Hi,
If memory is tight and a dynamic allocation fails there's no reason to
make a bad situation worse by leaking memory.
mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing
to do is to free that memory again before returning -ENOMEM - which is
what this patch does.
I realize that the function is under '#if 0' so this probably doesn't
matter much, but I assume that the function is still there for a reason
(but I could be wrong, I don't know the powerpc code).
Anyway, I suggest we remove the leak.
Please keep me on CC when replying.
Signed-off-by: Jesper Juhl <redacted>
---
mf.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Michael Ellerman <hidden> Date: 2010-11-01 11:10:45
On Sat, 2010-10-30 at 19:20 +0200, Jesper Juhl wrote:
Hi,
If memory is tight and a dynamic allocation fails there's no reason to
make a bad situation worse by leaking memory.
mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing
to do is to free that memory again before returning -ENOMEM - which is
what this patch does.
I realize that the function is under '#if 0' so this probably doesn't
matter much, but I assume that the function is still there for a reason
(but I could be wrong, I don't know the powerpc code).
Anyway, I suggest we remove the leak.
Stephen is the iSeries maintainer, and I think he #if 0'ed the code. But
I don't think it will ever be un-ifdef'ed, so should probably just be
removed.
cheers
From: Stephen Rothwell <hidden> Date: 2010-11-01 20:10:43
Hi Jesper,
On Mon, 01 Nov 2010 22:10:42 +1100 Michael Ellerman [off-list ref] wrote:
On Sat, 2010-10-30 at 19:20 +0200, Jesper Juhl wrote:
quoted
If memory is tight and a dynamic allocation fails there's no reason to
make a bad situation worse by leaking memory.
mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing
to do is to free that memory again before returning -ENOMEM - which is
what this patch does.
I realize that the function is under '#if 0' so this probably doesn't
matter much, but I assume that the function is still there for a reason
(but I could be wrong, I don't know the powerpc code).
Anyway, I suggest we remove the leak.
Stephen is the iSeries maintainer, and I think he #if 0'ed the code. But
I don't think it will ever be un-ifdef'ed, so should probably just be
removed.
Well, only unofficially iseries maintainer :-)
Yes, just remove the whole function ... it was never used and never will
be.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Hi Jesper,
On Mon, 01 Nov 2010 22:10:42 +1100 Michael Ellerman [off-list ref] wrote:
quoted
On Sat, 2010-10-30 at 19:20 +0200, Jesper Juhl wrote:
quoted
If memory is tight and a dynamic allocation fails there's no reason to
make a bad situation worse by leaking memory.
mf_getSrcHistory potentially leaks pages[0-3]. I believe the right thing
to do is to free that memory again before returning -ENOMEM - which is
what this patch does.
I realize that the function is under '#if 0' so this probably doesn't
matter much, but I assume that the function is still there for a reason
(but I could be wrong, I don't know the powerpc code).
Anyway, I suggest we remove the leak.
Stephen is the iSeries maintainer, and I think he #if 0'ed the code. But
I don't think it will ever be un-ifdef'ed, so should probably just be
removed.
Well, only unofficially iseries maintainer :-)
Yes, just remove the whole function ... it was never used and never will
be.
Done.
Remove unused function 'mf_getSrcHistory' (that will never be used ever
according to Stephen Rothwell).
Signed-off-by: Jesper Juhl <redacted>
---
mf.c | 46 ----------------------------------------------
1 file changed, 46 deletions(-)
From: Michael Ellerman <hidden> Date: 2010-11-02 00:20:55
On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
Hi Stephen,
On Tue, 2 Nov 2010, Stephen Rothwell wrote:
quoted
On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl [off-list ref] wrote:
quoted
Remove unused function 'mf_getSrcHistory' (that will never be used ever
according to Stephen Rothwell).
Signed-off-by: Jesper Juhl <redacted>
Acked-by: Stephen Rothwell <redacted>
Ok, so if you are the (unofficial) iSeries maintainer and you don't merge
the patch somewhere that'll eventually go up-stream, but just ACK it
(thank you for that btw), then where do I send it to get it merged?
Here. ie. linuxppc-dev.
But, while you're removing it you should remove the #if 0'ed callsite as
well, see mf_src_proc_show() in that file. :)
cheers
On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
quoted
Hi Stephen,
On Tue, 2 Nov 2010, Stephen Rothwell wrote:
quoted
On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl [off-list ref] wrote:
quoted
Remove unused function 'mf_getSrcHistory' (that will never be used ever
according to Stephen Rothwell).
Signed-off-by: Jesper Juhl <redacted>
Acked-by: Stephen Rothwell <redacted>
Ok, so if you are the (unofficial) iSeries maintainer and you don't merge
the patch somewhere that'll eventually go up-stream, but just ACK it
(thank you for that btw), then where do I send it to get it merged?
Here. ie. linuxppc-dev.
But, while you're removing it you should remove the #if 0'ed callsite as
well, see mf_src_proc_show() in that file. :)
Done. See patch below.
Remove unused function 'mf_getSrcHistory' (that will never be used
ever according to Stephen Rothwell) and also remove most of (under 'if
0') code from mf_src_proc_show() where the function was called.
Signed-off-by: Jesper Juhl <redacted>
---
mf.c | 62
--------------------------------------------------------------
1 file changed, 62 deletions(-)
On Mon, 2010-11-01 at 22:20 +0100, Jesper Juhl wrote:
quoted
Hi Stephen,
On Tue, 2 Nov 2010, Stephen Rothwell wrote:
quoted
On Mon, 1 Nov 2010 21:06:23 +0100 (CET) Jesper Juhl [off-list ref] wrote:
quoted
Remove unused function 'mf_getSrcHistory' (that will never be used ever
according to Stephen Rothwell).
Signed-off-by: Jesper Juhl <redacted>
Acked-by: Stephen Rothwell <redacted>
Ok, so if you are the (unofficial) iSeries maintainer and you don't merge
the patch somewhere that'll eventually go up-stream, but just ACK it
(thank you for that btw), then where do I send it to get it merged?
Here. ie. linuxppc-dev.
But, while you're removing it you should remove the #if 0'ed callsite as
well, see mf_src_proc_show() in that file. :)
Done. See patch below.
Remove unused function 'mf_getSrcHistory' (that will never be used
ever according to Stephen Rothwell) and also remove most of (under 'if
0') code from mf_src_proc_show() where the function was called.
Signed-off-by: Jesper Juhl <redacted>
---
mf.c | 62
--------------------------------------------------------------
1 file changed, 62 deletions(-)
Ok. Thank you for that bit of information. That was one place that I had
no knowledge about what-so-ever, so I didn't look.
I will now rest happily in the knowledge that the patch is in good hands.
Thanks.
--
Jesper Juhl [off-list ref] http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.