Files
linux/drivers/net
Jacob Keller 474443c998 e100: fix length calculation in e100_get_regs_len
[ Upstream commit 4329c8dc11 ]

commit abf9b90205 ("e100: cleanup unneeded math") tried to simplify
e100_get_regs_len and remove a double 'divide and then multiply'
calculation that the e100_reg_regs_len function did.

This change broke the size calculation entirely as it failed to account
for the fact that the numbered registers are actually 4 bytes wide and
not 1 byte. This resulted in a significant under allocation of the
register buffer used by e100_get_regs.

Fix this by properly multiplying the register count by u32 first before
adding the size of the dump buffer.

Fixes: abf9b90205 ("e100: cleanup unneeded math")
Reported-by: Felicitas Hetzelt <felicitashetzelt@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-07 07:53:13 +02:00
..
2021-07-13 09:43:50 -07:00
2021-08-26 11:08:32 -07:00
2021-06-28 12:44:17 -07:00
2021-06-14 13:17:10 -07:00
2021-06-01 17:05:04 -07:00