summaryrefslogtreecommitdiff
path: root/kernel/capability.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-09-17 08:15:32 +0200
committerTakashi Iwai <tiwai@suse.de>2026-09-17 08:15:32 +0200
commit546b928da0427b0d6c663cbb992bd7bfa9ac7971 (patch)
tree8af139c814686116b55ab46ad130804f5da46a57 /kernel/capability.c
parentdbd9d1cbf9700528c8595ab1fa7ef832e79821fe (diff)
parent940e8fe8535d22ce67dd2fb9588e6c55a31d7d03 (diff)
downloadlinux-546b928da0427b0d6c663cbb992bd7bfa9ac7971.tar.gz
linux-546b928da0427b0d6c663cbb992bd7bfa9ac7971.zip
Merge tag 'asoc-fix-v7.3-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v7.3 A relatively large pile of fixes here, a lot of driver specific stuff that's broadly unremarkable plus a few core fixes from Richard that fix issues where SoundWire systems with multiple CODECs on the same link would configure the CODECs to use the same bus slots leading to broken audio.
Diffstat (limited to 'kernel/capability.c')
-rw-r--r--kernel/capability.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/capability.c b/kernel/capability.c
index 829f49ae07b9..90e6ab62f6db 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -326,7 +326,6 @@ bool has_capability_noaudit(struct task_struct *t, int cap)
{
return has_ns_capability_noaudit(t, &init_user_ns, cap);
}
-EXPORT_SYMBOL(has_capability_noaudit);
static bool ns_capable_common(struct user_namespace *ns,
int cap,
@@ -416,6 +415,24 @@ bool capable(int cap)
return ns_capable(&init_user_ns, cap);
}
EXPORT_SYMBOL(capable);
+
+/**
+ * capable_noaudit - Determine if the current task has a superior
+ * capability in effect by checking the process's effective
+ * capabilities (unaudited).
+ * @cap: The capability to be tested for
+ *
+ * This is the same as capable(), except it uses CAP_OPT_NOAUDIT as to prevent
+ * issuing spurious audit messages.
+ *
+ * This sets PF_SUPERPRIV on the task if the capability is available on the
+ * assumption that it's about to be used.
+ */
+bool capable_noaudit(int cap)
+{
+ return ns_capable_noaudit(&init_user_ns, cap);
+}
+EXPORT_SYMBOL(capable_noaudit);
#endif /* CONFIG_MULTIUSER */
/**