mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [fbdev] Lockdep error
@ 2008-09-15 12:21 Dmitry Baryshkov
  2008-09-16 21:39 ` [Linux-fbdev-devel] " Krzysztof Helt
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2008-09-15 12:21 UTC (permalink / raw)
  To: linux-fbdev-devel, linux-kernel; +Cc: adaplas, rpurdie

Hi,

After doing
# echo 1 > /sys/class/graphics/fb0/blank
I got the following in my kernel log:

=============================================
[ INFO: possible recursive locking detected ]
2.6.27-rc6-00086-gda63874-dirty #97
---------------------------------------------
echo/1564 is trying to acquire lock:
 ((fb_notifier_list).rwsem){..--}, at: [<c005a384>] __blocking_notifier_call_chain+0x38/0x6c

but task is already holding lock:
 ((fb_notifier_list).rwsem){..--}, at: [<c005a384>] __blocking_notifier_call_chain+0x38/0x6c

other info that might help us debug this:
2 locks held by echo/1564:
 #0:  (&buffer->mutex){--..}, at: [<c00ddde0>] sysfs_write_file+0x30/0x80
 #1:  ((fb_notifier_list).rwsem){..--}, at: [<c005a384>] __blocking_notifier_call_chain+0x38/0x6c

stack backtrace:
[<c0029fe4>] (dump_stack+0x0/0x14) from [<c0060ce0>] (print_deadlock_bug+0xa4/0xd0)
[<c0060c3c>] (print_deadlock_bug+0x0/0xd0) from [<c0060e54>] (check_deadlock+0x148/0x17c)
 r6:c397a1e0 r5:c397a530 r4:c04fcf98
[<c0060d0c>] (check_deadlock+0x0/0x17c) from [<c00637e8>] (validate_chain+0x3c4/0x4f0)
[<c0063424>] (validate_chain+0x0/0x4f0) from [<c0063efc>] (__lock_acquire+0x5e8/0x6b4)
[<c0063914>] (__lock_acquire+0x0/0x6b4) from [<c006402c>] (lock_acquire+0x64/0x78)
[<c0063fc8>] (lock_acquire+0x0/0x78) from [<c0316ca8>] (down_read+0x4c/0x60)
 r7:00000009 r6:ffffffff r5:c0427a40 r4:c005a384
[<c0316c5c>] (down_read+0x0/0x60) from [<c005a384>] (__blocking_notifier_call_chain+0x38/0x6c)
 r5:c0427a40 r4:c0427a74
[<c005a34c>] (__blocking_notifier_call_chain+0x0/0x6c) from [<c005a3d8>] (blocking_notifier_call_chain+0x20/0x28)
 r8:00000009 r7:c086d640 r6:c3967940 r5:00000000 r4:c38984b8
[<c005a3b8>] (blocking_notifier_call_chain+0x0/0x28) from [<c014baa0>] (fb_notifier_call_chain+0x1c/0x24)
[<c014ba84>] (fb_notifier_call_chain+0x0/0x24) from [<c014c18c>] (fb_blank+0x64/0x70)
[<c014c128>] (fb_blank+0x0/0x70) from [<c0155978>] (fbcon_blank+0x114/0x1bc)
 r5:00000001 r4:c38984b8
[<c0155864>] (fbcon_blank+0x0/0x1bc) from [<c0170ea8>] (do_blank_screen+0x1e0/0x2a0)
[<c0170cc8>] (do_blank_screen+0x0/0x2a0) from [<c0154024>] (fbcon_fb_blanked+0x74/0x94)
 r5:c3967940 r4:00000001
[<c0153fb0>] (fbcon_fb_blanked+0x0/0x94) from [<c0154228>] (fbcon_event_notify+0x100/0x12c)
 r5:fffffffe r4:c39bc194
[<c0154128>] (fbcon_event_notify+0x0/0x12c) from [<c005a0d4>] (notifier_call_chain+0x38/0x7c)
[<c005a09c>] (notifier_call_chain+0x0/0x7c) from [<c005a3a0>] (__blocking_notifier_call_chain+0x54/0x6c)
 r8:c3b51ea0 r7:00000009 r6:ffffffff r5:c0427a40 r4:c0427a74
[<c005a34c>] (__blocking_notifier_call_chain+0x0/0x6c) from [<c005a3d8>] (blocking_notifier_call_chain+0x20/0x28)
 r8:00000001 r7:c3a7e000 r6:00000000 r5:00000000 r4:c38984b8
[<c005a3b8>] (blocking_notifier_call_chain+0x0/0x28) from [<c014baa0>] (fb_notifier_call_chain+0x1c/0x24)
[<c014ba84>] (fb_notifier_call_chain+0x0/0x24) from [<c014c18c>] (fb_blank+0x64/0x70)
[<c014c128>] (fb_blank+0x0/0x70) from [<c014e450>] (store_blank+0x54/0x7c)
 r5:c38984b8 r4:c3b51ec4
[<c014e3fc>] (store_blank+0x0/0x7c) from [<c017981c>] (dev_attr_store+0x28/0x2c)
 r8:00000001 r7:c042bf80 r6:c39eba10 r5:c3967c30 r4:c38e0140
[<c01797f4>] (dev_attr_store+0x0/0x2c) from [<c00ddaac>] (flush_write_buffer+0x54/0x68)
[<c00dda58>] (flush_write_buffer+0x0/0x68) from [<c00dde08>] (sysfs_write_file+0x58/0x80)
 r8:c3b51f78 r7:c3bcb070 r6:c39eba10 r5:00000001 r4:00000001
[<c00dddb0>] (sysfs_write_file+0x0/0x80) from [<c009de04>] (vfs_write+0xb8/0x148)
[<c009dd4c>] (vfs_write+0x0/0x148) from [<c009e384>] (sys_write+0x44/0x70)
 r7:00000004 r6:c3bcb070 r5:00000000 r4:00000000
[<c009e340>] (sys_write+0x0/0x70) from [<c0025d00>] (ret_fast_syscall+0x0/0x2c)
 r6:4001b000 r5:00000001 r4:401dc658

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-fbdev-devel] [fbdev] Lockdep error
  2008-09-15 12:21 [fbdev] Lockdep error Dmitry Baryshkov
@ 2008-09-16 21:39 ` Krzysztof Helt
  2008-09-23  9:53   ` Dmitry
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Helt @ 2008-09-16 21:39 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: linux-fbdev-devel, linux-kernel, rpurdie, adaplas

On Mon, 15 Sep 2008 16:21:52 +0400
Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:

> Hi,
> 
> After doing
> # echo 1 > /sys/class/graphics/fb0/blank
> I got the following in my kernel log:
> 
> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.27-rc6-00086-gda63874-dirty #97
> ---------------------------------------------
> echo/1564 is trying to acquire lock:
>  ((fb_notifier_list).rwsem){..--}, at: [<c005a384>] __blocking_notifier_call_chain+0x38/0x6c
> 

Does the patch below fix the problem for you?

Kind regards,
Krzysztof

diff -urp linux-ref/drivers/video/console/fbcon.c linux-mm/drivers/video/console/fbcon.c
--- linux-ref/drivers/video/console/fbcon.c	2008-09-05 23:38:47.000000000 +0200
+++ linux-mm/drivers/video/console/fbcon.c	2008-09-16 23:30:52.309604454 +0200
@@ -2400,11 +2400,15 @@ static int fbcon_blank(struct vc_data *v
 
  	if (!fbcon_is_inactive(vc, info)) {
 		if (ops->blank_state != blank) {
+			int ret = 1;
+
 			ops->blank_state = blank;
 			fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
 			ops->cursor_flash = (!blank);
 
-			if (fb_blank(info, blank))
+			if (info->fbops->fb_blank)
+				ret = info->fbops->fb_blank(blank, info);
+			if (ret)
 				fbcon_generic_blank(vc, info, blank);
 		}
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-fbdev-devel] [fbdev] Lockdep error
  2008-09-16 21:39 ` [Linux-fbdev-devel] " Krzysztof Helt
@ 2008-09-23  9:53   ` Dmitry
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry @ 2008-09-23  9:53 UTC (permalink / raw)
  To: Krzysztof Helt; +Cc: linux-fbdev-devel, linux-kernel, rpurdie, adaplas

2008/9/17 Krzysztof Helt <krzysztof.h1@wp.pl>:
> On Mon, 15 Sep 2008 16:21:52 +0400
> Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
>
>> Hi,
>>
>> After doing
>> # echo 1 > /sys/class/graphics/fb0/blank
>> I got the following in my kernel log:
>>
>> =============================================
>> [ INFO: possible recursive locking detected ]
>> 2.6.27-rc6-00086-gda63874-dirty #97
>> ---------------------------------------------
>> echo/1564 is trying to acquire lock:
>>  ((fb_notifier_list).rwsem){..--}, at: [<c005a384>] __blocking_notifier_call_chain+0x38/0x6c
>>
>
> Does the patch below fix the problem for you?

Sorry for the delay.
Yes, the patch does fix the issue for me. Thank you.

>
> Kind regards,
> Krzysztof
>
> diff -urp linux-ref/drivers/video/console/fbcon.c linux-mm/drivers/video/console/fbcon.c
> --- linux-ref/drivers/video/console/fbcon.c     2008-09-05 23:38:47.000000000 +0200
> +++ linux-mm/drivers/video/console/fbcon.c      2008-09-16 23:30:52.309604454 +0200
> @@ -2400,11 +2400,15 @@ static int fbcon_blank(struct vc_data *v
>
>        if (!fbcon_is_inactive(vc, info)) {
>                if (ops->blank_state != blank) {
> +                       int ret = 1;
> +
>                        ops->blank_state = blank;
>                        fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
>                        ops->cursor_flash = (!blank);
>
> -                       if (fb_blank(info, blank))
> +                       if (info->fbops->fb_blank)
> +                               ret = info->fbops->fb_blank(blank, info);
> +                       if (ret)
>                                fbcon_generic_blank(vc, info, blank);
>                }
>
>



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-23  9:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-15 12:21 [fbdev] Lockdep error Dmitry Baryshkov
2008-09-16 21:39 ` [Linux-fbdev-devel] " Krzysztof Helt
2008-09-23  9:53   ` Dmitry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®