diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2010-09-22 16:05:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-22 20:22:39 -0400 |
commit | 142092e577255e33a4ab74c6baad04c9fb887927 (patch) | |
tree | 3c662d36238262873014c41d2adac6815a0421fb /drivers/video/console | |
parent | a5757c2a474a15f87e5baa9a4caacc31cde2bae6 (diff) |
fbcon: fix lockdep warning from fbcon_deinit()
Fix the lockdep warning:
[ 13.657164] INFO: trying to register non-static key.
[ 13.657169] the code is fine but needs lockdep annotation.
[ 13.657171] turning off the locking correctness validator.
[ 13.657177] Pid: 622, comm: modprobe Not tainted 2.6.36-rc3c #8
[ 13.657180] Call Trace:
[ 13.657194] [<c13002c8>] ? printk+0x18/0x20
[ 13.657202] [<c1056cf6>] register_lock_class+0x336/0x350
[ 13.657208] [<c1058bf9>] __lock_acquire+0x449/0x1180
[ 13.657215] [<c1059997>] lock_acquire+0x67/0x80
[ 13.657222] [<c1042bf1>] ? __cancel_work_timer+0x51/0x230
[ 13.657227] [<c1042c23>] __cancel_work_timer+0x83/0x230
[ 13.657231] [<c1042bf1>] ? __cancel_work_timer+0x51/0x230
[ 13.657236] [<c10582b2>] ? mark_held_locks+0x62/0x80
[ 13.657243] [<c10b3a2f>] ? kfree+0x7f/0xe0
[ 13.657248] [<c105853c>] ? trace_hardirqs_on_caller+0x11c/0x160
[ 13.657253] [<c105858b>] ? trace_hardirqs_on+0xb/0x10
[ 13.657259] [<c117f4cd>] ? fbcon_deinit+0x16d/0x1e0
[ 13.657263] [<c117f4cd>] ? fbcon_deinit+0x16d/0x1e0
[ 13.657268] [<c1042dea>] cancel_work_sync+0xa/0x10
[ 13.657272] [<c117f444>] fbcon_deinit+0xe4/0x1e0
...
The warning is caused by trying to cancel an uninitialized work from
fbcon_exit(). Fix it by adding a check for queue.func, similarly to other
places in this code.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/fbcon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 84f842331dfa..7ccc967831f0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -3508,7 +3508,7 @@ static void fbcon_exit(void) | |||
3508 | softback_buf = 0UL; | 3508 | softback_buf = 0UL; |
3509 | 3509 | ||
3510 | for (i = 0; i < FB_MAX; i++) { | 3510 | for (i = 0; i < FB_MAX; i++) { |
3511 | int pending; | 3511 | int pending = 0; |
3512 | 3512 | ||
3513 | mapped = 0; | 3513 | mapped = 0; |
3514 | info = registered_fb[i]; | 3514 | info = registered_fb[i]; |
@@ -3516,7 +3516,8 @@ static void fbcon_exit(void) | |||
3516 | if (info == NULL) | 3516 | if (info == NULL) |
3517 | continue; | 3517 | continue; |
3518 | 3518 | ||
3519 | pending = cancel_work_sync(&info->queue); | 3519 | if (info->queue.func) |
3520 | pending = cancel_work_sync(&info->queue); | ||
3520 | DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : | 3521 | DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" : |
3521 | "no")); | 3522 | "no")); |
3522 | 3523 | ||