thunderbolt: Right shifting to zero bug in tbnet_handle_packet()
There is a problem when we do: sequence = pkg->hdr.length_sn & TBIP_HDR_SN_MASK; sequence >>= TBIP_HDR_SN_SHIFT; TBIP_HDR_SN_SHIFT is 27, and right shifting a u8 27 bits is always going to result in zero. The fix is to declare these variables as u32. Fixes: e69b6c02 ("net: Add support for networking over Thunderbolt cable") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NYehezkel Bernat <yehezkel.bernat@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录