Commit d6609084 authored by Gopal Tiwari's avatar Gopal Tiwari Committed by Christoph Hellwig

nvme: fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store

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

Fixes: 09fbed63 (nvme: export fast_io_fail_tmo to sysfs)
Signed-off-by: default avatarGopal Tiwari <gtiwari@redhat.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a9e0e6bc
......@@ -3379,6 +3379,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment