Thread (5 messages) flat view 5 messages, 3 authors, 2017-09-11

Re: [PATCH net] netlink: access nlk groups safely in netlink bind and getname

From: Cong Wang <hidden>
Date: 2017-09-08 19:36:12

On Tue, Sep 5, 2017 at 8:53 PM, Xin Long [off-list ref] wrote:
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.
This looks very odd.

netlink_lock_table() should be protecting nl_table, why
it also protects nlk->groups?? For me it looks like you
need lock_sock() instead.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help