]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: Fix skb_truesize_check() assertion
authorChuck Lever <chuck.lever@oracle.com>
Sun, 11 Nov 2007 05:53:30 +0000 (21:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Nov 2007 05:53:30 +0000 (21:53 -0800)
commit362d489baa70e21f038b934968adb96b7b7bd452
treebeed02e8e886be6a9661e9eb6ca60cc1208c59d2
parentd411eb6d177404b399fb3c6825308941cf0ebbac
[NET]: Fix skb_truesize_check() assertion

The intent of the assertion in skb_truesize_check() is to check
for skb->truesize being decremented too much by other code,
resulting in a wraparound below zero.

The type of the right side of the comparison causes the compiler to
promote the left side to an unsigned type, despite the presence of an
explicit type cast.  This defeats the check for negativity.

Ensure both sides of the comparison are a signed type to prevent the
implicit type conversion.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h