From: Jakub Kicinski <kuba@kernel.org>
To: Igor Russkikh <irusskikh@marvell.com>
Cc: <netdev@vger.kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] net: atlantic: fixed double free when constrained memory conditions
Date: Tue, 5 Dec 2023 19:33:26 -0800 [thread overview]
Message-ID: <20231205193326.3fb93009@kernel.org> (raw)
In-Reply-To: <20231204162040.923-1-irusskikh@marvell.com>
On Mon, 4 Dec 2023 17:20:40 +0100 Igor Russkikh wrote:
> Driver has a logic leak in ring data allocation/free,
> where double free may happen in aq_ring_free if system is under
> stress and driver init/deinit is happening.
>
> The probability is higher to get this during suspend/resume cycle.
>
> Verification was done simulating same conditions with
>
> stress -m 2000 --vm-bytes 20M --vm-hang 10 --backoff 1000
> while true; do sudo ifconfig enp1s0 down; sudo ifconfig enp1s0 up; done
>
> Fixed by explicitly clearing pointers to NULL, also eliminate two
> levels of aq_ring_free invocation.
The change of the return type plays no functional role in the fix,
right?
I think it'd make the change far more readable if that was a separate
patch. And if it's a separate, non-functional patch, it should go
to net-next, rather than with the fix to net.
next prev parent reply other threads:[~2023-12-06 3:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 16:20 [PATCH] net: atlantic: fixed double free when constrained memory conditions Igor Russkikh
2023-12-06 3:33 ` Jakub Kicinski [this message]
2023-12-07 9:29 ` [EXT] " Igor Russkikh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231205193326.3fb93009@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=irusskikh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.