[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1184765724.3864.4.camel@johannes.berg>
Date: Wed, 18 Jul 2007 15:35:24 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Patrick McHardy <kaber@...sh.net>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
Zhang Rui <rui.zhang@...el.com>, jamal <hadi@...erus.ca>
Subject: Re: [patch 2/3] netlink: allow removing multicast groups
On Tue, 2007-07-17 at 17:50 +0200, Patrick McHardy wrote:
> Having the caller lock the table would save lots of atomic operation
> in case of netlink_clear_multicast_users.
Good point.
> > +void netlink_clear_multicast_users(int unit, unsigned int group)
>
> Same as in the last patch, passing the kernel socket would be nicer IMO.
Changed.
> > + read_lock(&nl_table_lock);
>
> Won't this deadlock? netlink_table_grab takes a write-lock.
I guess it's valid to update a read lock to a write lock? Or I was just
lucky on UP. But moving the lock out of netlink_clear_multicast_users()
made this obvious and I just use the write lock now.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)
Powered by blists - more mailing lists