All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND v2 PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method
Date: Mon, 11 Jan 2016 18:36:07 +0300	[thread overview]
Message-ID: <20160111153607.GA30070@altlinux.org> (raw)
In-Reply-To: <20151118174248.GA13411@altlinux.org>

Date: Thu, 19 Mar 2015 11:10:54 +0000

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 8ebd9a3..876459559 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -197,17 +197,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

  parent reply	other threads:[~2016-01-11 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Dmitry V. Levin [this message]
2016-02-19  1:56     ` [RESEND v3 PATCH] vfs: show_vfsstat: do not ignore errors from show_devname method Dmitry V. Levin
2016-03-16 16:31       ` [RESEND v4 " Dmitry V. Levin
2016-03-16 16:49         ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160111153607.GA30070@altlinux.org \
    --to=ldv@altlinux.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.