[lvc-project] [PATCH net v3] bnxt_en: Adjust logging of firmware messages in case of released token in __hwrm_send()

Michael Chan michael.chan at broadcom.com
Tue Jun 11 19:39:32 MSK 2024


On Tue, Jun 11, 2024 at 1:28 AM Aleksandr Mishin <amishin at t-argos.ru> wrote:
>
> In case of token is released due to token->state == BNXT_HWRM_DEFERRED,
> released token (set to NULL) is used in log messages. This issue is
> expected to be prevented by HWRM_ERR_CODE_PF_UNAVAILABLE error code. But
> this error code is returned by recent firmware. So some firmware may not
> return it. This may lead to NULL pointer dereference.
> Adjust this issue by adding token pointer check.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 8fa4219dba8e ("bnxt_en: add dynamic debug support for HWRM messages")
> Suggested-by: Michael Chan <michael.chan at broadcom.com>
> Signed-off-by: Aleksandr Mishin <amishin at t-argos.ru>
> Reviewed-by: Wojciech Drewek <wojciech.drewek at intel.com>
> ---
> v1->v2: Preserve the error message by replacing 'token' with 'ctx->req->seq_id' as suggested by Michael.
>  As the patch didn't change significantly, add Wojciech's Reviewed-by tag from the previous version.
> v2->v3: Fix missing alignment.

Thanks.
Reviewed-by: Michael Chan <michael.chan at broadcom.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4209 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://linuxtesting.org/pipermail/lvc-project/attachments/20240611/3075fee6/attachment.bin>


More information about the lvc-project mailing list