NACK/Cmnt: [PATCH] UBUNTU: SAUCE: apparmor: Fix build error, make sk parameter const

Stefan Bader stefan.bader at canonical.com
Mon Mar 29 06:12:07 UTC 2021


On 26.03.21 18:27, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Make the sk parameter const to fix a build error with clang:
> 
> security/apparmor/net.c:143:35: error: passing 'const struct sock *' to
> parameter of type 'struct sock *' discards qualifiers
> [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
>                          audit_unix_sk_addr(ab, "addr", sa->u.net->sk);
>                                                         ^~~~~~~~~~~~~
> /home/ubuntu/hirsute/security/apparmor/net.c:98:24: note: passing argument
> to parameter 'sk' here
>                                 struct sock *sk)
>                                              ^
> 
> Fixes: 2775e0786896 ("UBUNTU: SAUCE: apparmor: af_unix mediation")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   security/apparmor/net.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/apparmor/net.c b/security/apparmor/net.c
> index e2e759b21e44..f379aec0f7e6 100644
> --- a/security/apparmor/net.c
> +++ b/security/apparmor/net.c
> @@ -95,7 +95,7 @@ static void audit_unix_addr(struct audit_buffer *ab, const char *str,
>   }
>   
>   static void audit_unix_sk_addr(struct audit_buffer *ab, const char *str,
> -			       struct sock *sk)
> +			       const struct sock *sk)
>   {
>   	struct unix_sock *u = unix_sk(sk);
>   	if (u && u->addr)
> 
Please send again with hirsute mentioned in the subject of at least either the 
cover email (or like in this case) the patch.

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210329/d5bcd310/attachment.sig>


More information about the kernel-team mailing list