linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method
@ 2015-03-19 11:30 Dmitry V. Levin
  2015-11-18 17:42 ` [RESEND PATCH] " Dmitry V. Levin
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry V. Levin @ 2015-03-19 11:30 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel

Explicitly check show_devname method return code and bail out in case
of an error.  This fixes regression introduced by commit 9d4d65748a5c.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 fs/proc_namespace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 8db932d..a5644c4 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -196,17 +196,19 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt)
 	if (sb->s_op->show_devname) {
 		seq_puts(m, "device ");
 		err = sb->s_op->show_devname(m, mnt_path.dentry);
+		if (err)
+			goto out;
 	} else {
 		if (r->mnt_devname) {
 			seq_puts(m, "device ");
 			mangle(m, r->mnt_devname);
 		} else
 			seq_puts(m, "no device");
 	}
 
 	/* mount point */
 	seq_puts(m, " mounted on ");
 	/* mountpoints outside of chroot jail will give SEQ_SKIP on this */
 	err = seq_path_root(m, &mnt_path, &p->root, " \t\n\\");
 	if (err)
 		goto out;
-- 
ldv

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-03-16 16:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-19 11:30 [PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method Dmitry V. Levin
2015-11-18 17:42 ` [RESEND PATCH] " Dmitry V. Levin
2015-11-18 18:02   ` Mateusz Guzik
2015-11-18 21:57     ` [PATCH 1/3] vfs: show_vfsmnt: remove redundant initialization of error code Dmitry V. Levin
2016-01-11 15:36       ` [RESEND PATCH " Dmitry V. Levin
2015-11-18 21:58     ` [PATCH 2/3] vfs: show_mountinfo: cleanup error code checks Dmitry V. Levin
2016-01-11 15:37       ` [RESEND PATCH " Dmitry V. Levin
2015-11-18 21:58     ` [PATCH 3/3] vfs: show_vfsstat: remove redundant initialization and check of error code Dmitry V. Levin
2016-01-11 15:37       ` [RESEND PATCH " Dmitry V. Levin
2015-12-02 17:20     ` [RESEND v2 PATCH 1/4] vfs: show_vfsstat: do not ignore errors from show_devname method Dmitry V. Levin
2015-12-02 17:20     ` [RESEND PATCH 2/4] vfs: show_vfsmnt: remove redundant initialization of error code Dmitry V. Levin
2015-12-02 17:20     ` [RESEND PATCH 3/4] vfs: show_mountinfo: cleanup error code checks Dmitry V. Levin
2015-12-02 17:20     ` [RESEND PATCH 4/4] vfs: show_vfsstat: remove redundant initialization and check of error code Dmitry V. Levin
2016-01-11 15:36   ` [RESEND v2 PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method Dmitry V. Levin
2016-02-19  1:56     ` [RESEND v3 " Dmitry V. Levin
2016-03-16 16:31       ` [RESEND v4 " Dmitry V. Levin
2016-03-16 16:49         ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).