diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-09-09 10:37:53 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-10 13:08:46 -0700 |
commit | 5251ef82993252da0f63616676905da38b40778a (patch) | |
tree | cbf94ed6cf85789793620d8bd136c61de728d175 /net/core/netpoll.c | |
parent | 4d092dd2041a5f328410ad16d63b8606c24e8604 (diff) | |
download | linux-stable-5251ef82993252da0f63616676905da38b40778a.tar.gz linux-stable-5251ef82993252da0f63616676905da38b40778a.tar.bz2 linux-stable-5251ef82993252da0f63616676905da38b40778a.zip |
net: make sure napi_list is safe for RCU traversal
netpoll needs to traverse dev->napi_list under RCU, make
sure it uses the right iterator and that removal from this
list is handled safely.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 2338753e936b..c310c7c1cef7 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -297,7 +297,7 @@ static int netpoll_owner_active(struct net_device *dev) { struct napi_struct *napi; - list_for_each_entry(napi, &dev->napi_list, dev_list) { + list_for_each_entry_rcu(napi, &dev->napi_list, dev_list) { if (napi->poll_owner == smp_processor_id()) return 1; } |