* [PATCH] check return of ext4_orphan_get properly
@ 2008-04-11 19:32 Josef Bacik
2008-04-11 20:23 ` Mingming Cao
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2008-04-11 19:32 UTC (permalink / raw)
To: linux-ext4; +Cc: cmm
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>
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] check return of ext4_orphan_get properly
2008-04-11 19:32 [PATCH] check return of ext4_orphan_get properly Josef Bacik
@ 2008-04-11 20:23 ` Mingming Cao
0 siblings, 0 replies; 2+ messages in thread
From: Mingming Cao @ 2008-04-11 20:23 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-ext4
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-11 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-11 19:32 [PATCH] check return of ext4_orphan_get properly Josef Bacik
2008-04-11 20:23 ` Mingming Cao
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).