]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: access nlk groups safely in netlink bind and getname
authorXin Long <lucien.xin@gmail.com>
Wed, 6 Sep 2017 03:53:29 +0000 (11:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Sep 2017 04:22:54 +0000 (21:22 -0700)
commitb8c63cf03e91c35be8e6ecea3955fd6b03f7419e
tree3fcf22bd2c2e40f96e34df68dc69a1a2c707c1da
parent75aaa90312dd663a6b42061bae57581abb7ed875
netlink: access nlk groups safely in netlink bind and getname

Now there is no lock protecting nlk ngroups/groups' accessing in
netlink bind and getname. It's safe from nlk groups' setting in
netlink_release, but not from netlink_realloc_groups called by
netlink_setsockopt.

netlink_lock_table is needed in both netlink bind and getname when
accessing nlk groups.

Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c