At Tue, 15 Jan 2013 15:25:18 +0100,
Takashi Iwai wrote:
> 
> At Sat, 5 Jan 2013 13:13:27 +0100,
> Sedat Dilek wrote:
> > 
> > Hi Jiri,
> > 
> > ...known issue (see thread in [1]), please feel free to test patches
> > from Alan and Andrew (see [1], [2] and [3]) and report.
> > 
> > Regards,
> > - Sedat -
> > 
> > [1] http://marc.info/?t=135309396400003&r=1&w=2
> > [2] 
> > http://ozlabs.org/~akpm/mmots/broken-out/fb-rework-locking-to-fix-lock-ordering-on-takeover.patch
> > [3] 
> > http://ozlabs.org/~akpm/mmots/broken-out/fb-rework-locking-to-fix-lock-ordering-on-takeover-fix.patch
> > [4] 
> > http://ozlabs.org/~akpm/mmots/broken-out/fb-rework-locking-to-fix-lock-ordering-on-takeover-fix-2.patch
> 
> I've hit this bug and tried the patch [2] ([3] and [4] are gone).
> Unfortunately the deadlock is still reported, as seen below.
> 
> A similar fix for fbcon_unbind(), splitting an unlocked version of
> unbind_con_driver() and call it?
> 
> (BTW, the patch [2] contains strange characters in the comments, and
>  has a few coding issues easily detected by checkpatch.pl.)

The fix patch for coding issue is below.
Feel free to fold into the original patch.


Takashi

===

From: Takashi Iwai <[email protected]>
Subject: [PATCH] fb: Fix coding style and remove stray non-ascii chars

Signed-off-by: Takashi Iwai <[email protected]>
---
 drivers/tty/vt/vt.c           | 4 ++--
 drivers/video/console/fbcon.c | 3 +--
 drivers/video/fbmem.c         | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index f307196..1db1c8d 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3653,7 +3653,7 @@ int do_take_over_console(const struct consw *csw, int 
first, int last, int deflt
        /*
         * If we get an busy error we still want to bind the console driver
         * and return success, as we may have unbound the console driver
-        * but not unregistered it.
+        * but not unregistered it.
         */
        if (err == -EBUSY)
                err = 0;
@@ -3679,7 +3679,7 @@ int take_over_console(const struct consw *csw, int first, 
int last, int deflt)
        /*
         * If we get an busy error we still want to bind the console driver
         * and return success, as we may have unbound the console driver
-        * but not unregistered it.
+        * but not unregistered it.
         */
        if (err == -EBUSY)
                err = 0;
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index c75f8ce..4bd7820 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -546,9 +546,8 @@ static int do_fbcon_takeover(int show_logo)
                                fbcon_is_default);
 
        if (err) {
-               for (i = first_fb_vc; i <= last_fb_vc; i++) {
+               for (i = first_fb_vc; i <= last_fb_vc; i++)
                        con2fb_map[i] = -1;
-               }
                info_idx = -1;
        } else {
                fbcon_has_console_bind = 1;
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 564ebe9..d8d9831 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1650,9 +1650,9 @@ static int do_register_framebuffer(struct fb_info 
*fb_info)
        event.info = fb_info;
        if (!lock_fb_info(fb_info))
                return -ENODEV;
-        console_lock();
+       console_lock();
        fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event);
-        console_unlock();
+       console_unlock();
        unlock_fb_info(fb_info);
        return 0;
 }
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to