Nikita Yushchenko
24e00f0fa9
net: ravb: Fix dma_addr_t truncation in error case
...
[ Upstream commit e327b2372bc0f18c30433ac40be07741b59231c5 ]
In ravb_start_xmit(), ravb driver uses u32 variable to store result of
dma_map_single() call. Since ravb hardware has 32-bit address fields in
descriptors, this works properly when mapping is successful - it is
platform's job to provide mapping addresses that fit into hardware
limitations.
However, in failure case dma_map_single() returns DMA_MAPPING_ERROR
constant that is 64-bit when dma_addr_t is 64-bit. Storing this constant
in u32 leads to truncation, and further call to dma_mapping_error()
fails to notice the error.
Fix that by storing result of dma_map_single() in a dma_addr_t
variable.
Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com >
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se >
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru >
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-25 15:27:49 -08:00
..
2023-01-24 07:24:37 +01:00
2024-01-25 15:27:46 -08:00
2023-09-13 09:42:56 +02:00
2024-01-25 15:27:39 -08:00
2023-12-08 08:51:14 +01:00
2023-12-20 17:00:16 +01:00
2023-12-08 08:51:16 +01:00
2024-01-25 15:27:46 -08:00
2024-01-25 15:27:30 -08:00
2024-01-25 15:27:30 -08:00
2024-01-01 12:39:07 +00:00
2023-11-20 11:52:04 +01:00
2024-01-25 15:27:36 -08:00
2024-01-25 15:27:39 -08:00
2023-01-24 07:24:35 +01:00
2023-10-19 23:08:58 +02:00
2024-01-25 15:27:20 -08:00
2023-09-13 09:42:48 +02:00
2024-01-25 15:27:23 -08:00
2024-01-25 15:27:48 -08:00
2023-07-19 16:21:43 +02:00
2023-11-20 11:51:54 +01:00
2022-12-31 13:32:38 +01:00
2023-12-20 17:00:25 +01:00
2023-12-08 08:51:15 +01:00
2024-01-25 15:27:18 -08:00
2023-09-13 09:42:53 +02:00
2024-01-10 17:10:35 +01:00
2024-01-25 15:27:24 -08:00
2023-05-11 23:03:27 +09:00
2023-09-13 09:42:54 +02:00
2024-01-01 12:39:07 +00:00
2024-01-25 15:27:42 -08:00
2024-01-25 15:27:44 -08:00
2022-12-31 13:32:45 +01:00
2023-11-20 11:51:58 +01:00
2023-09-13 09:42:59 +02:00
2024-01-20 11:50:06 +01:00
2023-09-19 12:28:05 +02:00
2024-01-20 11:50:11 +01:00
2024-01-20 11:50:09 +01:00
2023-11-28 17:07:17 +00:00
2023-10-10 22:00:44 +02:00
2024-01-25 15:27:47 -08:00
2024-01-25 15:27:38 -08:00
2024-01-25 15:27:39 -08:00
2024-01-10 17:10:37 +01:00
2024-01-25 15:27:43 -08:00
2023-11-08 14:10:57 +01:00
2023-08-16 18:27:26 +02:00
2024-01-25 15:27:45 -08:00
2023-05-11 23:03:31 +09:00
2023-09-19 12:27:58 +02:00
2023-11-28 17:07:13 +00:00
2024-01-25 15:27:43 -08:00
2024-01-25 15:27:35 -08:00
2023-07-19 16:21:24 +02:00
2023-07-19 16:21:08 +02:00
2023-05-24 17:32:37 +01:00
2024-01-25 15:27:45 -08:00
2024-01-25 15:27:37 -08:00
2024-01-25 15:27:38 -08:00
2024-01-25 15:27:21 -08:00
2024-01-25 15:27:49 -08:00
2023-06-28 11:12:36 +02:00
2023-09-13 09:43:02 +02:00
2023-07-05 18:27:37 +01:00
2023-11-20 11:52:05 +01:00
2024-01-25 15:27:48 -08:00
2023-11-02 09:35:31 +01:00
2024-01-25 15:27:38 -08:00
2023-09-13 09:42:28 +02:00
2023-11-28 17:07:14 +00:00
2024-01-20 11:50:11 +01:00
2024-01-25 15:27:48 -08:00
2023-11-20 11:52:13 +01:00
2023-11-20 11:52:01 +01:00
2023-10-25 12:03:16 +02:00
2024-01-20 11:50:09 +01:00
2024-01-25 15:27:20 -08:00
2022-12-31 13:31:56 +01:00
2024-01-25 15:27:45 -08:00
2023-12-13 18:39:21 +01:00
2023-11-28 17:07:05 +00:00
2024-01-25 15:27:42 -08:00
2022-12-31 13:32:00 +01:00
2023-11-20 11:51:56 +01:00
2023-05-24 17:32:53 +01:00
2024-01-20 11:50:07 +01:00
2023-09-13 09:42:58 +02:00
2023-11-20 11:52:13 +01:00
2024-01-20 11:50:08 +01:00
2024-01-25 15:27:42 -08:00
2022-11-10 18:45:40 +01:00
2024-01-25 15:27:28 -08:00
2023-12-20 17:00:25 +01:00
2024-01-25 15:27:20 -08:00
2024-01-25 15:27:47 -08:00
2024-01-25 15:27:32 -08:00
2024-01-25 15:27:42 -08:00
2023-12-13 18:39:12 +01:00
2023-11-20 11:51:54 +01:00
2024-01-01 12:39:08 +00:00
2024-01-25 15:27:48 -08:00
2024-01-25 15:27:42 -08:00
2024-01-20 11:50:10 +01:00
2024-01-25 15:27:48 -08:00
2024-01-25 15:27:47 -08:00
2023-10-06 14:56:45 +02:00
2023-11-28 17:07:04 +00:00
2024-01-25 15:27:42 -08:00
2023-11-20 11:52:13 +01:00
2023-11-02 09:35:23 +01:00
2023-07-19 16:21:48 +02:00
2024-01-25 15:27:36 -08:00
2023-12-08 08:51:20 +01:00