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

Commit f34dfcb5 authored by Praveen Kurapati's avatar Praveen Kurapati
Browse files

msm: ipa3: Add check to avoid Null pointer dereference



Accessing a null pointer without proper check may
lead to Null pointer dereference. Added check to
avoid it.

Change-Id: I4fd93d5eafdf8dcf7f3a69caefc61b4149ab8256
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent f5f31790
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3066,6 +3066,10 @@ static void ipa3_wq_rx_common(struct ipa3_sys_context *sys,
	struct ipa3_sys_context *coal_sys;
	int ipa_ep_idx;

	if (!notify) {
		IPAERR_RL("gsi_chan_xfer_notify is null\n");
		return;
	}
	rx_skb = handle_skb_completion(notify, true);

	if (rx_skb) {
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/fs.h>
@@ -392,6 +392,8 @@ static int wlan_msg_process(struct ipa_msg_meta *meta, void *buff)
	uint8_t mac[IPA_MAC_ADDR_SIZE];
	uint8_t mac2[IPA_MAC_ADDR_SIZE];

	if (!buff)
		return -EINVAL;
	if (meta->msg_type == WLAN_CLIENT_CONNECT_EX) {
		/* debug print */
		event_ex_cur_con = buff;