linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: Tim Gardner <tim.gardner@canonical.com>
Cc: linux-fbdev@vger.kernel.org, lethal@linux-sh.org,
	linux-kernel@vger.kernel.org,
	Andy Whitcroft <andy.whitcroft@canonical.com>
Subject: Re: [PATCH V3] fbcon -- fix race between open and removal of
Date: Wed, 11 May 2011 14:27:43 +0000	[thread overview]
Message-ID: <20110511162743.6b363f1f@pluto.restena.lu> (raw)
In-Reply-To: <4DCA9899.6070403@canonical.com>

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@canonical.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

      reply	other threads:[~2011-05-11 14:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 17:41 [PATCH 0/1] fbcon -- fix race between open and removal of framebuffers tim.gardner
2011-05-05 17:41 ` [PATCH] " tim.gardner
2011-05-05 18:30   ` [PATCH] fbcon -- fix race between open and removal of Bruno Prémont
2011-05-05 21:00   ` [PATCH] fbcon -- fix race between open and removal of framebuffers Jack Stone
2011-05-06  1:09     ` Anca Emanuel
2011-05-06  1:44       ` [PATCH] fbcon -- fix race between open and removal of Greg KH
2011-05-10 12:47     ` [PATCH V2] fbcon -- fix race between open and removal of framebuffers Tim Gardner
2011-05-10 21:06       ` Jack Stone
2011-05-10 21:08         ` Jack Stone
2011-05-06  0:21   ` [PATCH] " Anca Emanuel
2011-05-10 13:52 ` [PATCH V3] " Tim Gardner
2011-05-10 21:44   ` [PATCH V3] fbcon -- fix race between open and removal of Bruno Prémont
2011-05-11 14:09     ` [PATCH V3] fbcon -- fix race between open and removal of framebuffers Tim Gardner
2011-05-11 14:27       ` Bruno Prémont [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110511162743.6b363f1f@pluto.restena.lu \
    --to=bonbons@linux-vserver.org \
    --cc=andy.whitcroft@canonical.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim.gardner@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).