]> 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>
Thu, 13 Sep 2012 00:58:31 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 05:29:59 +0000 (15:29 +1000)
commit3c8aa11cfdf24ff7b73ddf3f69ccbaea99522b7e
treeb9ecc963a1f3dc94efb5297121b4c0832c4d3956
parent59dd790db95d7837a75f7417f32d702068bdf043
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>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c