Re: [PATCH V2 1/2] ublk_drv: fix error handling of ublk_add_dev

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

 



On 2022/7/22 13:09, Ming Lei wrote:
> __ublk_destroy_dev() is called for handling error in ublk_add_dev(),
> but either tagset isn't allocated or mutex isn't initialized.
> 
> So fix the issue by letting ublk_add_dev cleanup its own allocation,
> and simply call kfree(ub) outside of ublk_add_dev which is named
> as ublk_add_tagset(), meantime ublk_add_chdev() is moved out too.
> 
> Now the error handling in ublk_ctrl_add_dev() becomes more readable.
> 
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> ---
Reviewed-by: ZiyangZhang <ZiyangZhang@xxxxxxxxxxxxxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux