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

Commit 7cbea6b0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Add guard around nat entries read"

parents e2df155a 38b227b0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1420,6 +1420,7 @@ static ssize_t ipa_read_nat4(struct file *file,
	u16 enable, tbl_entry, flag;
	u32 no_entrys = 0;

	mutex_lock(&ipa_ctx->nat_mem.lock);
	value = ipa_ctx->nat_mem.public_ip_addr;
	pr_err(
				"Table IP Address:%d.%d.%d.%d\n",
@@ -1573,6 +1574,7 @@ static ssize_t ipa_read_nat4(struct file *file,
		}
	}
	pr_err("Current No. Nat Entries: %d\n", no_entrys);
	mutex_unlock(&ipa_ctx->nat_mem.lock);

	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -1478,6 +1478,7 @@ static ssize_t ipa3_read_nat4(struct file *file,
	u16 enable, tbl_entry, flag;
	u32 no_entrys = 0;

	mutex_lock(&ipa3_ctx->nat_mem.lock);
	value = ipa3_ctx->nat_mem.public_ip_addr;
	pr_err(
				"Table IP Address:%d.%d.%d.%d\n",
@@ -1631,6 +1632,7 @@ static ssize_t ipa3_read_nat4(struct file *file,
		}
	}
	pr_err("Current No. Nat Entries: %d\n", no_entrys);
	mutex_unlock(&ipa3_ctx->nat_mem.lock);

	return 0;
}