Re: [PATCH] libata: transport: Remove circular dependency at free time

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

 



Hello!

On 03/03/2017 08:00 PM, Gwendal Grignou wrote:

From: Tejun Heo <tj@xxxxxxxxxx>

Without this patch, failed probe would not free resources like irq.

ata port tdev object currently hold a reference to the ata port object.
Therefore the ata port object release function will not get called until
the ata_tport_release is called. But that would never happen, releasing
the last reference of ata port dev is done by scsi_host_release, which
is called by ata_host_release when the ata port object is released.

The ata tranport device objects actually do not need to explicitly hold

   Not ata_transport.

a reference to their real counterpart, given the transport objects are
the children of these objects and device_add() is call for each child.
We know the parent will not be deleted until we call the child

   Child's?

device_del().

Reported-by: Matthew Whitehead <tedheadster@xxxxxxxxx>
Tested-by: Matthew Whitehead <tedheadster@xxxxxxxxx>
Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>

   You're saying it's Tejun's patch but there's no sign-off from him?

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux