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:	Fri, 20 Feb 2015 11:44:37 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Fabian Frederick <fabf@...net.be>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Jan \"Yenya\" Kasprzak" <kas@...muni.cz>, netdev@...r.kernel.org
Subject: Re: [PATCH 6/7 linux-next] wan: cosa: replace current->state by
 set_current_state()

On Fri, 2015-02-20 at 11:31 -0800, Eric Dumazet wrote:
> On Fri, 2015-02-20 at 19:58 +0100, Peter Zijlstra wrote:
> > On Fri, Feb 20, 2015 at 09:34:28PM +0300, Sergei Shtylyov wrote:
> > > Hello.
> > > 
> > > On 02/20/2015 09:12 PM, Fabian Frederick wrote:
> > > 
> > > >Use helper functions to access current->state.
> > > >Direct assignments are prone to races and therefore buggy.
> > > 
> > > >current->state = TASK_RUNNING is replaced by __set_current_state()
> > > 
> > >    You sometimes use __set_current_state() and sometimes set_current_state().
> > 
> > It depends on which state; setting yourself TASK_RUNNING is free of
> > wakeup races -- you're already running after all, so it can safely use
> > __set_current_state().
> 
> Maybe this might be self documented in set_current_state(),
> as we have about 120 calls to __set_current_state(TASK_RUNNING)

And about 138 calls to set_current_state(TASK_RUNNING)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ