Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store
@ 2021-04-14  8:46 Gopal Tiwari
  2021-04-14 14:13 ` Keith Busch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gopal Tiwari @ 2021-04-14  8:46 UTC (permalink / raw)
  To: linux-nvme, kbusch; +Cc: gtiwari

Adding entry for dev_attr_fast_io_fail_tmo to avoid the kernel crash
while reading and writing the fast_io_fail_tmo.

Fixes: 09fbed636382 (nvme: export fast_io_fail_tmo to sysfs)

Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>
---
 drivers/nvme/host/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d26eddf2bde4..dcf0228a6e09 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3821,6 +3821,8 @@ static umode_t nvme_dev_attrs_are_visible(struct kobject *kobj,
 		return 0;
 	if (a == &dev_attr_reconnect_delay.attr && !ctrl->opts)
 		return 0;
+	if (a == &dev_attr_fast_io_fail_tmo.attr && !ctrl->opts)
+		return 0;
 
 	return a->mode;
 }
-- 
2.26.2


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store
  2021-04-14  8:46 [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store Gopal Tiwari
@ 2021-04-14 14:13 ` Keith Busch
  2021-04-14 18:22 ` Chaitanya Kulkarni
  2021-04-15  7:57 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2021-04-14 14:13 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: linux-nvme

On Wed, Apr 14, 2021 at 02:16:45PM +0530, Gopal Tiwari wrote:
> Adding entry for dev_attr_fast_io_fail_tmo to avoid the kernel crash
> while reading and writing the fast_io_fail_tmo.
> 
> Fixes: 09fbed636382 (nvme: export fast_io_fail_tmo to sysfs)

Looks good.

Reviewed-by: Keith Busch <kbusch@kernel.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store
  2021-04-14  8:46 [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store Gopal Tiwari
  2021-04-14 14:13 ` Keith Busch
@ 2021-04-14 18:22 ` Chaitanya Kulkarni
  2021-04-15  7:57 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-14 18:22 UTC (permalink / raw)
  To: Gopal Tiwari, linux-nvme, kbusch

On 4/14/21 01:58, Gopal Tiwari wrote:
> Adding entry for dev_attr_fast_io_fail_tmo to avoid the kernel crash
> while reading and writing the fast_io_fail_tmo.
>
> Fixes: 09fbed636382 (nvme: export fast_io_fail_tmo to sysfs)
>
> Signed-off-by: Gopal Tiwari <gtiwari@redhat.com>

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store
  2021-04-14  8:46 [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store Gopal Tiwari
  2021-04-14 14:13 ` Keith Busch
  2021-04-14 18:22 ` Chaitanya Kulkarni
@ 2021-04-15  7:57 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-04-15  7:57 UTC (permalink / raw)
  To: Gopal Tiwari; +Cc: linux-nvme, kbusch

Thanks,

applied to nvme-5.13.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14  8:46 [PATCH] Fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store Gopal Tiwari
2021-04-14 14:13 ` Keith Busch
2021-04-14 18:22 ` Chaitanya Kulkarni
2021-04-15  7:57 ` Christoph Hellwig

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git