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: <20150330125946.GE32051@twin.jikos.cz>
Date:	Mon, 30 Mar 2015 14:59:46 +0200
From:	David Sterba <dsterba@...e.cz>
To:	Omar Sandoval <osandov@...ndov.com>
Cc:	Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
	David Sterba <dsterba@...e.cz>,
	Filipe Manana <fdmanana@...e.com>, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: unlock i_mutex after attempting to delete
 subvolume during send

On Sat, Mar 28, 2015 at 04:02:06AM -0700, Omar Sandoval wrote:
> Whenever the check for a send in progress introduced in commit
> 521e0546c970 (btrfs: protect snapshots from deleting during send) is
> hit, we return without unlocking inode->i_mutex. This is easy to see
> with lockdep enabled:
> 
> [  +0.000059] ================================================
> [  +0.000028] [ BUG: lock held when returning to user space! ]
> [  +0.000029] 4.0.0-rc5-00096-g3c435c1 #93 Not tainted
> [  +0.000026] ------------------------------------------------
> [  +0.000029] btrfs/211 is leaving the kernel with locks still held!
> [  +0.000029] 1 lock held by btrfs/211:
> [  +0.000023]  #0:  (&type->i_mutex_dir_key){+.+.+.}, at: [<ffffffff8135b8df>] btrfs_ioctl_snap_destroy+0x2df/0x7a0
> 
> Make sure we unlock it in the error path.
> 
> Signed-off-by: Omar Sandoval <osandov@...ndov.com>

Reviewed-by: David Sterba <dsterba@...e.cz>
--
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