Re:Re: [PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-19 Thread Nixiaoming
On Fri, Sep 15, 2017 at 10:46 AM, Willem de Bruijn wrote: > > In case of failure we also need to unlink and free match. I > sent the following: > > http://patchwork.ozlabs.org/patch/813945/ + spin_lock(>bind_lock); + if (po->running && +

[PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-14 Thread nixiaoming
+0xa4/0xd4 Signed-off-by: nixiaoming <nixiaom...@huawei.com> Tested-by: wudesheng <dede...@huawei.com> --- net/packet/af_packet.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 54a18a8..7a52a3b 100644

[PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-13 Thread nixiaoming
race+0x0/0xf8 [] show_stack+0x20/0x28 [] dump_stack+0xac/0xe4 [] panic+0xf8/0x268 [] __unregister_prot_hook+0xa0/0x144 [] packet_set_ring+0x280/0x5b4 [] packet_setsockopt+0x320/0x950 [] SyS_setsockopt+0xa4/0xd4 Signed-off-by: nixiaoming <nixiaom...@huawei.com> Tested-by: wudesheng <dede..

[PATCH] net/packet: fix race condition between fanout_add and __unregister_prot_hook

2017-09-13 Thread nixiaoming
race+0x0/0xf8 [] show_stack+0x20/0x28 [] dump_stack+0xac/0xe4 [] panic+0xf8/0x268 [] __unregister_prot_hook+0xa0/0x144 [] packet_set_ring+0x280/0x5b4 [] packet_setsockopt+0x320/0x950 [] SyS_setsockopt+0xa4/0xd4 Signed-off-by: nixiaoming <nixiaom...@huawei.com> Tested-by: wudesheng <dede..