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

Commit 7c45f352 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: Fix to unsigned integer underflow"

parents 4b8a4712 b6959f75
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1445,6 +1445,10 @@ static ssize_t ipa_read_nat4(struct file *file,
	pr_err("Table Size:%d\n",
				ipa_ctx->nat_mem.size_base_tables);

	if (!ipa_ctx->nat_mem.size_expansion_tables)
		pr_err("Expansion Table Size:%d\n",
				ipa_ctx->nat_mem.size_expansion_tables);
	else
		pr_err("Expansion Table Size:%d\n",
				ipa_ctx->nat_mem.size_expansion_tables-1);

@@ -1460,6 +1464,8 @@ static ssize_t ipa_read_nat4(struct file *file,

			pr_err("\nBase Table:\n");
		} else {
			if (!ipa_ctx->nat_mem.size_expansion_tables)
				continue;
			tbl_size = ipa_ctx->nat_mem.size_expansion_tables-1;
			base_tbl =
			 (u32 *)ipa_ctx->nat_mem.ipv4_expansion_rules_addr;
@@ -1559,6 +1565,8 @@ static ssize_t ipa_read_nat4(struct file *file,

			pr_err("\nIndex Table:\n");
		} else {
			if (!ipa_ctx->nat_mem.size_expansion_tables)
				continue;
			tbl_size = ipa_ctx->nat_mem.size_expansion_tables-1;
			indx_tbl =
			 (u32 *)ipa_ctx->nat_mem.index_table_expansion_addr;
+10 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1430,6 +1430,10 @@ static ssize_t ipa3_read_nat4(struct file *file,
	pr_err("Table Size:%d\n",
				ipa3_ctx->nat_mem.size_base_tables);

	if (!ipa3_ctx->nat_mem.size_expansion_tables)
		pr_err("Expansion Table Size:%d\n",
				ipa3_ctx->nat_mem.size_expansion_tables);
	else
		pr_err("Expansion Table Size:%d\n",
				ipa3_ctx->nat_mem.size_expansion_tables-1);

@@ -1445,6 +1449,8 @@ static ssize_t ipa3_read_nat4(struct file *file,

			pr_err("\nBase Table:\n");
		} else {
			if (!ipa3_ctx->nat_mem.size_expansion_tables)
				continue;
			tbl_size = ipa3_ctx->nat_mem.size_expansion_tables-1;
			base_tbl =
			 (u32 *)ipa3_ctx->nat_mem.ipv4_expansion_rules_addr;
@@ -1544,6 +1550,8 @@ static ssize_t ipa3_read_nat4(struct file *file,

			pr_err("\nIndex Table:\n");
		} else {
			if (!ipa3_ctx->nat_mem.size_expansion_tables)
				continue;
			tbl_size = ipa3_ctx->nat_mem.size_expansion_tables-1;
			indx_tbl =
			 (u32 *)ipa3_ctx->nat_mem.index_table_expansion_addr;