提交 48f8f711 编写于 作者: A Abhi Das 提交者: Steven Whitehouse

GFS2: check NULL return value in gfs2_ok_to_move

gfs2_lookupi() can return NULL if the path to the root is broken by
another rename/rmdir. In this case gfs2_ok_to_move() must check for
this NULL pointer and return error.

Resolves: rhbz#1060246
Signed-off-by: NAbhi Das <adas@redhat.com>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 cb94eb06
......@@ -1299,6 +1299,10 @@ static int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to)
}
tmp = gfs2_lookupi(dir, &gfs2_qdotdot, 1);
if (!tmp) {
error = -ENOENT;
break;
}
if (IS_ERR(tmp)) {
error = PTR_ERR(tmp);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册