diff options
| author | Michael Ellerman <mpe@ellerman.id.au> | 2017-10-09 21:52:44 +1100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 10:05:00 +0100 |
| commit | afa8f0a7af7041665443603ee3c20609733ce940 (patch) | |
| tree | cc13006d755114c7af99e5eaca0f3e55f80a399f /fs/proc/proc_tty.c | |
| parent | 28a5b0e438f18bbacc977a38cf47b3d265ac3d27 (diff) | |
powerpc/perf/hv-24x7: Fix incorrect comparison in memord
[ Upstream commit 05c14c03138532a3cb2aa29c2960445c8753343b ]
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@hotmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc/proc_tty.c')
0 files changed, 0 insertions, 0 deletions
