ice: fix potential double free in probe unrolling
commitf45a35074abae40dbf9a7aab216d79041246bdb0
authorJacob Keller <jacob.e.keller@intel.com>
Sat, 16 May 2020 00:42:24 +0000 (15 17:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:51 +0000 (22 09:32 +0200)
tree7ecfbf6aa23b23aef774fb4e66c85960741242fd
parent49fe4ce4f41b395440fcbbf3e7d0c067d87d56fc
ice: fix potential double free in probe unrolling

[ Upstream commit bc3a024101ca497bea4c69be4054c32a5c349f1d ]

If ice_init_interrupt_scheme fails, ice_probe will jump to clearing up
the interrupts. This can lead to some static analysis tools such as the
compiler sanitizers complaining about double free problems.

Since ice_init_interrupt_scheme already unrolls internally on failure,
there is no need to call ice_clear_interrupt_scheme when it fails. Add
a new unroll label and use that instead.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c