Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752991AbYKNOv5 (ORCPT ); Fri, 14 Nov 2008 09:51:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751222AbYKNOvt (ORCPT ); Fri, 14 Nov 2008 09:51:49 -0500 Received: from vervifontaine.sonytel.be ([80.88.33.193]:64646 "EHLO vervifontaine.sonycom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750727AbYKNOvs (ORCPT ); Fri, 14 Nov 2008 09:51:48 -0500 Date: Fri, 14 Nov 2008 15:51:45 +0100 (CET) From: Geert Uytterhoeven To: "Rafael J. Wysocki" cc: Linux Kernel Mailing List , Kernel Testers List , Keith Packard Subject: Re: [Bug #11988] Eliminate recursive mutex in compat fb ioctl path In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2859 Lines: 71 On Sun, 9 Nov 2008, Rafael J. Wysocki wrote: > This message has been generated automatically as a part of a report > of recent regressions. > > The following bug entry is on the current list of known regressions > from 2.6.27. Please verify if it still should be listed and let me know > (either way). > > > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11988 > Subject : Eliminate recursive mutex in compat fb ioctl path > Submitter : Keith Packard > Date : 2008-11-03 7:06 (7 days old) > References : http://marc.info/?l=linux-kernel&m=122569604828448&w=4 > Handled-By : Keith Packard > Geert Uytterhoeven > Patch : http://marc.info/?l=linux-kernel&m=122569604828448&w=4 > http://lkml.org/lkml/2008/10/31/162 Fixed in mainline. commit a684e7d33096892093456dd56a582cfc3bfad648 Author: Geert Uytterhoeven Date: Thu Nov 6 12:53:37 2008 -0800 fbdev: fix fb_compat_ioctl() deadlocks commit 3e680aae4e53ab54cdbb0c29257dae0cbb158e1c ("fb: convert lock/unlock_kernel() into local fb mutex") introduced several deadlocks in the fb_compat_ioctl() path, as mutex_lock() doesn't allow recursion, unlike lock_kernel(). This broke frame buffer applications on 64-bit systems with a 32-bit userland. commit 120a37470c2831fea49fdebaceb5a7039f700ce6 ("framebuffer compat_ioctl deadlock") fixed one of the deadlocks. This patch fixes the remaining deadlocks: - Revert commit 120a37470c2831fea49fdebaceb5a7039f700ce6, - Extract the core logic of fb_ioctl() into a new function do_fb_ioctl(), - Change all callsites of fb_ioctl() where info->lock is already held to call do_fb_ioctl() instead, - Add sparse annotations to all routines that take info->lock. Signed-off-by: Geert Uytterhoeven Cc: Mikulas Patocka Cc: Krzysztof Helt Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds With kind regards, Geert Uytterhoeven Software Architect Sony Techsoft Centre Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010 -- 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/