Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Qiujun Huang <hqjagain@gmail.com>
Cc: cristian.marussi@arm.com, linux-arm-kernel@lists.infradead.org,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] firmware: arm_scmi: Fix NULL pointer dereference in mailbox_clear_channel
Date: Wed, 30 Aug 2023 10:39:02 +0100	[thread overview]
Message-ID: <20230830093902.duvvjimgwddh7qbt@bogus> (raw)
In-Reply-To: <ED5DC8DB-AE81-4380-8AE5-588F370CD4B0@gmail.com>

On Wed, Aug 30, 2023 at 01:07:47AM +0800, Qiujun Huang wrote:
> There is a race between the failure of probe and rx_callback (due to a
> delayed response).
> 
> scmi_probe
> scmi_acquire_protocal
> do_xfer
>  timeout
> mailbox_chan_free
>                                                     <--- delay response
>                                                            rx_callback
> mbox_free_channel
> cinfo->transport_info = NULL
>                                                           mailbox_clear_channel
>                                                          dereference cinfo->transport_info

It is always good to provide the kernel stacktrace which you get when a
NULL pointer is dereference. It helps for review and also to document it.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-08-30  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 17:07 [PATCH v1] firmware: arm_scmi: Fix NULL pointer dereference in mailbox_clear_channel Qiujun Huang
2023-08-30  9:39 ` Sudeep Holla [this message]
2023-08-30 13:23   ` Qiujun Huang
2023-08-31 12:34     ` Sudeep Holla
2023-08-31 14:49       ` Qiujun Huang

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=20230830093902.duvvjimgwddh7qbt@bogus \
    --to=sudeep.holla@arm.com \
    --cc=cristian.marussi@arm.com \
    --cc=hqjagain@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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