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-next>] [day] [month] [year] [list]
Message-Id: <1288180275-19941-1-git-send-email-jslaby@suse.cz>
Date:	Wed, 27 Oct 2010 13:51:15 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	hch@...era.com
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	jirislaby@...il.com
Subject: [PATCH] FS: hfsplus, fix lock imbalance

Stanse found that there is mutex_lock in a fail path of
hfsplus_ioctl_setflags (i.e. double lock + leaving a function in
locked state). So fix that.

Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Cc: Christoph Hellwig <hch@...era.com>
---
 fs/hfsplus/ioctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
index 5b4667e..40a85a3 100644
--- a/fs/hfsplus/ioctl.c
+++ b/fs/hfsplus/ioctl.c
@@ -92,7 +92,7 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
 	mark_inode_dirty(inode);
 
 out_unlock_inode:
-	mutex_lock(&inode->i_mutex);
+	mutex_unlock(&inode->i_mutex);
 out_drop_write:
 	mnt_drop_write(file->f_path.mnt);
 out:
-- 
1.7.3.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