git: b81cbb12410b - main - gve: Make gve_free_qpls idempotent
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Jun 2024 06:09:08 UTC
The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=b81cbb12410b000074483899e61e9e767ba3ec1d commit b81cbb12410b000074483899e61e9e767ba3ec1d Author: Shailend Chand <shailend@google.com> AuthorDate: 2024-06-05 05:31:46 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2024-06-18 06:08:31 +0000 gve: Make gve_free_qpls idempotent This fixes a panic caused by double free. PR: kern/279410 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45489 --- sys/dev/gve/gve_qpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/gve/gve_qpl.c b/sys/dev/gve/gve_qpl.c index 3c6d9af6feee..9a946a2a2f2d 100644 --- a/sys/dev/gve/gve_qpl.c +++ b/sys/dev/gve/gve_qpl.c @@ -182,6 +182,7 @@ gve_free_qpls(struct gve_priv *priv) for (i = 0; i < num_qpls; i++) gve_free_qpl(priv, i); free(priv->qpls, M_GVE_QPL); + priv->qpls = NULL; } }