Received: by 10.223.176.46 with SMTP id f43csp615103wra; Thu, 18 Jan 2018 22:56:07 -0800 (PST) X-Google-Smtp-Source: ACJfBouMx+VR8I1QPlVtaGjziSWU6F/gj1QTLmpy32mL5ckBl9WXVERjLKF5+GjaiKpd3ibBB2CG X-Received: by 10.98.87.2 with SMTP id l2mr8388189pfb.46.1516344966904; Thu, 18 Jan 2018 22:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516344966; cv=none; d=google.com; s=arc-20160816; b=uYV7/RuuZPzBzoz2bs5tqWejXlb+/mxO1NSPqfMo/QVddA00qLjzPt1dFquCS9MH37 BbWz8t0bCcBPt+Iu1pWqdqUG966Y6SuNGW6PBCmkF0d0BZDpgbFtiysrKb5Z4DmpQrbb 4/GnzA2ydFZBJoNNMZ5zwDLH8LYArrRn2xB0+uYp5J9Tb0KLJrhQQ4zUCUUpFTQUmWw9 M65wh7mIXyq3kSxjeLF8af7wLba7Qfzv7aXQf8RVVyx0j4cTYU/AOtxw9SJnkQPsaymV y28hMJheS8dYOu3eoNmNNqOqxj0M8DGehlBLG/M8xHSooSpFddNFqqrpjqRYhzfJ6q73 AyFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=JtsFBVibSkPtEKCW8TSb0PqDFUSTDaO6DaPyLuc59Qw=; b=aTCGvslesKPOZZL1MgMWPSmELHAPI4BfLzLFXoIWVOrow8xnLjKTZzf1QLcnMBd73N WuIj7HJalP3mDAypenM7ugZSc+z0AUoomwsH4+Mtf1Qpyuyv/EsRWEnVmNwhRYTauIp2 yk1ZNP3Kee+pMeLBP9Eo0MCdy/hoJHDdwREnUKQqkvhBg6IVhS3cAw/F0bKZnww1WpgR QmuME8n00Aa2u35spYfN1cq4MkAYYxig9aXwwsIHX+dUEMLZVbrgdBVV9zn4o2w2u866 tzKPIOlcc6e/6MZJ8H6iuB8sGkPbWGs5dCPq13G2qjJ/VsTAgiWuruwrRHFX2rObziYS vrHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=NRxJvC09; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u71si8518658pfd.344.2018.01.18.22.55.51; Thu, 18 Jan 2018 22:56:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=NRxJvC09; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1753427AbeASGyx (ORCPT + 99 others); Fri, 19 Jan 2018 01:54:53 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:45202 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbeASGyq (ORCPT ); Fri, 19 Jan 2018 01:54:46 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0J6pwiE072307; Fri, 19 Jan 2018 06:53:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=JtsFBVibSkPtEKCW8TSb0PqDFUSTDaO6DaPyLuc59Qw=; b=NRxJvC096DUixzEZUxtgqiMBBC1FHRUDuzlyRkaR/6DPhF/is1Lqbk5d/0PNqc8wiDQH 01N4LnGrtkfyG+jU/RdT9vcDTxmoam7fRUFe/jS9t+gDn6LfifA8Ha/lq9XNVZXXNyg8 JF/DngqTSHsedVm3kRHT5NgOI/An7EAZ2C+IMxj9zWuQTccCjrzrujbecMYNMNBh6p57 NQROte3XJRYRkAcbzBxGGkI/fhtZ03N7xMGJ3sY27NwMIAtzXiBon5eb3kTp90DbgDWH NmJcxpobHYbeulmTg70Xp/O4SP0Wall2MOxN5RCxXwmnqfn8aQK0809HjN+BT9QhE4YJ SA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2fkber021n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Jan 2018 06:53:45 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w0J6ri2c027128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Jan 2018 06:53:44 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0J6rhcq000391; Fri, 19 Jan 2018 06:53:44 GMT Received: from [10.182.70.180] (/10.182.70.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Jan 2018 22:53:43 -0800 Subject: Re: [PATCH V5 2/2] nvme-pci: fixup the timeout case when reset is ongoing To: Keith Busch Cc: sagi@grimberg.me, james.smart@broadcom.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, axboe@fb.com, maxg@mellanox.com, hch@lst.de References: <1516270202-8051-1-git-send-email-jianchao.w.wang@oracle.com> <1516270202-8051-3-git-send-email-jianchao.w.wang@oracle.com> <20180119045944.GC12043@localhost.localdomain> <0b74b36d-ecb5-e9e2-2900-6dc9c9699658@oracle.com> <20180119060521.GD12043@localhost.localdomain> From: "jianchao.wang" Message-ID: <23b3ea15-aed0-3b2f-e02f-124fe6fdf618@oracle.com> Date: Fri, 19 Jan 2018 14:53:37 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180119060521.GD12043@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8778 signatures=668654 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801190087 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Keith Thanks for your kindly reminding. On 01/19/2018 02:05 PM, Keith Busch wrote: >>> The driver may be giving up on the command here, but that doesn't mean >>> the controller has. We can't just end the request like this because that >>> will release the memory the controller still owns. We must wait until >>> after nvme_dev_disable clears bus master because we can't say for sure >>> the controller isn't going to write to that address right after we end >>> the request. >>> >> Yes, but the controller is going to be reseted or shutdown at the moment, >> even if the controller accesses a bad address and goes wrong, everything will >> be ok after reset or shutdown. :) > Hm, I don't follow. DMA access after free is never okay. Yes, this may cause unexpected memory corruption. Thanks Jianchao