DragonFly BSD
DragonFly kernel List (threaded) for 2011-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: race condition in knote deletion?


From: "Samuel J. Greear" <sjg@xxxxxxxxxxxx>
Date: Tue, 1 Feb 2011 20:37:31 -0700

On Tue, Feb 1, 2011 at 6:26 PM, Matthew Dillon
<dillon@apollo.backplane.com> wrote:
> :        kn->kn_status |= KN_DELETING | KN_REPROCESS;
> :
> :So  wouldn't another cpu running knote_release() while the 1st one
> :sleeps call knote_detach_and_drop() too
> :causing a crash when the 1st cpu resumes?
>
>    Only the thread which set KN_PROCESSING can release the knote,
>    so it shouldn't be possible.  Other threads will see that KN_PROCESSING
>    is already set and not try to do anything drastic to the knote.
>
>                                        -Matt
>                                        Matthew Dillon
>                                        <dillon@backplane.com>
>

I think the mouse detach bug is probably something more fundamental,
like teardown ordering. It's very easy to tickle, start up X with a
usb mouse configured (/dev/ums*), unplug the mouse. It may take a bit
of time before it occurs, but switching from X to a console seems to
make it happen immediately.

Sam




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