From: Adrian Bunk <bunk@kernel.org>
To: Nick Piggin <npiggin@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: fs/buffer.c:nobh_write_end(): NULL dereference
Date: Fri, 19 Oct 2007 15:43:00 +0200 [thread overview]
Message-ID: <20071019134300.GA3778@stusta.de> (raw)
Commit 03158cd7eb3374843de68421142ca5900df845d9 introcduced the
following NULL dereference:
<-- snip -->
...
int nobh_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
struct inode *inode = page->mapping->host;
struct buffer_head *head = NULL;
struct buffer_head *bh;
if (!PageMappedToDisk(page)) {
if (unlikely(copied < len) && !page_has_buffers(page))
attach_nobh_buffers(page, head);
... ^^^^
<-- snip -->
Spotted by the Coverity checker.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
reply other threads:[~2007-10-19 13:42 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=20071019134300.GA3778@stusta.de \
--to=bunk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.