aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index adf84dd8c7b..d676a561d98 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -760,7 +760,7 @@ int __netpoll_setup(struct netpoll *np)
760 } 760 }
761 761
762 /* last thing to do is link it to the net device structure */ 762 /* last thing to do is link it to the net device structure */
763 rcu_assign_pointer(ndev->npinfo, npinfo); 763 RCU_INIT_POINTER(ndev->npinfo, npinfo);
764 764
765 return 0; 765 return 0;
766 766
@@ -901,7 +901,7 @@ void __netpoll_cleanup(struct netpoll *np)
901 if (ops->ndo_netpoll_cleanup) 901 if (ops->ndo_netpoll_cleanup)
902 ops->ndo_netpoll_cleanup(np->dev); 902 ops->ndo_netpoll_cleanup(np->dev);
903 903
904 rcu_assign_pointer(np->dev->npinfo, NULL); 904 RCU_INIT_POINTER(np->dev->npinfo, NULL);
905 905
906 /* avoid racing with NAPI reading npinfo */ 906 /* avoid racing with NAPI reading npinfo */
907 synchronize_rcu_bh(); 907 synchronize_rcu_bh();