All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: tb: fix use after free in tb_activate_pcie_devices
@ 2017-11-05  4:52 Gustavo A. R. Silva
  2017-11-06  9:18 ` Mika Westerberg
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-05  4:52 UTC (permalink / raw)
  To: Andreas Noever, Michael Jamet, Mika Westerberg, Yehezkel Bernat
  Cc: linux-kernel, Gustavo A. R. Silva

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>
---
 drivers/thunderbolt/tb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index d674e06..1424581 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -225,6 +225,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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-06 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-05  4:52 [PATCH] thunderbolt: tb: fix use after free in tb_activate_pcie_devices Gustavo A. R. Silva
2017-11-06  9:18 ` Mika Westerberg
2017-11-06 13:16   ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.