On 20 September 2016 at 16:50, Martin Pieuchot <m...@openbsd.org> wrote: > On 20/09/16(Tue) 16:37, Alexander Bluhm wrote: >> On Tue, Sep 20, 2016 at 04:17:37PM +0200, Mike Belopuhov wrote: >> > Can we assert that *_usrreq is always called under splsoftnet? >> >> I think that is the way to go. Long time back the spl moved from >> inet to socket. We need it in the socket layer to fix various >> races. > > *_ussreq() is a can of worm. It is recursive and we'll have to split > per operation if if we want to avoid releasing/grabbing the lock again. >
This means it would be better to grab a lock before calling usrreq and assert that it's taken there, no? In other words we can remove splsoftnet from *_usrreq and assert IPL_SOFTNET now. > That said, assert are good putting more splsoftnet() should be avoided. > s/assert are good putting/assert are good, but putting/ ?