Skip to contentSkip to conversation

spufs: add support for read/write oncntl

PATCH New Noguchi, Masato 2 participants 2 messages Oct 10, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Oops,
I'm so sorry. I mistake to send wrong patch.
Correct version is below:

---

Index:
linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
---
linux-2.6.18-arnd-20061004.orig/arch/powerpc/platforms/cell/spufs/file.c +++ linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c @@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode

static struct file_operations spufs_cntl_fops =3D {
.open =3D spufs_cntl_open,
+ .release =3D simple_attr_close,
.read =3D simple_attr_read,
.write =3D simple_attr_write,
.mmap =3D spufs_cntl_mmap,

Quoted 7 lines

-----Original Message-----
From: Noguchi, Masato
Sent: Tuesday, October 10, 2006 3:00 PM
To: 'Arnd Bergmann'
Cc: Paul Mackerras; Arnd Bergmann; [email protected]; [email protected]; [email protected]
Subject: RE: [Cbe-oss-dev] [PATCH 09/14] spufs: add support for

read/write

Quoted 11 lines

oncntl
=20
After applying these patches, it seems the kernel leaks memory. No doubt you forget to call simple_attr_close on "[PATCH 09/14]
spufs: add support for read/write oncntl".
=20

=20
---
=20
Index:

linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c

Quoted 1 line

=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Quoted 2 lines

---

linux-2.6.18-arnd-20061004.orig/arch/powerpc/platforms/cell/spufs/file.c

Quoted 1 line

+++

linux-2.6.18-arnd-20061004/arch/powerpc/platforms/cell/spufs/file.c

Quoted 9 lines
(quoted diff) +0 -0
@@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode

=20
static struct file_operations spufs_cntl_fops =3D {

(quoted diff) +1 -0
 	.open =3D spufs_cntl_open,
+	.close =3D simple_attr_close,
 	.read =3D simple_attr_read,
 	.write =3D simple_attr_write,
 	.mmap =3D spufs_cntl_mmap,

=20

#1 lore raw

PATCH 1/1 spufs: fix support for read/write on cntl

From: "Noguchi, Masato" <[email protected]>

This fixes a memory leak introduced by "spufs: add support for read/write oncntl", which was missing a call to simple_attr_close.

---

Quoted 2 lines · Masato

Oops,
I'm so sorry. I mistake to send wrong patch.

Ok, no worries. Paul, please use this patch instead.

arch/powerpc/platforms/cell/spufs/file.c +1 -0
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
@@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode 
 
 static struct file_operations spufs_cntl_fops = {
 	.open = spufs_cntl_open,
+	.release = simple_attr_close,
 	.read = simple_attr_read,
 	.write = simple_attr_write,
 	.mmap = spufs_cntl_mmap,