From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 8 Oct 2018 01:07:24 +0100 From: Al Viro To: syzbot Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: general protection fault in getname_kernel Message-ID: <20181008000724.GB32577@ZenIV.linux.org.uk> References: <0000000000006533a60577ac1419@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0000000000006533a60577ac1419@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Sun, Oct 07, 2018 at 04:44:03PM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit: c1d84a1b42ef Merge git://git.kernel.org/pub/scm/linux/kern.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10f3c6a1400000 > kernel config: https://syzkaller.appspot.com/x/.config?x=c0af03fe452b65fb > dashboard link: https://syzkaller.appspot.com/bug?extid=c54f8e94e6bba03b04e9 > compiler: gcc (GCC) 8.0.1 20180413 (experimental) > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10688159400000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1162aa31400000 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+c54f8e94e6bba03b04e9@syzkaller.appspotmail.com Umm... See if this helps: diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index c2469833b4fb..6b84ef6ccff3 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1333,6 +1333,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",