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:	Sat, 19 Jan 2008 10:39:33 +0100
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Dave Young <hidave.darkstar@...il.com>
CC:	Kay Sievers <kay.sievers@...y.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Greg KH <gregkh@...e.de>, stefanr@...6.in-berlin.de,
	David Brownell <david-b@...bell.net>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct
 class

Dave Young wrote, On 01/18/2008 10:07 AM:

> On Jan 18, 2008 4:23 PM, Jarek Poplawski <jarkao2@...il.com> wrote:

>> On Fri, Jan 18, 2008 at 03:48:02PM +0800, Dave Young wrote:

...

>>> 1) Using CLASS_NORMAL/CLASS_PARENT/CLASS_CHILD will be enough.
>>> or
>>> 2) Simply add SINGLE_LEVEL_NESTING in class_device_add and other
>>> class_device functions because it is the only possible nest-lock place
>>> as I know.


Dave, after looking a bit at this it seems you could be "mostly" right
with this 2). Maybe I've missed something (I didn't verify this yet), but
it looks like +1 level (SINGLE_LEVEL_NESTING) could be needed in:
class_device_add() (as you did), but probably also class_device_del() and
class_device_destroy().

...But, there seems to be "little" problem, if there is used this recursion
with: class_intf->add()/remove() in class_device_add()/del()?! Then Kay
is right about possibility of deeper nesting. If this path is really used,
and any of these class_device_* functions with locking are called, then
this patch couldn't work like this. So, there is a question: how deep
nesting is currently used here?

Regards,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ