Thread (38 messages) 38 messages, 5 authors, 2011-03-16
STALE5675d

Re: [PATCH] ARM: PXA: Make PXA27x/PXA3xx overlay actually work

From: Russell King - ARM Linux <hidden>
Date: 2011-02-15 09:48:08
Also in: linux-arm-kernel

On Tue, Feb 15, 2011 at 03:35:44PM +0800, Eric Miao wrote:
quoted
@@ -720,12 +726,10 @@ static int overlayfb_open(struct fb_info *info, int user)
       if (user = 0)
               return -ENODEV;

-       /* allow only one user at a time */
-       if (atomic_inc_and_test(&ofb->usage))
-               return -EBUSY;
+       if (ofb->usage++ = 0)
+               /* unblank the base framebuffer */
+               fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK);
The change above allows multiple user at a time? Then I guess
some other places need to be changed accordingly to avoid the
racing conditions.
You can't prevent multiple users.  Think threaded applications which
share the same set of fds.

Any driver which tries to do so by restricting the number of open()s is
simply buggy.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help