Commit:     c1a72173ab156306666cb531f891f32e4e21d592
Parent:     59000b53c7ea07531018b6cf1f5fcd21e881867a
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 19 14:38:12 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Sep 19 15:12:18 2007 +1000

    [POWERPC] spufs: Don't return -ENOSYS as extra notes size if spufs is not 
    Because the SPU coredump code might be built as part of a module (spufs),
    we have a stub which is called by the coredump code, this routine then calls
    into spufs if it's loaded.
    Unfortunately the stub returns -ENOSYS if spufs is not loaded, which is
    interpreted by the coredump code as an extra note size of -38 bytes. This
    leads to a corrupt core dump.
    If spufs is not loaded there will be no SPU ELF notes to write, and so the
    extra notes size will be == 0.
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Acked-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/platforms/cell/spu_coredump.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spu_coredump.c 
index 4fd37ff..656a8c5 100644
--- a/arch/powerpc/platforms/cell/spu_coredump.c
+++ b/arch/powerpc/platforms/cell/spu_coredump.c
@@ -31,15 +31,19 @@ static DEFINE_MUTEX(spu_coredump_mutex);
 int arch_notes_size(void)
-       long ret;
+       int ret;
-       ret = -ENOSYS;
        if (spu_coredump_calls && try_module_get(spu_coredump_calls->owner)) {
                ret = spu_coredump_calls->arch_notes_size();
+       } else {
+               ret = 0;
        return ret;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to