Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 14 Apr 2001 13:41:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 14 Apr 2001 13:41:16 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:23568 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Sat, 14 Apr 2001 13:41:01 -0400 Date: Sat, 14 Apr 2001 12:59:40 -0300 (BRT) From: Marcelo Tosatti To: Christoph Rohland Cc: "Stephen C. Tweedie" , Linus Torvalds , Rik van Riel , lkml Subject: shmem_getpage_locked() / swapin_readahead() race in 2.4.4-pre3 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, There is a nasty race between shmem_getpage_locked() and swapin_readahead() with the new shmem code (introduced in 2.4.3-ac3 and merged in the main tree in 2.4.4-pre3): shmem_getpage_locked() finds a page in the swapcache and moves it to the pagecache as an shmem page, freeing the swapcache and the swap map entry for this page. (which causes a BUG() in mm/shmem.c:353 since the swap map entry is being used) In the meanwhile, swapin_readahead() is allocating a page and adding it to the swapcache. I don't see any clean fix for this one. Suggestions ? - 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/