* [Cluster-devel] [GFS2 PATCH] - kernel panic with small gfs2 filesystems - 1 RG
[not found] <f9e5e94f-eaa0-416c-92cd-52b66442a32d@zmail12.collab.prod.int.phx2.redhat.com>
@ 2012-07-18 15:56 ` Abhijith Das
2012-07-18 16:16 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Abhijith Das @ 2012-07-18 15:56 UTC (permalink / raw)
To: cluster-devel.redhat.com
In the unlikely setup where there's only one resource group in the gfs2 filesystem, gfs2_rgrpd_get_next() returns a NULL rgd that is not dealt with properly, causing a kernel NULL ptr dereference. This patch fixes this issue.
This bug was reported in rhel6: https://bugzilla.redhat.com/show_bug.cgi?id=838638
Signed-off-by: Abhi Das <adas@redhat.com>
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index e53d0a1..fb70792 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1276,6 +1276,7 @@ int gfs2_inplace_reserve(struct gfs2_inode *ip, u32 requested)
/* fall through */
case GLR_TRYFAILED:
rgd = gfs2_rgrpd_get_next(rgd);
+ rgd = rgd ? : begin; /* if NULL, wrap */
if (rgd != begin) /* If we didn't wrap */
break;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [GFS2 PATCH] - kernel panic with small gfs2 filesystems - 1 RG
2012-07-18 15:56 ` [Cluster-devel] [GFS2 PATCH] - kernel panic with small gfs2 filesystems - 1 RG Abhijith Das
@ 2012-07-18 16:16 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2012-07-18 16:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Now in the -nmw tree. Thanks,
Steve.
On Wed, 2012-07-18 at 11:56 -0400, Abhijith Das wrote:
> In the unlikely setup where there's only one resource group in the gfs2 filesystem, gfs2_rgrpd_get_next() returns a NULL rgd that is not dealt with properly, causing a kernel NULL ptr dereference. This patch fixes this issue.
>
> This bug was reported in rhel6: https://bugzilla.redhat.com/show_bug.cgi?id=838638
>
> Signed-off-by: Abhi Das <adas@redhat.com>
>
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index e53d0a1..fb70792 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -1276,6 +1276,7 @@ int gfs2_inplace_reserve(struct gfs2_inode *ip, u32 requested)
> /* fall through */
> case GLR_TRYFAILED:
> rgd = gfs2_rgrpd_get_next(rgd);
> + rgd = rgd ? : begin; /* if NULL, wrap */
> if (rgd != begin) /* If we didn't wrap */
> break;
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-18 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <f9e5e94f-eaa0-416c-92cd-52b66442a32d@zmail12.collab.prod.int.phx2.redhat.com>
2012-07-18 15:56 ` [Cluster-devel] [GFS2 PATCH] - kernel panic with small gfs2 filesystems - 1 RG Abhijith Das
2012-07-18 16:16 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).