Merge "diag: Update hdlc disable protection to avoid deadlock"
This commit is contained in:
commit
384eb39489
1 changed files with 2 additions and 2 deletions
|
@ -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
|
* 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
|
* 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(&apps_data_mutex);
|
||||||
mutex_lock(&driver->hdlc_disable_mutex);
|
mutex_lock(&driver->hdlc_disable_mutex);
|
||||||
hdlc_disabled = driver->p_hdlc_disabled[APPS_DATA];
|
hdlc_disabled = driver->p_hdlc_disabled[APPS_DATA];
|
||||||
|
mutex_unlock(&driver->hdlc_disable_mutex);
|
||||||
if (hdlc_disabled)
|
if (hdlc_disabled)
|
||||||
ret = diag_process_apps_data_non_hdlc(user_space_data, len,
|
ret = diag_process_apps_data_non_hdlc(user_space_data, len,
|
||||||
pkt_type);
|
pkt_type);
|
||||||
else
|
else
|
||||||
ret = diag_process_apps_data_hdlc(user_space_data, len,
|
ret = diag_process_apps_data_hdlc(user_space_data, len,
|
||||||
pkt_type);
|
pkt_type);
|
||||||
mutex_unlock(&driver->hdlc_disable_mutex);
|
|
||||||
mutex_unlock(&apps_data_mutex);
|
mutex_unlock(&apps_data_mutex);
|
||||||
|
|
||||||
diagmem_free(driver, user_space_data, mempool);
|
diagmem_free(driver, user_space_data, mempool);
|
||||||
|
|
Loading…
Add table
Reference in a new issue