Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2021 20:50:25 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 589d5d28a811 - releng/13.0 - Fix kassert panic when inserting multipath routes from multiple threads.
Message-ID:  <202103282050.12SKoPSU011993@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/13.0 has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=589d5d28a8119dac166346f890fa450e1b7b489c

commit 589d5d28a8119dac166346f890fa450e1b7b489c
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2021-03-21 18:15:29 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2021-03-28 20:40:48 +0000

    Fix kassert panic when inserting multipath routes from multiple threads.
    
    Reported by:    Marco Zec <zec at fer.hr>
    Approved by:    re (gjb)
    
    (cherry picked from commit 42f997d9b721ce5b64c37958f21fa81630f5a224)
---
 sys/net/route/nhgrp_ctl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c
index c2119506370f..b329b907144f 100644
--- a/sys/net/route/nhgrp_ctl.c
+++ b/sys/net/route/nhgrp_ctl.c
@@ -488,7 +488,9 @@ get_nhgrp(struct nh_control *ctl, struct weightened_nhop *wn, int num_nhops,
 		if (link_nhgrp(ctl, key) == 0) {
 			/* Unable to allocate index? */
 			*perror = EAGAIN;
-			destroy_nhgrp(key);
+			free_nhgrp_nhops(key);
+			destroy_nhgrp_int(key);
+			return (NULL);
 		}
 		*perror = 0;
 		return (key);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103282050.12SKoPSU011993>