lkml.org 
[lkml]   [2021]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjecthippi: incorrect address masking and compare operation
Date
Hi,

Static analysis with Coverity has detected an issue in
drivers/net/hippi/rrunner.c where a masking operation and a comparison
is always false.

The analysis is as follows:

656 /*
657 * Sanity test to see if we conflict with the DMA
658 * limitations of the Roadrunner.
659 */

Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
dead_error_condition: The condition ((unsigned long)skb->data & 0xfffUL)
> 18446744073709486295UL cannot be true.

660 if ((((unsigned long)skb->data) & 0xfff) > ~65320)

Logically dead code (DEADCODE)dead_error_line: Execution cannot reach
this statement: printk("skb alloc error\n");.

661 printk("skb alloc error\n");
662

I suspect the masking 0xfff is incorrect here, I think it be ~0xfff but
I'm not 100% sure.

Colin

\
 
 \ /
  Last update: 2021-07-02 12:43    [W:0.024 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site