Home
last modified time | relevance | path

Searched hist:e3e19dcc (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/nvme/target/
H A Dconfigfs.ce3e19dcc Wed Oct 06 03:09:43 CDT 2021 Israel Rukshin <israelr@nvidia.com> nvmet: fix use-after-free when a port is removed

When a port is removed through configfs, any connected controllers
are starting teardown flow asynchronously and can still send commands.
This causes a use-after-free bug for any command that dereferences
req->port (like in nvmet_parse_io_cmd).

To fix this, wait for all the teardown scheduled works to complete
(like release_work at rdma/tcp drivers). This ensures there are no
active controllers when the port is eventually removed.

Signed-off-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>