Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932361Ab1BYB4X (ORCPT ); Thu, 24 Feb 2011 20:56:23 -0500 Received: from mail-gw0-f51.google.com ([74.125.83.51]:37405 "EHLO mail-gw0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314Ab1BYB4V (ORCPT ); Thu, 24 Feb 2011 20:56:21 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=W3zCbucztB0n+4LaoHLRedBlCRbKWesO4vIwlcfUixLJHVgmyytKB4rM7fc3yuzc4Y cMjcPy3xnVjVg73nw2/f7Sc2FHgWDSjbqt7onsVCrey9ZWhEzUOu0Y8SiMx37jOwH+ev z7/7I2XgBxrwynK25j3YPz2p6Zu8hpu37ND44= MIME-Version: 1.0 In-Reply-To: References: <20110222140349.GA20708@kryptos.osrc.amd.com> <1298596499.10585.27.camel@clockmaker-el6> Date: Fri, 25 Feb 2011 03:56:20 +0200 Message-ID: Subject: Re: Linux 2.6.38-rc6 From: Anca Emanuel To: Dave Airlie Cc: Linus Torvalds , linux-fbdev@vger.kernel.org, Ben Skeggs , dri-devel@lists.freedesktop.org, Borislav Petkov , Herton Ronaldo Krzesinski , Linux Kernel Mailing List Content-Type: multipart/mixed; boundary=0016e68e7f68f09057049d11a2d7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 16039 Lines: 248 --0016e68e7f68f09057049d11a2d7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Feb 25, 2011 at 3:47 AM, Anca Emanuel wrot= e: > On Fri, Feb 25, 2011 at 3:14 AM, Dave Airlie wrote: >> On Thu, 2011-02-24 at 16:54 -0800, Linus Torvalds wrote: >>> On Thu, Feb 24, 2011 at 4:48 PM, Anca Emanuel = wrote: >>> > >>> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c >>> > index e2bf953..e8f8925 100644 >>> > --- a/drivers/video/fbmem.c >>> > +++ b/drivers/video/fbmem.c >>> > @@ -1511,6 +1511,7 @@ void remove_conflicting_framebuffers(struct >>> > apertures_struct *a, >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "%s vs %s= - removing generic driver\n", >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 name, reg= istered_fb[i]->fix.id); >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unregister_framebuffer= (registered_fb[i]); >>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 registered_fb[i] =3D NU= LL; >>> > >>> > Tested the patch, and now I get this: >>> > dmesg: http://pastebin.com/ieMNrA7C >>> > >>> > [ =A0 12.252328] BUG: unable to handle kernel NULL pointer dereferenc= e >>> > at 00000000000003b8 >>> > [ =A0 12.252342] IP: [] fb_mmap+0x58/0x1d0 >>> >>> Ok, goodie. >>> >>> Or not so goodie, but it does make it clear that yeah, the fb code >>> seems to be using stale pointers from that registered_fb[] array, and >>> the whole unregistration process is just racing with people using it. >>> >>> Herton had that much bigger patch, can you test it? >> >> I think Andy's patch worked, not sure why it fell between the cracks, >> either didn't appear on lkml or in my inbox at all. >> >> if we can get Herton to repost it properly + a tested by I'm happy for >> it to go in. >> >> Dave. >> >> > > Tested Andy's patch and it works ! > http://kernel.ubuntu.com/git?p=3Dubuntu/ubuntu-natty.git;a=3Dcommit;h=3Dc= 5a742b5f78e161d6a13853a7e3e6e1dfa429e69 > > Tested-by: Anca Emanuel > link to patch: http://is.gd/otIfGc --0016e68e7f68f09057049d11a2d7 Content-Type: application/octet-stream; name=patch Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_gkkgajhf0 RnJvbSBjN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ldHRlOwkJLyogRmFrZSBw YWxldHRlIG9mIDE2IGNvbG9ycyAqLyAKICNkZWZpbmUgRkJJTkZPX1NUQVRFX1JVTk5JTkcJMAog I2RlZmluZSBGQklORk9fU1RBVEVfU1VTUEVOREVECTEKKyNkZWZpbmUgRkJJTkZPX1NUQVRFX1JF TU9WRUQJMgogCXUzMiBzdGF0ZTsJCQkvKiBIYXJkd2FyZSBzdGF0ZSBpLmUgc3VzcGVuZCAqLwog CXZvaWQgKmZiY29uX3BhcjsgICAgICAgICAgICAgICAgLyogZmJjb24gdXNlLW9ubHkgcHJpdmF0 ZSBhcmVhICovCiAJLyogRnJvbSBoZXJlIG9uIGV2ZXJ5dGhpbmcgaXMgZGV2aWNlIGRlcGVuZGVu dCAqLwotLSAKMS43LjAuNAo= --0016e68e7f68f09057049d11a2d7-- -- 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/