• Hugh Dickins's avatar
    Sorry, just noticed what the diff contexts don't show: Jiri's patch is · 16f80590
    Hugh Dickins authored
    initializing p->first_swap_extent.list at a point before p has been
    decided - we may kfree that newly allocated p and go on to reuse an
    existing free entry for p.
    
    Now, the patch is not actually wrong: an existing free entry will have a
    good empty first_swap_extent.list; but it looks suspicious, it seems
    strange to initialize a field in something we're about to kfree, and I'd
    rather we put that initialization back to where it was in 2.6.32.
    Signed-off-by: default avatarHugh Dickins <hugh.dickins@tiscali.co.uk>
    Cc: Jiri Slaby <jirislaby@gmail.com>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Rik van Riel <riel@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    16f80590
swapfile.c 56.4 KB