lkml.org 
[lkml]   [2023]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [EXT] Re: [net-next PATCH V3] octeontx2-af: Install TC filter rules in hardware based on priority
Date
>
>> @@ -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;
>> +}
>
>...

\
 
 \ /
  Last update: 2023-07-21 06:34    [W:0.053 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site