mbox series

[net,0/2] net: ipa: fix page free in two spots

Message ID 20220522005959.1175181-1-elder@linaro.org (mailing list archive)
Headers show
Series net: ipa: fix page free in two spots | expand

Message

Alex Elder May 22, 2022, 12:59 a.m. UTC
When a receive buffer is not wrapped in an SKB and passed to the
network stack, the (compound) page gets freed within the IPA driver.
This is currently quite rare.

The pages are freed using __free_pages(), but they should instead be
freed using page_put().  This series fixes this, in two spots.

These patches work for Linux v5.18-rc7 and v5.17.y, but won't apply
cleanly to earlier stable branches.  (Nevertheless, the fix is
trivial.)

					-Alex

Alex Elder (2):
  net: ipa: fix page free in ipa_endpoint_trans_release()
  net: ipa: fix page free in ipa_endpoint_replenish_one()

 drivers/net/ipa/ipa_endpoint.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Alex Elder May 22, 2022, 12:46 p.m. UTC | #1
On 5/21/22 7:59 PM, Alex Elder wrote:
> When a receive buffer is not wrapped in an SKB and passed to the
> network stack, the (compound) page gets freed within the IPA driver.
> This is currently quite rare.
> 
> The pages are freed using __free_pages(), but they should instead be
> freed using page_put().  This series fixes this, in two spots.
> 
> These patches work for Linux v5.18-rc7 and v5.17.y, but won't apply
> cleanly to earlier stable branches.  (Nevertheless, the fix is
> trivial.)
> 
> 					-Alex

I accidentally based this on net-next/master rather than net/master.
Sorry about that.  I'll send version 2 in a few days.

					-Alex

> Alex Elder (2):
>    net: ipa: fix page free in ipa_endpoint_trans_release()
>    net: ipa: fix page free in ipa_endpoint_replenish_one()
> 
>   drivers/net/ipa/ipa_endpoint.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
>
David Miller May 22, 2022, 8 p.m. UTC | #2
From: Alex Elder <elder@linaro.org>
Date: Sat, 21 May 2022 19:59:57 -0500

> When a receive buffer is not wrapped in an SKB and passed to the
> network stack, the (compound) page gets freed within the IPA driver.
> This is currently quite rare.
> 
> The pages are freed using __free_pages(), but they should instead be
> freed using page_put().  This series fixes this, in two spots.
> 
> These patches work for Linux v5.18-rc7 and v5.17.y, but won't apply
> cleanly to earlier stable branches.  (Nevertheless, the fix is
> trivial.)

This does not apply to the current net tree, please respin.

Thank you.