powerpc/spufs: Fix coredump of SPU contexts

Michael Ellerman patch-notifications at ellerman.id.au
Thu Jun 1 23:31:10 AEST 2017


On Mon, 2017-05-29 at 10:26:07 UTC, Michael Ellerman wrote:
> If a process dumps core while it has SPU contexts active then we have
> code to also dump information about the SPU contexts.
> 
> Unfortunately it's been broken for 3 1/2 years, and we didn't notice. In
> commit 7b1f4020d0d1 ("spufs: get rid of dump_emit() wrappers") the nread
> variable was removed and rc used instead. That means when the loop exits
> successfully, rc has the number of bytes read, but it's then used as the
> return value for the function, which should return 0 on success.
> 
> So fix it by setting rc = 0 before returning in the success case.
> 
> Fixes: 7b1f4020d0d1 ("spufs: get rid of dump_emit() wrappers")
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> Acked-by: Jeremy Kerr <jk at ozlabs.org>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/99acc9bede06bbb2662aafff51f5b9

cheers


More information about the Linuxppc-dev mailing list