lkml.org 
[lkml]   [2006]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: DoS with POSIX file locks?
    From
    On Mon, Mar 20, 2006 at 05:41:30PM +0100, Miklos Szeredi wrote:
    > > > Things look fairly straightforward if the accounting is done in
    > > > files_struct instead of task_struct. At least for POSIX locks. I
    > > > haven't looked at flocks or leases yet.
    > >
    > > I was thinking that would work, yes. It might not be worth worrying
    > > about accounting for leases/flocks since each process can only have one
    > > of those per open file anyway.
    >
    > Here's a minimally tested patch. The only tricky part is when the
    > unlock splits an existing lock in two.
    >
    > Also the limit checking is sloppy when the lock is split, and in that
    > case allows the counter to go one above the limit.

    Do you need to handle blocks as well as applied locks?

    --b.
    -
    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 21:38    [W:5.428 / U:0.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site