Re: [PATCH] mm: simplify find_vma_prev

From: KOSAKI Motohiro
Date: Fri Dec 09 2011 - 15:44:54 EST


This changes the (undocumented, naturally) interface in disturbing ways.

Currently, *pprev will always be written to. With this change, *pprev
will only be written to if find_vma_prev() returns non-NULL.

Looking through the code, this is mostly benign. But it will cause the
CONFIG_STACK_GROWSUP version of find_extend_vma() to use an
uninitialised stack slot in ways which surely will crash the kernel.

Weird.


So please have a think about that and fix it up. And please add
documentation for find_vma_prev()'s interface so we don't break it next
time.

Sure thing. Thank you for good spotting!


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