Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757528AbbGUAeH (ORCPT ); Mon, 20 Jul 2015 20:34:07 -0400 Received: from lists.s-osg.org ([54.187.51.154]:53730 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757344AbbGUAeE (ORCPT ); Mon, 20 Jul 2015 20:34:04 -0400 Message-ID: <55AD9379.7030206@osg.samsung.com> Date: Mon, 20 Jul 2015 18:34:01 -0600 From: Shuah Khan Organization: Samsung Open Source Group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Darren Hart , Linux Kernel Mailing List CC: David Binderman , Linux API Mailing List Subject: Re: [PATCH] selftests/futex: Fix futex_cmp_requeue_pi() error handling References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1646 Lines: 45 On 07/20/2015 04:48 PM, Darren Hart wrote: > 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 > Cc: Shuah Khan > Signed-off-by: Darren Hart > --- > .../selftests/futex/functional/futex_requeue_pi_signal_restart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c b/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c > index 7f0c756..3d7dc6a 100644 > --- a/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c > +++ b/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c > @@ -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; > Daren, That is quick. Applied to linux-kselftest fixes for 4.2 thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/