[PATCH -next] apparmor: remove unneeded #ifdef in decompress_zstd()
Xiu Jianfeng
xiujianfeng at huaweicloud.com
Wed Aug 9 10:02:44 UTC 2023
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.
Signed-off-by: Xiu Jianfeng <xiujianfeng at huawei.com>
---
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;
--
2.34.1
More information about the Linux-security-module-archive
mailing list