Re: [PATCH resend] rewrite AF_UNIX garbage collector, fixes race

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

 



From: Miklos Szeredi <[email protected]>
Date: Wed, 04 Jul 2007 11:49:41 +0200

> Throw out the old mark & sweep garbage collector and put in a
> refcounting cycle detecting one.
> 
> The old one had a race with recvmsg, that resulted in false positives
> and hence data loss.  The old algorithm operated on all unix sockets
> in the system, so any additional locking would have meant performance
> problems for all users of these.
> 
> The new algorithm instead only operates on "in flight" sockets, which
> are very rare, and the additional locking for these doesn't negatively
> impact the vast majority of users.
> 
> In fact it's probable, that there weren't *any* heavy senders of
> sockets over sockets, otherwise the above race would have been
> discovered long ago.
> 
> The patch works OK with the app that exposed the race with the old
> code.  The garbage collection has also been verified to work in a few
> simple cases.
> 
> See comments inside patch for the description of the algorithm.
> 
> Signed-off-by: Miklos Szeredi <[email protected]>

This looks good, patch applied and I'll get this into the
2.6.23 merge window.

Once this sits around for a while and we feel super-confident
with it we can consider a backport into -stable.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux