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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5H0WZtp2BTlHfyM@corigine.com>
Date:   Thu, 8 Dec 2022 15:27:37 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Yuan Can <yuancan@...wei.com>
Cc:     amitkarwar@...il.com, siva8118@...il.com, kvalo@...nel.org,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, prameela.j04cs@...il.com,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] rsi: Fix memory leak in rsi_coex_attach()

On Mon, Dec 05, 2022 at 06:14:41AM +0000, Yuan Can wrote:
> The coex_cb needs to be freed when rsi_create_kthread() failed in
> rsi_coex_attach().
> 
> Fixes: 2108df3c4b18 ("rsi: add coex support")
> Signed-off-by: Yuan Can <yuancan@...wei.com>

Reviewed-by: Simon Horman <simon.horman@...igine.com>

> ---
>  drivers/net/wireless/rsi/rsi_91x_coex.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/rsi/rsi_91x_coex.c b/drivers/net/wireless/rsi/rsi_91x_coex.c
> index 8a3d86897ea8..45ac9371f262 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_coex.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_coex.c
> @@ -160,6 +160,7 @@ int rsi_coex_attach(struct rsi_common *common)
>  			       rsi_coex_scheduler_thread,
>  			       "Coex-Tx-Thread")) {
>  		rsi_dbg(ERR_ZONE, "%s: Unable to init tx thrd\n", __func__);
> +		kfree(coex_cb);

I was going to ask if the assignment of coex_cb to common->coex_cb
also needs to be cleaned up. But I see that the caller frees
common on error, so I think this is ok.

>  		return -EINVAL;
>  	}
>  	return 0;
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ