lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] lockdep: check that no locks held at freeze time
On Wed, 20 Feb 2013 15:17:16 -0800
Mandeep Singh Baines <msb@chromium.org> wrote:

> We shouldn't try_to_freeze if locks are held.
>
> ...
>
> @@ -43,6 +44,9 @@ extern void thaw_kernel_threads(void);
>
> + if (!(current->flags & PF_NOFREEZE))
> + debug_check_no_locks_held(current,
> +
> "lock held while trying to freeze");
> ...
>
> + debug_check_no_locks_held(tsk, "lock held at task exit time");

There doesn't seem much point in adding the `msg' to
debug_check_no_locks_held() - the dump_stack() in
print_held_locks_bug() will tell us the same thing. Maybe just change
the print_held_locks_bug() messages so they stop assuming they were
called from do_exit()?

Also, I wonder if the `tsk' arg is needed. In both callers
tsk==current. Is it likely that we'll ever call
debug_check_no_locks_held() for any task other than `current'?



\
 
 \ /
  Last update: 2013-02-21 01:03    [W:0.125 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site