lkml.org 
[lkml]   [2013]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] lockdep: check that no locks held at freeze time
On 02/14, Mandeep Singh Baines wrote:
>
> We shouldn't try_to_freeze if locks are held. Verified that
> I get no lockdep warnings after applying this patch and
> "vfork: don't freezer_count() for in-kernel users of CLONE_VFORK".

Ah. Now I understand why you did 1/5. Beacuse you call
debug_check_no_locks_held() right at the start of try_to_freeze(),
even if the caller can't be frozen.

> static inline bool try_to_freeze(void)
> {
> + debug_check_no_locks_held(current);
> might_sleep();
> if (likely(!freezing(current)))
> return false;

Up to maintainers, but perhaps you should check !PF_NOFREEZE at least?

Oleg.



\
 
 \ /
  Last update: 2013-02-15 17:41    [W:0.200 / U:4.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site