Re: UNIX sockets: make `unp_rights', `unp_msgcount' and `unp_file' atomic

2021-11-05 Thread Vitaliy Makkoveev
On Fri, Nov 05, 2021 at 09:50:05AM +0100, Mark Kettenis wrote: > > Date: Fri, 5 Nov 2021 07:18:03 +0100 > > From: Martin Pieuchot > > > > On 30/10/21(Sat) 21:22, Vitaliy Makkoveev wrote: > > > This completely removes global rwlock(9) from the unp_internalize() and > > > unp_externalize() normal p

Re: UNIX sockets: make `unp_rights', `unp_msgcount' and `unp_file' atomic

2021-11-05 Thread Mark Kettenis
> Date: Fri, 5 Nov 2021 07:18:03 +0100 > From: Martin Pieuchot > > On 30/10/21(Sat) 21:22, Vitaliy Makkoveev wrote: > > This completely removes global rwlock(9) from the unp_internalize() and > > unp_externalize() normal paths but only leaves it in unp_externalize() > > error path. Also we don't

Re: UNIX sockets: make `unp_rights', `unp_msgcount' and `unp_file' atomic

2021-11-04 Thread Martin Pieuchot
On 30/10/21(Sat) 21:22, Vitaliy Makkoveev wrote: > This completely removes global rwlock(9) from the unp_internalize() and > unp_externalize() normal paths but only leaves it in unp_externalize() > error path. Also we don't need to simultaneously hold both fdplock() > and `unp_lock' in unp_internal

UNIX sockets: make `unp_rights', `unp_msgcount' and `unp_file' atomic

2021-10-30 Thread Vitaliy Makkoveev
This completely removes global rwlock(9) from the unp_internalize() and unp_externalize() normal paths but only leaves it in unp_externalize() error path. Also we don't need to simultaneously hold both fdplock() and `unp_lock' in unp_internalize(). As non obvious profit this simplifies the future l