diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 23:58:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 23:58:12 -0500 |
commit | 848b81415c42ff3dc9a4204749087b015c37ef66 (patch) | |
tree | 391da3a73aea48632248220d2d6b8d45a88f7eae /fs/exec.c | |
parent | 992956189de58cae9f2be40585bc25105cd7c5ad (diff) | |
parent | 6fd59a83b9261fa53eaf98fb5514abba504a3ea3 (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc patches from Andrew Morton:
"Incoming:
- lots of misc stuff
- backlight tree updates
- lib/ updates
- Oleg's percpu-rwsem changes
- checkpatch
- rtc
- aoe
- more checkpoint/restart support
I still have a pile of MM stuff pending - Pekka should be merging
later today after which that is good to go. A number of other things
are twiddling thumbs awaiting maintainer merges."
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (180 commits)
scatterlist: don't BUG when we can trivially return a proper error.
docs: update documentation about /proc/<pid>/fdinfo/<fd> fanotify output
fs, fanotify: add @mflags field to fanotify output
docs: add documentation about /proc/<pid>/fdinfo/<fd> output
fs, notify: add procfs fdinfo helper
fs, exportfs: add exportfs_encode_inode_fh() helper
fs, exportfs: escape nil dereference if no s_export_op present
fs, epoll: add procfs fdinfo helper
fs, eventfd: add procfs fdinfo helper
procfs: add ability to plug in auxiliary fdinfo providers
tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test
breakpoint selftests: print failure status instead of cause make error
kcmp selftests: print fail status instead of cause make error
kcmp selftests: make run_tests fix
mem-hotplug selftests: print failure status instead of cause make error
cpu-hotplug selftests: print failure status instead of cause make error
mqueue selftests: print failure status instead of cause make error
vm selftests: print failure status instead of cause make error
ubifs: use prandom_bytes
mtd: nandsim: use prandom_bytes
...
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1353,6 +1353,10 @@ int search_binary_handler(struct linux_binprm *bprm) | |||
1353 | struct linux_binfmt *fmt; | 1353 | struct linux_binfmt *fmt; |
1354 | pid_t old_pid, old_vpid; | 1354 | pid_t old_pid, old_vpid; |
1355 | 1355 | ||
1356 | /* This allows 4 levels of binfmt rewrites before failing hard. */ | ||
1357 | if (depth > 5) | ||
1358 | return -ELOOP; | ||
1359 | |||
1356 | retval = security_bprm_check(bprm); | 1360 | retval = security_bprm_check(bprm); |
1357 | if (retval) | 1361 | if (retval) |
1358 | return retval; | 1362 | return retval; |
@@ -1377,12 +1381,8 @@ int search_binary_handler(struct linux_binprm *bprm) | |||
1377 | if (!try_module_get(fmt->module)) | 1381 | if (!try_module_get(fmt->module)) |
1378 | continue; | 1382 | continue; |
1379 | read_unlock(&binfmt_lock); | 1383 | read_unlock(&binfmt_lock); |
1384 | bprm->recursion_depth = depth + 1; | ||
1380 | retval = fn(bprm); | 1385 | retval = fn(bprm); |
1381 | /* | ||
1382 | * Restore the depth counter to its starting value | ||
1383 | * in this call, so we don't have to rely on every | ||
1384 | * load_binary function to restore it on return. | ||
1385 | */ | ||
1386 | bprm->recursion_depth = depth; | 1386 | bprm->recursion_depth = depth; |
1387 | if (retval >= 0) { | 1387 | if (retval >= 0) { |
1388 | if (depth == 0) { | 1388 | if (depth == 0) { |