Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2994428rdb; Wed, 15 Nov 2023 17:56:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1hFwJPDhEvpfpp7o/+YQ/M/OGTHSRtjbyqKANP9/t04wRgnN0mzBIzUHH4CrNHygD/+36 X-Received: by 2002:a17:90b:4c87:b0:27f:f9e5:b8d6 with SMTP id my7-20020a17090b4c8700b0027ff9e5b8d6mr15638139pjb.41.1700099807601; Wed, 15 Nov 2023 17:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700099807; cv=none; d=google.com; s=arc-20160816; b=SP/iBOwRczAlL0dwyHZU7AqDiwuwoY7wHCaT4O0HSirqIdfWkcgCysSN38N6HaHaMe OD5u4EPEYxTEBBdY8Y8kI/0VOPsg+UTKKlHoMwFDOJCcsdORCN2aMYeQY1hCb4YfOatV tictgozovW61tYEnQBbfIE8sxF2TA4rfdSftZ2n7e32Z/2F7qKM8YGeVRFeB2HonP2FH PpvGEaaJn4p0ij5vUnXvjfRQo5m1mIzeV2m4bzOgWaHG8RN2GaLvqjTtioGm5kevUocU 8u+SjJiNFfyqMFtA4oc4GeJqZedBmPnwu5UBaqMteg0eUDzt98zr3QuSFAkGoIvlfG06 jKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:to:from:dkim-signature:dkim-filter; bh=NjHAXY+npESZSHKM54SAmh+Z2EcBgtlB9s/fZyVIdII=; fh=Mf8pTaoRAFm3ujrMY3mVroaP5ALjnLzS8ohhhY7kqB4=; b=ZaTzOfs+mpTK+SVs1BiOUwvgDnOxKLBrdPaCdF2WxHBTRbAWQhwBRy7mQmtCEBh1At pPWsFMJRyIhHw/OACepuLTq+L4Fs9GZBBYgmVlmZSZsSKdG05g38H8s7bIcVOeZ1ohEW lfmsq0G7hG/nV35oSM3pQj0WWWGrqG4k1s6Mf1rlbLuzVsDgUeoAbOeQ8GwseIDmKsR4 eHDgSlWMEwRqIP/SPOMXnY4WlCMIJlugAQevOxPpqwZj72m2OrvfDrqZtWuFD/6QMZKe lNFVjNp2SSM5p+FnnhSYKERtn/FJJv2iNKxjd4Vt14k1EC1z/3OdRS5Cg+4bPB/02onj aSlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=paKoW9xy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y7-20020a1709029b8700b001c9d690baa4si10706628plp.532.2023.11.15.17.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 17:56:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=paKoW9xy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B760A8075EE0; Wed, 15 Nov 2023 17:56:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344469AbjKPB4c (ORCPT + 99 others); Wed, 15 Nov 2023 20:56:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbjKPB4b (ORCPT ); Wed, 15 Nov 2023 20:56:31 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 507E1182 for ; Wed, 15 Nov 2023 17:56:25 -0800 (PST) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20231116015620epoutp02b397f8e773ba4b3ce499b99a53fe53c8~X974zDYZ02159021590epoutp021 for ; Thu, 16 Nov 2023 01:56:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20231116015620epoutp02b397f8e773ba4b3ce499b99a53fe53c8~X974zDYZ02159021590epoutp021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1700099780; bh=NjHAXY+npESZSHKM54SAmh+Z2EcBgtlB9s/fZyVIdII=; h=From:To:In-Reply-To:Subject:Date:References:From; b=paKoW9xyuNUqO97lBxPvDzCOda3pO3geruL3C80IqHX+Y1fwfZLrAcemi/BLzvKSL MNhaax0entOPJBWQkBRW8/YMFJrP3FGlb+vftmDJYWGuoIurrtmQFRAo9mFLEmL32e cY2GpzasjnGGI4b7WhM9MFrkfZ9yn5qIGuXWxego= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20231116015620epcas2p23b7fe74778dfc2a1d0316aa87f235295~X974WDLbn2813728137epcas2p2D; Thu, 16 Nov 2023 01:56:20 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.91]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4SW36W2Zxgz4x9QH; Thu, 16 Nov 2023 01:56:19 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 77.D9.10022.3C675556; Thu, 16 Nov 2023 10:56:19 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20231116015618epcas2p2a80374aad80c6bbb7f3328d053fc457e~X973KnIRg3014830148epcas2p2h; Thu, 16 Nov 2023 01:56:18 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231116015618epsmtrp26518cede86e1297626df595b3f9546e0~X973IgGM31715617156epsmtrp2M; Thu, 16 Nov 2023 01:56:18 +0000 (GMT) X-AuditID: b6c32a47-bfdfa70000002726-f0-655576c38a48 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 4A.BC.07368.2C675556; Thu, 16 Nov 2023 10:56:18 +0900 (KST) Received: from KORCO118546 (unknown [10.229.38.108]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231116015618epsmtip2b91d84e4bba45f4a987e7cda3c11a4c6~X9727xHuG3047830478epsmtip2W; Thu, 16 Nov 2023 01:56:18 +0000 (GMT) From: "hoyoung seo" To: "'Bart Van Assche'" , , , , , , , , , , , , , , , In-Reply-To: Subject: RE: [PATCH v2] scsi: ufs: core: fix racing issue during ufshcd_mcq_abort Date: Thu, 16 Nov 2023 10:56:18 +0900 Message-ID: <00a901da1830$16ff2e10$44fd8a30$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLYbO3h/Z18bVSq8KBPFnY/ewa5qgDl2w4PAbQq5PoB4bZfOgGN9AJOrk8xZ4A= Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPJsWRmVeSWpSXmKPExsWy7bCmme7hstBUg1Oz+C0ezNvGZvHy51U2 i4MPO1kspn34yWzx8pCmxa+/69ktFt3YxmSx628zk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ymnvt9+v+f0scLijutHrnyrf/klpEdsX+1Tn+iQ H5MO72OcPPtsp+BLUeF0RWGdS1YLFfW57l25WjvhR+/kVTLxM+s1Wmf8r/nCE/hA6+qaB3xz /zK4n340ddsuZWOGCf/OOSuxFGckGmoxFxUnAgBV9k9XRAMAAA== X-CMS-MailID: 20231116015618epcas2p2a80374aad80c6bbb7f3328d053fc457e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231114043431epcas2p4a8d452e18fff192c03fb6066e81514ea References: <20231114043704.52525-1-hy50.seo@samsung.com> <000001da1784$5c2520f0$146f62d0$@samsung.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 15 Nov 2023 17:56:44 -0800 (PST) > -----Original Message----- > From: Bart Van Assche > Sent: Thursday, November 16, 2023 3:22 AM > To: hoyoung seo ; linux-scsi=40vger.kernel.org; l= inux- > kernel=40vger.kernel.org; alim.akhtar=40samsung.com; avri.altman=40wdc.co= m; > jejb=40linux.ibm.com; martin.petersen=40oracle.com; beanhuo=40micron.com; > kwangwon.min=40samsung.com; kwmad.kim=40samsung.com; sh425.lee=40samsung.= com; > sc.suh=40samsung.com; quic_nguyenb=40quicinc.com; cpgs=40samsung.com; > grant.jung=40samsung.com; junwoo80.lee=40samsung.com > Subject: Re: =5BPATCH v2=5D scsi: ufs: core: fix racing issue during > ufshcd_mcq_abort >=20 > On 11/14/23 21:27, hoyoung seo wrote: > > The test_bit() function just check SCMD_STATE_COMPLETE bit state. > > Do not set SCMD_STATE_COMPLETE field. > > This function is also used in ufshcd_mcq_compl_pending_transfer() > > to check the status of cmd. >=20 > Right, I misread your patch. Can you please take a look at the following > patch and verify whether it perhaps addresses the same issue that you wan= t > to address: https://lore.kernel.org/linux-scsi/20231115131024.15829-1- > peter.wang=40mediatek.com/ >=20 > Thanks, >=20 > Bart. Hi, Bart. It seem that not same issue. That problem is that the try_to_abort_task() function has already been=20 processed. So clear_cmd() has been processed. However, this issue was already completed IO request before executing clear= _cmd(). So can't get utag to clean up sq. This patch to prevent access to utag for cmd that has already been complete= d. Thanks Seo.