From: Andrew Morton <akpm@osdl.org>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, skodati@in.ibm.com
Subject: Re: Can this happen ?
Date: Wed, 27 Apr 2005 17:05:15 -0700 [thread overview]
Message-ID: <20050427170515.54a67065.akpm@osdl.org> (raw)
In-Reply-To: <1114645113.26913.662.camel@dyn318077bld.beaverton.ibm.com>
Badari Pulavarty <pbadari@us.ibm.com> wrote:
>
> We ran into a panic in drop_buffers()
erk.
In rare situations, drop_buffers() can be called for a page which has buffers,
but no ->mapping (it was truncated, but the buffers were left behind because
ext3 was still fiddling with them).
But if there was an I/O error in a buffer_head, drop_buffers() will try to get
at the address_space and will oops.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
fs/buffer.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/buffer.c~drop-buffers-oops-fix fs/buffer.c
--- 25/fs/buffer.c~drop-buffers-oops-fix Wed Apr 27 17:02:02 2005
+++ 25-akpm/fs/buffer.c Wed Apr 27 17:02:44 2005
@@ -2924,7 +2924,7 @@ drop_buffers(struct page *page, struct b
bh = head;
do {
- if (buffer_write_io_error(bh))
+ if (buffer_write_io_error(bh) && page->mapping)
set_bit(AS_EIO, &page->mapping->flags);
if (buffer_busy(bh))
goto failed;
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2005-04-28 0:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-27 23:38 Badari Pulavarty
2005-04-27 23:53 ` [PATCH] drop_buffers() shouldn't de-ref page->mapping if its NULL Badari Pulavarty
2005-04-28 3:46 ` OGAWA Hirofumi
2005-04-28 15:12 ` Badari Pulavarty
2005-04-28 16:26 ` OGAWA Hirofumi
2005-04-28 0:05 ` Andrew Morton [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=20050427170515.54a67065.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pbadari@us.ibm.com \
--cc=skodati@in.ibm.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