if (!mm) return 0;
to
if (!mm && mm != &init_mm) return 0;
but it should _obviously_ be
if (!mm || mm == &init_mm) return 0;
Duh. Silly me. (The test just makes sure we don't try to unmap any kernel pages)
Linus