dect
/
linux-2.6
Archived
13
0
Fork 0

GFS2: kernel panic with small gfs2 filesystems - 1 RG

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.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Abhijith Das 2012-07-18 11:56:59 -04:00 committed by Steven Whitehouse
parent 44b8db1386
commit 294f2ad5a5
1 changed files with 1 additions and 0 deletions

View File

@ -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;