Skip to contentSkip to conversation

umh-optimize-proc_cap_handler.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 20, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kernel/umh.c: optimize 'proc_cap_handler()'
has been removed from the -mm tree. Its filename was
umh-optimize-proc_cap_handler.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christophe JAILLET <[email protected]>
Subject: kernel/umh.c: optimize 'proc_cap_handler()'

If 'write' is 0, we can avoid a call to spin_lock/spin_unlock.

---

 kernel/umh.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/umh.c renamed from kernel/umh.c~umh-optimize-proc_cap_handler +2 -2
diff -puN kernel/umh.c~umh-optimize-proc_cap_handler kernel/umh.c
@@ -537,14 +537,14 @@ static int proc_cap_handler(struct ctl_t
 	/*
 	 * Drop everything not in the new_cap (but don't add things)
 	 */
-	spin_lock(&umh_sysctl_lock);
 	if (write) {
+		spin_lock(&umh_sysctl_lock);
 		if (table->data == CAP_BSET)
 			usermodehelper_bset = cap_intersect(usermodehelper_bset, new_cap);
 		if (table->data == CAP_PI)
 			usermodehelper_inheritable = cap_intersect(usermodehelper_inheritable, new_cap);
+		spin_unlock(&umh_sysctl_lock);
 	}
-	spin_unlock(&umh_sysctl_lock);
 
 	return 0;
 }

_

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