Return-Path: Received: from mga03.intel.com ([134.134.136.65]:21068 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbeHMRRd (ORCPT ); Mon, 13 Aug 2018 13:17:33 -0400 Date: Mon, 13 Aug 2018 08:35:43 -0600 From: Keith Busch To: shan.gavin@linux.alibaba.com Cc: dubo.sgw@alibaba-inc.com, Jon Derrick , "# 4 . 9+" Subject: Re: [PATCH 4/4] nvme-pci: Remap CMB SQ entries on every controller reset Message-ID: <20180813143543.GB32027@localhost.localdomain> References: <20180813074238.10367-1-shan.gavin@linux.alibaba.com> <20180813074238.10367-4-shan.gavin@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180813074238.10367-4-shan.gavin@linux.alibaba.com> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Aug 13, 2018 at 03:42:38PM +0800, shan.gavin@linux.alibaba.com wrote: > The controller memory buffer is remapped into a kernel address on each > reset, but the driver was setting the submission queue base address > only on the very first queue creation. The remapped address is likely to > change after a reset, so accessing the old address will hit a kernel bug. > > This patch fixes that by setting the queue's CMB base address each time > the queue is created. > > Cherry-pick from upstream commit 815c6704bf9f ("nvme-pci: Remap CMB SQ > entries on every controller reset") > > Fixes: f63572dff1421 ("nvme: unmap CMB and remove sysfs file in reset path") > Reported-by: Christian Black > Cc: Jon Derrick > Cc: # 4.9+ This one is already in 4.9-stable.