From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753854Ab3KYMNL (ORCPT ); Mon, 25 Nov 2013 07:13:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32196 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128Ab3KYMNH (ORCPT ); Mon, 25 Nov 2013 07:13:07 -0500 Date: Mon, 25 Nov 2013 13:14:17 +0100 From: Oleg Nesterov To: zhang.yi20@zte.com.cn Cc: Tejun Heo , htejun@gmail.com, lkml , Tetsuo Handa Subject: Re: =?utf-8?B?562U5aSNOiBSZTogW1BBVENIIDEv?= =?utf-8?Q?1=5D_workqueue?= =?utf-8?Q?=3A?= swap set_cpus_allowed_ptr() and PF_NO_SETAFFINITY Message-ID: <20131125121416.GB23829@redhat.com> References: <20131114052326.GA29031@mtj.dyndns.org> <20131114114039.GA29277@redhat.com> <20131114115551.GA30824@redhat.com> <20131114115618.GB30824@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25, zhang.yi20@zte.com.cn wrote: > > htejun@gmail.com wrote on 2013/11/23 07:13:43: > > > > > Re: [PATCH 1/1] workqueue: swap set_cpus_allowed_ptr() and PF_NO_SETAFFINITY > > > > On Thu, Nov 14, 2013 at 6:56 AM, Oleg Nesterov wrote: > > > Move the setting of PF_NO_SETAFFINITY up before set_cpus_allowed() > > > in create_worker(). Otherwise userland can change ->cpus_allowed > > > in between. > > > > > > Signed-off-by: Oleg Nesterov > > > > Applied to wq/for-3.13-fixes. > > > > Thanks! > > > > -- > > tejun > > How about the first patch? Let me quote myself: Looks like Zhang is right... But I'd suggest to change flush_old_exec() instead (see "current->flags &= ..."). Do you agree? If yes, could you make v2? flush_old_exec() already clears the unwanted PF_ bits, I do not think we should add another place. Oleg.