[PATCH v7 02/11] landlock: Use mem_is_zero() in is_layer_masks_allowed()
Günther Noack
gnoack3000 at gmail.com
Mon Mar 23 16:56:44 UTC 2026
This is equivalent, but expresses the intent a bit clearer.
Signed-off-by: Günther Noack <gnoack3000 at gmail.com>
---
security/landlock/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/landlock/fs.c b/security/landlock/fs.c
index a03ec664c78e..97065d51685a 100644
--- a/security/landlock/fs.c
+++ b/security/landlock/fs.c
@@ -564,7 +564,7 @@ static void test_no_more_access(struct kunit *const test)
static bool is_layer_masks_allowed(const struct layer_access_masks *masks)
{
- return !memchr_inv(&masks->access, 0, sizeof(masks->access));
+ return mem_is_zero(&masks->access, sizeof(masks->access));
}
/*
--
2.53.0
More information about the Linux-security-module-archive
mailing list