提交 6c93fd1e 编写于 作者: R Russell Cattelan 提交者: Steven Whitehouse

[GFS2] BZ 217008 fsfuzzer fix.

Update the quilt header comments to match the
code changes.

Change gfs2_lookup_simple to return an error in the case
of a NULL inode.
The callers of gfs2_lookup_simple do not check for NULL
in the no entry case and such would end up dereferencing a NULL ptr.

This fixes:
http://projects.info-pull.com/mokb/MOKB-15-11-2006.htmlSigned-off-by: NRussell Cattelan <cattelan@redhat.com>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 49686f71
...@@ -361,8 +361,18 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff) ...@@ -361,8 +361,18 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff)
struct inode *gfs2_lookup_simple(struct inode *dip, const char *name) struct inode *gfs2_lookup_simple(struct inode *dip, const char *name)
{ {
struct qstr qstr; struct qstr qstr;
struct inode *inode;
gfs2_str2qstr(&qstr, name); gfs2_str2qstr(&qstr, name);
return gfs2_lookupi(dip, &qstr, 1, NULL); inode = gfs2_lookupi(dip, &qstr, 1, NULL);
/* gfs2_lookupi has inconsistent callers: vfs
* related routines expect NULL for no entry found,
* gfs2_lookup_simple callers expect ENOENT
* and do not check for NULL.
*/
if (inode == NULL)
return ERR_PTR(-ENOENT);
else
return inode;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册