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:
c61284e
)
mm/vmscan.c: fix mapping use after free
author
Nick Piggin
<
[email protected]
>
Tue, 20 Jul 2010 20:24:25 +0000
(13:24 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 20 Jul 2010 23:25:40 +0000
(16:25 -0700)
We need lock_page_nosync() here because we have no reference to the
mapping when taking the page lock.
Signed-off-by: Nick Piggin <
[email protected]
>
Reviewed-by: Johannes Weiner <
[email protected]
>
Cc: Mel Gorman <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/vmscan.c
patch
|
blob
|
history
diff --git
a/mm/vmscan.c
b/mm/vmscan.c
index 199fa436c0ddfc49566a1221af9c3da788359b45..b94fe1b3da435f34f567e8a23358ec18ccd452ad 100644
(file)
--- a/
mm/vmscan.c
+++ b/
mm/vmscan.c
@@
-298,7
+298,7
@@
static int may_write_to_queue(struct backing_dev_info *bdi)
static void handle_write_error(struct address_space *mapping,
struct page *page, int error)
{
- lock_page(page);
+ lock_page
_nosync
(page);
if (page_mapping(page) == mapping)
mapping_set_error(mapping, error);
unlock_page(page);