mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
To: Srinivas Kandagatla <srini@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Cc: Bharath Kumar <quic_bkumar@quicinc.com>,
	Chenna Kesava Raju <quic_chennak@quicinc.com>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Subject: [PATCH 0/2] misc: fastrpc: fix session setup and teardown ordering in probe
Date: Thu, 03 Dec 2026 11:11:28 +0530	[thread overview]
Message-ID: <20261203-fastrpc-probe-ordering-fix-v1-0-b5e56e5c895f@oss.qualcomm.com> (raw)

Commit 112dc91edd51 ("misc: fastrpc: move ADSP duplicate session
creation to the driver") and commit 81b3908cf7b9 ("misc: fastrpc:
iterate CB nodes manually instead of of_platform_populate") were
developed against different layouts of fastrpc_rpmsg_probe(). After
both landed in fastrpc for-next, two parts of the probe still reflect
the layout they were written against.

Patch 1 moves the ADSP duplicate session creation ahead of
fastrpc_device_register(), so the session table is complete and unused
before userspace can open the device. In the current order an open()
can fail with all sessions in use, and a duplicate copied from an
already-allocated session is created with used = true and can never be
freed.

Patch 2 switches the probe error path from of_platform_depopulate() to
fastrpc_cb_devices_destroy(), matching the helper that now creates the
CB devices and that fastrpc_rpmsg_remove() already uses, so the
sessions are invalidated under the channel lock before the CB devices
go away.

Both issues exist only in fastrpc for-next, so no stable backport is
needed. Feel free to squash these into the original commits if you
prefer that over applying them on top.

Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
---
Ekansh Gupta (2):
      misc: fastrpc: create ADSP duplicate sessions before registering devices
      misc: fastrpc: use fastrpc_cb_devices_destroy() in probe error path

 drivers/misc/fastrpc.c | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)
---
base-commit: 3680d0d62e9c661e228874cab35346ebd79feaf9
change-id: 20261203-fastrpc-probe-ordering-fix-80c72974d916

Best regards,
--  
Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>


             reply	other threads:[~2026-12-03  5:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  5:41 Ekansh Gupta [this message]
2026-12-03  5:41 ` [PATCH 1/2] misc: fastrpc: create ADSP duplicate sessions before registering devices Ekansh Gupta
2026-12-03  5:41 ` [PATCH 2/2] misc: fastrpc: use fastrpc_cb_devices_destroy() in probe error path Ekansh Gupta

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=20261203-fastrpc-probe-ordering-fix-v1-0-b5e56e5c895f@oss.qualcomm.com \
    --to=ekansh.gupta@oss.qualcomm.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_bkumar@quicinc.com \
    --cc=quic_chennak@quicinc.com \
    --cc=srini@kernel.org \
    --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®