]> 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>
Tue, 18 Sep 2012 06:04:15 +0000 (16:04 +1000)
commit1e78c3b7d67b61b1ad5455b3fd56e639e1896ef8
tree3ed1cd8ddd3c86f14ba58c4151d594262f01af9b
parentd82dd0baa570c06770a792971f5859b276a68b2d
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