X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=kernel%2Fsys.c;h=8fdac0d90504a4f5156974c28aa0b43e4ac79769;hb=8dde20867c443aedf6d64d8a494e8703d7ba53cb;hp=30c12e54585aa6c4a88aa46ef00223704c607059;hpb=35d7bdc86031a2c1ae05ac27dfa93b2acdcbaecc;p=linux-2.6-microblaze.git diff --git a/kernel/sys.c b/kernel/sys.c index 30c12e54585a..8fdac0d90504 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -480,7 +480,8 @@ static int set_user(struct cred *new) * failure to the execve() stage. */ if (is_ucounts_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) && - new_user != INIT_USER) + new_user != INIT_USER && + !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) current->flags |= PF_NPROC_EXCEEDED; else current->flags &= ~PF_NPROC_EXCEEDED; @@ -1928,13 +1929,6 @@ static int validate_prctl_map_addr(struct prctl_mm_map *prctl_map) error = -EINVAL; - /* - * @brk should be after @end_data in traditional maps. - */ - if (prctl_map->start_brk <= prctl_map->end_data || - prctl_map->brk <= prctl_map->end_data) - goto out; - /* * Neither we should allow to override limits if they set. */