mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
msm: ipa: adding checks if the rt_rule is not freed
Adding checks if the rt_rule is not freed before committing. Change-Id: I4a2c86c24587a6a3ea7318bac438a9f27784f2f7 Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
parent
8e1f7e0c74
commit
3fa607227c
1 changed files with 8 additions and 3 deletions
|
|
@ -64,9 +64,14 @@ static int ipa3_generate_flt_hw_rule(enum ipa_ip_type ip,
|
|||
}
|
||||
|
||||
gen_params.ipt = ip;
|
||||
if (entry->rt_tbl && (!ipa3_check_idr_if_freed(entry->rt_tbl)))
|
||||
gen_params.rt_tbl_idx = entry->rt_tbl->idx;
|
||||
else
|
||||
if (entry->rt_tbl) {
|
||||
if (ipa3_check_idr_if_freed(entry->rt_tbl)) {
|
||||
IPAERR_RL("Routing table already freed\n");
|
||||
return -EPERM;
|
||||
} else {
|
||||
gen_params.rt_tbl_idx = entry->rt_tbl->idx;
|
||||
}
|
||||
} else
|
||||
gen_params.rt_tbl_idx = entry->rule.rt_tbl_idx;
|
||||
|
||||
gen_params.priority = entry->prio;
|
||||
|
|
|
|||
Loading…
Reference in a new issue