diff options
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 52622517e0d8..cf64c1ffa4cd 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/export.h> | ||
26 | #include <net/tcp.h> | 27 | #include <net/tcp.h> |
27 | #include <net/udp.h> | 28 | #include <net/udp.h> |
28 | #include <asm/unaligned.h> | 29 | #include <asm/unaligned.h> |
@@ -762,7 +763,7 @@ int __netpoll_setup(struct netpoll *np) | |||
762 | } | 763 | } |
763 | 764 | ||
764 | /* last thing to do is link it to the net device structure */ | 765 | /* last thing to do is link it to the net device structure */ |
765 | rcu_assign_pointer(ndev->npinfo, npinfo); | 766 | RCU_INIT_POINTER(ndev->npinfo, npinfo); |
766 | 767 | ||
767 | return 0; | 768 | return 0; |
768 | 769 | ||
@@ -903,7 +904,7 @@ void __netpoll_cleanup(struct netpoll *np) | |||
903 | if (ops->ndo_netpoll_cleanup) | 904 | if (ops->ndo_netpoll_cleanup) |
904 | ops->ndo_netpoll_cleanup(np->dev); | 905 | ops->ndo_netpoll_cleanup(np->dev); |
905 | 906 | ||
906 | rcu_assign_pointer(np->dev->npinfo, NULL); | 907 | RCU_INIT_POINTER(np->dev->npinfo, NULL); |
907 | 908 | ||
908 | /* avoid racing with NAPI reading npinfo */ | 909 | /* avoid racing with NAPI reading npinfo */ |
909 | synchronize_rcu_bh(); | 910 | synchronize_rcu_bh(); |