Commit 17973f5af741f1758ed57c5115ca394c22bee159
Committed by
Linus Torvalds
1 parent
1e3e8d91fe
Exists in
master
and in
4 other branches
Only send SIGXFSZ when exceeding rlimits.
Some users have been having problems with utilities like cp or dd dumping core when they try to copy a file that's too large for the destination filesystem (typically, > 4gb). Apparently, some defunct standards required SIGXFSZ to be sent in such circumstances, but SUS only requires/allows it for when a written file exceeds the process's resource limits. I'd like to limit SIGXFSZs to the bare minimum required by SUS. Patch sent per http://lkml.org/lkml/2007/4/10/302 Signed-off-by: Micah Cowan <micahcowan@ubuntu.com> Acked-by: Alan Cox <alan@redhat.com> Cc: <reiserfs-dev@namesys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 3 changed files with 0 additions and 5 deletions Side-by-side Diff
fs/ncpfs/file.c
... | ... | @@ -203,7 +203,6 @@ |
203 | 203 | |
204 | 204 | if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) { |
205 | 205 | if (pos >= MAX_NON_LFS) { |
206 | - send_sig(SIGXFSZ, current, 0); | |
207 | 206 | return -EFBIG; |
208 | 207 | } |
209 | 208 | if (count > MAX_NON_LFS - (u32)pos) { |
... | ... | @@ -212,7 +211,6 @@ |
212 | 211 | } |
213 | 212 | if (pos >= inode->i_sb->s_maxbytes) { |
214 | 213 | if (count || pos > inode->i_sb->s_maxbytes) { |
215 | - send_sig(SIGXFSZ, current, 0); | |
216 | 214 | return -EFBIG; |
217 | 215 | } |
218 | 216 | } |
fs/reiserfs/file.c
... | ... | @@ -1305,7 +1305,6 @@ |
1305 | 1305 | if (get_inode_item_key_version (inode) == KEY_FORMAT_3_5 && |
1306 | 1306 | *ppos + count > MAX_NON_LFS) { |
1307 | 1307 | if (*ppos >= MAX_NON_LFS) { |
1308 | - send_sig(SIGXFSZ, current, 0); | |
1309 | 1308 | return -EFBIG; |
1310 | 1309 | } |
1311 | 1310 | if (count > MAX_NON_LFS - (unsigned long)*ppos) |
mm/filemap.c
... | ... | @@ -1967,7 +1967,6 @@ |
1967 | 1967 | if (unlikely(*pos + *count > MAX_NON_LFS && |
1968 | 1968 | !(file->f_flags & O_LARGEFILE))) { |
1969 | 1969 | if (*pos >= MAX_NON_LFS) { |
1970 | - send_sig(SIGXFSZ, current, 0); | |
1971 | 1970 | return -EFBIG; |
1972 | 1971 | } |
1973 | 1972 | if (*count > MAX_NON_LFS - (unsigned long)*pos) { |
... | ... | @@ -1985,7 +1984,6 @@ |
1985 | 1984 | if (likely(!isblk)) { |
1986 | 1985 | if (unlikely(*pos >= inode->i_sb->s_maxbytes)) { |
1987 | 1986 | if (*count || *pos > inode->i_sb->s_maxbytes) { |
1988 | - send_sig(SIGXFSZ, current, 0); | |
1989 | 1987 | return -EFBIG; |
1990 | 1988 | } |
1991 | 1989 | /* zero-length writes at ->s_maxbytes are OK */ |