]> git.baikalelectronics.ru Git - kernel.git/commit
ice: fix potential double free in probe unrolling
authorJacob Keller <jacob.e.keller@intel.com>
Sat, 16 May 2020 00:42:24 +0000 (17:42 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 28 May 2020 22:50:01 +0000 (15:50 -0700)
commit5d6ac4632293375e7424163446eb11f315a33012
treef843ad3fb8b45a330d380c5e8a11b4cf659f1f0b
parentc2d1ff974a1cee69eec7d9d0e22646086c0cd38e
ice: fix potential double free in probe unrolling

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>
drivers/net/ethernet/intel/ice/ice_main.c