lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zy+VIXDPuU613fFd@visitorckw-System-Product-Name>
Date: Sun, 10 Nov 2024 01:00:17 +0800
From: Kuan-Wei Chiu <visitorckw@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Benjamin Berg <benjamin.berg@...el.com>,
	Brendan Higgins <brendan.higgins@...ux.dev>,
	David Gow <davidgow@...gle.com>, Rae Moar <rmoar@...gle.com>,
	linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] kunit: skb: use "gfp" variable instead of hardcoding
 GFP_KERNEL

On Mon, Nov 04, 2024 at 08:16:30PM +0300, Dan Carpenter wrote:
> The intent here was clearly to use the gfp variable flags instead of
> hardcoding GFP_KERNEL.  All the callers pass GFP_KERNEL as the gfp
> flags so this doesn't affect runtime.
> 
> Fixes: b3231d353a51 ("kunit: add a convenience allocation wrapper for SKBs")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

The kernel doc comment for kunit_zalloc_skb() is missing a mention of
the gfp parameter. Additionally, the comment says "Allocate a new
struct sk_buff with GFP_KERNEL," which should replace GFP_KERNEL with
@gfp. It might be better to fix both issues in the comment together.
With the above corrections:

Reviewed-by: Kuan-Wei Chiu <visitorckw@...il.com>

Regards,
Kuan-Wei
> ---
>  include/kunit/skbuff.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/kunit/skbuff.h b/include/kunit/skbuff.h
> index 44d12370939a..345e1e8f0312 100644
> --- a/include/kunit/skbuff.h
> +++ b/include/kunit/skbuff.h
> @@ -29,7 +29,7 @@ static void kunit_action_kfree_skb(void *p)
>  static inline struct sk_buff *kunit_zalloc_skb(struct kunit *test, int len,
>  					       gfp_t gfp)
>  {
> -	struct sk_buff *res = alloc_skb(len, GFP_KERNEL);
> +	struct sk_buff *res = alloc_skb(len, gfp);
>  
>  	if (!res || skb_pad(res, len))
>  		return NULL;
> -- 
> 2.45.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ