Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761099AbZAPMGn (ORCPT ); Fri, 16 Jan 2009 07:06:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756584AbZAPMGe (ORCPT ); Fri, 16 Jan 2009 07:06:34 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38882 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756330AbZAPMGe (ORCPT ); Fri, 16 Jan 2009 07:06:34 -0500 Date: Fri, 16 Jan 2009 13:08:43 +0100 From: Pavel Machek To: kernel list , Andrew Morton , Paul.Clements@steeleye.com Subject: Re: nbd: add locking to nbd_ioctl Message-ID: <20090116120843.GA29971@elf.ucw.cz> References: <20090116115512.GA10771@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090116115512.GA10771@elf.ucw.cz> X-Warning: Reading this can be dangerous to your mental health. 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 Content-Length: 909 Lines: 24 On Fri 2009-01-16 12:55:12, Pavel Machek wrote: > > The code was written with "oh big kernel lock, please protect me from > all the evil" mentality: it does not locks its own data structures, it > just hopes that big kernel lock somehow helps. > > It does not. (My fault). > > So this uses tx_lock to protect data structures from concurrent use > between ioctl and worker threads. > > Signed-off-by: Pavel Machek Ok, it should return -EINVAL at the end of __nbd_ioctl. But Paul, does it look ok otherwise? -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/