public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Zoltan.Menyhart@bull.net
Subject: [Patch] Dereference in fs/jbd/journal.c
Date: Thu, 05 Oct 2006 12:56:41 +0200	[thread overview]
Message-ID: <1160045801.6153.9.camel@alice> (raw)

hi,

since the commit http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1807793e1e7e502e3dc047115e9dbc3b50e4534
we dereference a NULL pointer. Coverity id #1432.
We set journal to NULL, and use it directly afterwards.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.19-rc1/fs/jbd/journal.c.orig	2006-10-05 12:53:24.000000000 +0200
+++ linux-2.6.19-rc1/fs/jbd/journal.c	2006-10-05 12:53:41.000000000 +0200
@@ -724,7 +724,7 @@ journal_t * journal_init_dev(struct bloc
 		printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
 			__FUNCTION__);
 		kfree(journal);
-		journal = NULL;
+		return NULL;
 	}
 	journal->j_dev = bdev;
 	journal->j_fs_dev = fs_dev;



                 reply	other threads:[~2006-10-05 10:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1160045801.6153.9.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=Zoltan.Menyhart@bull.net \
    --cc=linux-kernel@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