Module Name:    src
Committed By:   martin
Date:           Sun Jan 14 15:18:37 UTC 2024

Modified Files:
        src/sys/net [netbsd-10]: if_tun.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #540):

        sys/net/if_tun.c: revision 1.174

tun: add missing kpreempt_enable() if pktq_enqueue() fails


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.173.4.1 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_tun.c
diff -u src/sys/net/if_tun.c:1.173 src/sys/net/if_tun.c:1.173.4.1
--- src/sys/net/if_tun.c:1.173	Mon Mar 28 12:33:22 2022
+++ src/sys/net/if_tun.c	Sun Jan 14 15:18:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tun.c,v 1.173 2022/03/28 12:33:22 riastradh Exp $	*/
+/*	$NetBSD: if_tun.c,v 1.173.4.1 2024/01/14 15:18:37 martin Exp $	*/
 
 /*
  * Copyright (c) 1988, Julian Onions <j...@cs.nott.ac.uk>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.173 2022/03/28 12:33:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.173.4.1 2024/01/14 15:18:37 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -982,6 +982,7 @@ tunwrite(dev_t dev, struct uio *uio, int
 	}
 	kpreempt_disable();
 	if (__predict_false(!pktq_enqueue(pktq, top, 0))) {
+		kpreempt_enable();
 		if_statinc(ifp, if_collisions);
 		mutex_exit(&tp->tun_lock);
 		error = ENOBUFS;

Reply via email to