aboutsummaryrefslogtreecommitdiff
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index c02a08da6d4..996787bca17 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -732,6 +732,9 @@ int netpoll_setup(struct netpoll *np)
/* last thing to do is link it to the net device structure */
ndev->npinfo = npinfo;
+ /* avoid racing with NAPI reading npinfo */
+ synchronize_rcu();
+
return 0;
release: