ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
Subsystems (5)
PATCH RESEND 1/1 ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
Pages allocated with GFP_ATOMIC cannot come from Highmem. This is why there is no need to call kmap() on them.
Therefore, don't call kmap() on rx_buffer->page() and instead use a plain page_address() to get the kernel address.
---
I send again this patch because it was submitted more than two months ago, Monday 4th July 2022, but for one or more (good?) reasons it has not yet reached Linus' tree. In the meantime I am also forwarding two "Reviewed-by" and one "Tested-by" tags (thanks a lot to Ira, Alexander, Gurucharan). Obviously I have not made any changes to the code.
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +1 -3
@@ -1964,15 +1964,13 @@ static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer, frame_size >>=1 ; - data =kmap (rx_buffer->page) + rx_buffer->page_offset; + data =page_address (rx_buffer->page) + rx_buffer->page_offset;if (data[3 ] !=0xFF || data[frame_size +10 ] !=0xBE || data[frame_size +12 ] !=0xAF ) match = false; -kunmap (rx_buffer->page); -return match; }
Signature · 1 line
2.37.2
Tony Nguyen
maintainerQuoted 12 lines · Fabio M. De Francesco
Pages allocated with
GFP_ATOMICcannot come from Highmem. This is why there is no need to callkmap()on them.Therefore, don't call
kmap()onrx_buffer->page()and instead use a plainpage_address()to get the kernel address.Suggested-by Ira Weiny <[email protected]>Suggested-by Alexander Duyck <[email protected]>Reviewed-by Ira Weiny <[email protected]>Reviewed-by Alexander Duyck <[email protected]>Tested-by Gurucharan <[email protected]>Signed-off-by Fabio M. De Francesco <[email protected]>
Quoted 7 lines
---
I send again this patch because it was submitted more than two months ago, Monday 4th July 2022, but for one or more (good?) reasons it has not yet reached Linus' tree. In the meantime I am also forwarding two "Reviewed-by" and one "Tested-by" tags (thanks a lot to Ira, Alexander, Gurucharan). Obviously I have not made any changes to the code.
Hi Fabio,
This is accepted into net-next already[1] and will land in the next kernel.
Thanks,
Tony
[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=03f51719df032637250af828f9a1ffcc5695982d
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 23 lines · Tony Nguyen
Quoted 12 lines · Fabio M. De Francesco
Pages allocated with
GFP_ATOMICcannot come from Highmem. This is why there is no need to callkmap()on them.Therefore, don't call
kmap()onrx_buffer->page()and instead use a plainpage_address()to get the kernel address.Suggested-by Ira Weiny <[email protected]>Suggested-by Alexander Duyck <[email protected]>Reviewed-by Ira Weiny <[email protected]>Reviewed-by Alexander Duyck <[email protected]>Tested-by Gurucharan <[email protected]>Signed-off-by Fabio M. De Francesco <[email protected]>Quoted 7 lines
---
I send again this patch because it was submitted more than two months ago, Monday 4th July 2022, but for one or more (good?) reasons it has not yet reached Linus' tree. In the meantime I am also forwarding two "Reviewed-by" and one "Tested-by" tags (thanks a lot to Ira, Alexander, Gurucharan). Obviously I have not made any changes to the code.
Quoted 3 lines
Hi Fabio,
This is accepted into net-next already[1] and will land in the next kernel.
Thanks, sorry just saw this after sending my last. :-/ :-D
Ira
Quoted 5 lines
Thanks,
Tony
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 12 lines · Fabio M. De Francesco
Pages allocated with
GFP_ATOMICcannot come from Highmem. This is why there is no need to callkmap()on them.Therefore, don't call
kmap()onrx_buffer->page()and instead use a plainpage_address()to get the kernel address.Suggested-by Ira Weiny <[email protected]>Suggested-by Alexander Duyck <[email protected]>Reviewed-by Ira Weiny <[email protected]>Reviewed-by Alexander Duyck <[email protected]>Tested-by Gurucharan <[email protected]>Signed-off-by Fabio M. De Francesco <[email protected]>
Quoted 7 lines
---
I send again this patch because it was submitted more than two months ago, Monday 4th July 2022, but for one or more (good?) reasons it has not yet reached Linus' tree. In the meantime I am also forwarding two "Reviewed-by" and one "Tested-by" tags (thanks a lot to Ira, Alexander, Gurucharan). Obviously I have not made any changes to the code.
I see this applied by Tony Nguyen in linux-next:
03f51719df03 ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
So I assume it will land in the next merge window?
Move Tony to the To line.
Ira
Quoted 28 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +1
-3@@ -1964,15 +1964,13 @@ static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer, frame_size >>=1 ; - data =kmap (rx_buffer->page) + rx_buffer->page_offset; + data =page_address (rx_buffer->page) + rx_buffer->page_offset;if (data[3 ] !=0xFF || data[frame_size +10 ] !=0xBE || data[frame_size +12 ] !=0xAF ) match = false; -kunmap (rx_buffer->page); -return match; }Signature · 1 line
2.37.2