Re: 2.4.21rc2aa1

Andrea Arcangeli (andrea@suse.de)
Thu, 15 May 2003 01:18:38 +0200


On Thu, May 15, 2003 at 12:39:40AM +0200, Carl-Daniel Hailfinger wrote:
> Andrea Arcangeli wrote:
>
> > Only in 2.4.21rc2aa1: 00_remove_inode_page-prune_icache-smp-race-1
> >
> > Fix mm corrupting SMP race between remove_inode_page and prune_icache.
> > Found by Chris Mason.
>
> Any chance this will get into mainline before 2.4.21?

it's obviously safe so I think yes:

--- x/mm/filemap.c.~1~ 2003-04-24 16:37:50.000000000 +0200
+++ x/mm/filemap.c 2003-04-24 17:05:10.000000000 +0200
@@ -100,9 +100,10 @@ static inline void remove_page_from_inod
if (mapping->a_ops->removepage)
mapping->a_ops->removepage(page);

- mapping->nrpages--;
list_del(&page->list);
page->mapping = NULL;
+ wmb();
+ mapping->nrpages--;
}

static inline void remove_page_from_hash_queue(struct page * page)

Marcelo please apply, thanks!

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/