1. 18 8月, 2006 1 次提交
    • M
      [BNX2]: Fix tx race condition. · 2f8af120
      Michael Chan 提交于
      Fix a subtle race condition between bnx2_start_xmit() and bnx2_tx_int()
      similar to the one in tg3 discovered by Herbert Xu:
      
      CPU0					CPU1
      bnx2_start_xmit()
      	if (tx_ring_full) {
      		tx_lock
      					bnx2_tx()
      						if (!netif_queue_stopped)
      		netif_stop_queue()
      		if (!tx_ring_full)
      						update_tx_ring
      			netif_wake_queue()
      		tx_unlock
      	}
      
      Even though tx_ring is updated before the if statement in bnx2_tx_int() in
      program order, it can be re-ordered by the CPU as shown above.  This
      scenario can cause the tx queue to be stopped forever if bnx2_tx_int() has
      just freed up the entire tx_ring.  The possibility of this happening
      should be very rare though.
      
      The following changes are made, very much identical to the tg3 fix:
      
      1. Add memory barrier to fix the above race condition.
      
      2. Eliminate the private tx_lock altogether and rely solely on
      netif_tx_lock.  This eliminates one spinlock in bnx2_start_xmit()
      when the ring is full.
      
      3. Because of 2, use netif_tx_lock in bnx2_tx_int() before calling
      netif_wake_queue().
      
      4. Add memory barrier to bnx2_tx_avail().
      
      5. Add bp->tx_wake_thresh which is set to half the tx ring size.
      
      6. Check for the full wake queue condition before getting
      netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
      spinlocks when the tx ring is full in a steady-state condition.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f8af120
  2. 16 8月, 2006 2 次提交
  3. 15 8月, 2006 3 次提交
    • M
      [WATCHDOG] Kconfig typos fix. · 2621e2a1
      Matt LaPlante 提交于
      Three typos in drivers/char/watchdog/Kconfig...
      Signed-off-by: NMatt LaPlante <kernel1@cyberdogtech.com>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      2621e2a1
    • M
      [PATCH] dm: BUG/OOPS fix · 485311a2
      Michal Miroslaw 提交于
      Fix BUG I tripped on while testing failover and multipathing.
      
      BUG shows up on error path in multipath_ctr() when parse_priority_group()
      fails after returning at least once without error.  The fix is to
      initialize m->ti early - just after alloc()ing it.
      
      BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
       printing eip:
      c027c3d2
      *pde = 00000000
      Oops: 0000 [#3]
      Modules linked in: qla2xxx ext3 jbd mbcache sg ide_cd cdrom floppy
      CPU:    0
      EIP:    0060:[<c027c3d2>]    Not tainted VLI
      EFLAGS: 00010202   (2.6.17.3 #1)
      EIP is at dm_put_device+0xf/0x3b
      eax: 00000001   ebx: ee4fcac0   ecx: 00000000   edx: ee4fcac0
      esi: ee4fc4e0   edi: ee4fc4e0   ebp: 00000000   esp: c5db3e78
      ds: 007b   es: 007b   ss: 0068
      Process multipathd (pid: 15912, threadinfo=c5db2000 task=ef485a90)
      Stack: ec4eda40 c02816bd ee4fc4c0 00000000 f7e89498 f883e0bc c02816f6 f7e89480
             f7e8948c c0281801 ffffffea f7e89480 f883e080 c0281ffe 00000001 00000000
             00000004 dfe9cab8 f7a693c0 f883e080 f883e0c0 ca4b99c0 c027c6ee 01400000
      Call Trace:
       <c02816bd> free_pgpaths+0x31/0x45  <c02816f6> free_priority_group+0x25/0x2e
       <c0281801> free_multipath+0x35/0x67  <c0281ffe> multipath_ctr+0x123/0x12d
       <c027c6ee> dm_table_add_target+0x11e/0x18b  <c027e5b4> populate_table+0x8a/0xaf
       <c027e62b> table_load+0x52/0xf9  <c027ec23> ctl_ioctl+0xca/0xfc
       <c027e5d9> table_load+0x0/0xf9  <c0152146> do_ioctl+0x3e/0x43
       <c0152360> vfs_ioctl+0x16c/0x178  <c01523b4> sys_ioctl+0x48/0x60
       <c01029b3> syscall_call+0x7/0xb
      Code: 97 f0 00 00 00 89 c1 83 c9 01 80 e2 01 0f 44 c1 88 43 14 8b 04 24 59 5b 5e 5f 5d c3 53 89 c1 89 d3 ff 4a 08 0f 94 c0 84 c0 74 2a <8b> 01 8b 10 89 d8 e8 f6 fb ff ff 8b 03 8b 53 04 89 50 04 89 02
      EIP: [<c027c3d2>] dm_put_device+0xf/0x3b SS:ESP 0068:c5db3e78
      Signed-off-by: NMichal Miroslaw <mirq-linux@rere.qmqm.pl>
      Acked-by: NAlasdair G Kergon <agk@redhat.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      485311a2
    • E
      [PATCH] add imacfb documentation and detection · b64ef8af
      Edgar Hucek 提交于
      Add basic Machine detection to imacfb and some Ducumentation bits for
      imacfb.
      Signed-off-by: NEdgar Hucek <hostmaster@ed-soft.at>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b64ef8af
  4. 12 8月, 2006 8 次提交
  5. 10 8月, 2006 2 次提交
  6. 09 8月, 2006 15 次提交
  7. 08 8月, 2006 3 次提交
    • M
      [TG3]: Fix tx race condition · 1b2a7205
      Michael Chan 提交于
      Fix a subtle race condition between tg3_start_xmit() and tg3_tx()
      discovered by Herbert Xu <herbert@gondor.apana.org.au>:
      
      CPU0					CPU1
      tg3_start_xmit()
      	if (tx_ring_full) {
      		tx_lock
      					tg3_tx()
      						if (!netif_queue_stopped)
      		netif_stop_queue()
      		if (!tx_ring_full)
      						update_tx_ring 
      			netif_wake_queue()
      		tx_unlock
      	}
      
      Even though tx_ring is updated before the if statement in tg3_tx() in
      program order, it can be re-ordered by the CPU as shown above.  This
      scenario can cause the tx queue to be stopped forever if tg3_tx() has
      just freed up the entire tx_ring.  The possibility of this happening
      should be very rare though.
      
      The following changes are made:
      
      1. Add memory barrier to fix the above race condition.
      
      2. Eliminate the private tx_lock altogether and rely solely on
      netif_tx_lock.  This eliminates one spinlock in tg3_start_xmit()
      when the ring is full.
      
      3. Because of 2, use netif_tx_lock in tg3_tx() before calling
      netif_wake_queue().
      
      4. Change TX_BUFFS_AVAIL to an inline function with a memory barrier.
      Herbert and David suggested using the memory barrier instead of
      volatile.
      
      5. Check for the full wake queue condition before getting
      netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
      spinlocks when the tx ring is full in a steady-state condition.
      
      6. Update version to 3.65.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b2a7205
    • C
      [TG3]: skb->dev assignment is done by netdev_alloc_skb · d14cc9a3
      Christoph Hellwig 提交于
      All caller of netdev_alloc_skb need to assign skb->dev shortly
      afterwards.  Move it into common code.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d14cc9a3
    • M
      [S390] xpram system device class. · 37ab46a3
      Martin Schwidefsky 提交于
      Remove system device class for xpram. It creates the directory hierarchy
      under /sys/devices/system/xpram/xpram0. The xpram0 directory is empty and
      it is always created while xpram1 and following devices are always missing,
      independent if the devices exist or not. Since the xpram devices are
      listed in /proc/partitions and /sys/block/ as slram<x> the system device
      class for xpram is meaningless.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      37ab46a3
  8. 07 8月, 2006 6 次提交