diff options
author | Andrey Vagin <avagin@openvz.org> | 2013-04-09 09:33:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:09:50 -0400 |
commit | e9c5d8a562f01b211926d70443378eb14b29a676 (patch) | |
tree | 7cd74c19415b6390b44110ec3fe756deaabd15d3 /fs/namespace.c | |
parent | ccf932042fa7785832d8989ba1369cd7c7f5d7a1 (diff) |
mnt: release locks on error path in do_loopback
do_loopback calls lock_mount(path) and forget to unlock_mount
if clone_mnt or copy_mnt fails.
[ 77.661566] ================================================
[ 77.662939] [ BUG: lock held when returning to user space! ]
[ 77.664104] 3.9.0-rc5+ #17 Not tainted
[ 77.664982] ------------------------------------------------
[ 77.666488] mount/514 is leaving the kernel with locks still held!
[ 77.668027] 2 locks held by mount/514:
[ 77.668817] #0: (&sb->s_type->i_mutex_key#7){+.+.+.}, at: [<ffffffff811cca22>] lock_mount+0x32/0xe0
[ 77.671755] #1: (&namespace_sem){+++++.}, at: [<ffffffff811cca3a>] lock_mount+0x4a/0xe0
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 50ca17d3cb45..6c7d31eebba4 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1686,7 +1686,7 @@ static int do_loopback(struct path *path, const char *old_name, | |||
1686 | 1686 | ||
1687 | if (IS_ERR(mnt)) { | 1687 | if (IS_ERR(mnt)) { |
1688 | err = PTR_ERR(mnt); | 1688 | err = PTR_ERR(mnt); |
1689 | goto out; | 1689 | goto out2; |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | err = graft_tree(mnt, path); | 1692 | err = graft_tree(mnt, path); |