From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45102 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbeDILxh (ORCPT ); Mon, 9 Apr 2018 07:53:37 -0400 Date: Mon, 9 Apr 2018 13:53:30 +0200 From: Greg KH To: Sagi Grimberg Cc: roys@lightbitslabs.com, alexander.levin@microsoft.com, hch@lst.de, maxg@mellanox.com, stable@vger.kernel.org, stable-commits@vger.kernel.org Subject: Re: Patch "nvme-fabrics: protect against module unload during create_ctrl" has been added to the 4.15-stable tree Message-ID: <20180409115330.GD22354@kroah.com> References: <1523266593785@kroah.com> <7313fa84-5b75-0738-31ee-0f46e1d427fa@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7313fa84-5b75-0738-31ee-0f46e1d427fa@grimberg.me> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Apr 09, 2018 at 01:37:11PM +0300, Sagi Grimberg wrote: > > > --- a/drivers/nvme/host/fabrics.c > > +++ b/drivers/nvme/host/fabrics.c > > @@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect) > > */ > > int nvmf_register_transport(struct nvmf_transport_ops *ops) > > { > > - if (!ops->create_ctrl) > > + if (!ops->create_ctrl || !ops->module) > > return -EINVAL; > > down_write(&nvmf_transports_rwsem); > > Hi Greg, > > I think that this part broke builtin compilation of nvme over fabrics > code. > > This was later fixed by Christoph in: > -- > commit 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 > Author: Christoph Hellwig > Date: Thu Feb 22 07:24:08 2018 -0800 > > nvme-fabrics: don't check for non-NULL module in nvmf_register_transport > > THIS_MODULE evaluates to NULL when used from code built into the kernel, > thus breaking built-in transport modules. Remove the bogus check. > > Fixes: 0de5cd36 ("nvme-fabrics: protect against module unload during > create_ctrl") > Signed-off-by: Christoph Hellwig > Reviewed-by: Sagi Grimberg > Reviewed-by: Johannes Thumshirn > Signed-off-by: Keith Busch > > diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c > index 5dd4ceefed8f..a1c58e35075e 100644 > --- a/drivers/nvme/host/fabrics.c > +++ b/drivers/nvme/host/fabrics.c > @@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect); > */ > int nvmf_register_transport(struct nvmf_transport_ops *ops) > { > - if (!ops->create_ctrl || !ops->module) > + if (!ops->create_ctrl) > return -EINVAL; > > down_write(&nvmf_transports_rwsem); > -- > > So I'd suggest taking that as well. Many thanks for letting me know, I've now queued up that patch as well. greg k-h