Re: [PATCH] scsi: scsi_transport_sas: fix error handling in sas_port_add()

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

 



On 11/11/2022 13:24, Yang Yingliang wrote:
In sas_port_add(), the return value of transport_add_device() is
not checked. As a result, it causes null-ptr-deref while removing
device, because transport_remove_device() is called to remove the
device that was not added.

This makes it sound like we have the null-ptr-deref always, which would not be the case.

You need to make it clear that we don't check for an error in the add and we may later go on to try to remove a device which was never successfully added, causing the null-ptr-deref.


Apart from comment, above:
Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>




[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