mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lsm: simplify security_inode_copy_up_xattr()
@ 2025-07-29  9:09 Tianjia Zhang
  2025-07-29 14:43 ` Casey Schaufler
  0 siblings, 1 reply; 8+ messages in thread
From: Tianjia Zhang @ 2025-07-29  9:09 UTC (permalink / raw)
  To: Paul Moore, James Morris, Serge E. Hallyn, linux-security-module,
	linux-kernel
  Cc: Tianjia Zhang

The implementation of function security_inode_copy_up_xattr can be
simplified to directly call call_int_hook().

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
 security/security.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/security/security.c b/security/security.c
index 596d41818577..a5c2e5a8009f 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2774,13 +2774,7 @@ EXPORT_SYMBOL(security_inode_copy_up);
  */
 int security_inode_copy_up_xattr(struct dentry *src, const char *name)
 {
-	int rc;
-
-	rc = call_int_hook(inode_copy_up_xattr, src, name);
-	if (rc != LSM_RET_DEFAULT(inode_copy_up_xattr))
-		return rc;
-
-	return LSM_RET_DEFAULT(inode_copy_up_xattr);
+	return call_int_hook(inode_copy_up_xattr, src, name);
 }
 EXPORT_SYMBOL(security_inode_copy_up_xattr);
 
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-31 21:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-29  9:09 [PATCH] lsm: simplify security_inode_copy_up_xattr() Tianjia Zhang
2025-07-29 14:43 ` Casey Schaufler
2025-07-29 15:09   ` Paul Moore
2025-07-30  9:25     ` tianjia.zhang
2025-07-30 15:35       ` Paul Moore
2025-07-31 11:59     ` tianjia.zhang
2025-07-31 15:00       ` Casey Schaufler
2025-07-31 21:17       ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®