diff options
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 3ba526b56fe3..7abeb7ceaa4c 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -711,13 +711,18 @@ static void rx_queue_release(struct kobject *kobj) map = rcu_dereference_raw(queue->rps_map); - if (map) + if (map) { + RCU_INIT_POINTER(queue->rps_map, NULL); call_rcu(&map->rcu, rps_map_release); + } flow_table = rcu_dereference_raw(queue->rps_flow_table); - if (flow_table) + if (flow_table) { + RCU_INIT_POINTER(queue->rps_flow_table, NULL); call_rcu(&flow_table->rcu, rps_dev_flow_table_release); + } + memset(kobj, 0, sizeof(*kobj)); dev_put(queue->dev); } |