Messages in this thread Patch in this message | | | From | Andi Kleen <> | Subject | [PATCH] [9/31] HWPOISON: comment the possible set_page_dirty() race | Date | Tue, 8 Dec 2009 22:16:25 +0100 (CET) |
| |
From: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
--- mm/memory-failure.c | 2 ++ 1 file changed, 2 insertions(+)
Index: linux/mm/memory-failure.c =================================================================== --- linux.orig/mm/memory-failure.c +++ linux/mm/memory-failure.c @@ -689,6 +689,8 @@ static int hwpoison_user_mappings(struct /* * Propagate the dirty bit from PTEs to struct page first, because we * need this to decide if we should kill or just drop the page. + * XXX: the dirty test could be racy: set_page_dirty() may not always + * be called inside page lock (it's recommended but not enforced). */ mapping = page_mapping(p); if (!PageDirty(p) && mapping && mapping_cap_writeback_dirty(mapping)) {
| |