[PATCH 11/27] selftests/landlock: Assert helper results that are used afterwards

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 8 14:35:32 UTC 2026


> Some helpers check a result with EXPECT_*() and then use it:
> cap_get_proc() in _init_caps() and _change_cap(), and
> landlock_create_ruleset() in drop_access_rights(), create_domain() and
> create_fs_domain().  On failure they pass NULL or -1 to the next calls,
> which then fail with misleading messages.
> 
> Use ASSERT_*() for these checks, as create_scoped_domain() already does.
> 
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000 at gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261008142604.39107-2-gnoack3000@gmail.com?part=11




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