From: David S. Miller Date: Thu, 9 Nov 2017 01:03:10 +0000 (+0900) Subject: Merge branch 'net-sched-race-fix' X-Git-Tag: v4.14~16^2~1 X-Git-Url: http://git.ipfire.org/?p=people%2Farne_f%2Fkernel.git;a=commitdiff_plain;h=623859ae06b85cabba79ce78f0d49e67783d4c34 Merge branch 'net-sched-race-fix' Cong Wang says: ==================== net_sched: close the race between call_rcu() and cleanup_net() This patchset tries to fix the race between call_rcu() and cleanup_net() again. Without holding the netns refcnt the tc_action_net_exit() in netns workqueue could be called before filter destroy works in tc filter workqueue. This patchset moves the netns refcnt from tc actions to tcf_exts, without breaking per-netns tc actions. Patch 1 reverts the previous fix, patch 2 introduces two new API's to help to address the bug and the rest patches switch to the new API's. Please see each patch for details. I was not able to reproduce this bug, but now after adding some delay in filter destroy work I manage to trigger the crash. After this patchset, the crash is not reproducible any more and the debugging printk's show the order is expected too. ==================== Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Reported-by: Lucas Bates Cc: Lucas Bates Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- 623859ae06b85cabba79ce78f0d49e67783d4c34