From owner-dev-commits-src-all@freebsd.org Mon Mar 29 23:32:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7EBB5B0507; Mon, 29 Mar 2021 23:32:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8TQF32wSz4tgD; Mon, 29 Mar 2021 23:32:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id R1N4ltVlm2SWTR1N5lTWyY; Mon, 29 Mar 2021 17:32:35 -0600 X-Authority-Analysis: v=2.4 cv=fdJod2cF c=1 sm=1 tr=0 ts=60626393 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=dESyimp9J3IA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=a2I0WHjqtDzGpkUg5AYA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 8738D14B; Mon, 29 Mar 2021 16:32:33 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 12TNWXSv007193; Mon, 29 Mar 2021 16:32:33 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202103292332.12TNWXSv007193@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Alexander V. Chernikov" cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9fa8d1582b44 - main - Put bandaid for nhgrp_dump_sysctl() malloc KASSERT(). In-reply-to: <202103292315.12TNFFmZ050152@gitrepo.freebsd.org> References: <202103292315.12TNFFmZ050152@gitrepo.freebsd.org> Comments: In-reply-to "Alexander V. Chernikov" message dated "Mon, 29 Mar 2021 23:15:15 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Mar 2021 16:32:33 -0700 X-CMAE-Envelope: MS4xfOAI4hRRNgNrmbpW6Rg4wdOuEWZ2RyjXxQcpAevn5gDJNNzm+i9W1xowwxhn8QoaAN9Mf+SouopPRaeOrYLayloxvtIPijUF8tHWh5QPb4rtto/8QRcM /M3mm6Uk/tUt1oRwLLpNWtobQJpeW1FoDGNu+GLFXHTIsAOMW8Ti5bXfCVt6t3Tx7d8NtSi0xUcT6UOC1Zctmc0rnnKG5jPRKVs0XbcfB7sUq+r64PLFgvwy Hnz4U8xQtCXXJre6Wa5eLJsKMJU+kEGsLd8RsLVcSQWocz9lWGYeawfgxMzLsxjDL3fnZxVXblyD5UsfAUdzXTmCNIkqTWm3JxmUfGPtAA8= X-Rspamd-Queue-Id: 4F8TQF32wSz4tgD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 23:32:37 -0000 In message <202103292315.12TNFFmZ050152@gitrepo.freebsd.org>, "Alexander V. Che rnikov" writes: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9fa8d1582b44b4850d40699c9adb1047 > 32328b7d > > commit 9fa8d1582b44b4850d40699c9adb104732328b7d > Author: Alexander V. Chernikov > AuthorDate: 2021-03-29 23:12:11 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2021-03-29 23:12:11 +0000 > > Put bandaid for nhgrp_dump_sysctl() malloc KASSERT(). > > Recent rtsock changes widened epoch and covered nhgrp_dump_sysctl(), > resulting in `netstat -4On` triggering with KASSERT. > > MFC after: 1 day > --- > 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 b228c3bcee37..2896730458b5 100644 > --- a/sys/net/route/nhgrp_ctl.c > +++ b/sys/net/route/nhgrp_ctl.c > @@ -806,7 +806,9 @@ nhgrp_dump_sysctl(struct rib_head *rh, struct sysctl_req > *w) > sz = sizeof(struct rt_msghdr) + sizeof(struct nhgrp_external); > sz += 2 * sizeof(struct nhgrp_container); > sz += 2 * sizeof(struct nhgrp_nhop_external) * RIB_MAX_MPATH_WIDTH; > - buffer = malloc(sz, M_TEMP, M_WAITOK); > + buffer = malloc(sz, M_TEMP, M_MOWAIT); ^ This appears to be a typo. > + if (buffer == NULL) > + return (ENOMEM); > > NET_EPOCH_ENTER(et); > NHOPS_RLOCK(ctl); > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.