]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm-mmapc-replace-find_vma_prepare-with-clearer-find_vma_links fix
authorHugh Dickins <hughd@google.com>
Fri, 28 Sep 2012 00:19:08 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 02:59:53 +0000 (13:59 +1100)
commit9a857ee8882887c1908cdca1012cada7d24f9a35
tree2716616326cbe085efb833d3d2bfa1315adc24d1
parent6aa306356e216bdea4f794f4f2355c6a22e4c713
mm-mmapc-replace-find_vma_prepare-with-clearer-find_vma_links fix

Strangely, I can no longer get an uninitialized variable warning out of
copy_vma(), with or without the BUG() there; but David Rientjes gets it
when he builds with CONFIG_BUG off, which is understandable.

uninitialized_var() can be a useful tool, but I do prefer to avoid it:
partly because it might hide future errors, partly because I misspell it,
but mainly because the need for it comes and goes so mysteriously.

Given David's preference for no warning, mine for no uninitialized_var,
and Linus's for renaming BUG() to I_AM_A_MORON() to discourage its use in
the first place: copy_vma() seems a prime candidate for returning failure
to mremap instead of crashing the system.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Benny Halevy <bhalevy@tonian.com>
Cc: Hillf Danton <dhillf@gmail.com>
Tested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c