RE: [patch] IB/ipath: add a range check before bumping the stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oddly, I don't see an issue with qib, which masks the opcode.

Would:
opcode = (be32_to_cpu(ohdr->bth[0]) >> 24) & 0x7f;

also correct the issue without adding the if test.   At this point the hardware has already validated the opcode, so there is no value in the fail handling.

What args are you using with smatch?

Mike

> My static checker complains that this could corrupt memory.  It seems valid to
> add a range check here.
> 
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux