[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-3.1] linux-user/sparc/signal.c: Remove dead
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH for-3.1] linux-user/sparc/signal.c: Remove dead code |
Date: |
Thu, 15 Nov 2018 12:59:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 15/11/2018 12:46, Peter Maydell wrote:
> Coverity complains (CID 1390847) about some dead code in
> do_sigreturn(). This is an if (err) clause that can never be
> true, copied from the kernel (where __get_user returns an error).
> The one code path that could report an error is in the
> currently commented-out pseudocode for handling FPU register
> restoring, so move the if into that comment (and fix the
> broken indent in the comment in the process).
>
> (The new position for the error check is also the semantically
> correct one -- we should not restore the signal mask from
> the signal frame if we get an error here, so the check must
> be done before set_sigmask(), not after.)
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> linux-user/sparc/signal.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
Reviewed-by: Laurent Vivier <address@hidden>
Do you apply it directly to the master or do you want a linux-user pull
request?
Thanks,
Laurent