From: Dan Carpenter
Date: Tue, 17 Oct 2017 15:32:17 +0300
> The problematic code looks like this:
>
> res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK;
> res_seq >>= TB_XDOMAIN_SN_SHIFT;
>
> TB_XDOMAIN_SN_SHIFT is 27, and right shifting a u8 27 bits is always
> going to resu
The problematic code looks like this:
res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK;
res_seq >>= TB_XDOMAIN_SN_SHIFT;
TB_XDOMAIN_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: d1f