diff options
author | Max Gurtovoy <[email protected]> | 2020-11-25 12:27:36 +0000 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2020-12-01 20:36:37 +0100 |
commit | 0068a7b010533872b6e71a376771dc310d90fa1c (patch) | |
tree | 5e7864c6d32cc2446f734500f642851046ab70e5 | |
parent | 6d65aeab7bf6e83e75f53cfdbdb84603e52e1182 (diff) |
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.
Signed-off-by: Max Gurtovoy <[email protected]>
Reviewed-by: Israel Rukshin <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
-rw-r--r-- | drivers/nvme/target/discovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c index f40c05c33c3a..682854e0e079 100644 --- a/drivers/nvme/target/discovery.c +++ b/drivers/nvme/target/discovery.c @@ -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) |