lkml.org 
[lkml]   [2008]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [regression] Latest git has WARN_ON storm with e1000e driver


On Fri, 3 Oct 2008, Christian Borntraeger wrote:
>
> kernel_init does lock_kernel (which does preempt_disable).
> The kernel_unlock is done in init_post. As far as I can see, this happens
> after the driver init calls.

Yes. I just came to the same conclusion: preempt_count is 1 already in
do_one_initcall().

So this whole bug is actually because that debug test is just _broken_. It
shouldn't be WARN_ON(preempt_count()), it should be 'might_sleep()', which
does it right.

The right thing to check is "in_atomic() || irqs_disabled()".

Duh. That was wasted effort for a buggy test.

Linus


\
 
 \ /
  Last update: 2008-10-03 18:11    [W:0.055 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site