nvmet-auth: don't try to cancel a non-initialized work_struct
Currently blktests nvme/002 trips up debugobjects if CONFIG_NVME_AUTH is enabled, but authentication is not on a queue. This is because nvmet_auth_sq_free cancels sq->auth_expired_work unconditionaly, while auth_expired_work is only ever initialized if authentication is enabled for a given controller. Fix this by calling most of what is nvmet_init_auth unconditionally when initializing the SQ, and just do the setting of the result field in the connect command handler. Fixes: db1312dd ("nvmet: implement basic In-Band Authentication") Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Hannes Reinecke <hare@suse.de>
Showing
- drivers/nvme/target/core.c 1 addition, 0 deletionsdrivers/nvme/target/core.c
- drivers/nvme/target/fabrics-cmd-auth.c 4 additions, 9 deletionsdrivers/nvme/target/fabrics-cmd-auth.c
- drivers/nvme/target/fabrics-cmd.c 4 additions, 2 deletionsdrivers/nvme/target/fabrics-cmd.c
- drivers/nvme/target/nvmet.h 4 additions, 3 deletionsdrivers/nvme/target/nvmet.h
Loading
Please register or sign in to comment