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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to