Re: [PATCH] scsi: scsi_debug: fix possible name leak in sdebug_add_host_helper()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux