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

Commit 8ad40fe7 authored by Manoj Prabhu B's avatar Manoj Prabhu B Committed by Gerrit - the friendly Code Review server
Browse files

diag: Prevent possible deadlock while memory device session runs



Possibility of deadlock trying to acquire a mutex when memory
device session is active is prevented by proper synchronization of
mutexes involved in the threads.

Change-Id: I4dca3096f37bf2208f1e0cc7baa59ba288bb1496
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent b7b62496
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2020, The Linux Foundation. All rights reserved.
 */
 */
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/init.h>
@@ -1378,8 +1378,8 @@ int diag_process_apps_pkt(unsigned char *buf, int len, int pid)
			}
			}
		}
		}
		mutex_unlock(&driver->md_session_lock);
		mutex_unlock(&driver->md_session_lock);
		diag_update_md_clients(HDLC_SUPPORT_TYPE);
		mutex_unlock(&driver->hdlc_disable_mutex);
		mutex_unlock(&driver->hdlc_disable_mutex);
		diag_update_md_clients(HDLC_SUPPORT_TYPE);
		return 0;
		return 0;
	}
	}
#endif
#endif