[PATCH v2] nvmet: Handle a NULL admin queue in nvmet_queue_tls_keyid()
Christoph Hellwig
hch at lst.de
Thu Oct 29 05:15:52 PDT 2026
On Thu, Oct 29, 2026 at 11:43:06AM +0800, Guixin Liu wrote:
> The admin queue is not necessarily installed when the tls_key debugfs
> entry is read: it may not have been created yet, or it may have been
> destroyed already. nvmet_queue_tls_keyid() then dereferences a NULL
> sq.
>
> Guard the helper and return 0 instead, which also covers the read
> racing with admin queue teardown.
The patch itself looks obviously fine, but do we have any synchronization
that ensure it does not go away while we're looking at the submission
queue?
More information about the Linux-nvme
mailing list