public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: "Günther Noack" <gnoack@google.com>,
	linux-security-module@vger.kernel.org,
	"Kees Cook" <kees@kernel.org>
Subject: Re: [PATCH v1] landlock: Fix formatting
Date: Tue, 3 Mar 2026 19:09:40 +0100	[thread overview]
Message-ID: <20260303.55923ece9536@gnoack.org> (raw)
In-Reply-To: <20260303173632.88040-1-mic@digikod.net>

On Tue, Mar 03, 2026 at 06:36:31PM +0100, Mickaël Salaün wrote:
> Auto-format with clang-format -i security/landlock/*.[ch]
> 
> Cc: Günther Noack <gnoack@google.com>
> Cc: Kees Cook <kees@kernel.org>
> Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> ---
>  security/landlock/domain.c  | 3 +--
>  security/landlock/ruleset.c | 9 ++++-----
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/security/landlock/domain.c b/security/landlock/domain.c
> index f5b78d4766cd..f0d83f43afa1 100644
> --- a/security/landlock/domain.c
> +++ b/security/landlock/domain.c
> @@ -94,8 +94,7 @@ static struct landlock_details *get_current_details(void)
>  	 * allocate with GFP_KERNEL_ACCOUNT because it is independent from the
>  	 * caller.
>  	 */
> -	details =
> -		kzalloc_flex(*details, exe_path, path_size);
> +	details = kzalloc_flex(*details, exe_path, path_size);
>  	if (!details)
>  		return ERR_PTR(-ENOMEM);
>  
> diff --git a/security/landlock/ruleset.c b/security/landlock/ruleset.c
> index 319873586385..73018dc8d6c7 100644
> --- a/security/landlock/ruleset.c
> +++ b/security/landlock/ruleset.c
> @@ -32,9 +32,8 @@ static struct landlock_ruleset *create_ruleset(const u32 num_layers)
>  {
>  	struct landlock_ruleset *new_ruleset;
>  
> -	new_ruleset =
> -		kzalloc_flex(*new_ruleset, access_masks, num_layers,
> -			     GFP_KERNEL_ACCOUNT);
> +	new_ruleset = kzalloc_flex(*new_ruleset, access_masks, num_layers,
> +				   GFP_KERNEL_ACCOUNT);
>  	if (!new_ruleset)
>  		return ERR_PTR(-ENOMEM);
>  	refcount_set(&new_ruleset->usage, 1);
> @@ -559,8 +558,8 @@ landlock_merge_ruleset(struct landlock_ruleset *const parent,
>  	if (IS_ERR(new_dom))
>  		return new_dom;
>  
> -	new_dom->hierarchy = kzalloc_obj(*new_dom->hierarchy,
> -					 GFP_KERNEL_ACCOUNT);
> +	new_dom->hierarchy =
> +		kzalloc_obj(*new_dom->hierarchy, GFP_KERNEL_ACCOUNT);
>  	if (!new_dom->hierarchy)
>  		return ERR_PTR(-ENOMEM);
>  
> -- 
> 2.53.0
> 

Reviewed-by: Günther Noack <gnoack3000@gmail.com>

Thanks!

      reply	other threads:[~2026-03-03 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 17:36 [PATCH v1] landlock: Fix formatting Mickaël Salaün
2026-03-03 18:09 ` Günther Noack [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260303.55923ece9536@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=gnoack@google.com \
    --cc=kees@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox