lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Sep 2017 10:36:29 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "chengjian (D)" <cj.chengjian@...wei.com>
cc:     huawei.libin@...wei.com, mingo@...hat.com, peterz@...radead.org,
        dvhart@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: a competition when some threads acquire futex

On Wed, 6 Sep 2017, chengjian (D) wrote:

> > > diff --git a/kernel/futex.c b/kernel/futex.c
> > > index 3d38eaf..0b2d17a 100644
> > > --- a/kernel/futex.c
> > > +++ b/kernel/futex.c
> > > @@ -1545,6 +1545,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32
> > > uval,
> > > struct futex_pi_state *pi_
> > >    	spin_unlock(&hb->lock);
> > >   	wake_up_q(&wake_q);
> > > +        _cond_resched( );
> > 

> I wrote _cond_resched( ) in futex_wake( ) which will be called to wake up
> waiters
> when the process release the futex.
> 
> 
> But the patch producted by git format-patch displayed in wake_futex_pi( ).

Ok. Still that patch has issues.

1) It's white space damaged. Please use TAB not spaces for
   indentation. checkpatch.pl would have told you.

2) Why are you using _cond_resched() instead of plain cond_resched().

   cond_resched() is what you want to use.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ