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

Commit 1cca7d07 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Update hdlc disable protection to avoid deadlock"

parents 3fd5243b c6b3532b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3227,13 +3227,13 @@ static int diag_user_process_apps_data(const char __user *buf, int len,
	mutex_lock(&apps_data_mutex);
	mutex_lock(&driver->hdlc_disable_mutex);
	hdlc_disabled = driver->p_hdlc_disabled[APPS_DATA];
	mutex_unlock(&driver->hdlc_disable_mutex);
	if (hdlc_disabled)
		ret = diag_process_apps_data_non_hdlc(user_space_data, len,
						      pkt_type);
	else
		ret = diag_process_apps_data_hdlc(user_space_data, len,
						  pkt_type);
	mutex_unlock(&driver->hdlc_disable_mutex);
	mutex_unlock(&apps_data_mutex);

	diagmem_free(driver, user_space_data, mempool);