Module Name:    src
Committed By:   ozaki-r
Date:           Wed Nov 26 10:18:38 UTC 2014

Modified Files:
        src/sys/netinet: ip_output.c

Log Message:
Call looutput with holding KERNEL_LOCK

This fixes diagnostic assertion "KERNEL_LOCKED_P()" in if_loop.c.

PR kern/49410


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/sys/netinet/ip_output.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/netinet/ip_output.c
diff -u src/sys/netinet/ip_output.c:1.232 src/sys/netinet/ip_output.c:1.233
--- src/sys/netinet/ip_output.c:1.232	Sun Oct 12 19:00:21 2014
+++ src/sys/netinet/ip_output.c	Wed Nov 26 10:18:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_output.c,v 1.232 2014/10/12 19:00:21 christos Exp $	*/
+/*	$NetBSD: ip_output.c,v 1.233 2014/11/26 10:18:37 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.232 2014/10/12 19:00:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.233 2014/11/26 10:18:37 ozaki-r Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1713,5 +1713,7 @@ ip_mloopback(struct ifnet *ifp, struct m
 
 	ip->ip_sum = 0;
 	ip->ip_sum = in_cksum(copym, ip->ip_hl << 2);
+	KERNEL_LOCK(1, NULL);
 	(void)looutput(ifp, copym, sintocsa(dst), NULL);
+	KERNEL_UNLOCK_ONE(NULL);
 }

Reply via email to