[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110511162743.6b363f1f@pluto.restena.lu>
Date: Wed, 11 May 2011 16:27:43 +0200
From: Bruno Prémont <bonbons@...ux-vserver.org>
To: Tim Gardner <tim.gardner@...onical.com>
Cc: linux-fbdev@...r.kernel.org, lethal@...ux-sh.org,
linux-kernel@...r.kernel.org,
Andy Whitcroft <andy.whitcroft@...onical.com>
Subject: Re: [PATCH V3] fbcon -- fix race between open and removal of
framebuffers
On Wed, 11 May 2011 16:09:29 Tim Gardner wrote:
> On 05/10/2011 11:44 PM, Bruno Prémont wrote:
> > On Tue, 10 May 2011 Tim Gardner<tim.gardner@...onical.com> wrote:
> > This only partially protects the list and count as two concurrent
> > framebuffer registrations do still race against each other.
> > For the issue addressed by this patch I don't think it makes sense to
> > have this spinlock at all as it's only used in get_framebuffer_info()
> > and in put_framebuffer_info() and put_framebuffer_info() doesn't even
> > look at registered_fb or num_registered_fb.
> > Such a spinlock makes sense in a separate patch that really protects
> > all access to registered_fb or num_registered_fb, be it during framebuffer
> > (un)registration or during access from fbcon.
> >
>
> Our goal was merely to stop the user space open/close races. I agree
> that the framebuffer registration list needs more orthogonal protection,
> but that is going to be a much larger patch.
I know that such a protection needs a much larger patch. (that would be
for 2.6.40 or 2.6.41, I have preparing patches for that cooking)
My main issue for tis patch is that the comment reads as if spinlock was
protecting registered_fb[] and num_registered_fb. So changing the
comment would be a good thing (say it protects fb_info->ref_count).
Later patch can then protect registered_fb against concurrent
framebuffer registrations.
Bruno
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists