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

Commit 1d9cd562 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Add check to validate rule_cnt"

parents 640294f6 760f6aac
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -939,7 +939,10 @@ static int __ipa_finish_flt_rule_add(struct ipa3_flt_tbl *tbl,
{
	int id;

	if (tbl->rule_cnt < IPA_RULE_CNT_MAX)
		tbl->rule_cnt++;
	else
		return -EINVAL;
	if (entry->rt_tbl)
		entry->rt_tbl->ref_cnt++;
	id = ipa3_id_alloc(entry);
+2 −0
Original line number Diff line number Diff line
@@ -457,6 +457,8 @@ enum {

#define MBOX_TOUT_MS 100

#define IPA_RULE_CNT_MAX 512

struct ipa3_active_client_htable_entry {
	struct hlist_node list;
	char id_string[IPA3_ACTIVE_CLIENTS_LOG_NAME_LEN];
+4 −1
Original line number Diff line number Diff line
@@ -1077,7 +1077,10 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl,
{
	int id;

	if (tbl->rule_cnt < IPA_RULE_CNT_MAX)
		tbl->rule_cnt++;
	else
		return -EINVAL;
	if (entry->hdr)
		entry->hdr->ref_cnt++;
	else if (entry->proc_ctx)