Correcting erroneous patch

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Apr 24 21:54:06 PDT 2023


On 4/24/23 21:44, Irvin Cote wrote:
> Following the error comment in the previous e-mail thread, I have identified the cause of the error.
>
> nvme_free_ctrl which is the ctrl's release method, and nvme_init_ctrl's
> teardown path, both call ida_free on ctrl->instance.
> To properly decrement the ref-count while avoiding such issues:
>
> -The final nvme_put_ctrl was placed in nvme_pci_alloc_dev at the end of the teardown path
>   so that nvme_free_ctrl executes last.
>
> -I have addressed the broader issue of double-freeing between the teardown-path and the release method,
>   by marking the resources as freed in the former and implementing checks in the latter.
>
> This is the object of the last two patches, while the first one is just a cleanup.
> The patches were written one on top of the other.
>
>

please send a patches in linux kernel mailing list format with 
cover-letter..

-ck




More information about the Linux-nvme mailing list