[PATCH -next] apparmor: remove unneeded #ifdef in decompress_zstd()

John Johansen john.johansen at canonical.com
Wed Aug 9 04:22:07 UTC 2023


On 8/9/23 03:02, Xiu Jianfeng wrote:
> From: Xiu Jianfeng <xiujianfeng at huawei.com>
> 
> The whole function is guarded by CONFIG_SECURITY_APPARMOR_EXPORT_BINARY,
> so the #ifdef here is redundant, remove it.
> 

indeed

> Signed-off-by: Xiu Jianfeng <xiujianfeng at huawei.com>
Acked-by: John Johansen <john.johansen at canonical.com>

I have pulled this into apparmor-next


> ---
>   security/apparmor/apparmorfs.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index c198a8a2047b..7ee8f4bb7733 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -1314,7 +1314,6 @@ SEQ_RAWDATA_FOPS(compressed_size);
>   
>   static int decompress_zstd(char *src, size_t slen, char *dst, size_t dlen)
>   {
> -#ifdef CONFIG_SECURITY_APPARMOR_EXPORT_BINARY
>   	if (slen < dlen) {
>   		const size_t wksp_len = zstd_dctx_workspace_bound();
>   		zstd_dctx *ctx;
> @@ -1341,7 +1340,6 @@ static int decompress_zstd(char *src, size_t slen, char *dst, size_t dlen)
>   		kvfree(wksp);
>   		return ret;
>   	}
> -#endif
>   
>   	if (dlen < slen)
>   		return -EINVAL;



More information about the Linux-security-module-archive mailing list