mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
To: Shawn Guo <shengchao.guo@oss.qualcomm.com>,
	Srinivas Kandagatla <srini@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Anandu Krishnan E <anandu.e@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] misc: fastrpc: fix self-deadlock in fastrpc_notify_users()
Date: Mon, 30 Nov 2026 13:40:35 +0530	[thread overview]
Message-ID: <bc85a7b5-887b-43e6-b929-ea7ffafb153c@oss.qualcomm.com> (raw)
In-Reply-To: <20261130035246.4119744-1-shengchao.guo@oss.qualcomm.com>

On 30-11-2026 09:22, Shawn Guo wrote:
> fastrpc_notify_users() holds user->lock while it walks the pending and
> interrupted lists, and calls fastrpc_context_schedule_put_work() for
> each context. That helper takes ctx->fl->lock, which is the same lock,
> so the CPU spins on a lock it already holds. Since the caller,
> fastrpc_rpmsg_remove(), also holds cctx->lock with interrupts disabled,
> the CPU is stuck with IRQs off. Any invoker woken by the preceding
> complete() then spins on fl->lock as well.
> 
> This is hit on every remoteproc stop of a DSP with an active fastrpc
> user, e.g. on Nord Ride:
> 
>   echo stop > /sys/class/remoteproc/remoteproc1/state
>   rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
>   ...
>   Call trace:
>    queued_spin_lock_slowpath+0x248/0x340 (P)
>    fastrpc_internal_invoke+0xa8c/0x13e0 [fastrpc]
>    fastrpc_device_ioctl+0x6e8/0x10c0 [fastrpc]
> 
> Add __fastrpc_context_schedule_put_work() for callers that already
> hold fl->lock, and use it in fastrpc_notify_users().
> 
> Fixes: 3f645f6884b5 ("misc: fastrpc: fix context leak and hang on signal-interrupted invoke")
> Cc: stable@vger.kernel.org
> Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>

I believe this[1] addresses the same issue, can you have a look at this?

[1]
https://lore.kernel.org/all/20261127-fix-put-work-irq-deadlock-v1-1-3aa66fe4f2c9@oss.qualcomm.com/

      reply	other threads:[~2026-11-30  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  3:52 Shawn Guo
2026-11-30  8:10 ` Ekansh Gupta [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=bc85a7b5-887b-43e6-b929-ea7ffafb153c@oss.qualcomm.com \
    --to=ekansh.gupta@oss.qualcomm.com \
    --cc=anandu.e@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=shengchao.guo@oss.qualcomm.com \
    --cc=srini@kernel.org \
    --cc=stable@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

all inboxes | Powered by JetHome®