Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2e37343 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Greg Kroah-Hartman
Browse files

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: 9d3cce0b ("thunderbolt: Introduce thunderbolt bus and connection manager")
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cc528414
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);