Maxim Korotkov 64a8f8f712 ethtool: avoiding integer overflow in ethtool_phys_id()
The value of an arithmetic expression "n * id.data" is subject
to possible overflow due to a failure to cast operands to a larger data
type before performing arithmetic. Used macro for multiplication instead
operator for avoiding overflow.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221122122901.22294-1-korotkov.maxim.s@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-23 20:03:51 -08:00
..
2022-11-22 20:41:54 -08:00
2022-11-02 11:58:13 +00:00
2022-11-18 12:09:20 +00:00
2022-11-18 11:44:36 +00:00
2022-08-22 14:26:30 +01:00
2022-08-22 14:26:30 +01:00