Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2023 12:12:18 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: 8c60d469d3fa - stable/13 - netlink: fix if_allocdescr() malloc options argument.
Message-ID:  <202302181212.31ICCI4w097698@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=8c60d469d3faa98f6b0e49173f16a8603c4c4654

commit 8c60d469d3faa98f6b0e49173f16a8603c4c4654
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-02-17 17:35:28 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-02-18 11:56:18 +0000

    netlink: fix if_allocdescr() malloc options argument.
    
    The current value was based on the initial revision of D37566 and
     was not updated afterwards.
    
    MFC after:      1 day
    
    (cherry picked from commit 6694cb1f5784d6ceacd684d29b3e3012e1e4e4d5)
---
 sys/netlink/route/iface_drivers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c
index 7f098b808743..1b8c27bfca68 100644
--- a/sys/netlink/route/iface_drivers.c
+++ b/sys/netlink/route/iface_drivers.c
@@ -72,7 +72,7 @@ modify_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
 	if (lattrs->ifla_ifalias != NULL) {
 		if (nlp_has_priv(nlp, PRIV_NET_SETIFDESCR)) {
 			int len = strlen(lattrs->ifla_ifalias) + 1;
-			char *buf = if_allocdescr(len, true);
+			char *buf = if_allocdescr(len, M_WAITOK);
 
 			memcpy(buf, lattrs->ifla_ifalias, len);
 			if_setdescr(ifp, buf);



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