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:   Tue, 25 Feb 2020 11:32:44 +0100
From:   Jan Kara <jack@...e.cz>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Jan Kara <jack@...e.cz>, 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 24-02-20 11:46:55, Christoph Hellwig wrote:
> 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.

Fair enough, I'll switch to WARN_ON_ONCE here. Thanks for the review.

								Honza

-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ