lkml.org 
[lkml]   [2006]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: DoS with POSIX file locks?
From
Date
On Mon, 2006-03-20 at 13:52 +0100, Miklos Szeredi wrote:
> > Right. Um. I took it out back in March 2003 after enough people
> > convinced me it wasn't worth trying to account for all the memory
> > processes use, and the userbeans project would take care of it anyway.
> > Haha.
> >
> > It's hard to fix the accounting. You have to deal with one thread
> > allocating the lock, and then a different thread freeing it. We never
> > actually accounted for posix locks (which are the ones we really needed
> > to!) and on occasion had current->locks go negative, with all kinds of
> > associated badness.
>
> Things look fairly straightforward if the accounting is done in
> files_struct instead of task_struct.

that's the wrong place; you can send fd's over unix sockets to other
processes....



the better solution is to account per user struct, and keep a pointer
(and a refcount) of that user struct inside your lock data somehow.


-
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: 2006-03-20 14:16    [W:1.498 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site