lkml.org 
[lkml]   [2018]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/18] sysfs: check return value of kernfs_get_tree()
Date
From: Eric Biggers <ebiggers@google.com>

Reported-by: syzbot+0977fcb74b8a12a967b8@syzkaller.appspotmail.com
Fixes: a5195193b1e5 ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context")
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/sysfs/mount.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 0a016dd49300a..1e1c0ccc6a367 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -27,6 +27,9 @@ static int sysfs_get_tree(struct fs_context *fc)
int ret;

ret = kernfs_get_tree(fc);
+ if (ret)
+ return ret;
+
if (kfc->new_sb_created)
fc->root->d_sb->s_iflags |= SB_I_USERNS_VISIBLE;
return 0;
--
2.18.0
\
 
 \ /
  Last update: 2018-07-08 23:10    [W:0.192 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site