nvmet: make sure discovery change log event is protected
Subsystems (2)
PATCH 1/1 nvmet: make sure discovery change log event is protected
Generation counter is protected by nvmet_config_sem. Make sure the callers that call functions that might change it, are calling it properly.
--- drivers/nvme/target/discovery.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/target/discovery.c +1 -0
@@ -69,6 +69,7 @@ void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys,struct nvmet_port *port;struct nvmet_subsys_link *s; +lockdep_assert_held (&nvmet_config_sem); nvmet_genctr++;list_for_each_entry (port, nvmet_ports, global_entry)
Signature · 7 lines
2.25.4 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 6 lines · Max Gurtovoy
Generation counter is protected by
nvmet_config_sem. Make sure the callers that call functions that might change it, are calling it properly.Signed-off-by Max Gurtovoy <[email protected]>Reviewed-by Israel Rukshin <[email protected]>
Looks good.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Thanks,
applied to nvme-5.11.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme