lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ