Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2492369 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: qmi: Fix recursive spinlock



The worker thread callback can potentially invoke the transmit
path softirq NET_TX leading to a recursive spinlock acquisition
of the rtnl_lock().

CRs-Fixed: 2274502
Change-Id: I7d78eddf1383a0c1ee7ab6aca1600d391ca21d62
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 231ed603
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -605,6 +605,7 @@ static void dfc_do_burst_flow_control(struct work_struct *work)
		return;
	}

	local_bh_disable();
	/* This will drop some messages but that is
	 * unavoidable for now since the notifier callback is
	 * protected by rtnl_lock() and destroy_workqueue()
@@ -613,6 +614,7 @@ static void dfc_do_burst_flow_control(struct work_struct *work)
	if (!rtnl_trylock()) {
		kfree(ind);
		kfree(svc_ind);
		local_bh_enable();
		return;
	}

@@ -644,6 +646,7 @@ static void dfc_do_burst_flow_control(struct work_struct *work)
	kfree(ind);
	kfree(svc_ind);
	rtnl_unlock();
	local_bh_enable();
}

static void dfc_clnt_ind_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,