diff options
Diffstat (limited to 'sys/dev/qbus')
| -rw-r--r-- | sys/dev/qbus/if_dmc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/qbus/if_dmc.c b/sys/dev/qbus/if_dmc.c index 2dfa1433309..a8997037bcf 100644 --- a/sys/dev/qbus/if_dmc.c +++ b/sys/dev/qbus/if_dmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_dmc.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $ */ +/* $NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $ */ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.25 2016/07/07 09:32:02 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.26 2016/07/20 07:37:51 ozaki-r Exp $"); #undef DMCDEBUG /* for base table dump on fatal error */ @@ -313,9 +313,12 @@ dmcinit(struct ifnet *ifp) * Check to see that an address has been set * (both local and destination for an address family). */ - IFADDR_READER_FOREACH(ifa, ifp) + s = pserialize_read_enter(); + IFADDR_READER_FOREACH(ifa, ifp) { if (ifa->ifa_addr->sa_family && ifa->ifa_dstaddr->sa_family) break; + } + pserialize_read_exit(s); if (ifa == NULL) return 0; |
