Date: Fri, 12 Aug 2022 19:30:38 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b7bf3cb07fcf - main - keysock: explicitly initialized LIST_HEAD Message-ID: <202208121930.27CJUcoo064450@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b7bf3cb07fcf633c5500171b43c1ef68b5208139 commit b7bf3cb07fcf633c5500171b43c1ef68b5208139 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-08-12 19:29:26 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-08-12 19:29:26 +0000 keysock: explicitly initialized LIST_HEAD This is supposed to fix syzcaller report. Reported by: syzbot+1e08b5f9f7f00383ddea@syzkaller.appspotmail.com Fixes: ea7be1293b48385f27b97c5f112e4cad93cbd33b --- sys/netipsec/keysock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c index 148a67a1775e..8c95bc775c73 100644 --- a/sys/netipsec/keysock.c +++ b/sys/netipsec/keysock.c @@ -72,7 +72,8 @@ MTX_SYSINIT(keysock, &keysock_mtx, "key socket pcb list", MTX_DEF); #define KEYSOCK_LOCK() mtx_lock(&keysock_mtx) #define KEYSOCK_UNLOCK() mtx_unlock(&keysock_mtx) -VNET_DEFINE_STATIC(LIST_HEAD(, keycb), keycb_list); +VNET_DEFINE_STATIC(LIST_HEAD(, keycb), keycb_list) = + LIST_HEAD_INITIALIZER(keycb_list); #define V_keycb_list VNET(keycb_list) static struct sockaddr key_src = { 2, PF_KEY, };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208121930.27CJUcoo064450>