git: 2476178e6b09 - main - Fix kassert panic when inserting multipath routes from multiple threads.
Alexander V. Chernikov
melifaro at FreeBSD.org
Sun Mar 21 18:17:26 UTC 2021
The branch main has been updated by melifaro:
URL: https://cgit.FreeBSD.org/src/commit/?id=2476178e6b09acc8d0fe6b1fb9c1b6f2981f766e
commit 2476178e6b09acc8d0fe6b1fb9c1b6f2981f766e
Author: Alexander V. Chernikov <melifaro at FreeBSD.org>
AuthorDate: 2021-03-21 18:15:29 +0000
Commit: Alexander V. Chernikov <melifaro at FreeBSD.org>
CommitDate: 2021-03-21 18:15:29 +0000
Fix kassert panic when inserting multipath routes from multiple threads.
Reported by: Marco Zec <zec at fer.hr>
MFC after: immediately
---
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);
More information about the dev-commits-src-all
mailing list