summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/ipa_table.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-07-26 12:40:07 -0500
committerDavid S. Miller <davem@davemloft.net>2021-07-26 22:38:11 +0100
commitf2c1dac0abcfa93e8b20065b8d6b4b2b6f9990aa (patch)
tree9b4dbaa72b1475a1c515c65ad0a194abf688b91e /drivers/net/ipa/ipa_table.c
parentbeeee08ca1d432891f9e1f6188eea85ffac68527 (diff)
downloadlinux-f2c1dac0abcfa93e8b20065b8d6b4b2b6f9990aa.tar.bz2
net: ipa: fix ipa_cmd_table_valid()
Stop supporting different sizes for hashed and non-hashed filter or route tables. Add BUILD_BUG_ON() calls to verify the sizes of the fields in the filter/route table initialization immediate command are the same. Add a check to ipa_cmd_table_valid() to ensure the size of the memory region being checked fits within the immediate command field that must hold it. Remove two Boolean parameters used only for error reporting. This actually fixes a bug that would only show up if IPA_VALIDATE were defined. Define ipa_cmd_table_valid() unconditionally (no longer dependent on IPA_VALIDATE). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_table.c')
-rw-r--r--drivers/net/ipa/ipa_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipa/ipa_table.c b/drivers/net/ipa/ipa_table.c
index c617a9156f26..4f5b6749f6aa 100644
--- a/drivers/net/ipa/ipa_table.c
+++ b/drivers/net/ipa/ipa_table.c
@@ -161,7 +161,7 @@ ipa_table_valid_one(struct ipa *ipa, enum ipa_mem_id mem_id, bool route)
else
size = (1 + IPA_FILTER_COUNT_MAX) * sizeof(__le64);
- if (!ipa_cmd_table_valid(ipa, mem, route, ipv6, hashed))
+ if (!ipa_cmd_table_valid(ipa, mem, route))
return false;
/* mem->size >= size is sufficient, but we'll demand more */