mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
batman-adv: tpmeter: fix u32 truncation of reported bytes
When more than 4 GB are transferred by the throughput meter,
batadv_tp_batctl_notify() will cut of the upper 32 bit of the u64 counter
and thus under-report the actual transferred bytes.
The data type of the temporary storage variable must therefore still
continue to use u64.
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/bug/linux-08bb3be4-6c6a-452d-b4e4-606940c6cfa5
Fixes: 33a3bb4a33 ("batman-adv: throughput meter implementation")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
ea01fff30f
commit
1025b76d13
|
|
@ -221,7 +221,7 @@ static void batadv_tp_batctl_notify(enum batadv_tp_meter_reason reason,
|
|||
unsigned long start_time, u64 total_sent,
|
||||
u32 cookie)
|
||||
{
|
||||
u32 total_bytes;
|
||||
u64 total_bytes;
|
||||
u32 test_time;
|
||||
u8 result;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user