Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2024 04:45:11 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 67971181687f - stable/14 - if_vlan: Stop checking for failures from malloc(M_WAITOK)
Message-ID:  <202409300445.48U4jB64086306@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=67971181687f0475dcf72b42d065364efea96251

commit 67971181687f0475dcf72b42d065364efea96251
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:19 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 04:44:15 +0000

    if_vlan: Stop checking for failures from malloc(M_WAITOK)
    
    Fixes:  b08d611de835 fix vlan locking to permit sx acquisition in ioctl calls
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
    
    (cherry picked from commit 07b16b1e2aeab0b30f68a013de31a4c322a61246)
---
 sys/net/if_vlan.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 59eb41956ad4..206d46e7f9be 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -508,11 +508,6 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch)
 		return;
 
 	hash2 = malloc(sizeof(struct ifvlanhead) * n2, M_VLAN, M_WAITOK);
-	if (hash2 == NULL) {
-		printf("%s: out of memory -- hash size not changed\n",
-		    __func__);
-		return;		/* We can live with the old hash table */
-	}
 	for (j = 0; j < n2; j++)
 		CK_SLIST_INIT(&hash2[j]);
 	for (i = 0; i < n; i++)



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