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]
Date:   Thu, 10 Mar 2022 16:23:52 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Yihao Han <hanyihao@...o.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     kernel@...o.com, toke@...hat.com
Subject: Re: [PATCH] bpf: test_run: use kvfree() for memory allocated with
 kvmalloc()

[ You have plenty of folks in Cc, just not Toke given b530e9e1063e, so added him. ;) ]

On 3/10/22 10:28 AM, Yihao Han wrote:
> It is allocated with kvmalloc(), the corresponding release function
> should not be kfree(), use vfree() instead.

nit: s/vfree/kvfree/

> Generated by: scripts/coccinelle/api/kfree_mismatch.cocci

Fixed up typo and added Fixes tag before pushing, thanks!

> Signed-off-by: Yihao Han <hanyihao@...o.com>
> ---
>   net/bpf/test_run.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
> index 25169908be4a..b7e1e5f61c50 100644
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -196,9 +196,9 @@ static int xdp_test_run_setup(struct xdp_test_data *xdp, struct xdp_buff *orig_c
>   err_mmodel:
>   	page_pool_destroy(pp);
>   err_pp:
> -	kfree(xdp->skbs);
> +	kvfree(xdp->skbs);
>   err_skbs:
> -	kfree(xdp->frames);
> +	kvfree(xdp->frames);
>   	return err;
>   }
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ