On Sat, Apr 12, 2008 at 10:41:18PM +0100, Andrew Doran wrote:
Here's an updated patch.
http://www.netbsd.org/~ad/socklock-2008041201.diff
- Rudimentary tests on inet6 show it working.
- The bluetooth patch is merged in.
- More bugfixes, and assertions.
- The sbcheck change is bogus (sbcheck appears to be bogus, anyway)
- I think that I would prefer to move acquire of kernel_lock into the
individual protocols, instead of always having the wrappers which
will be unneeded baggage in the future.
One problem I know of: I think there is a race when sending SCM_RIGHTS
messages through a Unix socket. The symptom I see is gnome-terminal
hanging
due to a corrupted sockbuf. I think that the loop around
unp_externalize in
soreceive needs to be atomic. I'm surprised we never got bitten by
this
before since it could block, but whatever.
Aside from the below I think the patch is nearly ready:
- Make protosw::pr_lock mandatory.