Re: mm/swapfile.c problem

Stephen C. Tweedie (sct@redhat.com)
Tue, 14 Sep 1999 21:11:41 +0100 (BST)


Hi Pete,

On Mon, 13 Sep 1999 23:09:00 -0700 (PDT), Pete Zaitcev
<zaitcev@metabyte.com> said:

> Hi, I have a small problem with 2.3.18.
> If a swap device does not come online on reboot, sys_swapon() does
> lock_page(), then rw_swap_page_nolock (unsuccessful) and goes to
> bad_swap, where it calls free_page(swap_header). This causes the
> following diagnostic: "kernel BUG in page_alloc.c:161", and a NULL
> pointer dereference somewhere down the line. I would like to see
> something along these lines:

Can you reproduce this and let me know exactly which errors the swapon
produces? I just get a clean "ENODEV" back from swapon, which happens
when the blkdev_open happens in swapon. Successful open of a
non-existant block device sounds more like a driver problem than
anything else. Certainly, the read/write functions should never, ever
silently succeed while still leaving the page locked, but manually
unlocking the page in such a condition is definitely the wrong thing to
do (even freeing the page is bad news in this state), as the driver has
not yet disclaimed that page.

--Stephen

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