Re: [PATCH] net: stmmac: gmac5+: fix potential integer overflow on 32 bit multiply

2020-05-04 Thread David Miller
From: Colin King Date: Fri, 1 May 2020 15:10:16 +0100 > From: Colin Ian King > > The multiplication of cfg->ctr[1] by 10 is performed using a > 32 bit multiplication (since cfg->ctr[1] is a u32) and this can lead > to a potential overflow. Fix this by making the constant a ULL to > ens

[PATCH] net: stmmac: gmac5+: fix potential integer overflow on 32 bit multiply

2020-05-01 Thread Colin King
From: Colin Ian King The multiplication of cfg->ctr[1] by 10 is performed using a 32 bit multiplication (since cfg->ctr[1] is a u32) and this can lead to a potential overflow. Fix this by making the constant a ULL to ensure a 64 bit multiply occurs. Fixes: 504723af0d85 ("net: stmmac: Add