diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2021-10-14 23:05:11 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2021-10-14 23:05:11 +0000 |
commit | d20b73cea798c9da6cfaab2e8d00e960cf55a488 (patch) | |
tree | a1fcb1666ffc04a738fad88fd8388214c95e9a94 /sys/ufs | |
parent | 146cf15616df5dc48860f72092943418d60062c6 (diff) |
Release solock() before call unp_externalize().
A little step forward to make UNIX domain sockets locking fine grained.
The closest goal is to introduce the new rwlock(9) and use it to protect
garbage collector data. This leaves existing `unp_lock' rwlock(9) which
cowers the whole layer for per-socket data only and allows to replace it
with per-socket `so_lock' with further diffs.
Except file descriptor table unp_externalize() operates with the garbage
collector data only such as `unp_rights', `unp_msgcount' directly and
`unp_deferred' through unp_discard(). I want to introduce the new garbage
collector rwlock(9) with the separate diff, so `unp_lock' is still taken
within unp_externalize() around garbage collector data access. But right
now M_WAITOK allocation removed from rwlock(9). Also useless M_WAITOK
allocation and fdplock()/fdpunlock() dances removed from the error path.
The `unp_lock' and fdplock() are not taken together within
unp_externalize() but unp_internalize() still enforces `unp_lock' ->
fdplock() lock order. This rests the only place and will be changed with
the upcoming unp_internalize() and garbage collector rwlock(9) diffs.
ok bluhm@
Diffstat (limited to 'sys/ufs')
0 files changed, 0 insertions, 0 deletions