diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-30 08:08:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-30 08:08:40 -0700 |
commit | 2d175d438f297bcd75a7b88baf3a304137047af6 (patch) | |
tree | 22fa745d13f85dd8fd74bb35ba0e3bf01cab12f8 /net/core/dev.c | |
parent | c2db6376c934b9e4c0b905bee5222d5475bbd98a (diff) | |
parent | 502ef38da15d817f8e67acefc12dc2212f7f8aa1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[TIPC]: Add tipc_config.h to include/linux/Kbuild.
[WAN]: lmc_ioctl: don't return with locks held
[SUNRPC]: fix rpc debugging
[TCP]: Saner thash_entries default with much memory.
[SUNRPC] rpc_rdma: we need to cast u64 to unsigned long long for printing
[IPv4] SNMP: Refer correct memory location to display ICMP out-going statistics
[NET]: Fix error reporting in sys_socketpair().
[NETFILTER]: nf_ct_alloc_hashtable(): use __GFP_NOWARN
[NET]: Fix race between poll_napi() and net_rx_action()
[TCP] MD5: Remove some more unnecessary casting.
[TCP] vegas: Fix a bug in disabling slow start by gamma parameter.
[IPVS]: use proper timeout instead of fixed value
[IPV6] NDISC: Fix setting base_reachable_time_ms variable.
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 853c8b575f1d..02e7d8377c4a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2172,7 +2172,15 @@ static void net_rx_action(struct softirq_action *h) weight = n->weight; - work = n->poll(n, weight); + /* This NAPI_STATE_SCHED test is for avoiding a race + * with netpoll's poll_napi(). Only the entity which + * obtains the lock and sees NAPI_STATE_SCHED set will + * actually make the ->poll() call. Therefore we avoid + * accidently calling ->poll() when NAPI is not scheduled. + */ + work = 0; + if (test_bit(NAPI_STATE_SCHED, &n->state)) + work = n->poll(n, weight); WARN_ON_ONCE(work > weight); |