From: Alexander Drozdov Date: Tue, 28 Jul 2015 10:57:01 +0000 (+0300) Subject: packet: tpacket_snd(): fix signed/unsigned comparison X-Git-Tag: omap-for-v4.3/fixes-merge-window~158^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd46ab412b8fb395f2b0ff6f6a7eec9df311550;p=pandora-kernel.git packet: tpacket_snd(): fix signed/unsigned comparison tpacket_fill_skb() can return a negative value (-errno) which is stored in tp_len variable. In that case the following condition will be (but shouldn't be) true: tp_len > dev->mtu + dev->hard_header_len as dev->mtu and dev->hard_header_len are both unsigned. That may lead to just returning an incorrect EMSGSIZE errno to the user. Fixes: 52f1454f629fa ("packet: allow to transmit +4 byte in TX_RING slot for VLAN case") Signed-off-by: Alexander Drozdov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- Reading git-diff-tree failed