Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [95b866] Maximize Restore History

e1000e: Fix incorrect debug warning

Doing 'WARN_ON(preempt_count())' was horribly horribly wrong, and would
cause tons of warnings at bootup if PREEMPT was enabled because the
initcalls currently run with the kernel lock, which increments the
preempt count.

At the same time, the warning was also insufficient, since it didn't
check that interrupts were enabled.

The proper debug function to use for something that can sleep and wants
a warning if it's called in the wrong context is 'might_sleep()'.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Linus Torvalds Linus Torvalds 2008-10-03

changed drivers
changed drivers/net
changed drivers/net/e1000e
changed drivers/net/e1000e/ich8lan.c
drivers
Directory.
drivers/net
Directory.
drivers/net/e1000e
Directory.
drivers/net/e1000e/ich8lan.c Diff Switch to side-by-side view
Loading...