Module Name: src
Committed By: ozaki-r
Date: Tue Jun 3 01:24:32 UTC 2014
Modified Files:
src/sys/netinet: if_arp.c
Log Message:
Call ifp->if_output in revarprequest with KERNEL_LOCK held
Otherwise, it hits KASSERT(KERNEL_LOCKED_P()) in ether_output
when nfs_boot fails and tries RARP.
To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet/if_arp.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/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.157 src/sys/netinet/if_arp.c:1.158
--- src/sys/netinet/if_arp.c:1.157 Sun May 18 14:46:16 2014
+++ src/sys/netinet/if_arp.c Tue Jun 3 01:24:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.157 2014/05/18 14:46:16 rmind Exp $ */
+/* $NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.157 2014/05/18 14:46:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -1481,8 +1481,10 @@ revarprequest(struct ifnet *ifp)
sa.sa_family = AF_ARP;
sa.sa_len = 2;
m->m_flags |= M_BCAST;
- (*ifp->if_output)(ifp, m, &sa, NULL);
+ KERNEL_LOCK(1, NULL);
+ (*ifp->if_output)(ifp, m, &sa, NULL);
+ KERNEL_UNLOCK_ONE(NULL);
}
/*