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: <19368.33225.516492.542519@notabene.brown>
Date:	Tue, 23 Mar 2010 19:54:33 +1100
From:	Neil Brown <neilb@...e.de>
To:	Mark Fasheh <mfasheh@...e.com>,
	Joel Becker <joel.becker@...cle.com>
Cc:	Sachin Prabhu <sprabhu@...hat.com>
Subject: [PATCH] ocfs2: Skip check for mandatory locks when unlocking


The nfs bug fixed by 0800c5f7a499a8961c3868e95cc4cf1715166457
and the 9p bug fixed by f78233dd44a110c574fe760ad6f9c1e8741a0d00
and the gfs2 bug fixed by 720e7749279bde0d08684b1bb4e7a2eedeec6394

also needs to be fixed for ocfs2.  This patch does that.

Hopefully this is the last filesystem with this bug :-)

Signed-off-by: NeilBrown <neilb@...e.de>
Cc: stable@...nel.org

diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c
index 544ac62..923d3d8 100644
--- a/fs/ocfs2/locks.c
+++ b/fs/ocfs2/locks.c
@@ -113,7 +113,8 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl)
 
 	if (!(fl->fl_flags & FL_FLOCK))
 		return -ENOLCK;
-	if (__mandatory_lock(inode))
+	if (__mandatory_lock(inode) &&
+	    fl->fl_type != F_UNLCK)
 		return -ENOLCK;
 
 	if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) ||
--
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