lkml.org 
[lkml]   [2012]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 14/16] GFS2: kernel panic with small gfs2 filesystems - 1 RG
    Date
    From: Abhijith Das <adas@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.

    Signed-off-by: Abhi Das <adas@redhat.com>
    Signed-off-by: Steven Whitehouse <swhiteho@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;

    --
    1.7.4


    \
     
     \ /
      Last update: 2012-07-23 11:02    [W:0.023 / U:34.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site