linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: Check return value of ->show_devname
@ 2015-01-21 12:46 Jan Kara
  2015-01-21 12:46 ` [PATCH] seq_file: Remove pointless assignment in seq_read() Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2015-01-21 12:46 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel, Andrew Morton, Jan Kara

show_vfsstat() isn't checking the return value of ->show_devname().
Check it and bail out properly.

Coverity-id: 1260113
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/proc_namespace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 0f96f71ab32b..a29f17a9070f 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -195,6 +195,8 @@ 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 ");
-- 
2.1.2


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

end of thread, other threads:[~2015-01-21 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 12:46 [PATCH] fs: Check return value of ->show_devname Jan Kara
2015-01-21 12:46 ` [PATCH] seq_file: Remove pointless assignment in seq_read() Jan Kara

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