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]
Message-Id: <1153193513.4533.3.camel@testmachine>
Date:	Tue, 18 Jul 2006 05:31:53 +0200
From:	Arjan van de Ven <arjan@...radead.org>
To:	Joshua Hudson <joshudson@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: How to explain to lock validator: locking inodes in inode order

On Mon, 2006-07-17 at 19:24 -0700, Joshua Hudson wrote:
> Code does this:
> 
> /* Lock two items. See locking.txt */
> static inline void kb0_lock2m(struct kb0_idata *m1, struct kb0_idata *m2)
> {
>         if (m1->vi.i_ino > m2->vi.i_ino)
>                 mutex_lock(&m2->k_mutex);
>         mutex_lock(&m1->k_mutex);
>         if (m1->vi.i_ino < m2->vi.i_ino)
>                 mutex_lock(&m2->k_mutex);
> }
> 
> Not sure how to explain to the lock validator that this code can never deadlock.

you're sure it can;t? (which fs is this btw?)

all places in the kernel that take this mutex in that order only do it
in i_ino order, including all directory operations like cross directory
rename?

(if so you can explain normal parent/child nesting, but only if so)

-
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