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/06/2017 11:09 PM, Tejun Heo wrote:

Applied the following to libata/for-4.11-fixes.

Thanks.
------ 8< ------
From d4a32919c3d9c959af268d33bab24eb134dab0cc Mon Sep 17 00:00:00 2001
From: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
Date: Fri, 3 Mar 2017 09:00:09 -0800
Subject: [PATCH] libata: transport: Remove circular dependency at free time

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

   Still tranport? :-/

hold 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's device_del().

Reported-by: Matthew Whitehead <tedheadster@xxxxxxxxx>
Tested-by: Matthew Whitehead <tedheadster@xxxxxxxxx>
Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
[...]

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