cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] - kernel panic with small gfs2 filesystems - 1 RG
Date: Wed, 18 Jul 2012 17:16:51 +0100	[thread overview]
Message-ID: <1342628211.2913.24.camel@menhir> (raw)
In-Reply-To: <9d2529a5-926d-4920-b0bc-0d77a4964f64@zmail12.collab.prod.int.phx2.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;
>  
> 




      reply	other threads:[~2012-07-18 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342628211.2913.24.camel@menhir \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).