Subject: BUG() in sys_swapon

From: Peter Horton <[email-masked]>
Date: Wed, 14 Apr 2004 23:53:29 +0100

The current 2.6.x tree running on a Cobalt Qube throws an OOPS from
sys_swapon().

It looks like this is because line 1257 in r1.89 of mm/swapfile.c
(2.6.x) compiles to a BUG().

    ... swp_type(pte_to_swp_entry(swp_entry_to_pte(swp_entry(~0UL,0)))))

swp_entry(~0UL,0)			--> f800_0000
swp_entry_to_pte(f800_0000)
    __swp_entry(1f, 0000_0000)		--> 0000_003e
    pte_file(0000_003e)			--> 0000_0010
    BUG_ON(0000_0010)

P.