From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by ozlabs.org (Postfix) with ESMTP id 7FBB2B6FF5 for ; Fri, 18 Nov 2011 06:09:34 +1100 (EST) Date: Fri, 18 Nov 2011 00:39:20 +0530 From: Amit Shah To: Rusty Russell Subject: Re: [PATCH v3 1/3] virtio_console: Fix locking of vtermno. Message-ID: <20111117190920.GD2873@amit-x200.redhat.com> References: <20111108214452.28884.14840.stgit@miche.sea.corp.google.com> <20111108214458.28884.86759.stgit@miche.sea.corp.google.com> <877h37qo5z.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <877h37qo5z.fsf@rustcorp.com.au> Cc: Stephen Rothwell , xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk , Greg Kroah-Hartman , Miche Baker-Harvey , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Anton Blanchard , Mike Waychison , ppc-dev , Eric Northrup List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On (Fri) 11 Nov 2011 [14:57:20], Rusty Russell wrote: > On Tue, 08 Nov 2011 13:44:58 -0800, Miche Baker-Harvey wrote: > > Some modifications of vtermno were not done under the spinlock. > > > > Moved assignment from vtermno and increment of vtermno together, > > putting both under the spinlock. Revert vtermno on failure. > > > > Signed-off-by: Miche Baker-Harvey > > Does it matter? It's normal not to lock in a function called > "init_XXX", since it's not exposed yet. > > Or is it? Slight misnomer, I suppose. We do this init_console_port() as part of add_port() if the port is a console port. Should it be named 'mark_console_port()'? Dunno, doesn't sound like the right name. init fits closest. Amit