From patchwork Fri Sep 10 16:26:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 64414 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3AEFCB70F4 for ; Sat, 11 Sep 2010 02:27:25 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Ou6RX-0002pV-Ho; Fri, 10 Sep 2010 17:27:15 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Ou6RE-0002gb-Mm for kernel-team@lists.ubuntu.com; Fri, 10 Sep 2010 17:26:56 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1Ou6RE-00030G-LI for ; Fri, 10 Sep 2010 17:26:56 +0100 Received: from 79-71-116-231.dynamic.dsl.as9105.com ([79.71.116.231] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Ou6RE-0001AM-G6 for kernel-team@lists.ubuntu.com; Fri, 10 Sep 2010 17:26:56 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] [Maverick] UBUNTU: SAUCE: fbcon -- fix OOPs triggered by race prevention fixes Date: Fri, 10 Sep 2010 17:26:55 +0100 Message-Id: <1284136015-4742-1-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/614008 The fix below added reference counting to framebuffer opens, it inadvertantly does not handle the totally missing framebuffer case: UBUNTU: SAUCE: fbcon -- fix race between open and removal of framebuffers lshw tickles this searching for framebuffers leading to an OOPs and boot hangs for some machines. Initial-fix-by: Dave Gilbert Signed-off-by: Andy Whitcroft --- drivers/video/fbmem.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 02eb135..0088013 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1407,7 +1407,8 @@ __releases(®istered_lock) spin_lock(®istered_lock); fb_info = registered_fb[idx]; - fb_info->ref_count++; + if (fb_info) + fb_info->ref_count++; spin_unlock(®istered_lock); return fb_info;