linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Talker Alex <alextalker@yandex.ru>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] nvmet: fix null-pointer when removing a referral
Date: Thu, 12 Dec 2019 01:33:41 -0800	[thread overview]
Message-ID: <20191212093341.GA20683@infradead.org> (raw)
In-Reply-To: <34086421575664793@iva7-8a22bc446c12.qloud-c.yandex.net>

On Fri, Dec 06, 2019 at 11:39:53PM +0300, Talker Alex wrote:
> nvmet_referral_release() was called after item->ci_parent
> and item->ci_group were set to NULL by configfs internals.
> This caused oops on older kernels and possibly on the mainline too.
> 
> Tested on CentOS 7.7 (kernel 3.10) and Ubuntu 18.04.3 (kernel 4.15)
> by means of MLNX OFED sources.
> 
> This patch is mainly wanted in Mellanox OFED as in-tree nvmet.ko for
> mentioned kernel behaves proper as the bug was introduced about
> a year ago.
> 
> I haven't found information about bug-reporting into the Mellanox OFED
> but after taking a look in the mainline I thought that it might need
> this patch too.
> 
> I have never before sent a kernel patch so
> feel free to tell me if I did something improper.

As Sagi said the commit description can be shorted, basically just
the first paragraph is needed.

>  static struct configfs_item_operations nvmet_referral_item_ops = {
> -	.release	= nvmet_referral_release,
>  };

nvmet_referral_item_ops can be entirely removed now.

Otherwise the patch looks good, thanks a lot!

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2019-12-12  9:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 20:39 [PATCH] nvmet: fix null-pointer when removing a referral Talker Alex
2019-12-06 22:31 ` Sagi Grimberg
2019-12-07 10:21   ` Talker Alex
2019-12-12  9:33 ` Christoph Hellwig [this message]
2019-12-12 10:36   ` Talker Alex
2019-12-12 10:40     ` Talker Alex
2019-12-12 10:43     ` Christoph Hellwig
2020-01-16 14:15       ` Talker Alex
2020-01-16 16:08         ` Keith Busch

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=20191212093341.GA20683@infradead.org \
    --to=hch@infradead.org \
    --cc=alextalker@yandex.ru \
    --cc=linux-nvme@lists.infradead.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).