Messages in this thread | | | Date | Wed, 11 Jul 2007 19:29:40 -0700 (PDT) | Subject | Re: [PATCH resend] rewrite AF_UNIX garbage collector, fixes race | From | David Miller <> |
| |
From: Miklos Szeredi <miklos@szeredi.hu> 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 <mszeredi@suse.cz>
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 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/
| |