Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp216622rwb; Wed, 18 Jan 2023 16:40:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXveKj2pVevcor9Qd2RPr1OfwdFFY4IooaLQ0lWFxw2sVdMbZELS7bb/kzbWgFHQKrwAye6C X-Received: by 2002:a17:906:9710:b0:7c1:e7a:62e6 with SMTP id k16-20020a170906971000b007c10e7a62e6mr10237891ejx.71.1674088821114; Wed, 18 Jan 2023 16:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674088821; cv=none; d=google.com; s=arc-20160816; b=OVtrDpxQWdC4DwTjSh6GCpP55PVySUOXXTtUhkuFRQOO6d/gncWcr8XUGL56MuHzBj NnQUvZGkvfVKDDbn8FCMf+mCTpCBMK7jFuBHfTAA6wIuKp97EiDPoxxYvVGcauTX3EcP 7fMGQQW3jA/voRwCAWdVfNhcGQh6m4Nrqdp80VcQaoQ0jnLlt2W4t+CAb8TVDGzTTOVe bEHmt/HNgROZk4f30JOUKoBbMMef+6lQ6h3igkF9ZG5t+W2x/MvfQ5IAGiyx147eVb4b E5TFvO6U8ILv58yCWmMywVTL0+eFCGTfMd+mrzv3WWloGZ5uDz6QL1wmo6Zumgg7ecL9 /kbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZCP7XGu9FCxlendnB63ykyjoX0wHLW17+xYQa8RFbYQ=; b=zG60a6Et+WxlRp9/Vt/56V2vgryUggLxYC0Jw4GWNNXRLecEj+4gShm7VtdZgKPUVt 5E3YJjcFr5LsBE9HfSB2IRIqyWxZpz2nmsGhH547mZtaoActh7ko6sYhETm5IC/eTQai N0Fbry6oc/DMQ392xWs2NRY2trxmqvdVo097Z36K8Klze3rg2y1bmIZK7we+ZtNKDeac 11dquZFSweUc6yWmIdlATHW0+Si1XcZbpzAFAyDN15j66zSZDoZYTtjmGZhyKJjeDwiF 7PuvOQ+TklLxznHGznke0RjuwkXgFNO02JpHr/D3vql+jzorP41lZe3vo10tV/5SQ98k neSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=jQWFZ49q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd10-20020a170907968a00b00872ecaebf85si6764596ejc.103.2023.01.18.16.40.10; Wed, 18 Jan 2023 16:40:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=jQWFZ49q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbjASAV4 (ORCPT + 46 others); Wed, 18 Jan 2023 19:21:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjASAVy (ORCPT ); Wed, 18 Jan 2023 19:21:54 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FEF654B16; Wed, 18 Jan 2023 16:21:54 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30ILmh5c016456; Thu, 19 Jan 2023 00:21:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2022-7-12; bh=ZCP7XGu9FCxlendnB63ykyjoX0wHLW17+xYQa8RFbYQ=; b=jQWFZ49qYY4gwBzL7XrHo66L/4CFKyf1bMYGy1evL809xfG+5BpE3VOAk9+OxpyydU2Y hZbFNTssABxKfPIgF6tiguMSEbHFPAmAr8QY11wcDM563qSocgmhptlkwVCuQC1iAdXe hRErlWRtxv2AFimRByZmvaiPGJsqr20cdlcRMp1Dg9PBOzV85t+IEgsFE/OBBINujGWE hJlmdQubTxMuQPx0XWHdhmVs7YoNy0zMv9NsSfoyckKBntB8DMUMieMXZnoXIwte2G4a dYsdzzkDG2UAaYn4zuy2VtbunJTZh07Bqztz5DP8QFB6d0TxH3nuA+cceT5SkroIIew4 +g== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n3kaah1tf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 00:21:37 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30INqADL030692; Thu, 19 Jan 2023 00:21:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n6quaxw7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 00:21:36 +0000 Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30J0LYP0007137; Thu, 19 Jan 2023 00:21:35 GMT Received: from ca-mkp2.ca.oracle.com.com (mpeterse-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.251.135]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3n6quaxw6c-2; Thu, 19 Jan 2023 00:21:35 +0000 From: "Martin K. Petersen" To: "James E.J. Bottomley" , Johan Hovold Cc: "Martin K . Petersen" , Alim Akhtar , Avri Altman , Bart Van Assche , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Can Guo , Andrew Halaney Subject: Re: [PATCH v2] scsi: ufs: core: fix devfreq deadlocks Date: Wed, 18 Jan 2023 19:21:28 -0500 Message-Id: <167408762166.3511288.15577656498672472733.b4-ty@oracle.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230116161201.16923-1-johan+linaro@kernel.org> References: <20230116161201.16923-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-18_05,2023-01-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=814 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190000 X-Proofpoint-GUID: AFlohegXLb34xo_IVga-FgwsFxmMtIJa X-Proofpoint-ORIG-GUID: AFlohegXLb34xo_IVga-FgwsFxmMtIJa X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Jan 2023 17:12:01 +0100, Johan Hovold wrote: > There is a lock inversion and rwsem read-lock recursion in the devfreq > target callback which can lead to deadlocks. > > Specifically, ufshcd_devfreq_scale() already holds a clk_scaling_lock > read lock when toggling the write booster, which involves taking the > dev_cmd mutex before taking another clk_scaling_lock read lock. > > [...] Applied to 6.2/scsi-fixes, thanks! [1/1] scsi: ufs: core: fix devfreq deadlocks https://git.kernel.org/mkp/scsi/c/ba81043753ff -- Martin K. Petersen Oracle Linux Engineering