If e1000_get_hw_semaphore_82574() succeed, it acquires swflag_mutex, otherwise it does not. But the returned value of e1000_get_hw_semaphore_82574() is ignored, so unlocking of swflag_mutex happens anyway.
The patch fixes the issue by breaking reset if MIC ownership is not acquired. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> --- drivers/net/ethernet/intel/e1000e/82571.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 2faffbd..a6bd80e 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c @@ -1003,8 +1003,10 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw) default: break; } - if (ret_val) + if (ret_val) { e_dbg("Cannot acquire MDIO ownership\n"); + return ret_val; + } ctrl = er32(CTRL); -- 1.7.9.5 ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
