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

Commit e282251b authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm: ipa: Fix to validate routing table index for filter exception



Fix to validate routing table index for filter action
IPA_PASS_TO_EXCEPTION case to avoid ipa assert
during commit filter rule.

Change-Id: I957f7ffc415ea1a042f6b3a948e94410d41b2262
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent c8e3be69
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1039,6 +1039,11 @@ static int __ipa_add_flt_rule(struct ipa_flt_tbl *tbl, enum ipa_ip_type ip,
				goto error;
			}
		}
	} else {
		if (rule->rt_tbl_idx > 0) {
			IPAERR_RL("invalid RT tbl\n");
			goto error;
		}
	}

	entry = kmem_cache_zalloc(ipa_ctx->flt_rule_cache, GFP_KERNEL);
@@ -1160,6 +1165,11 @@ static int __ipa_mdfy_flt_rule(struct ipa_flt_rule_mdfy *frule,
				goto error;
			}
		}
	} else {
		if (frule->rule.rt_tbl_idx > 0) {
			IPAERR_RL("invalid RT tbl\n");
			goto error;
		}
	}

	entry->rule = frule->rule;
+10 −0
Original line number Diff line number Diff line
@@ -1096,6 +1096,11 @@ static int __ipa_validate_flt_rule(const struct ipa_flt_rule *rule,
				goto error;
			}
		}
	} else {
		if (rule->rt_tbl_idx > 0) {
			IPAERR("invalid RT tbl\n");
			goto error;
		}
	}

	if (rule->rule_id) {
@@ -1347,6 +1352,11 @@ static int __ipa_mdfy_flt_rule(struct ipa_flt_rule_mdfy *frule,
				goto error;
			}
		}
	} else {
		if (frule->rule.rt_tbl_idx > 0) {
			IPAERR("invalid RT tbl\n");
			goto error;
		}
	}

	entry->rule = frule->rule;