From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>, stable@kernel.org
Cc: "Yan, Zheng " <yanzheng@21cn.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"kirill@shutemov.name" <kirill@shutemov.name>,
LKML <linux-kernel@vger.kernel.org>,
Jens Axboe <jens.axboe@oracle.com>
Subject: [PATCH][BUGFIX] readahead: fix NULL filp dereference
Date: Fri, 2 Apr 2010 15:27:50 +0800 [thread overview]
Message-ID: <20100402072750.GA22952@localhost> (raw)
In-Reply-To: <20100326040114.GA20717@localhost>
The btrfs relocate_file_extent_cluster() calls us with NULL filp:
[ 4005.426805] BUG: unable to handle kernel NULL pointer dereference at 00000021
[ 4005.426818] IP: [<c109a130>] page_cache_sync_readahead+0x18/0x3e
CC: Yan Zheng <yanzheng@21cn.com>
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
Andrew and Greg:
This is an obvious correct bug fix for .34 and .33-stable,
so I'm resending it directly to you without Kirill's confirmation.
--- sound-2.6.orig/mm/readahead.c 2010-03-26 11:51:57.000000000 +0800
+++ sound-2.6/mm/readahead.c 2010-03-26 11:52:11.000000000 +0800
@@ -502,7 +502,7 @@ void page_cache_sync_readahead(struct ad
return;
/* be dumb */
- if (filp->f_mode & FMODE_RANDOM) {
+ if (filp && (filp->f_mode & FMODE_RANDOM)) {
force_page_cache_readahead(mapping, filp, offset, req_size);
return;
}
next prev parent reply other threads:[~2010-04-02 7:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 13:06 Oops on btrfs filesystem balance Kirill A. Shutemov
2010-03-26 3:40 ` Yan, Zheng
2010-03-26 4:01 ` Wu Fengguang
2010-03-26 4:01 ` Wu Fengguang
2010-04-02 7:27 ` Wu Fengguang [this message]
2010-04-02 12:18 ` [PATCH][BUGFIX] readahead: fix NULL filp dereference Kirill A. Shutemov
2010-04-02 12:18 ` Kirill A. Shutemov
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=20100402072750.GA22952@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=kirill@shutemov.name \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=yanzheng@21cn.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 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.