From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84155231C82 for ; Tue, 10 Dec 2024 09:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733822098; cv=none; b=UQaDS8u2yqzLuKkTiFuLI4CH1aSlEfJ4xC9GTcbiYhlj/AHmoNPqo6Gms6b358kXpSfBIuFDCXuihtzuq+2spbRoPmQ/WDBEt2dT8I7GCpxFdeMf+dv85Dwg+D64mMwgK3rDBNFAYHvozPXbo58LMEdVkiQuIBsKkRDaf2EIDXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733822098; c=relaxed/simple; bh=BR/HDhBpQ8J8xl+/UUwo/rlLua9hM5k/tH4z07XcpOQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Qk0+oiFQVU+3MLx2LOejz5Kf2wbi+BHPG7M7Ph1s4scJuZe//P/hEV0LFdAh/Dh4dGl0MNuFbV11sN0RY6F+TpYb//kQth8ftSdZaqcmppTSPxz4ristV6B0KH/onLluIzZG3hY83g9kde/RNMrViv4yExvoTVplS56tMijtxiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=P0TdpvHT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="P0TdpvHT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05179C4CED6; Tue, 10 Dec 2024 09:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733822098; bh=BR/HDhBpQ8J8xl+/UUwo/rlLua9hM5k/tH4z07XcpOQ=; h=Subject:To:Cc:From:Date:From; b=P0TdpvHTmPPVK4uksgdGaRuUvZZxG8CunbJ7ac737zNhm0Led6ZmHss9mOUVAc7Gb phYzXOcohWt3seOe5Pbf1mR+c7rmh9WRDJySzko+hqZTnstUtPJd2RHEIEBf9+Ccs8 dKPM9SRjUd0QcT2G9kz4IGnyTBw/fi1N0sKgKTEI= Subject: FAILED: patch "[PATCH] scsi: ufs: pltfrm: Dellocate HBA during" failed to apply to 5.10-stable tree To: mani@kernel.org,beanhuo@micron.com,bvanassche@acm.org,manivannan.sadhasivam@linaro.org,martin.petersen@oracle.com,peter.wang@mediatek.com Cc: From: Date: Tue, 10 Dec 2024 10:14:07 +0100 Message-ID: <2024121007-conflict-handclap-ac2f@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 897df60c16d54ad515a3d0887edab5c63da06d1f # git commit -s git send-email --to '' --in-reply-to '2024121007-conflict-handclap-ac2f@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 897df60c16d54ad515a3d0887edab5c63da06d1f Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Mon, 11 Nov 2024 23:18:34 +0530 Subject: [PATCH] scsi: ufs: pltfrm: Dellocate HBA during ufshcd_pltfrm_remove() This will ensure that the scsi host is cleaned up properly using scsi_host_dev_release(). Otherwise, it may lead to memory leaks. Cc: stable@vger.kernel.org # 4.4 Fixes: 03b1781aa978 ("[SCSI] ufs: Add Platform glue driver for ufshcd") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20241111-ufs_bug_fix-v1-5-45ad8b62f02e@linaro.org Reviewed-by: Peter Wang Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen diff --git a/drivers/ufs/host/ufshcd-pltfrm.c b/drivers/ufs/host/ufshcd-pltfrm.c index b8dadd0a2f4c..505572d4fa87 100644 --- a/drivers/ufs/host/ufshcd-pltfrm.c +++ b/drivers/ufs/host/ufshcd-pltfrm.c @@ -534,6 +534,7 @@ void ufshcd_pltfrm_remove(struct platform_device *pdev) pm_runtime_get_sync(&pdev->dev); ufshcd_remove(hba); + ufshcd_dealloc_host(hba); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); }