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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Sep 2012 12:10:09 +0200
From:	Maarten Lankhorst <maarten.lankhorst@...onical.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	mingo@...nel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] lockdep: Check if nested lock is actually held

Hey,

Op 13-09-12 11:59, Peter Zijlstra schreef:
> On Thu, 2012-09-13 at 11:39 +0200, Maarten Lankhorst wrote:
>> It is considered good form to lock the lock you claim to be nested in.
> Uhm yeah.. cute. You actually found a site where this triggered?
>
Not in mainline, I was working on some lockdep annotations for my work on
moving ttm reservations to base kernel, and I wrote a whole bunch of tests
to stress interaction between reservations and locks, one of the tests I
was doing was taking a spinlock without the nested object:

static void reservation_test_fence_nest_unreserved(void)
{
	struct reservation_object o;

	reservation_object_init(&o);

	spin_lock_nest_lock(&o.fence_lock, &o);
	spin_unlock(&o.fence_lock);
}

I would have expected it to fail, and the patch fixed it. As a nice side effect
it also complained about another hack I was doing elsewhere with reservations to
tests for deadlocks, and it forced me to fix it in a slightly less hacky way.

~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