aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
authorGünther Noack <gnoack3000@gmail.com>2026-03-27 17:48:27 +0100
committerMickaël Salaün <mic@digikod.net>2026-04-07 18:51:06 +0200
commit1c4fe87364782d1b058cc9d15fc8acef44bce033 (patch)
treef626d32e582ef9199f347c24b5f9a79ecd808016 /security
parenteb25e202b3d60cdc239f14e0e5f6f7465fcc506c (diff)
downloadlinux-next-history-1c4fe87364782d1b058cc9d15fc8acef44bce033.tar.gz
landlock: Use mem_is_zero() in is_layer_masks_allowed()
This is equivalent, but expresses the intent a bit clearer. Signed-off-by: Günther Noack <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20260327164838.38231-3-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'security')
-rw-r--r--security/landlock/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/landlock/fs.c b/security/landlock/fs.c
index a03ec664c78e9..97065d51685a9 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));
}
/*