Re: [PATCH 2/2] mailbox: qcom-cpucp: handle NULL data in send_data callback

Dmitry Baryshkov <[email protected]>
Newsgroups dev.linux.lists.linux-rt-devel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <gkju5hkg2r6nveirwe3bzeu6onezx5wxnkd6rxgn4lsp3uox2k@dn3crxwncft2>
On Thu, Aug 06, 2026 at 03:03:57PM +0800, Jia Yang wrote:
> mailbox_clear_channel() calls mbox_send_message() with NULL data to
> notify the remote side that the RX channel has been cleared.
> qcom_cpucp_mbox_send_data() blindly dereferenced the data pointer,
> causing a NULL pointer dereference kernel panic when invoked from
> this path under PREEMPT_RT.
> 
> Add an explicit NULL check and return early without writing to the
> TX register, which is the correct behaviour for a channel-clear
> notification.
> 
> Fixes: 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller")
> Signed-off-by: Jia Yang <[email protected]>
> ---
>  drivers/mailbox/qcom-cpucp-mbox.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <[email protected]>


-- 
With best wishes
Dmitry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.