On Fri, 26 May 2017 18:05:30 +0200
Martin Pieuchot <m...@openbsd.org> wrote:
> On 26/05/17(Fri) 17:43, Alexander Bluhm wrote:
>> > @@ -569,8 +554,6 @@ tun_output(struct ifnet *ifp, struct mbu
>> >    af = mtod(m0, u_int32_t *);
>> >    *af = htonl(dst->sa_family);
>> >  
>> > -  s = splnet();
>> > -
>> >  #if NBPFILTER > 0
>> >    if (ifp->if_bpf)
>> >            bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
>> > @@ -584,7 +567,6 @@ tun_output(struct ifnet *ifp, struct mbu
>> >  #endif
>> >  
>> >    error = if_enqueue(ifp, m0);
>> > -  splx(s);
>> >  
>> >    if (error) {
>> >            ifp->if_collisions++;
>> 
>> There is a forgotten splx(s) after pipex_output().  Is it safe to
>> call pipex_output() without splnet()?  There is a lot of splnet()
>> protection in pipex.
> 
> pipex data structures are not touched from an IPL_NET interrupt handler,
> so splnet() is superfluous.

Yes.  pipex is called from ether_input() which had been executed in
ethernet drivers' interrupt.  But now it is executed as a task, so
splnet is not neccesary for pipex.

--yasuoka

Reply via email to