Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Ensure that all queues passed to ifq_enqueue2() have...
details: https://anonhg.NetBSD.org/src/rev/a7b4899f15e2
branches: trunk
changeset: 369671:a7b4899f15e2
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Aug 27 19:19:10 2022 +0000
description:
Ensure that all queues passed to ifq_enqueue2() have a valid ifq_lock.
diffstat:
sys/net/if_sl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r f9892cb1cdcb -r a7b4899f15e2 sys/net/if_sl.c
--- a/sys/net/if_sl.c Sat Aug 27 19:17:08 2022 +0000
+++ b/sys/net/if_sl.c Sat Aug 27 19:19:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sl.c,v 1.133 2022/08/27 19:17:08 thorpej Exp $ */
+/* $NetBSD: if_sl.c,v 1.134 2022/08/27 19:19:10 thorpej Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.133 2022/08/27 19:17:08 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.134 2022/08/27 19:19:10 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -270,6 +270,7 @@
sc->sc_if.if_output = sloutput;
sc->sc_if.if_dlt = DLT_SLIP;
IFQ_SET_MAXLEN(&sc->sc_fastq, 32);
+ IFQ_LOCK_INIT(&sc->sc_fastq);
IFQ_SET_READY(&sc->sc_if.if_snd);
if_attach(&sc->sc_if);
if_alloc_sadl(&sc->sc_if);
@@ -291,6 +292,8 @@
bpf_detach(ifp);
if_detach(ifp);
+ IFQ_LOCK_DESTROY(&sc->sc_fastq);
+
free(sc, M_DEVBUF);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index