lkml.org 
[lkml]   [2007]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] fix race in AF_UNIX
Date
Miklos Szeredi <miklos@szeredi.hu> writes:
>
> And I think incremental GC algorithms are much too complex for this
> task. What I've realized, is that in fact we don't require a generic
> garbage collection algorithm, just a much more specialized cycle
> collection algorithm, since refcounting in struct file takes care of
> the rest.
>
> This would help with localizing the problem to the problematic sockets
> (which have an in-flight unix socket), instead of having to blindly
> traverse _all_ unix sockets in the system.
>
> I'll look at reimplementing the GC with such an algorithm.

Ok. If you can do it more simply have at it.

There are incremental garbage collectors that are essentially just the
current algorithm with fine-grained locking. So we don't have to live
in a spin-lock the whole time.

If your approach fails we can look at something more fine-grained.

>> It appears clear that since we can't stop the world and garbage
>> collect we need an incremental collector.
>
> Constraining ourselves to stopping unix sockets from going in flight
> or coming out of flight during garbage collection should be OK I
> think. There's still a possibility of a DoS there, but it would only
> be able to affect _very_ few applications.

Yes.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-26 17:27    [W:1.439 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site