Re: [bug report] ppp: fix 'ppp_mp_reconstruct bad seq' errors

James Carlson <[email protected]>
Newsgroups gmane.linux.ppp
Message-ID <[email protected]>
On 7/30/21 1:15 PM, James Carlson wrote:
> On 7/30/21 4:48 AM, Dan Carpenter wrote:
>>> --> 2840 		ppp->nextseq = PPP_MP_CB(tail)->sequence + 1;
>>>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Here is where Smatch complains.
> 
> If that's Smatch's analysis of the situation, then Smatch is wrong.
> It's a bogus warning.

For what it's worth, it's not my code, and I agree that it's at least a 
bit hard to follow, and may well harbor bugs.  If you're suggesting 
either some kind of suppression directive (I tried looking for some 
Smatch documentation but couldn't find much to suggest that's possible, 
though I guess now that you'd be the one who knows for sure), or adding 
something like "u32 nextseq = PPP_CB(tail)->sequence + 1;" around line 
2795, and then using "ppp->nextseq = nextseq;" on 2840, then I'd be in 
favor of that, at least to make the tool happy.

Is there an equivalent of "/* LINTED: tail pointer still ok */" here?

-- 
James Carlson         42.703N 71.076W         <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.