The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Ivy Lopez <skunkolee@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: use kfree_sensitive() for key material
Date: Tue, 14 Jul 2026 10:20:25 +0300	[thread overview]
Message-ID: <alXjOb8c53MddWeH@stanley.mountain> (raw)
In-Reply-To: <20260713233401.48262-1-skunkolee@gmail.com>

On Mon, Jul 13, 2026 at 05:34:01PM -0600, Ivy Lopez wrote:
> The set_stakey_parm struct contains a 16-byte encryption key.
> Use kfree_sensitive() instead of kfree() to ensure the key
> material is zeroed before the memory is freed, preventing
> potential information leaks.
> 
> Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
> ---
>  drivers/net/ethernet/faraday/ftmac100.c  | 47 +++++-------------------
>  drivers/staging/rtl8723bs/core/rtw_cmd.c |  8 ++--
>  2 files changed, 13 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
> index 5803a382f0ba..adb318925f44 100644
> --- a/drivers/net/ethernet/faraday/ftmac100.c
> +++ b/drivers/net/ethernet/faraday/ftmac100.c
> @@ -49,7 +49,6 @@ struct ftmac100_descs {
>  };
>  
>  struct ftmac100 {
> -	struct resource *res;
>  	void __iomem *base;
>  	int irq;
>  
> @@ -1137,11 +1136,9 @@ static int ftmac100_probe(struct platform_device *pdev)
>  		return irq;
>  
>  	/* setup net_device */
> -	netdev = alloc_etherdev(sizeof(*priv));
> -	if (!netdev) {
> -		err = -ENOMEM;
> -		goto err_alloc_etherdev;
> -	}
> +	netdev = devm_alloc_etherdev(&pdev->dev, sizeof(*priv));
> +	if (!netdev)
> +		return -ENOMEM;

This is unrelated...

regards,
dan carpenter


      parent reply	other threads:[~2026-07-14  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 23:34 [PATCH] staging: rtl8723bs: use kfree_sensitive() for key material Ivy Lopez
2026-07-13 23:37 ` Ivy Lopez
2026-07-14  7:20 ` Dan Carpenter [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=alXjOb8c53MddWeH@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=skunkolee@gmail.com \
    /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