From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796089402; b=4P5k4XWAg7dOhWd+gksa3J5KrABUYpo0gPr4taF7M/ZAeh+sy5HtS/2ZKgONDdifQ4ag +gjkRFmEGfN4ExcV2wW0zj53+VMyJ96gae88VsYjXf3WVzQlu5ypO1gcyTSmaaugvZVpt jQ3/GW3/5pPuEP4Qh6UENvg+QpXQBnlDRPKF7tXrbommmr/Ff35cOYirjB4/RksaL241J XEzoeV4Y3TjPqIRxzUWtSSJkaceoyyqDOoRyZehrbQHYhNZH89MLvB52jHcjE4F4bpA5G zMe7KMLaxMgqVGDcR+AiwzZ4xuFqlln2XsMrcaWA2RN+zxW98U7eFyyBMhXh78inLnQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796089402; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=HSZv9pkRnCGcqBWkjWr0FlNF4KxfJZ4fTuhpxJXXBuA=; b=a/A6mK8UOmG5EThJKep/XEfVE7Tysp+kHSBCdOhmsHZ02+eTzxo5myqpoV4nJZ7h3UKY a1aAFLGSuVaiNtQSNlev6ifmWQ6YOgTkLVhHI5X0tPkzeWT2ubVBDDKZu2Kus1EYcoPSH Hw7aY1ybiFxyVOX2UectHE0UfWw9h8hUkwziB47lhoKVGLBQb2ugvgNLQl6UKWnMW9w8W jZwNDFuHezg5rnUcsXiC2PIYd4wFSnUQv1+U8VjjzMGxxzv2i/yqpca2ljsrNUBxXc7k0 4MW6iASps8dO6IMZR6eknFrHVDA6z4IUwerSQFoMFb25+d9IpHqmqR65HyfWv4/t8hg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=c2zLnfpr; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=dkFA1RQX; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED86F606A336 for ; Tue, 1 Dec 2026 01:43:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ED86F606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=c2zLnfpr; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=dkFA1RQX Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B10Wdxk2550596 for ; Tue, 1 Dec 2026 01:43:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=HSZv9pkRnCGcqBWkjWr0FlNF 4KxfJZ4fTuhpxJXXBuA=; b=c2zLnfprq1vM/TTJjsIkuiW5boWPSKibmrhKcm+N CyL3wWEHFNJggiC/Qeqice7WKmk1aFm3nneHlrFSRNlnRkcF8J8HDeW/8+aBiq/E T2rLpEzsxc3Ok1AAuJQ6HjyxEwHnOVSwBwmg8PzaZjM8g2Pajc/HYsrgJZtbafK4 LBBjAFU95+dprytWiCX4BZAnlkxCB8drE8gid/NL1Mbhc5VNC02iL5l4SdYsS5U9 IH6RQHsYn8G2vh1h6pLmFPvnJ/xeyfxmncLTzNG7tu6TceRMUJubnqCi75Uk6dau w/czBLCUiI83AL7DHYUMmLZI4ccbZT6En7MXHKRuqYiH4A== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9enx1aau-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 01:43:21 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-386df943355so3385133eec.1 for ; Mon, 30 Nov 2026 17:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796089400; x=1796694200; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=HSZv9pkRnCGcqBWkjWr0FlNF4KxfJZ4fTuhpxJXXBuA=; b=dkFA1RQXn0x1I3IrCiuPJr7oVzI59V2Ii0pFC4nPejkpbZBQ/d4Dj8V0a1AGkDufWL ik21t8rR2hSliF7LfLo71YZO/ppZ/IaqiJi6Lllg0f5Ho8wjzxOH2ns72AUuEj0bZK7R Fwohv/95l0WBUODYTFyEM6qeFEUTx6jOR2RN8dwYoNu3CQ6GG8cZyy7Q4PWXcCVJ8G/S b65CJEatLLtLUGh7k/QZ40QkMTxEF98u0YzwyJNKh3oI6wfHxAd/gLxQAPRLIQWcPHZA XYFq3SwU/i2IJJRDLHUUvqSK9nR/q+mFucsdwoTyouhX+KfGbo2Xwy3HGKt4xD+EoOlS Vn8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796089400; x=1796694200; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HSZv9pkRnCGcqBWkjWr0FlNF4KxfJZ4fTuhpxJXXBuA=; b=S4MqiB83kYcLl/vgxbMjVKb5g99L7CVCYqsQ9kEWnKJuT0wb12v5Gtvcl9UXT9E9b8 644KUNsGAiVCd7r82lj8+8ZH9cPY0eloyW+vVmYTs5fuf6R/PlFiOXn9b9mmbKfJbUek rmxThOPMYtjdxxn1WMiMGkBfNIZHCdGexsKrrndeQRAm34b/VNSMTblvrtvimIVUFvFd z4vAGvxbtXI76EaA4u7HkQMwKT2nXNRk7cEyzjnaujosqMlhVpSnorS2XIMdNJa5DqAQ /cbD1YwjNjYG92UvxF32z5Q/xaBzdqnStGA6phPZMlkLOgA0GvKeRUWuuQj7c5km1X+u 5C/g== X-Forwarded-Encrypted: i=1; AL+hErEw0ATM1Gx1wwNOop3//fXijhSD0d0ffW7tpNK4f84iJsKfl9bBlF34mgJEcB5l/BSDtLdTYp8a5+TT/3A=@vger.kernel.org X-Gm-Message-State: APuU4Z8B8/Rp0UrfFMKOgiRuSv8sMpB5lrXJxa427NCyEY/o/B44+yan 74TYPko24J0wfK2w4ScaHpPi+8Z88h2W6QkhCENITNQYCQ0EunfVE2kc2Cdfr4DzEvb7A9w1XUb swtNidOpknFt3f3q2vapi/ptU7YsAsl60KAL3adNhbAXSdMOCojeVJjguvpXTE2bRoSRt4p74xu wwi8ul X-Gm-Gg: AZFdTZfLVqVyiZaq3Dh+w5462jGA9trUOm3kDSx17dgou/lRu8+qlXMmlXWtmuHgSsP Tn8votOGfyK7u2UCw5YaGHMlPTndjfyDVnFz7o6ALipAB0UKBP7VjJ3QTomQUPfmueFwmmxRMdP 3h/0UM9bmRZOIgg9+0o9YqlHtVYDnIvG4PpRs/aV8ztO5+i1cA98Gt4BhJhSGUYJgdWsy5Vuibs 0IV94+wqz45CNO5YA9nt0kiLfWn5YqoZ2uvCBty6qNtQb991A49PcoA74v0JYYQcIwgGHuGAAQG 3xAK/W6EYrQjmBoV3P5/y9Is1P/gyHiOM95SUx9/3PQnifNuc9MsnkV0Nz7PfrAeJNWWzfVkjsO VykOxXK8cLNsRSAQGbfeNqlSle+95kc9GDcX8sprgn0dp9VZtkFoT1T3TVISFwi1Gd3EDFgXvh3 rRbqym5eqbOYkZCQ== X-Received: by 2002:a05:693c:8084:b0:386:c5d3:72fe with SMTP id 5a478bee46e88-386c5d37550mr20440696eec.0.1796089400344; Mon, 30 Nov 2026 17:43:20 -0800 (PST) X-Received: by 2002:a05:693c:8084:b0:386:c5d3:72fe with SMTP id 5a478bee46e88-386c5d37550mr20440669eec.0.1796089399782; Mon, 30 Nov 2026 17:43:19 -0800 (PST) Received: from QCOM-aGQu4IUr3Y (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386ffc4ab65sm18851666eec.22.2026.11.30.17.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 17:43:19 -0800 (PST) Date: Tue, 1 Dec 2026 09:43:14 +0800 From: Shawn Guo To: Ekansh Gupta Cc: Srinivas Kandagatla , Arnd Bergmann , Greg Kroah-Hartman , Anandu Krishnan E , 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() Message-ID: References: <20261130035246.4119744-1-shengchao.guo@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Authority-Analysis: v=2.4 cv=Lv0HWXdc c=1 sm=1 tr=0 ts=6b0e2639 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=kj9zAlcOel0A:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=g--68duIi62PeIg6pEMA:9 a=CjuIK1q_8ugA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: XA2iMj1QD6mnVNFRQ7XqksezIBdqFIA7 X-Proofpoint-GUID: XA2iMj1QD6mnVNFRQ7XqksezIBdqFIA7 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDAwNiBTYWx0ZWRfX3t3bkzdQcyVZ FkTXRfr5sRFlg+XjGRAMmMKabAVc6eNxVJ+Bley6C2ahFM+TS/zSOQ4y7tIodYmvPEFWvRozhbH AEpkT7jayTH3s3GlnGY2Ty2HvplxexA= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDAwNiBTYWx0ZWRfX67G/2bZAxcMh cO3DBikfY7pJd03FV9V3LVbn6GXIqKhChHOpibevYl8RhAtEek7kka1vcrGQSBnDjhI4Qr+2gtd Ok51ES6dZsO+sWVWy6fmy0W61XdqRFOCphByxGlsQchEEKzC1aC2c13UDfNlQbp9O9qCtGwkSEf TYZnJ7hzzSJkn+AZXwWoKIrpd9rVbkrBmn8IKLtrEIkx0lZthav3O///9uTT+yTqWTjU4x3Esen TVkgB2j0GM5WLStovKQvPEtDLCYW2eEPY5zN39rYHIvGo3iFJ988Na0DBJBJ9XhmLhVkkhYSmKR Ny0HLXGhI6BkA/KZcDLNYYsoTLuxHm48toMzYQtNcOliKWio10D//+ZBN/Wdayr7Nt2F0l9CEjE gzT5dhdarX2ZjjN1d3iJR1XbVgR0NEQK+MlOXb6HRNg2Za5K7P7Cz/AiGdTLr5STbGJMgKqTkIu rqAX5WCVacFZfYmNTVw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_05,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010006 On Mon, Nov 30, 2026 at 01:40:35PM +0530, Ekansh Gupta wrote: > 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 > > I believe this[1] addresses the same issue, can you have a look at this? Thanks for the pointer, Ekansh! Indeed! The pointed patch works for me. My version can be discarded then. Shawn > > [1] > https://lore.kernel.org/all/20261127-fix-put-work-irq-deadlock-v1-1-3aa66fe4f2c9@oss.qualcomm.com/