Skip to contentSkip to conversation

FAILED: patch "[PATCH] iavf: Rework mutexes for better synchronisation" failed to apply to 5.15-stable tree

PATCH [email protected] 1 participant 1 message Mar 5, 2022

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From fc2e6b3b132a907378f6af08356b105a4139c4fb Mon Sep 17 00:00:00 2001
From: Slawomir Laba <[email protected]>
Date: Wed, 23 Feb 2022 13:35:49 +0100
Subject: [PATCH] iavf: Rework mutexes for better synchronisation

The driver used to crash in multiple spots when put to stress testing of the init, reset and remove paths.

The user would experience call traces or hangs when creating, resetting, removing VFs. Depending on the machines, the call traces are happening in random spots, like reset restoring resources racing with driver remove.

Make adapter->crit_lock mutex a mandatory lock for guarding the operations performed on all workqueues and functions dealing with resource allocation and disposal.

Make __IAVF_REMOVE a final state of the driver respected by workqueues that shall not requeue, when they fail to obtain the crit_lock.

Make the IRQ handler not to queue the new work for adminq_task when the __IAVF_REMOVE state is set.

Fixes 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
drivers/net/ethernet/intel/iavf/iavf.h +0 -1
index 59806d1f7e79..44f83e06486d 100644
@@ -246,7 +246,6 @@ struct iavf_adapter {
 	struct list_head mac_filter_list;
 	struct mutex crit_lock;
 	struct mutex client_lock;
-	struct mutex remove_lock;
 	/* Lock to protect accesses to MAC and VLAN lists */
 	spinlock_t mac_vlan_list_lock;
 	char misc_vector_name[IFNAMSIZ + 9];
drivers/net/ethernet/intel/iavf/iavf_main.c +36 -30

149 lines not on this page · raw message