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] [day] [month] [year] [list]
Date:	Thu, 07 Feb 2013 17:19:11 +0100
From:	Maarten Lankhorst <maarten.lankhorst@...onical.com>
To:	Ben Skeggs <skeggsb@...il.com>
CC:	Marcin Slusarz <marcin.slusarz@...il.com>,
	Peter Hurley <peter@...leysoftware.com>,
	nouveau@...ts.freedesktop.org,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	dri-devel@...ts.freedesktop.org,
	Daniel J Blueman <daniel@...ra.org>,
	Ben Skeggs <bskeggs@...hat.com>,
	Arend van Spriel <arend@...adcom.com>
Subject: Re: [PATCH] drm/nouveau: add lockdep annotations

Hey,

Op 05-02-13 21:52, Ben Skeggs schreef:
> On Mon, Feb 04, 2013 at 10:59:28PM +0100, Maarten Lankhorst wrote:
>> Op 04-02-13 22:30, Marcin Slusarz schreef:
>>> 1) Lockdep thinks all nouveau subdevs belong to the same class and can be
>>> locked in arbitrary order, which is not true (at least in general case).
>>> Tell it to distinguish subdevs by (o)class type.
>> Apart from this specific case, is there any other reason why we require being able to nest 2 subdev locks?
> I think I tend to prefer Marcin's fix for this actually.  The subdev's
> are completely separate classes of objects and as interaction between
> them increases (PM will be very much like this), we may very well
> require holding multiple subdev mutexes at once.
>
> Ben.
Depends, I think for this specific example I think my cleanup is better.

For the generic case you could use nested mutexes, which will give you a
different lockdep class when you need it. It's probably better to have those
cases where you do need to nest locking annotated:

mutex_lock_nested(&mutex, SINGLE_DEPTH_NESTING);

See also Documentation/lockdep-design.txt

~Maarten

--
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