Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c703d66 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Linus Torvalds
Browse files

kernel/umh.c: optimize 'proc_cap_handler()'

parent 4ca59b14
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -537,14 +537,14 @@ static int proc_cap_handler(struct ctl_table *table, int write,
	/*
	 * 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);
	}

	return 0;
}