Skip to contentSkip to conversation

+ exec-proc_exec_connector-should-be-called-only-once.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Aug 5, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + exec-proc_exec_connector-should-be-called-only-once.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 05 Aug 2013 13:45:10 -0700

The patch titled
Subject: exec: proc_exec_connector() should be called only once
has been added to the -mm tree. Its filename is
exec-proc_exec_connector-should-be-called-only-once.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/exec-proc_exec_connector-should-be-called-only-once.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/exec-proc_exec_connector-should-be-called-only-once.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Oleg Nesterov <[email protected]>
Subject: exec: proc_exec_connector() should be called only once

A separate one-liner with the minor fix.

PROC_EVENT_EXEC reports the "exec" event, but this message is sent at least twice if search_binary_handler() is called by ->load_binary() recursively, say, load_script().

Move it to exec_binprm(), this is "depth == 0" code too.

---

 fs/exec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exec.c renamed from fs/exec.c~exec-proc_exec_connector-should-be-called-only-once +1 -1
diff -puN fs/exec.c~exec-proc_exec_connector-should-be-called-only-once fs/exec.c
@@ -1404,7 +1404,6 @@ int search_binary_handler(struct linux_b
 				if (bprm->file)
 					fput(bprm->file);
 				bprm->file = NULL;
-				proc_exec_connector(current);
 				return retval;
 			}
 			read_lock(&binfmt_lock);
@@ -1455,6 +1454,7 @@ static int exec_binprm(struct linux_binp
 		trace_sched_process_exec(current, old_pid, bprm);
 		ptrace_event(PTRACE_EVENT_EXEC, old_vpid);
 		current->did_exec = 1;
+		proc_exec_connector(current);
 	}
 
 	return ret;

_

Patches currently in -mm which might be from [email protected] are

x86-get_unmapped_area-use-proper-mmap-base-for-bottom-up-direction.patch include-linux-schedh-dont-use-task-pid-tgid-in-same_thread_group-has_group_leader_pid.patch mm-mempolicy-turn-vma_set_policy-into-vma_dup_policy.patch mm-shift-vm_grows-check-from-mmap_region-to-do_mmap_pgoff-v2.patch mm-do_mmap_pgoff-cleanup-the-usage-of-file_inode.patch mm-mmap_region-kill-correct_wcount-inode-use-allow_write_access.patch kernel-wide-fix-missing-validations-on-__get-__put-__copy_to-__copy_from_user.patch autofs4-allow-autofs-to-work-outside-the-initial-pid-namespace.patch autofs4-translate-pids-to-the-right-namespace-for-the-daemon.patch signals-eventpoll-set-saved_sigmask-at-the-start.patch move-exit_task_namespaces-outside-of-exit_notify-fix.patch exec-introduce-exec_binprm-for-depth-==-0-code.patch exec-kill-int-depth-in-search_binary_handler.patch exec-proc_exec_connector-should-be-called-only-once.patch exec-move-allow_write_access-fput-to-exec_binprm.patch exec-kill-load_binary-=-null-check-in-search_binary_handler.patch exec-cleanup-the-config_modules-logic.patch exec-dont-retry-if-request_module-fails.patch exec-cleanup-the-error-handling-in-search_binary_handler.patch linux-next.patch