Re: splnet() and SIOCSIFADDR

2014-10-03 Thread Alexander Bluhm
On Thu, Sep 11, 2014 at 10:49:33AM +0200, Martin Pieuchot wrote: > --- netinet6/in6.c26 Aug 2014 21:44:29 - 1.140 > +++ netinet6/in6.c11 Sep 2014 08:45:29 - > @@ -561,8 +560,10 @@ in6_control(struct socket *so, u_long cm > } > > case SIOCDIFADDR_IN6: > +

Re: splnet() and SIOCSIFADDR

2014-09-30 Thread Martin Pieuchot
On 11/09/14(Thu) 10:49, Martin Pieuchot wrote: > On 03/09/14(Wed) 20:59, Alexander Bluhm wrote: > > On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: > > > @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) > > > void > > > in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
On 03/09/14(Wed) 23:59, Claudio Jeker wrote: > On Wed, Sep 03, 2014 at 03:25:34PM +0200, Martin Pieuchot wrote: > > Drivers that need a splnet() protection inside their SIOCSIFADDR > > generally raise the spl level themselves, so we should not need > > to do that in in{6,}_ifinit(). One exception

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
On 03/09/14(Wed) 20:59, Alexander Bluhm wrote: > On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: > > @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) > > void > > in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *ifp) > > { > > - int s = splnet(); > > + splsoft

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Claudio Jeker
On Wed, Sep 03, 2014 at 03:25:34PM +0200, Martin Pieuchot wrote: > Drivers that need a splnet() protection inside their SIOCSIFADDR > generally raise the spl level themselves, so we should not need > to do that in in{6,}_ifinit(). One exception to this rule is, > as always, carp(4)... > > So the

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Alexander Bluhm
On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: > @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) > void > in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *ifp) > { > - int s = splnet(); > + splsoftassert(IPL_SOFTNET); > > ifa_del(ifp, &ia6->ia_if

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Mike Belopuhov
On 3 September 2014 15:53, Martin Pieuchot wrote: > On 03/09/14(Wed) 15:25, Martin Pieuchot wrote: >> Drivers that need a splnet() protection inside their SIOCSIFADDR >> generally raise the spl level themselves, so we should not need >> to do that in in{6,}_ifinit(). One exception to this rule is

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
On 03/09/14(Wed) 15:25, Martin Pieuchot wrote: > Drivers that need a splnet() protection inside their SIOCSIFADDR > generally raise the spl level themselves, so we should not need > to do that in in{6,}_ifinit(). One exception to this rule is, > as always, carp(4)... > > So the diff below moves t

splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception to this rule is, as always, carp(4)... So the diff below moves the spl dance inside carp's SIOCSIFADDR handler, it's a baby