]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: Fix for recursive RTNL lock during PROMISC change
authorAnjali Singhai <anjali.singhai@intel.com>
Mon, 28 Sep 2015 20:37:12 +0000 (13:37 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 11 Dec 2015 17:26:06 +0000 (09:26 -0800)
commit5da0fc24ae8845b67b4269255f56ae9fec00034a
tree870560f1fe7855887a74a851b643dce88587c344
parent885bb302d5bb06d7f26427133a3b8afb2115a53a
i40e: Fix for recursive RTNL lock during PROMISC change

The sync_vsi_filters function can be called directly under RTNL
or through the timer subtask without one. This was causing a deadlock.

If sync_vsi_filters is called from a thread which held the lock,
and in another thread the PROMISC setting got changed we would
be executing the PROMISC change in the thread which already held
the lock alongside the other filter update. The PROMISC change
requires a reset if we are on a VEB, which requires it to be called
under RTNL.

Earlier the driver would call reset for PROMISC change without
checking if we were already under RTNL and would try to grab it
causing a deadlock. This patch changes the flow to see if we are
already under RTNL before trying to grab it.

Orabug: 22328907

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_debugfs.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c