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]
Message-ID: <20071024134404.GB82@tv-sign.ru>
Date:	Wed, 24 Oct 2007 17:44:04 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	ego@...ibm.com, Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Srivatsa Vaddagiri <vatsa@...ibm.com>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [RFC PATCH 4/5] Remove CPU_DEAD/CPU_UP_CANCELLED handling from workqueue.c

On 10/24, Rusty Russell wrote:
>
> On Wednesday 24 October 2007 15:37:16 Gautham R Shenoy wrote:
> > @@ -712,7 +712,7 @@ static void start_workqueue_thread(struc
> >
> >  	if (p != NULL) {
> >  		if (cpu >= 0)
> > -			kthread_bind(p, cpu);
> > +			set_cpus_allowed(p, cpumask_of_cpu(cpu));
> >  		wake_up_process(p);
> >  	}
> 
> Hi Gautham!
> 
> 	This works, although the change is unnecessary.

kthread_bind() changes ->cpu/->cpus_allowed without any locks.

Currently this is possible because nobody can wakeup the new thread
after wait_task_inactive() succeeds. With this patch this is not true
any longer, cwq->thread can sleep, for example, on cwq->more_work.

Oleg.

-
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