mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srini@kernel.org>
To: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
	 Arnd Bergmann <arnd@arndb.de>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Thierry Escande <thierry.escande@linaro.org>,
	 Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Cc: Bharath Kumar <bkumar@qti.qualcomm.com>,
	 Chenna Kesava Raju <chennak@qti.qualcomm.com>,
	 linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	 Tyler Baker <tyler.baker@oss.qualcomm.com>
Subject: Re: [PATCH v3 0/2] fastrpc: fix probe-time races between rpmsg and userspace
Date: Mon, 16 Nov 2026 13:57:13 +0000	[thread overview]
Message-ID: <179483743344.37272.11839722342354246118.b4-ty@kernel.org> (raw)
In-Reply-To: <20261116-fastrpc-probe-fixes-v3-0-3cd56d9d9a93@oss.qualcomm.com>


On Mon, 16 Nov 2026 18:57:29 +0530, Vinayak Katoch wrote:
> This series fixes two races in fastrpc_rpmsg_probe() that can be
> triggered when userspace opens a fastrpc device node concurrently with
> the rpmsg probe sequence.
> 
> fastrpc_device_register() calls misc_register() before the channel
> context is fully initialised. A concurrent open() in that window hits
> kref_get() on a zero refcount, and because of_platform_populate() has
> not yet run, sesscount is 0. The error path then calls kref_put() on the
> saturated refcount, which kfree()s the channel context. A subsequent
> IRQ-path fastrpc_rpmsg_callback() dereferences the freed spinlock,
> causing a kernel panic.
> 
> [...]

Applied, thanks!

[1/2] misc: fastrpc: fix NULL rpdev dereference when session alloc fails
      commit: 2b22e3266386190d2027d9f12f317e0662a40711
[2/2] misc: fastrpc: fix init ordering race in rpmsg probe
      commit: 1bf78aac760fd25b684153f8c477aede9b9dd634

Best regards,
-- 
Srinivas Kandagatla <srini@kernel.org>


      parent reply	other threads:[~2026-11-16 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 13:27 Vinayak Katoch
2026-11-16 13:27 ` [PATCH v3 1/2] misc: fastrpc: fix NULL rpdev dereference when session alloc fails Vinayak Katoch
2026-11-16 13:27 ` [PATCH v3 2/2] misc: fastrpc: fix init ordering race in rpmsg probe Vinayak Katoch
2026-11-16 13:57 ` Srinivas Kandagatla [this message]

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=179483743344.37272.11839722342354246118.b4-ty@kernel.org \
    --to=srini@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bkumar@qti.qualcomm.com \
    --cc=chennak@qti.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thierry.escande@linaro.org \
    --cc=tyler.baker@oss.qualcomm.com \
    --cc=vinayak.katoch@oss.qualcomm.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

all inboxes | Powered by JetHome®