From: Antoine Tenart Date: Thu, 18 Mar 2021 18:37:52 +0000 (+0100) Subject: net: NULL the old xps map entries when freeing them X-Git-Tag: microblaze-v5.14~96^2~495^2 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=75b2758abc355c410dd335d45b2d40f920e27cde;p=linux-2.6-microblaze.git net: NULL the old xps map entries when freeing them In __netif_set_xps_queue, old map entries from the old dev_maps are freed but their corresponding entry in the old dev_maps aren't NULLed. Fix this. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index d5f6ba209f1e..4961fc2e9b19 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2764,6 +2764,7 @@ int __netif_set_xps_queue(struct net_device *dev, const unsigned long *mask, continue; } + RCU_INIT_POINTER(dev_maps->attr_map[tci], NULL); kfree_rcu(map, rcu); } }