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

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

diag: Prevent using uninitialized mdlog session mask



Add check to prevent using uninitialized session mask to translate
kernel to user mask.

Change-Id: I341f0308775a2c5a00856fe6ec8acf9b63e207d9
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 0ced5701
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ void diag_clear_masks(int pid)
static void diag_close_logging_process(const int pid)
{
	int i, j;
	int session_mask;
	int session_mask = 0;
	int device_mask = 0;
	uint32_t p_mask;
	struct diag_md_session_t *session_info = NULL;
@@ -456,6 +456,7 @@ static void diag_close_logging_process(const int pid)
		diag_clear_masks(pid);

	mutex_lock(&driver->diagchar_mutex);
	if (session_mask)
		p_mask =
		diag_translate_kernel_to_user_mask(session_mask);