public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: marcelo@kvack.org
Cc: jolivares@gigablast.com, linux-kernel@vger.kernel.org
Subject: [PATCH-2.4] allow core files bigger than 2GB
Date: Sat, 17 Jun 2006 23:45:07 +0200	[thread overview]
Message-ID: <20060617214507.GA1213@1wt.eu> (raw)

Marcelo,

I think I have not sent you this one. It looks valid to me.
I can queue it in -upstream if you prefer to pull everything
at once.

Cheers,
Willy
--

>From nobody Mon Sep 17 00:00:00 2001
From: Javier Olivares <jolivares@gigablast.com>
Date: Wed, 31 May 2006 00:32:59 +0200
Subject: [PATCH] bug fix for 2GB core limit in 2.4

We were having problems when running programs that used over 2GB of ram
not being able to generate core files over 2GB, these are some very
simple changes that fixed the problem.

The changes have been running on many Debian systems for a couple of
months.  Valid core files just over 3GB have been created without any
problem.

---

 fs/binfmt_elf.c |    2 +-
 fs/exec.c       |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

04d0e7780b49eeef578ceec8901c71ac356df504
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index b0ad905..6c2f357 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1026,7 +1026,7 @@ static int dump_write(struct file *file,
 	return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
 }
 
-static int dump_seek(struct file *file, off_t off)
+static int dump_seek(struct file *file, loff_t off)
 {
 	if (file->f_op->llseek) {
 		if (file->f_op->llseek(file, off, 0) != off)
diff --git a/fs/exec.c b/fs/exec.c
index f196e7e..aec92be 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1148,7 +1148,8 @@ int do_coredump(long signr, struct pt_re
 		goto fail;
 
  	format_corename(corename, core_pattern, signr);
-	file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
+	file = filp_open(corename,
+	                 O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE, 0600);
 	if (IS_ERR(file))
 		goto fail;
 	inode = file->f_dentry->d_inode;
-- 
1.3.3



             reply	other threads:[~2006-06-17 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-17 21:45 Willy Tarreau [this message]
2006-06-18  6:09 ` [PATCH-2.4] allow core files bigger than 2GB Arjan van de Ven
2006-06-18  6:48   ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060617214507.GA1213@1wt.eu \
    --to=w@1wt.eu \
    --cc=jolivares@gigablast.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox