On Mon, 19 Nov 2001, Linus Torvalds wrote:
> On Mon, 19 Nov 2001, Marcelo Tosatti wrote:
> >
> > We ended up talking about the possibility of a reschedule (IRQ) happening
> > before after the "spin_unlock(pagecache_lock)" but before the
> > "lru_cache_add()".
>
> So?
>
> The worst that happens is that the page is not on the LRU list, which
> just means that it won't be free'd until we add it (which we will do
> when the lru_cache_add() resumes..
I wonder if the following scenario is possible:
CPU 0 CPU 1
add_to_page_cache() truncate_list_pages()
spin_lock(&pagecache_lock);
__add_to_page_cache()
spin_unlock(&pagecache_lock);
==> network irq
... remove_inode_page()
...
==> softirqs __free_pages_ok()
...
...
*** page now on free list ***
lru_cache_add(page);
*** BOOM ***
regards,
Rik
-- DMCA, SSSCA, W3C? Who cares? http://thefreeworld.net/http://www.surriel.com/ http://distro.conectiva.com/
- 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/
This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:21 EST