Skip to content

Commit 1c4fe87

Browse files
gnoackl0kod
authored andcommitted
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>
1 parent eb25e20 commit 1c4fe87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • security/landlock

security/landlock/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static void test_no_more_access(struct kunit *const test)
564564

565565
static bool is_layer_masks_allowed(const struct layer_access_masks *masks)
566566
{
567-
return !memchr_inv(&masks->access, 0, sizeof(masks->access));
567+
return mem_is_zero(&masks->access, sizeof(masks->access));
568568
}
569569

570570
/*

0 commit comments

Comments
 (0)