Skip to content

Commit

Permalink
selftests/futex: Fix futex_cmp_requeue_pi() error handling
Browse files Browse the repository at this point in the history
An earlier (pre-kernel-integration) refactoring of this code mistakenly
replaced the error condition, <, with a >. Use < to detect an error as
opposed to a successful requeue or signal race.

Reported-by: David Binderman <dcb314@hotmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
  • Loading branch information
Darren Hart authored and Shuah Khan committed Jul 21, 2015
1 parent d770e55 commit fee50f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int main(int argc, char *argv[])
if (res > 0) {
atomic_set(&requeued, 1);
break;
} else if (res > 0) {
} else if (res < 0) {
error("FUTEX_CMP_REQUEUE_PI failed\n", errno);
ret = RET_ERROR;
break;
Expand Down

0 comments on commit fee50f3

Please sign in to comment.