Re: [PATCH v4 09/19] landlock: Add create_domain and free_domain tracepoints

Günther Noack <[email protected]>
Newsgroups org.kernel.vger.linux-security-module,org.kernel.vger.linux-trace-kernel
Message-ID <[email protected]>
On Tue, Aug 11, 2026 at 11:43:23AM +0200, Mickaël Salaün wrote:
> diff --git a/security/landlock/domain.c b/security/landlock/domain.c
> index d0b35ccce122..7651eee8fe02 100644
> --- a/security/landlock/domain.c
> +++ b/security/landlock/domain.c
> @@ -427,6 +426,7 @@ landlock_merge_ruleset(struct landlock_domain *const parent,
>  	int err;
>  
>  	might_sleep();
> +	lockdep_assert_held(&ruleset->lock);
>  	if (WARN_ON_ONCE(!ruleset))
>  		return ERR_PTR(-EINVAL);

This checks that ruleset is not NULL, but the newly added
lockdep_assert_held() line already dereferences it before.

—Günther
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.