Re: sblock() & solock() ordering

2017-07-03 Thread Alexander Bluhm
On Mon, Jul 03, 2017 at 11:42:19AM +0200, Martin Pieuchot wrote: > Updated diff that fixes some issues reported by visa@: > > - prevents relocking the netlock in the 'restart' case. > - always call solock() after sbunlock() in sosplice(). > > Alexander is there an easy way to trigger the 'res

Re: sblock() & solock() ordering

2017-07-03 Thread Martin Pieuchot
On 26/06/17(Mon) 16:15, Martin Pieuchot wrote: > I'd like to enforce the following "lock" ordering: always hold the > socket lock when calling sblock(). > > This would allow me to protect `so_state' in sosend() when setting the > SS_ISSENDING bit. > > Diff below implements that. It also gets rid

Re: sblock() & solock() ordering

2017-06-26 Thread Alexander Bluhm
On Mon, Jun 26, 2017 at 04:15:50PM +0200, Martin Pieuchot wrote: > I'd like to enforce the following "lock" ordering: always hold the > socket lock when calling sblock(). I was already wondering wether the "panic: receive 1" seen by stsp@ may be caused by an additional sleeping point in soreceive(

sblock() & solock() ordering

2017-06-26 Thread Martin Pieuchot
I'd like to enforce the following "lock" ordering: always hold the socket lock when calling sblock(). This would allow me to protect `so_state' in sosend() when setting the SS_ISSENDING bit. Diff below implements that. It also gets rid of sbsleep() and uses sosleep() instead. ok? Index: sys/so