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>] [day] [month] [year] [list]
Message-ID: <20111202055658.22371.21820.stgit@rabbit.intern.cm-ag>
Date:	Fri, 02 Dec 2011 06:56:58 +0100
From:	Max Kellermann <mk@...all.com>
To:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	max@...mpel.org
Subject: [PATCH] fs/namespace: waiting for mutex in lock_mount() is "killable"

Allow killing the process while it's indirectly waiting for the NFS
server's response.
---
 fs/namespace.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index e5e1c7d..9560bec 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1651,8 +1651,13 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
 static int lock_mount(struct path *path)
 {
 	struct vfsmount *mnt;
+	int err;
+
 retry:
-	mutex_lock(&path->dentry->d_inode->i_mutex);
+	err = mutex_lock_killable(&path->dentry->d_inode->i_mutex);
+	if (unlikely(err))
+		return err;
+
 	if (unlikely(cant_mount(path->dentry))) {
 		mutex_unlock(&path->dentry->d_inode->i_mutex);
 		return -ENOENT;

--
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