linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Darren Hart <dvhart@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: David Binderman <dcb314@hotmail.com>,
	Linux API Mailing List <linux-api@vger.kernel.org>
Subject: Re: [PATCH] selftests/futex: Fix futex_cmp_requeue_pi() error handling
Date: Mon, 20 Jul 2015 18:34:01 -0600	[thread overview]
Message-ID: <55AD9379.7030206@osg.samsung.com> (raw)
In-Reply-To: <e45eef3361e23760f2fa8750d0468d7ec021db6d.1437432376.git.dvhart@infradead.org>

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 <dcb314@hotmail.com>
> Cc: Shuah Khan <shuahkh@osg.samsung.com>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> ---
>  .../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

      reply	other threads:[~2015-07-21  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 22:48 [PATCH] selftests/futex: Fix futex_cmp_requeue_pi() error handling Darren Hart
2015-07-21  0:34 ` Shuah Khan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AD9379.7030206@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=dcb314@hotmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).