summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-11-05 07:52:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-06 20:22:33 +0300
commita2e373438f72391493a4425efc1b82030b6b4fd5 (patch)
treec7ccb397642d1f4d4f4e2bc693cff0f7166e6b46 /drivers/thunderbolt
parentcc5284142268bbcb70cafdf110d6cf4c4f9714e5 (diff)
downloadlinux-a2e373438f72391493a4425efc1b82030b6b4fd5.tar.xz
thunderbolt: tb: fix use after free in tb_activate_pcie_devices
Add a ̣̣continue statement in order to avoid using a previously free'd pointer tunnel in list_add. Addresses-Coverity-ID: 1415336 Fixes: 9d3cce0b6136 ("thunderbolt: Introduce thunderbolt bus and connection manager") Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/tb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 0b22ad9d68b4..f7d0c60c6a11 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -224,6 +224,7 @@ static void tb_activate_pcie_devices(struct tb *tb)
tb_port_info(up_port,
"PCIe tunnel activation failed, aborting\n");
tb_pci_free(tunnel);
+ continue;
}
list_add(&tunnel->list, &tcm->tunnel_list);