[PATCH] nvme: fix APST error for power latency tolerance

Christoph Hellwig hch at infradead.org
Tue Mar 23 16:23:21 GMT 2021


On Tue, Mar 23, 2021 at 03:31:33PM +0800, pngliu at hotmail.com wrote:
> From: Peng Liu <liupeng17 at lenovo.com>
> 
> Clear apsta so that nvme_configure_apst() does not execute
> nvme_set_features(), which will fail because admin_q is either not set up
> yet or no longer available at the time of nvme_uninit_ctrl() being called,
> and this leads to the error message "nvme nvme0: failed to set APST feature
> (-19)".
> 
> Fixes: 510a405d945b("nvme: fix memory leak for power latency tolerance")

How did you get into this situation?  For PCIe nvme_uninit_ctrl is
only called at the end of ->remove and ->delete_ctrl, so how do we end
up in nvme_configure_apst after that?



More information about the Linux-nvme mailing list