Re: [PATCH 2/5] lockdep: check that no locks held at freeze time
From: Oleg Nesterov
Date: Fri Feb 15 2013 - 10:46:12 EST
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);
> if (likely(!freezing(current)))
> return false;
Up to maintainers, but perhaps you should check !PF_NOFREEZE at least?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/