lkml.org 
[lkml]   [2011]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] tmpfs: support user quotas
On Sun, 06.11.11 18:15, Davidlohr Bueso (dave@gnu.org) wrote:

> From: Davidlohr Bueso <dave@gnu.org>
>
> This patch adds a new RLIMIT_TMPFSQUOTA resource limit to restrict an individual user's quota across all mounted tmpfs filesystems.
> It's well known that a user can easily fill up commonly used directories (like /tmp, /dev/shm) causing programs to break through DoS.

Thanks a lot for this work! One comment without looking at the patch in detail:

> + if (atomic_long_read(&user->shmem_bytes) + len >
> + rlimit(RLIMIT_TMPFSQUOTA))
> + return -ENOSPC;

This should be EDQUOT "Disk quota exceeded", not ENOSPC "No space left
on device".

Lennart

--
Lennart Poettering - Red Hat, Inc.


\
 
 \ /
  Last update: 2011-11-06 23:13    [W:0.060 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site