Thread (7 messages) 7 messages, 2 authors, 2024-09-09
STALE653d

[PATCH v3 2/2] security: Update file_set_fowner documentation

From: Mickaël Salaün <mic@digikod.net>
Date: 2024-08-21 09:56:43
Also in: linux-fsdevel, lkml, selinux
Subsystem: security subsystem, the rest · Maintainers: Paul Moore, James Morris, "Serge E. Hallyn", Linus Torvalds

Highlight that the file_set_fowner hook is now called with a lock held.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: James Morris <jmorris@namei.org>
Cc: Jann Horn <jannh@google.com>
Cc: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
---

Changes since v2:
- Split the doc update into a separate patch to ease backporting.
---
 security/security.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/security/security.c b/security/security.c
index 8cee5b6c6e6d..dc2cd7354015 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2931,6 +2931,8 @@ int security_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
  * Save owner security information (typically from current->security) in
  * file->f_security for later use by the send_sigiotask hook.
  *
+ * This hook is called with file->f_owner.lock held.
+ *
  * Return: Returns 0 on success.
  */
 void security_file_set_fowner(struct file *file)
-- 
2.46.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help