diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2017-03-03 20:00:09 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-03-06 23:24:48 +0300 |
commit | d85fc67dd11e9a32966140677d4d6429ca540b25 (patch) | |
tree | faf40259eb99fc42941b828a7870fbff6f012146 /scripts/headerdep.pl | |
parent | c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff) | |
download | linux-d85fc67dd11e9a32966140677d4d6429ca540b25.tar.xz |
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 device objects actually do not need to explicitly 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@gmail.com>
Tested-by: Matthew Whitehead <tedheadster@gmail.com>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/headerdep.pl')
0 files changed, 0 insertions, 0 deletions