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

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

flat view
STALE5683d

From: Eric Miao <hidden>
Date: 2011-02-15 11:43:07
Also in: linux-arm-kernel

On Tue, Feb 15, 2011 at 5:48 PM, Russell King - ARM Linux
[off-list ref] wrote:
On Tue, Feb 15, 2011 at 03:35:44PM +0800, Eric Miao wrote:
quoted
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.
OK, let's go ahead fix the racing conditions later.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help