public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: Josef Bacik <jbacik@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] check return of ext4_orphan_get properly
Date: Fri, 11 Apr 2008 13:23:32 -0700	[thread overview]
Message-ID: <1207945412.3639.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20080411193208.GB2757@unused.rdu.redhat.com>

On Fri, 2008-04-11 at 15:32 -0400, Josef Bacik wrote:
> Hello,
> 
> Hit a panic while running fsfuzzer, seems we are improperly checking the return
> of ext4_orphan_get.  This patch fixes the problem, thank you
> 
> Signed-off-by: Josef Bacik <jbacik@redhat.com>
> 

Thanks, added to the patch queue.
> 
> Index: linux-2.6/fs/ext4/super.c
> ===================================================================
> --- linux-2.6.orig/fs/ext4/super.c
> +++ linux-2.6/fs/ext4/super.c
> @@ -1652,8 +1652,8 @@ static void ext4_orphan_cleanup (struct 
>  	while (es->s_last_orphan) {
>  		struct inode *inode;
> 
> -		if (!(inode =
> -		      ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)))) {
> +		inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan));
> +		if (IS_ERR(inode)) {
>  			es->s_last_orphan = 0;
>  			break;
>  		}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2008-04-11 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 19:32 [PATCH] check return of ext4_orphan_get properly Josef Bacik
2008-04-11 20:23 ` Mingming Cao [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=1207945412.3639.7.camel@localhost.localdomain \
    --to=cmm@us.ibm.com \
    --cc=jbacik@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /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