[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20241128060931.94100-1-zghbqbc@gmail.com>
Date: Thu, 28 Nov 2024 14:09:31 +0800
From: Baichuan Qi <zghbqbc@...il.com>
To: quic_vthiagar@...cinc.com
Cc: ath11k@...ts.infradead.org,
jjohnson@...nel.org,
kvalo@...nel.org,
linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org,
markus.elfring@....de,
zghbqbc@...il.com
Subject: Re: Re: [PATCH v5] NAK
Thanks for your reply
The reason I submit this patch is that the current
`ath11k_ce_rx_post_pipe()` NULL pointer check does not ensure
that `dest_ring` is NON-NULL. And it is not clear to show the
filtering of tx ce pipes
> This does not really fix any real issue. Please check ath11k_ce_alloc_pipe()
> where initialization would fail if anyone of pipe->dest_ring and
> pipe->status_ring allocation fails for ce pipe used for Rx.
When the driver is running normally, the results of the
following three are equal:
---
(pipe->dest_ring || pipe->status_ring) // current code
(pipe->dest_ring && pipe->status_ring)
(pipe->dest_ring)
---
However, when some errors occur and `dest_ring` is abnormal,
the OR operation cannot guarantee that the pointer is NON-NULL.
> This will always fail as the caller loops through all the supported ce pipes
> and ce pipes used for Tx will not have either dest_ring or status_ring.
> Please ensure the patch is tested properly.
I tested [PATCH v5] and indeed the wrong return value will lead
to wrong results when the pointer is null.
Please refer to [PATCH v4].
Link: https://lore.kernel.org/ath11k/20241127114310.26085-1-zghbqbc@gmail.com/
Although it does not return an error code, it can ensure that
when an unknown error occurs and causes the status of
`dest_ring` and `status_ring` to be different, the subsequent
code will not access the null pointer, which will only
cause the driver to fall into loops.
Thanks for you read.
Thanks
Baichuan Qi
Powered by blists - more mailing lists