On Sat, 12 Nov 2022 21:10:10 +0800, Yang Yingliang wrote: > Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's > bus_id string array"), the name of device is allocated dynamically, > it needs be freed, when device_register() returns error. > > As comment of device_register() says, it should use put_device() > to give up the reference in the error path. So fix this by calling > put_device(), then the name can be freed in kobject_cleanup(), and > sdbg_host is freed in sdebug_release_adapter(). > > [...] Applied to 6.2/scsi-queue, thanks! [1/1] scsi: scsi_debug: fix possible name leak in sdebug_add_host_helper() https://git.kernel.org/mkp/scsi/c/e6d773f93a49 -- Martin K. Petersen Oracle Linux Engineering