From: Greg KH <gregkh@linuxfoundation.org>
To: Sagi Grimberg <sagi@grimberg.me>
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
Date: Mon, 9 Apr 2018 13:53:30 +0200 [thread overview]
Message-ID: <20180409115330.GD22354@kroah.com> (raw)
In-Reply-To: <7313fa84-5b75-0738-31ee-0f46e1d427fa@grimberg.me>
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 <hch@lst.de>
> 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 <hch@lst.de>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
> Signed-off-by: Keith Busch <keith.busch@intel.com>
>
> 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
prev parent reply other threads:[~2018-04-09 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 9:36 Patch "nvme-fabrics: protect against module unload during create_ctrl" has been added to the 4.15-stable tree gregkh
2018-04-09 10:37 ` Sagi Grimberg
2018-04-09 11:53 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180409115330.GD22354@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.levin@microsoft.com \
--cc=hch@lst.de \
--cc=maxg@mellanox.com \
--cc=roys@lightbitslabs.com \
--cc=sagi@grimberg.me \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).