projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1276551
)
readahead: fix NULL filp dereference
author
Wu Fengguang
<
[email protected]
>
Tue, 6 Apr 2010 21:34:53 +0000
(14:34 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 7 Apr 2010 15:38:03 +0000
(08:38 -0700)
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
Signed-off-by: Wu Fengguang <
[email protected]
>
Cc: Yan Zheng <
[email protected]
>
Reported-by: Kirill A. Shutemov <
[email protected]
>
Tested-by: Kirill A. Shutemov <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/readahead.c
patch
|
blob
|
history
diff --git
a/mm/readahead.c
b/mm/readahead.c
index 999b54bb462f3ad24ec83b8997aec7c7780bc469..dfa9a1a03a116c7659d0d71134a3450a8d69026f 100644
(file)
--- a/
mm/readahead.c
+++ b/
mm/readahead.c
@@
-503,7
+503,7
@@
void page_cache_sync_readahead(struct address_space *mapping,
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;
}