All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Maksym Pikhotskyi" <mpikhotskyi@gmail.com>,
	<gregkh@linuxfoundation.org>, <ethantidmore06@gmail.com>,
	<starpt.official@gmail.com>, <straube.linux@gmail.com>,
	<sameekshasankpal@gmail.com>, <arthur.stupa@gmail.com>,
	<luka.gejak@linux.dev>
Cc: <linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt
Date: Thu, 16 Apr 2026 22:42:07 +0200	[thread overview]
Message-ID: <DHUVD5N4JNX9.20NSTUBQJJNTC@linux.dev> (raw)
In-Reply-To: <20260416195338.324428-1-mpikhotskyi@gmail.com>

On Thu Apr 16, 2026 at 9:53 PM CEST, Maksym Pikhotskyi wrote:
> The null-pointer-guard was incorrect, returning _FAIL on valid pointer.
> Invert the guard, so it returns _FAIL on invalid pointer.
>
> Fixes: e23ad1570028 ("staging: rtl8723bs: use guard clause for stainfo check")
> Signed-off-by: Maksym Pikhotskyi <mpikhotskyi@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> index a00504ff2910..f467cb5b1dca 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> @@ -1212,7 +1212,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
>  	if (prxattrib->encrypt != _AES_)
>  		return _SUCCESS;
>  	stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
> -	if (stainfo)
> +	if (!stainfo)
>  		return _FAIL;
>  	if (is_multicast_ether_addr(prxattrib->ra)) {
>  		static unsigned long start;

You should Cc stable and also add Reported-by tag since you weren't the
one to point out the bug.
Best regards,
Luka Gejak

  parent reply	other threads:[~2026-04-16 20:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 18:47 [PATCH] staging: r8723bs: reduce nesting Maksym Pikhotskyi
2026-04-16 11:20 ` Luka Gejak
2026-04-16 19:53 ` [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt Maksym Pikhotskyi
2026-04-16 19:53   ` [PATCH v2 2/2] staging: rtl8723bs: reduce nesting Maksym Pikhotskyi
2026-04-16 20:58     ` Luka Gejak
2026-04-16 20:42   ` Luka Gejak [this message]
2026-04-16 21:19     ` [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt Dan Carpenter
2026-04-16 21:11   ` Dan Carpenter
2026-04-16 21:13   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2026-04-17  9:51 Maksym Pikhotskyi

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=DHUVD5N4JNX9.20NSTUBQJJNTC@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=arthur.stupa@gmail.com \
    --cc=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mpikhotskyi@gmail.com \
    --cc=sameekshasankpal@gmail.com \
    --cc=starpt.official@gmail.com \
    --cc=straube.linux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.