powerpc/perf/hv-24x7: Fix incorrect comparison in memord
Michael Ellerman
patch-notifications at ellerman.id.au
Tue Oct 24 19:08:08 AEDT 2017
On Mon, 2017-10-09 at 10:52:44 UTC, Michael Ellerman wrote:
> In the hv-24x7 code there is a function memord() which tries to
> implement a sort function return -1, 0, 1. However one of the
> conditions is incorrect, such that it can never be true, because we
> will have already returned.
>
> I don't believe there is a bug in practice though, because the
> comparisons are an optimisation prior to calling memcmp().
>
> Fix it by swapping the second comparision, so it can be true.
>
> Reported-by: David Binderman <dcb314 at hotmail.com>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/05c14c03138532a3cb2aa29c296044
cheers
More information about the Linuxppc-dev
mailing list