projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ceedea
)
snmp: fix SNMP_ADD_STATS()
author
Eric Dumazet
<
[email protected]
>
Wed, 23 Jun 2010 00:32:03 +0000
(
00:32
+0000)
committer
David S. Miller
<
[email protected]
>
Wed, 23 Jun 2010 18:48:19 +0000
(11:48 -0700)
commit
aa2ea0586d9d
(tcp: fix outsegs stat for TSO segments) incorrectly
assumed SNMP_ADD_STATS() was used from BH context.
Fix this using mib[!in_softirq()] instead of mib[0]
Signed-off-by: Eric Dumazet <
[email protected]
>
CC: Tom Herbert <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
include/net/snmp.h
patch
|
blob
|
history
diff --git
a/include/net/snmp.h
b/include/net/snmp.h
index 92456f1035f52bd6e1a6c8e7733c7737d58d15e1..899003d18db9e57ab8813176f4ea896a27376c49 100644
(file)
--- a/
include/net/snmp.h
+++ b/
include/net/snmp.h
@@
-134,7
+134,7
@@
struct linux_xfrm_mib {
#define SNMP_ADD_STATS_USER(mib, field, addend) \
this_cpu_add(mib[1]->mibs[field], addend)
#define SNMP_ADD_STATS(mib, field, addend) \
- this_cpu_add(mib[
0
]->mibs[field], addend)
+ this_cpu_add(mib[
!in_softirq()
]->mibs[field], addend)
/*
* Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr"
* to make @ptr a non-percpu pointer.