Re: Avoid spl recursion in doaccept()

2016-11-08 Thread Alexander Bluhm
On Mon, Nov 07, 2016 at 10:16:14AM +0100, Martin Pieuchot wrote: > @@ -366,18 +362,23 @@ redo: > > if (error) { > /* if an error occurred, free the file descriptor */ > + splx(s); > + m_freem(nam); > fdplock(fdp); > fdremove(

Re: Avoid spl recursion in doaccept()

2016-11-08 Thread Mike Belopuhov
On Mon, Nov 07, 2016 at 10:16 +0100, Martin Pieuchot wrote: > We're aiming to replace critical sections protected by splsoftnet() by > a non recursive rwlock. So we'll have to care about recursivity. > > Diff below prevents a recursion in the error path. Currently closef() > will call soclose()

Avoid spl recursion in doaccept()

2016-11-07 Thread Martin Pieuchot
We're aiming to replace critical sections protected by splsoftnet() by a non recursive rwlock. So we'll have to care about recursivity. Diff below prevents a recursion in the error path. Currently closef() will call soclose() which will take splsoftnet() again. So let's release the spl level be