[PATCH v3] scsi: ufs: fix use-after free in init error and remove paths

André Draszik andre.draszik at linaro.org
Thu Jan 16 03:30:43 PST 2025


On Thu, 2025-01-16 at 11:18 +0000, André Draszik wrote:
> Changes in v2:
> - completely new approach using devres action for Scsi_host cleanup, to
>   ensure ordering

Just repeating this again due to updated recipients list:

This new approach now means that Scsi_host cleanup (scsi_host_put)
happens after ufshcd's hba->dev cleanup and I am not sure if this
approach has wider implications (in particular if there is any
underlying assumption or requirement for the Scsi_host device to
clean up before the ufshcd device).

Simple testing using a few iteration of manual module bind/unbind
worked, as did the error handling / cleanup during init. But I'm
not sure if that is sufficient testing for the changed release
ordering.

Cheers,
Andre'




More information about the linux-arm-kernel mailing list