]> git.karo-electronics.de Git - karo-tx-linux.git/commit
c/r: prctl: fix build error for no-MMU case
authorMark Salter <msalter@redhat.com>
Tue, 25 Sep 2012 00:17:38 +0000 (17:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:24 +0000 (10:39 -0700)
commit8bf0fbfae17c8444de42b5de64bda9ac8dad0ad7
treeb7ed30cd13cf68c3a5230fa5199289010019d035
parent2f5c31b0f2b8c6bfb004e24aef80c1df75452001
c/r: prctl: fix build error for no-MMU case

commit be8cfc4af15cf611dfeb66a1fb5df43d5f1e280a upstream.

Commit 1ad75b9e1628 ("c/r: prctl: add minimal address test to
PR_SET_MM") added some address checking to prctl_set_mm() used by
checkpoint-restore.  This causes a build error for no-MMU systems:

   kernel/sys.c: In function 'prctl_set_mm':
   kernel/sys.c:1868:34: error: 'mmap_min_addr' undeclared (first use in this function)

The test for mmap_min_addr doesn't make a lot of sense for no-MMU code
as noted in commit 6e1415467614 ("NOMMU: Optimise away the
{dac_,}mmap_min_addr tests").

This patch defines mmap_min_addr as 0UL in the no-MMU case so that the
compiler will optimize away tests for "addr < mmap_min_addr".

Signed-off-by: Mark Salter <msalter@redhat.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/security.h