Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Backout rev.1.137. It causes troubles, see PR k...
details: https://anonhg.NetBSD.org/src/rev/d27d3ceffadb
branches: trunk
changeset: 754888:d27d3ceffadb
user: oki <oki%NetBSD.org@localhost>
date: Sat May 15 05:02:46 2010 +0000
description:
Backout rev.1.137. It causes troubles, see PR kern/43294.
We needs more discussion/a more general solution.
diffstat:
sys/netinet/in.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diffs (108 lines):
diff -r a06e887d593b -r d27d3ceffadb sys/netinet/in.c
--- a/sys/netinet/in.c Sat May 15 03:54:35 2010 +0000
+++ b/sys/netinet/in.c Sat May 15 05:02:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.137 2010/03/12 13:33:19 oki Exp $ */
+/* $NetBSD: in.c,v 1.138 2010/05/15 05:02:46 oki Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.137 2010/03/12 13:33:19 oki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.138 2010/05/15 05:02:46 oki Exp $");
#include "opt_inet.h"
#include "opt_inet_conf.h"
@@ -386,7 +386,6 @@
ia = malloc(sizeof(*ia), M_IFADDR, M_WAITOK|M_ZERO);
if (ia == NULL)
return (ENOBUFS);
- mutex_enter(softnet_lock);
TAILQ_INSERT_TAIL(&in_ifaddrhead, ia, ia_list);
IFAREF(&ia->ia_ifa);
ifa_insert(ifp, &ia->ia_ifa);
@@ -406,7 +405,6 @@
ia->ia_ifp = ifp;
ia->ia_idsalt = arc4random() % 65535;
LIST_INIT(&ia->ia_multiaddrs);
- mutex_exit(softnet_lock);
newifaddr = 1;
}
break;
@@ -454,12 +452,10 @@
case SIOCSIFDSTADDR:
if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
return (EINVAL);
- mutex_enter(softnet_lock);
oldaddr = ia->ia_dstaddr;
ia->ia_dstaddr = *satocsin(ifreq_getdstaddr(cmd, ifr));
if ((error = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR, ia)) != 0) {
ia->ia_dstaddr = oldaddr;
- mutex_exit(softnet_lock);
return error;
}
if (ia->ia_flags & IFA_ROUTE) {
@@ -468,7 +464,6 @@
ia->ia_ifa.ifa_dstaddr = sintosa(&ia->ia_dstaddr);
rtinit(&ia->ia_ifa, RTM_ADD, RTF_HOST|RTF_UP);
}
- mutex_exit(softnet_lock);
break;
case SIOCSIFBRDADDR:
@@ -478,7 +473,6 @@
break;
case SIOCSIFADDR:
- mutex_enter(softnet_lock);
error = in_ifinit(ifp, ia, satocsin(ifreq_getaddr(cmd, ifr)),
1);
#ifdef PFIL_HOOKS
@@ -486,22 +480,18 @@
(void)pfil_run_hooks(&if_pfil,
(struct mbuf **)SIOCSIFADDR, ifp, PFIL_IFADDR);
#endif
- mutex_exit(softnet_lock);
break;
case SIOCSIFNETMASK:
- mutex_enter(softnet_lock);
in_ifscrub(ifp, ia);
ia->ia_sockmask = *satocsin(ifreq_getaddr(cmd, ifr));
ia->ia_subnetmask = ia->ia_sockmask.sin_addr.s_addr;
error = in_ifinit(ifp, ia, NULL, 0);
- mutex_exit(softnet_lock);
break;
case SIOCAIFADDR:
maskIsNew = 0;
hostIsNew = 1;
- mutex_enter(softnet_lock);
if (ia->ia_addr.sin_family != AF_INET)
;
else if (ifra->ifra_addr.sin_len == 0) {
@@ -534,7 +524,6 @@
(void)pfil_run_hooks(&if_pfil,
(struct mbuf **)SIOCAIFADDR, ifp, PFIL_IFADDR);
#endif
- mutex_exit(softnet_lock);
break;
case SIOCGIFALIAS:
@@ -551,13 +540,11 @@
break;
case SIOCDIFADDR:
- mutex_enter(softnet_lock);
in_purgeaddr(&ia->ia_ifa);
#ifdef PFIL_HOOKS
(void)pfil_run_hooks(&if_pfil, (struct mbuf **)SIOCDIFADDR,
ifp, PFIL_IFADDR);
#endif
- mutex_exit(softnet_lock);
break;
#ifdef MROUTING
Home |
Main Index |
Thread Index |
Old Index