Ingo Molnar bd6ca6375b forcedeth: fix locking bug with netconsole
While using netconsole on forcedeth, lockdep noticed the following locking
bug:

=================================
[ INFO: inconsistent lock state ]
2.6.24-rc6 #6
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---------------------------------
inconsistent {softirq-on-W} -> {in-softirq-W} usage.
udevd/719 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (_xmit_ETHER){-+..}, at: [<c043062e>] dev_watchdog+0x1c/0xb9
{softirq-on-W} state was registered at:
  [<c0147f67>] mark_held_locks+0x4e/0x66
  [<c014810e>] trace_hardirqs_on+0xfe/0x136
  [<c048ae63>] _spin_unlock_irq+0x22/0x42
  [<c02ec617>] nv_start_xmit_optimized+0x347/0x37a
  [<c042c80d>] netpoll_send_skb+0xa4/0x147
  [<c042d4a6>] netpoll_send_udp+0x238/0x242
  [<c02f44f6>] write_msg+0x6d/0x9b
  [<c012c129>] __call_console_drivers+0x4e/0x5a
  [<c012c18c>] _call_console_drivers+0x57/0x5b
  [<c012c2dd>] release_console_sem+0x11c/0x1b9
  [<c012caeb>] register_console+0x1eb/0x1f3
  [<c06ae673>] init_netconsole+0x119/0x15f
  [<c069149b>] kernel_init+0x147/0x294
  [<c01058cb>] kernel_thread_helper+0x7/0x10
  [<ffffffff>] 0xffffffff
irq event stamp: 950
hardirqs last  enabled at (950): [<c048ae63>] _spin_unlock_irq+0x22/0x42
hardirqs last disabled at (949): [<c048aaf7>] _spin_lock_irq+0xc/0x38
softirqs last  enabled at (0): [<c012a29c>] copy_process+0x375/0x126d
softirqs last disabled at (947): [<c0106d43>] do_softirq+0x61/0xc6

other info that might help us debug this:
no locks held by udevd/719.

stack backtrace:
Pid: 719, comm: udevd Not tainted 2.6.24-rc6 #6
 [<c0105c46>] show_trace_log_lvl+0x12/0x25
 [<c01063ec>] show_trace+0xd/0x10
 [<c010670c>] dump_stack+0x57/0x5f
 [<c0147505>] print_usage_bug+0x10a/0x117
 [<c0147c38>] mark_lock+0x121/0x402
 [<c01488b6>] __lock_acquire+0x3d1/0xb64
 [<c0149405>] lock_acquire+0x4e/0x6a
 [<c048a99b>] _spin_lock+0x23/0x32
 [<c043062e>] dev_watchdog+0x1c/0xb9
 [<c0133e4a>] run_timer_softirq+0x133/0x193
 [<c0130907>] __do_softirq+0x78/0xed
 [<c0106d43>] do_softirq+0x61/0xc6
 =======================
eth1: link down

The fix is to disable/restore irqs instead of disable/enable.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-28 22:08:02 -04:00
..
2008-03-25 23:15:51 -04:00
2008-01-28 15:10:29 -08:00
2008-03-25 23:42:05 -04:00
2008-02-15 10:51:51 -05:00
2008-03-25 23:16:03 -04:00
2008-02-03 15:42:53 +02:00
2008-03-25 23:16:09 -04:00
2008-03-05 06:34:29 -05:00
2008-01-28 15:10:31 -08:00
2008-02-03 15:42:53 +02:00
2007-10-17 20:23:30 -04:00
2008-03-17 08:11:03 -04:00
2008-01-28 15:04:05 -08:00
2008-01-12 17:41:04 -05:00
2008-01-28 15:07:12 -08:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:51:57 -07:00
2008-02-11 10:29:33 -05:00
2007-07-10 12:41:08 -04:00
2007-11-05 17:57:30 -05:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:55:27 -07:00
2008-01-28 15:03:59 -08:00
2008-01-28 15:04:05 -08:00
2008-03-25 23:42:07 -04:00
2007-10-10 16:51:43 -07:00
2008-01-31 19:27:17 -08:00
2008-01-31 19:27:17 -08:00
2008-02-23 19:49:48 -08:00
2008-02-28 11:51:50 -08:00
2008-02-28 11:51:50 -08:00
2008-02-28 11:57:55 -08:00
2008-01-28 15:07:12 -08:00
2008-01-04 00:47:04 -08:00
2007-02-09 16:23:17 +00:00
2008-01-18 14:44:33 -05:00
2008-02-01 20:54:03 +11:00
2007-10-10 16:51:13 -07:00
2008-03-25 23:16:05 -04:00
2007-10-10 16:51:13 -07:00
2008-01-28 15:07:59 -08:00
2008-03-05 18:51:19 -08:00
2007-10-19 11:53:42 -07:00
2008-02-15 10:51:53 -05:00
2007-07-30 15:48:16 -04:00
2007-10-17 20:11:28 -04:00
2007-12-14 15:26:15 -05:00
2008-01-28 15:07:12 -08:00
2008-02-03 04:26:12 -08:00
2007-10-10 16:50:46 -07:00
2008-03-17 08:11:41 -04:00
2008-01-28 15:05:53 -08:00
2008-01-28 15:04:05 -08:00
2008-01-28 15:07:12 -08:00
2007-10-10 16:51:13 -07:00
2008-02-24 00:07:42 -05:00
2008-01-28 15:07:12 -08:00
2008-01-08 23:30:00 -08:00
2007-10-19 11:53:42 -07:00
2007-04-28 11:01:05 -04:00
2008-02-03 04:28:10 -08:00
2008-02-09 23:41:08 -08:00
2008-03-17 07:56:33 -04:00
2008-01-08 23:29:59 -08:00
2007-10-23 21:28:40 -04:00
2008-02-20 00:18:09 -08:00
2008-02-20 00:18:09 -08:00
2008-01-28 15:07:56 -08:00
2008-02-11 10:28:31 -05:00
2007-11-12 18:07:31 -08:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:08:00 -08:00
2008-01-28 15:08:00 -08:00
2008-03-17 07:56:27 -04:00
2008-01-28 15:03:59 -08:00
2008-02-03 04:27:38 -08:00
2007-10-15 14:29:48 -04:00
2008-01-28 15:03:59 -08:00
2007-10-16 21:10:29 -04:00
2008-02-24 00:07:39 -05:00
2008-02-24 00:07:39 -05:00
2008-01-28 15:11:27 -08:00
2008-01-28 15:03:59 -08:00
2007-05-04 17:59:08 -07:00
2007-07-16 15:02:47 +02:00
2008-02-09 23:42:17 -08:00
2007-10-10 16:51:13 -07:00
2008-02-03 04:26:15 -08:00
2008-01-28 15:03:46 -08:00
2008-03-23 03:35:12 -07:00
2008-01-28 15:07:10 -08:00
2008-01-28 15:07:12 -08:00
2008-01-28 15:07:09 -08:00
2008-02-03 04:26:14 -08:00
2007-10-10 16:51:34 -07:00
2008-01-28 15:03:37 -08:00
2007-10-10 16:51:34 -07:00
2008-03-20 15:53:15 -07:00
2008-02-11 14:47:29 -05:00
2008-02-09 23:40:34 -08:00
2008-02-20 00:21:47 -08:00
2008-02-09 23:41:40 -08:00
2008-03-17 22:58:21 +11:00
2008-01-28 15:07:12 -08:00