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]
Date:	Mon, 6 Jul 2009 01:35:30 -0400
From:	Amerigo Wang <amwang@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Heiko Carstens <heiko.carstens@...ibm.com>,
	Amerigo Wang <amwang@...hat.com>,
	linux-fsdevel@...r.kernel.org, akpm@...ux-foundation.org,
	Al Viro <viro@...iv.linux.org.uk>,
	Miklos Szeredi <mszeredi@...e.cz>
Subject: [Patch] pipe: use file_update_time() when hold i_mutex


file_update_time() should be called with i_mutex held,
move it before mutex_unlock().

Signed-off-by: WANG Cong <amwang@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Miklos Szeredi <mszeredi@...e.cz>

---
diff --git a/fs/pipe.c b/fs/pipe.c
index f7dd21a..724b035 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -602,13 +602,14 @@ redo2:
 		pipe->waiting_writers--;
 	}
 out:
+	if (ret > 0)
+		file_update_time(filp);
+
 	mutex_unlock(&inode->i_mutex);
 	if (do_wakeup) {
 		wake_up_interruptible_sync(&pipe->wait);
 		kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
 	}
-	if (ret > 0)
-		file_update_time(filp);
 	return ret;
 }
 
--
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