* 2.6 patch] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference
@ 2006-10-19 13:27 Adrian Bunk
2006-10-19 14:09 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2006-10-19 13:27 UTC (permalink / raw)
To: swhiteho; +Cc: cluster-devel, linux-kernel
Don't dereference new->s_root when we do know it's NULL.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6/fs/gfs2/ops_fstype.c.old 2006-10-19 15:24:23.000000000 +0200
+++ linux-2.6/fs/gfs2/ops_fstype.c 2006-10-19 15:24:32.000000000 +0200
@@ -793,10 +793,10 @@ static int fill_super_meta(struct super_
if (!new->s_root) {
fs_err(sdp, "can't get root dentry\n");
error = -ENOMEM;
iput(inode);
- }
- new->s_root->d_op = &gfs2_dops;
+ } else
+ new->s_root->d_op = &gfs2_dops;
return error;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6 patch] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference
2006-10-19 13:27 2.6 patch] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference Adrian Bunk
@ 2006-10-19 14:09 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2006-10-19 14:09 UTC (permalink / raw)
To: Adrian Bunk; +Cc: cluster-devel, linux-kernel
Hi,
... and this one is pushed to the GFS2 git tree too. Thanks for the
patches,
Steve.
On Thu, 2006-10-19 at 15:27 +0200, Adrian Bunk wrote:
> Don't dereference new->s_root when we do know it's NULL.
>
> Spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> --- linux-2.6/fs/gfs2/ops_fstype.c.old 2006-10-19 15:24:23.000000000 +0200
> +++ linux-2.6/fs/gfs2/ops_fstype.c 2006-10-19 15:24:32.000000000 +0200
> @@ -793,10 +793,10 @@ static int fill_super_meta(struct super_
> if (!new->s_root) {
> fs_err(sdp, "can't get root dentry\n");
> error = -ENOMEM;
> iput(inode);
> - }
> - new->s_root->d_op = &gfs2_dops;
> + } else
> + new->s_root->d_op = &gfs2_dops;
>
> return error;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-19 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19 13:27 2.6 patch] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference Adrian Bunk
2006-10-19 14:09 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome