aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/netvsc_drv.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2016-10-11 10:56:45 -0700
committerDavid S. Miller <davem@davemloft.net>2016-10-13 10:26:43 -0400
commitab102b80cef28c20b3ef7794806c3a982c6444fc (patch)
treef1f4ef200fb7180cccc07d88978c1d4ff42aae92 /drivers/net/hyperv/netvsc_drv.c
parentxen-netback: fix guest Rx stall detection (after guest Rx refactor) (diff)
downloadlinux-dev-ab102b80cef28c20b3ef7794806c3a982c6444fc.tar.xz
linux-dev-ab102b80cef28c20b3ef7794806c3a982c6444fc.zip
net_sched: reorder pernet ops and act ops registrations
Krister reported a kernel NULL pointer dereference after tcf_action_init_1() invokes a_o->init(), it is a race condition where one thread calling tcf_register_action() to initialize the netns data after putting act ops in the global list and the other thread searching the list and then calling a_o->init(net, ...). Fix this by moving the pernet ops registration before making the action ops visible. This is fine because: a) we don't rely on act_base in pernet ops->init(), b) in the worst case we have a fully initialized netns but ops is still not ready so new actions still can't be created. Reported-by: Krister Johansen <kjlx@templeofstupid.com> Tested-by: Krister Johansen <kjlx@templeofstupid.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions