From: Alan Cox Subject: Re: [PATCH] add mutex to fbdev for fb_mmap locking Date: Tue, 2 Jun 2009 19:52:40 +0100 Message-ID: <20090602195240.0af2f21c@lxorguk.ukuu.org.uk> References: <200905282134.n4SLYNwv027999@imap1.linux-foundation.org> <20090530121128.5f04179d.krzysztof.h1@poczta.fm> <20090531162453.dff458cb.krzysztof.h1@poczta.fm> <20090601222413.c2b57c9f.krzysztof.h1@poczta.fm> <20090602200626.1c3486e1.krzysztof.h1@poczta.fm> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by 235xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MBZ5n-0003sz-69 for linux-fbdev-devel@lists.sourceforge.net; Tue, 02 Jun 2009 18:52:11 +0000 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250] helo=www.etchedpixels.co.uk) by 1b2kzd1.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1MBZ5g-00087f-1a for linux-fbdev-devel@lists.sourceforge.net; Tue, 02 Jun 2009 18:52:06 +0000 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Linus Torvalds Cc: krzysztof.h1@wp.pl, Linux-fbdev-devel , Peter Zijlstra , geert@linux-m68k.org, Andrew Morton , Ingo Molnar , righi.andrea@gmail.com > ie the fact that the TTY layer does user-mode copies while holding some > tty lock. So now the tty layer introduces that chain from some random lock > to the mmap_sem. Its basically holding the termios lock to copy from the struct termios to user space which means its trivial to do copy to a stack buffer first. I can fix that pretty easily if you want. Alan ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get