提交 d3f8ef11 编写于 作者: C Carolyn Wyborny 提交者: Jeff Kirsher

igb: Fix for improper exit in igb_get_i2c_client

This patch fixes an issue where we check for irq's disabled then exit after
explicitly disabling them with spin_lock_irqsave.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: NAaron Brown <arron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 74e238ea
...@@ -7750,12 +7750,7 @@ igb_get_i2c_client(struct igb_adapter *adapter, u8 dev_addr) ...@@ -7750,12 +7750,7 @@ igb_get_i2c_client(struct igb_adapter *adapter, u8 dev_addr)
} }
} }
/* no client_list found, create a new one as long as /* no client_list found, create a new one */
* irqs are not disabled
*/
if (unlikely(irqs_disabled()))
goto exit;
client_list = kzalloc(sizeof(*client_list), GFP_KERNEL); client_list = kzalloc(sizeof(*client_list), GFP_KERNEL);
if (client_list == NULL) if (client_list == NULL)
goto exit; goto exit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册