tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Request for testers - socket locking diff

On Sat, Apr 12, 2008 at 10:41:18PM +0100, Andrew Doran wrote:

> Here's an updated patch.
> - 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.
- Make protocol methods take kernel_lock directly, and remove wrappers.
- Profiling and further testing.
- In netisrs, always lock in the socket -> kernel_lock direction, instead
  of letting the softint code take kernel_lock. This is just for efficiency.

Any comments on it?


Home | Main Index | Thread Index | Old Index