From: Maksym Pikhotskyi <mpikhotskyi@gmail.com>
To: gregkh@linuxfoundation.org, error27@gmail.com,
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,
Maksym Pikhotskyi <mpikhotskyi@gmail.com>
Subject: [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt
Date: Fri, 17 Apr 2026 13:51:18 +0400 [thread overview]
Message-ID: <20260417095119.22948-1-mpikhotskyi@gmail.com> (raw)
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")
Reported-by: Luka Gejak <luka.gejak@linux.dev>
Closes: https://lore.kernel.org/linux-staging/E4BF62EF-C6F6-431F-8EDC-77C1E613E66B@linux.dev/
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Maksym Pikhotskyi <mpikhotskyi@gmail.com>
---
v2: rebase on staging-next. Split into a series of patches.
v3: add Reported-by, Closes and Reviewed-by tags.
---
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;
--
2.51.0
next reply other threads:[~2026-04-17 9:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 9:51 Maksym Pikhotskyi [this message]
2026-04-17 9:51 ` [PATCH v2 2/2] staging: rtl8723bs: reduce nesting in rtw_security.c Maksym Pikhotskyi
-- strict thread matches above, loose matches on Subject: below --
2026-04-15 18:47 [PATCH] staging: r8723bs: reduce nesting Maksym Pikhotskyi
2026-04-16 19:53 ` [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt Maksym Pikhotskyi
2026-04-16 20:42 ` Luka Gejak
2026-04-16 21:19 ` Dan Carpenter
2026-04-16 21:11 ` Dan Carpenter
2026-04-16 21:13 ` Dan Carpenter
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=20260417095119.22948-1-mpikhotskyi@gmail.com \
--to=mpikhotskyi@gmail.com \
--cc=arthur.stupa@gmail.com \
--cc=error27@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=luka.gejak@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox