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

Commit 97e16767 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Prevent using uninitialized mdlog session mask"

parents 458717be cd35d9b8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -322,8 +322,7 @@ enum remote_procs {
#define DIAG_MD_BRIDGE_BASE	DIAG_MD_LOCAL_LAST
#define DIAG_MD_MDM		(DIAG_MD_BRIDGE_BASE)
#define DIAG_MD_MDM2		(DIAG_MD_BRIDGE_BASE + 1)
#define DIAG_MD_SMUX		(DIAG_MD_BRIDGE_BASE + 2)
#define DIAG_MD_BRIDGE_LAST	(DIAG_MD_BRIDGE_BASE + 3)
#define DIAG_MD_BRIDGE_LAST	(DIAG_MD_BRIDGE_BASE + 2)

#ifndef CONFIG_DIAGFWD_BRIDGE_CODE
#define NUM_DIAG_MD_DEV		DIAG_MD_LOCAL_LAST
+4 −3
Original line number Diff line number Diff line
@@ -453,7 +453,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;
@@ -492,6 +492,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);