[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpXA7q9_WADayWiHgqsz=VfhNqZr42TL0F+N2XK+toEEOQ@mail.gmail.com>
Date: Fri, 8 Sep 2017 12:35:51 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Xin Long <lucien.xin@...il.com>
Cc: network dev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Florian Westphal <fw@...len.de>
Subject: Re: [PATCH net] netlink: access nlk groups safely in netlink bind and getname
On Tue, Sep 5, 2017 at 8:53 PM, Xin Long <lucien.xin@...il.com> 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.
Powered by blists - more mailing lists