[PATCH] apparmor: remove unused macro

GONG, Ruiqi posted 1 patch 2 years, 8 months ago
security/apparmor/include/net.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] apparmor: remove unused macro
Posted by GONG, Ruiqi 2 years, 8 months ago
SOCK_ctx() doesn't seem to be used anywhere in the code, so remove it.

Signed-off-by: GONG, Ruiqi <gongruiqi@huaweicloud.com>
---
 security/apparmor/include/net.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h
index 6fa440b5daed..64a0112bf62d 100644
--- a/security/apparmor/include/net.h
+++ b/security/apparmor/include/net.h
@@ -52,7 +52,6 @@ struct aa_sk_ctx {
 };
 
 #define SK_CTX(X) ((X)->sk_security)
-#define SOCK_ctx(X) SOCK_INODE(X)->i_security
 #define DEFINE_AUDIT_NET(NAME, OP, SK, F, T, P)				  \
 	struct lsm_network_audit NAME ## _net = { .sk = (SK),		  \
 						  .family = (F)};	  \
-- 
2.25.1
Re: [PATCH] apparmor: remove unused macro
Posted by John Johansen 2 years, 8 months ago
On 5/31/23 04:18, GONG, Ruiqi wrote:
> SOCK_ctx() doesn't seem to be used anywhere in the code, so remove it.
> 
> Signed-off-by: GONG, Ruiqi <gongruiqi@huaweicloud.com>

Acked-by: John Johansen <john.johansen@canonical.com>

I will pull this into the apparmor-next tree

> ---
>   security/apparmor/include/net.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h
> index 6fa440b5daed..64a0112bf62d 100644
> --- a/security/apparmor/include/net.h
> +++ b/security/apparmor/include/net.h
> @@ -52,7 +52,6 @@ struct aa_sk_ctx {
>   };
>   
>   #define SK_CTX(X) ((X)->sk_security)
> -#define SOCK_ctx(X) SOCK_INODE(X)->i_security
>   #define DEFINE_AUDIT_NET(NAME, OP, SK, F, T, P)				  \
>   	struct lsm_network_audit NAME ## _net = { .sk = (SK),		  \
>   						  .family = (F)};	  \