From: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Date: Mon, 25 Apr 2016 15:13:17 -0300

> Fix casting in net_gso_ok. Otherwise the shift on
> gso_type << NETIF_F_GSO_SHIFT may hit the 32th bit and make it look like
> a INT_MIN, which is then promoted from signed to uint64 which is
> 0xffffffff80000000, resulting in wrong behavior when it is and'ed with
> the feature itself, as in:
 ...
> So that this:
>    return (features & feature) == feature;
> Actually works on more bits than expected and invalid ones.
> 
> Fix is to promote it earlier.
> 
> Issue noted while rebasing SCTP GSO patch but posting separetely as
> someone else may experience this meanwhile.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>

Great catch, applied, thanks Marcelo.

Reply via email to