+ exec-move-recursion_depth-out-of-critical-sections.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/exec.c: move ->recursion_depth out of critical sections
has been added to the -mm tree.  Its filename is
     exec-move-recursion_depth-out-of-critical-sections.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/exec-move-recursion_depth-out-of-critical-sections.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/exec-move-recursion_depth-out-of-critical-sections.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Subject: fs/exec.c: move ->recursion_depth out of critical sections

->recursion_depth is changed only by current, therefore decrementing can
be done without taking any locks.

Link: http://lkml.kernel.org/r/20190417213150.GA26474@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/exec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/exec.c~exec-move-recursion_depth-out-of-critical-sections
+++ a/fs/exec.c
@@ -1652,11 +1652,13 @@ int search_binary_handler(struct linux_b
 		if (!try_module_get(fmt->module))
 			continue;
 		read_unlock(&binfmt_lock);
+
 		bprm->recursion_depth++;
 		retval = fmt->load_binary(bprm);
+		bprm->recursion_depth--;
+
 		read_lock(&binfmt_lock);
 		put_binfmt(fmt);
-		bprm->recursion_depth--;
 		if (retval < 0 && !bprm->mm) {
 			/* we got to flush_old_exec() and failed after it */
 			read_unlock(&binfmt_lock);
_

Patches currently in -mm which might be from adobriyan@xxxxxxxxx are

proc-fix-map_files-test-on-f29.patch
proc-fixup-proc-pid-vm-test.patch
ramfs-support-o_tmpfile.patch
elf-make-scope-of-pos-variable-smaller.patch
elf-free-pt_interp-filename-asap.patch
elf-delete-trailing-return-in-functions-returning-void.patch
elf-save-1-indent-level.patch
elf-move-variables-initialization-closer-to-their-usage.patch
exec-move-recursion_depth-out-of-critical-sections.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux