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:	Thu, 17 Jan 2008 09:17:35 +0800
From:	"Dave Young" <hidave.darkstar@...il.com>
To:	"Jarek Poplawski" <jarkao2@...il.com>
Cc:	"Greg KH" <gregkh@...e.de>, stefanr@...6.in-berlin.de,
	david-b@...bell.net, stern@...land.harvard.edu,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class

On Jan 16, 2008 4:34 PM, Jarek Poplawski <jarkao2@...il.com> wrote:
> On Wed, Jan 16, 2008 at 09:03:03AM +0800, Dave Young wrote:
> ...
> > The lockdep warining was posted in the below thread, actually, I have
> > built and run this patced kernel for several days, there's no more
> > warnings.
> > http://lkml.org/lkml/2008/1/3/2
>
> Right... But, with something like this:
>
> ... have_some_fun(... cls)
> {
>         mutex_lock_nested(&cls->mutex, SINGLE_DEPTH_NESTING);
>         have_other_fun(cls);
>         mutex_unlock(&cls->mutex);
>
> }
>
> ... have_more_fun(...)
> {
>         ...
>
>         mutex_init(&cls->mutex);
>
>         mutex_lock(&cls->mutex);
>         have_some_fun(cls);
>         mutex_unlock(&cls->mutex);
> }
>
> probably you wouldn't get any lockdep warning too...

Sorry for late reply.
Actually, I don't know much about lockdep. Could you tell how to use
it properly in this scenario?

>
> Of course, if we know all the locking is right such proper lockdep
> annotating shouldn't matter too much. (And of course this could be
> improved later.)
>
> 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