drivers: shs: add locking around generic netlink handlers
Adds locking around the structures traversed in the generic netlink
handlers. The ep lock is needed around the genl function to move flows,
and the ht lock is needed around the set segmentation genl function.
This is to prevent the race scenario where the ep/ht tables are modified
while the generic netlink runs in another context. Fixes this:
[29292.841793] [006b6b6b6b6b6b43] address between user and kernel address ranges
[29292.849475] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[29292.928088] pc : rmnet_shs_wq_set_flow_segmentation+0x4c/0x228 [rmnet_shs]
[29292.935145] lr : rmnet_shs_genl_set_flow_segmentation+0x5c/0x3a0 [rmnet_shs]
[29293.027717] Call trace:
[29293.030241] rmnet_shs_wq_set_flow_segmentation+0x4c/0x228 [rmnet_shs]
[29293.036941] rmnet_shs_genl_set_flow_segmentation+0x5c/0x3a0 [rmnet_shs]
[29293.043828] genl_rcv_msg+0x3d4/0x410
[29293.047601] netlink_rcv_skb+0xac/0x128
[29293.051544] genl_rcv+0x34/0x48
[29293.054775] netlink_unicast+0x1c0/0x268
[29293.058803] netlink_sendmsg+0x308/0x368
Change-Id: Ibc7143c6e3047afb9abc574a9ddb06d597895b7c
Signed-off-by:
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Loading
Please sign in to comment