* [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 related [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, other threads:[~2021-04-15 7:58 UTC | newest]
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
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).