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, 9 Sep 2010 06:07:26 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, reiserfs-devel@...r.kernel.org,
	Christoph Hellwig <hch@....de>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [Bug] possible circular locking in reiserfs_unpack

On Thu, Sep 09, 2010 at 03:53:52AM +0200, Frederic Weisbecker wrote:
> On Wed, Sep 08, 2010 at 03:37:30PM -0700, Andrew Morton wrote:
> > On Sun, 5 Sep 2010 13:31:21 +0200
> > Jarek Poplawski <jarkao2@...il.com> wrote:
> > 
> > > Hi,
> > > I get this warning on every lilo write with 2.6.35.4 and a bit/git
> > > later too.
> > > 
> > 
> > Can you tell us the latest kernel version which did *not* have this
> > bug?  That way we can narrow the problem down a bit.

I'll try if Frederic's patch doesn't help. But, generally, it seems
with this kind of (not too long) lockdep info it should be much faster
to have a look of somebody with a basic reiserfs locking knowledge.;-)

> > 
> > Thanks.
> 
> 
> 
> Ah, when you see &REISERFS_SB(s)->lock in a bug report, don't hesitate to blame me :-)
> 
> This is a problem resulting from the bkl conversion to a mutex that introduced
> a lot of new locking dependencies. Most of them have been fixed, but for less
> tested paths like ioctl, we hear about it later.
> 
> Does the following patch fixes the issue?
> If so, I'll make a proper changelog and put the appropriate 2.6.33-35 stable
> tags for the backport.

I should be able to test it when back home (within 9 hours).

Thanks,
Jarek P.

> 
> Thnaks!
> 
> 
> diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
> index f53505d..679d502 100644
> --- a/fs/reiserfs/ioctl.c
> +++ b/fs/reiserfs/ioctl.c
> @@ -188,7 +188,7 @@ int reiserfs_unpack(struct inode *inode, struct file *filp)
>  	/* we need to make sure nobody is changing the file size beneath
>  	 ** us
>  	 */
> -	mutex_lock(&inode->i_mutex);
> +	reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb);
>  	reiserfs_write_lock(inode->i_sb);
>  
>  	write_from = inode->i_size & (blocksize - 1);
> 
--
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