]> 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>
Thu, 4 Oct 2012 05:03:11 +0000 (15:03 +1000)
commit16f400ab056684dd37a1449c45aebc195243452a
tree4aebb793c4f26ff5afd80b9e1539e851c9ea9950
parent12fcb3d5bfc77eddd66d16f14603789df9ebabc7
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