mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhijit Pawar <abhi.c.pawar@gmail.com>
To: Joern Engel <joern@logfs.org>,
	Prasad Joshi <prasadjoshi.linux@gmail.com>,
	logfs@logfs.org
Cc: linux-kernel@vger.kernel.org, Abhijit Pawar <abhi.c.pawar@gmail.com>
Subject: [PATCH 1/2] fs: logfs NULL pointer check added
Date: Tue, 27 Nov 2012 16:54:58 +0530	[thread overview]
Message-ID: <1354015498-8986-1-git-send-email-abhi.c.pawar@gmail.com> (raw)

This patch fixes  Bug 49921 - Missing NULL check of return value of logfs_get_write_page() in function btree_write_block()

Signed-off-by: Abhijit Pawar <abhi.c.pawar@gmail.com>
---
 fs/logfs/readwrite.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index e1a3b6b..53596ce 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -2202,6 +2202,7 @@ void btree_write_block(struct logfs_block *block)
 
 	inode = logfs_safe_iget(block->sb, block->ino, &cookie);
 	page = logfs_get_write_page(inode, block->bix, block->level);
+	BUG_ON(!page);
 
 	err = logfs_readpage_nolock(page);
 	BUG_ON(err);
-- 
1.7.7.6


             reply	other threads:[~2012-11-27 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 11:24 Abhijit Pawar [this message]
2012-12-08  0:29 ` Andrew Morton

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=1354015498-8986-1-git-send-email-abhi.c.pawar@gmail.com \
    --to=abhi.c.pawar@gmail.com \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logfs@logfs.org \
    --cc=prasadjoshi.linux@gmail.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

all inboxes | Powered by JetHome®