Skip to contentSkip to conversation

+ fs-binfmts-better-handling-of-binfmt-loops-fix.patch added to -mm tree

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

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

Subject: + fs-binfmts-better-handling-of-binfmt-loops-fix.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Thu, 01 Aug 2013 16:41:13 -0700

The patch titled
Subject: fs/binfmts: double unlock in search_binary_handler()
has been added to the -mm tree. Its filename is
fs-binfmts-better-handling-of-binfmt-loops-fix.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fs-binfmts-better-handling-of-binfmt-loops-fix.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fs-binfmts-better-handling-of-binfmt-loops-fix.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: Dan Carpenter <[email protected]>
Subject: fs/binfmts: double unlock in search_binary_handler()

The recent -mm patch 3046d15088 "fs/binfmts: better handling of binfmt loops" introduced a new "continue" to the loop. The problem is that we are supposed to be holding the lock at the start so we need to take it again.

---

 fs/exec.c |    1 +
 1 file changed, 1 insertion(+)
fs/exec.c renamed from fs/exec.c~fs-binfmts-better-handling-of-binfmt-loops-fix +1 -0
diff -puN fs/exec.c~fs-binfmts-better-handling-of-binfmt-loops-fix fs/exec.c
@@ -1426,6 +1426,7 @@ int search_binary_handler(struct linux_b
 				copy_strings(bprm->argc_orig, *((struct user_arg_ptr *) bprm->argv_orig), bprm);
 				bprm->argc = bprm->argc_orig;
 				retval = -ENOEXEC;
+				read_lock(&binfmt_lock);
 				continue;
 			}
 

_

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

rapidio-fix-use-after-free-in-rio_unregister_scan.patch ocfs2-use-list_for_each_entry-instead-of-list_for_each.patch fs-binfmts-better-handling-of-binfmt-loops-fix.patch pktcdvd-convert-printk-to-pr_level.patch linux-next.patch fs-convert-fs-shrinkers-to-new-scan-count-api-fix-fix.patch