From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbbHAWgQ (ORCPT ); Sat, 1 Aug 2015 18:36:16 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:54320 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbbHAWgP (ORCPT ); Sat, 1 Aug 2015 18:36:15 -0400 Date: Sun, 2 Aug 2015 00:36:09 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: Ingo Molnar , Rik van Riel , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] stop_machine: kill stop_cpus_lock and lg_double_lock/unlock() Message-ID: <20150801223609.GD25159@twins.programming.kicks-ass.net> References: <20150721192219.GA31150@redhat.com> <20150721192247.GA31191@redhat.com> <20150730215527.GQ25159@twins.programming.kicks-ass.net> <20150801105718.GA13901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150801105718.GA13901@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 01, 2015 at 12:57:18PM +0200, Oleg Nesterov wrote: > > > + if (stop_work_pending(stopper1) != stop_work_pending(stopper2)) > > > + goto unlock; > > > > You could DoS/false positive this by running stop_one_cpu() in a loop, > > and thereby 'always' having work pending on one but not the other. > > IIRC no. I am pretty sure stop_one_cpu() doesn't use stopper->stop_work, > only stop_machine() does. Urgh, I missed you were testing the cpu_stopper::stop_work not the cpu_stopper::works list.