summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-02-05 16:48:13 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-02-05 16:48:12 -0800
commit384eb394892d3b271502d6b4cbd78bb37c0e1c14 (patch)
treec5c52077699379f47e9603d2a95d88b75341bfdb
parent1bca2e384a8a2d7635debcfb96a54e1de3f63f08 (diff)
parentaca00daec5e560e9f5f63bb572296a1c711b6f5b (diff)
Merge "diag: Update hdlc disable protection to avoid deadlock"
-rw-r--r--drivers/char/diag/diagchar_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/diag/diagchar_core.c b/drivers/char/diag/diagchar_core.c
index 9cee52fdf870..d6c92d6d417c 100644
--- a/drivers/char/diag/diagchar_core.c
+++ b/drivers/char/diag/diagchar_core.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -3089,13 +3089,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);