Skip to content

Commit 3df629d

Browse files
author
Al Viro
committed
gfs2_meta: ->mount() can get NULL dev_name
get in sync with mount_bdev() handling of the same Reported-by: syzbot+c54f8e94e6bba03b04e9@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 74dd7c9 commit 3df629d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/gfs2/ops_fstype.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,9 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
13331333
struct path path;
13341334
int error;
13351335

1336+
if (!dev_name || !*dev_name)
1337+
return ERR_PTR(-EINVAL);
1338+
13361339
error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
13371340
if (error) {
13381341
pr_warn("path_lookup on %s returned error %d\n",

0 commit comments

Comments
 (0)