Messages in this thread | | | From | Suman Ghosh <> | Subject | RE: [EXT] Re: [net-next PATCH V3] octeontx2-af: Install TC filter rules in hardware based on priority | Date | Fri, 21 Jul 2023 04:33:57 +0000 |
| |
> >> @@ -729,22 +816,106 @@ static int otx2_del_mcam_flow_entry(struct >otx2_nic *nic, u16 entry) >> mutex_unlock(&nic->mbox.lock); >> return -EFAULT; >> } >> + >> + if (cntr_val) { >> + rsp = (struct npc_delete_flow_rsp *)otx2_mbox_get_rsp(&nic- >>mbox.mbox, >> + 0, &req->hdr); >> + *cntr_val = rsp->cntr_val; > >Hi Suman, > >otx2_mbox_get_rsp may return an ERR_PTR. >Is it ok not to check that before dereferencing rsp? [Suman] No, we should check for the err pointer. Thanks for pointing it out. Will update in v4 > >> + } >> + >> mutex_unlock(&nic->mbox.lock); >> + return 0; >> +} > >...
| |