+ only-send-sigxfsz-when-exceeding-rlimits.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Only send SIGXFSZ when exceeding rlimits.
has been added to the -mm tree.  Its filename is
     only-send-sigxfsz-when-exceeding-rlimits.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Only send SIGXFSZ when exceeding rlimits.
From: Micah Cowan <micah@xxxxxxxxxx>

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@xxxxxxxxxx>
Acked-by: Alan Cox <alan@xxxxxxxxxx>
Cc: <reiserfs-dev@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ncpfs/file.c    |    2 --
 fs/reiserfs/file.c |    1 -
 mm/filemap.c       |    2 --
 3 files changed, 5 deletions(-)

diff -puN fs/ncpfs/file.c~only-send-sigxfsz-when-exceeding-rlimits fs/ncpfs/file.c
--- a/fs/ncpfs/file.c~only-send-sigxfsz-when-exceeding-rlimits
+++ a/fs/ncpfs/file.c
@@ -203,7 +203,6 @@ ncp_file_write(struct file *file, const 
 
 	if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) {
 		if (pos >= MAX_NON_LFS) {
-			send_sig(SIGXFSZ, current, 0);
 			return -EFBIG;
 		}
 		if (count > MAX_NON_LFS - (u32)pos) {
@@ -212,7 +211,6 @@ ncp_file_write(struct file *file, const 
 	}
 	if (pos >= inode->i_sb->s_maxbytes) {
 		if (count || pos > inode->i_sb->s_maxbytes) {
-			send_sig(SIGXFSZ, current, 0);
 			return -EFBIG;
 		}
 	}
diff -puN fs/reiserfs/file.c~only-send-sigxfsz-when-exceeding-rlimits fs/reiserfs/file.c
--- a/fs/reiserfs/file.c~only-send-sigxfsz-when-exceeding-rlimits
+++ a/fs/reiserfs/file.c
@@ -1305,7 +1305,6 @@ static ssize_t reiserfs_file_write(struc
 	if (get_inode_item_key_version (inode) == KEY_FORMAT_3_5 &&
 	    *ppos + count > MAX_NON_LFS) {
 		if (*ppos >= MAX_NON_LFS) {
-			send_sig(SIGXFSZ, current, 0);
 			return -EFBIG;
 		}
 		if (count > MAX_NON_LFS - (unsigned long)*ppos)
diff -puN mm/filemap.c~only-send-sigxfsz-when-exceeding-rlimits mm/filemap.c
--- a/mm/filemap.c~only-send-sigxfsz-when-exceeding-rlimits
+++ a/mm/filemap.c
@@ -1800,7 +1800,6 @@ inline int generic_write_checks(struct f
 	if (unlikely(*pos + *count > MAX_NON_LFS &&
 				!(file->f_flags & O_LARGEFILE))) {
 		if (*pos >= MAX_NON_LFS) {
-			send_sig(SIGXFSZ, current, 0);
 			return -EFBIG;
 		}
 		if (*count > MAX_NON_LFS - (unsigned long)*pos) {
@@ -1818,7 +1817,6 @@ inline int generic_write_checks(struct f
 	if (likely(!isblk)) {
 		if (unlikely(*pos >= inode->i_sb->s_maxbytes)) {
 			if (*count || *pos > inode->i_sb->s_maxbytes) {
-				send_sig(SIGXFSZ, current, 0);
 				return -EFBIG;
 			}
 			/* zero-length writes at ->s_maxbytes are OK */
_

Patches currently in -mm which might be from micah@xxxxxxxxxx are

only-send-sigxfsz-when-exceeding-rlimits.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux