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:   Mon, 24 Feb 2020 11:46:55 -0800
From:   Christoph Hellwig <hch@...radead.org>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-ext4@...r.kernel.org, "J. R. Okajima" <hooanon05g@...il.com>
Subject: Re: [PATCH] ext2: Silence lockdep warning about reclaim under
 xattr_sem

On Mon, Feb 24, 2020 at 01:59:16PM +0100, Jan Kara wrote:
> +	/*
> +	 * We are the only ones holding inode reference. The xattr_sem should
> + 	 * better be unlocked! We could as well just not acquire xattr_sem at
> +	 * all but this makes the code more futureproof. OTOH we need trylock
> +	 * here to avoid false-positive warning from lockdep about reclaim
> +	 * circular dependency.
> +	 */
> +	if (WARN_ON(!down_write_trylock(&EXT2_I(inode)->xattr_sem)))
> +		return;

Shouldn't this be a WARN_ON_ONCE?  Just in case the impossible happens
that avoids spamming dmesg over and over.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ