Currently the spu coredump code doesn't respect the ulimit, it should.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/cell/spufs/coredump.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index c3b5cd5..b8ab2c6 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -53,8 +53,12 @@ static ssize_t do_coredump_read(int num, struct spu_context *ctx, void *buffer,
*/
static int spufs_dump_write(struct file *file, const void *addr, int nr, loff_t *foffset)
{
+ unsigned long limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
ssize_t written;
+ if (*foffset + nr > limit)
+ return -EIO;
+
written = file->f_op->write(file, addr, nr, &file->f_pos);
*foffset += written;
--
1.5.1.3.g7a33b
-
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Nigel Cunningham | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Vitaly V. Bursov | Re: Slow file transfer speeds with CFQ IO scheduler in some cases |
| Jan Engelhardt | Re: sk98lin for 2.6.23-rc1 |
git: | |
| Guilhem Bonnefille | Re: GIT vs Other: Need argument |
| Steven Grimm | Re: [RFC] Submodules in GIT |
| Kevin Ballard | Re: git on MacOSX and files with decomposed utf-8 file names |
| Nigel Magnay | crlf with git-svn driving me nuts... |
| carlopmart | About Xen: maybe a reiterative question but .. |
| Douglas A. Tutty | OBSD's perspective on SELinux |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Michel Le Cocq | intel pro/1000 PT & PF |
| Johann Baudy | Packet mmap: TX RING and zero copy |
| Corey Minyard | Re: [PATCH 3/3] Convert the UDP hash lock to RCU |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
