mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
gfs2_meta: ->mount() can get NULL dev_name
commit 3df629d873 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cf08282805
commit
63be2065bf
@@ -1352,6 +1352,9 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,
|
||||
struct path path;
|
||||
int error;
|
||||
|
||||
if (!dev_name || !*dev_name)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
|
||||
if (error) {
|
||||
pr_warn("path_lookup on %s returned error %d\n",
|
||||
|
||||
Reference in New Issue
Block a user