1. 12 6月, 2013 1 次提交
  2. 05 6月, 2013 9 次提交
  3. 31 5月, 2013 2 次提交
  4. 26 5月, 2013 1 次提交
  5. 24 5月, 2013 2 次提交
  6. 23 5月, 2013 9 次提交
  7. 21 5月, 2013 1 次提交
  8. 20 5月, 2013 2 次提交
  9. 18 5月, 2013 2 次提交
  10. 17 5月, 2013 1 次提交
    • R
      NET: mv643xx_eth: avoid lockdep dump on interface down · 3aefe2b4
      Russell King 提交于
      When the interface is shutdown, the mv643xx_eth driver hits the following
      lockdep dump:
      
      =================================
      [ INFO: inconsistent lock state ]
      3.8.0+ #303 Not tainted
      ---------------------------------
      inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
      NetworkManager/3449 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (_xmit_ETHER#2){+.?...}, at: [<c02828e4>] txq_reclaim+0x60/0x230
      {IN-SOFTIRQ-W} state was registered at:
        [<c007e93c>] mark_irqflags+0xf8/0x1c4
        [<c007ee60>] __lock_acquire+0x458/0x9a4
        [<c007f8b0>] lock_acquire+0x60/0x74
        [<c03ea914>] _raw_spin_lock+0x40/0x50
        [<c0334040>] sch_direct_xmit+0xa4/0x2e4
        [<c0320880>] dev_queue_xmit+0x174/0x508
        [<c03953b0>] ip6_finish_output2+0xd0/0x3c4
        [<c03b15bc>] mld_sendpack+0x190/0x368
        [<c03b3204>] mld_ifc_timer_expire+0xc/0x58
        [<c005133c>] call_timer_fn+0x6c/0xe0
        [<c0051588>] run_timer_softirq+0x1d8/0x210
        [<c004c004>] __do_softirq+0xe0/0x1b4
        [<c004c448>] irq_exit+0x64/0x6c
        [<c000f1e0>] handle_IRQ+0x34/0x84
        [<c000e0d0>] __irq_usr+0x30/0x80
      irq event stamp: 160603
      hardirqs last  enabled at (160603): [<c00c736c>] kfree+0xa8/0xe8
      hardirqs last disabled at (160602): [<c00c72e0>] kfree+0x1c/0xe8
      softirqs last  enabled at (160304): [<c028260c>] mib_counters_update+0x5ec/0x60c
      softirqs last disabled at (160302): [<c03eab8c>] _raw_spin_lock_bh+0x14/0x54
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(_xmit_ETHER#2);
        <Interrupt>
          lock(_xmit_ETHER#2);
      
       *** DEADLOCK ***
      
      1 lock held by NetworkManager/3449:
       #0:  (rtnl_mutex){+.+.+.}, at: [<c032e664>] rtnetlink_rcv+0xc/0x24
      
      stack backtrace:
      [<c0013e34>] (unwind_backtrace+0x0/0xf8) from [<c007e12c>] (print_usage_bug+0x150/0x1d4)
      [<c007e12c>] (print_usage_bug+0x150/0x1d4) from [<c007e3f8>] (mark_lock_irq+0x248/0x290)
      [<c007e3f8>] (mark_lock_irq+0x248/0x290) from [<c007e598>] (mark_lock+0x158/0x404)
      [<c007e598>] (mark_lock+0x158/0x404) from [<c007e97c>] (mark_irqflags+0x138/0x1c4)
      [<c007e97c>] (mark_irqflags+0x138/0x1c4) from [<c007ee60>] (__lock_acquire+0x458/0x9a4)
      [<c007ee60>] (__lock_acquire+0x458/0x9a4) from [<c007f8b0>] (lock_acquire+0x60/0x74)
      [<c007f8b0>] (lock_acquire+0x60/0x74) from [<c03ea914>] (_raw_spin_lock+0x40/0x50)
      [<c03ea914>] (_raw_spin_lock+0x40/0x50) from [<c02828e4>] (txq_reclaim+0x60/0x230)
      [<c02828e4>] (txq_reclaim+0x60/0x230) from [<c0282ad8>] (txq_deinit+0x24/0xcc)
      [<c0282ad8>] (txq_deinit+0x24/0xcc) from [<c0282d28>] (mv643xx_eth_stop+0x1a8/0x1bc)
      [<c0282d28>] (mv643xx_eth_stop+0x1a8/0x1bc) from [<c031e314>] (__dev_close_many+0x88/0xcc)
      [<c031e314>] (__dev_close_many+0x88/0xcc) from [<c031e380>] (__dev_close+0x28/0x3c)
      [<c031e380>] (__dev_close+0x28/0x3c) from [<c0320fa0>] (__dev_change_flags+0x7c/0x134)
      [<c0320fa0>] (__dev_change_flags+0x7c/0x134) from [<c03210e0>] (dev_change_flags+0x10/0x48)
      [<c03210e0>] (dev_change_flags+0x10/0x48) from [<c032da1c>] (do_setlink+0x1a0/0x730)
      [<c032da1c>] (do_setlink+0x1a0/0x730) from [<c032f524>] (rtnl_newlink+0x304/0x4b0)
      [<c032f524>] (rtnl_newlink+0x304/0x4b0) from [<c032ef8c>] (rtnetlink_rcv_msg+0x25c/0x2a0)
      [<c032ef8c>] (rtnetlink_rcv_msg+0x25c/0x2a0) from [<c03383a0>] (netlink_rcv_skb+0xbc/0xd8)
      [<c03383a0>] (netlink_rcv_skb+0xbc/0xd8) from [<c032e674>] (rtnetlink_rcv+0x1c/0x24)
      [<c032e674>] (rtnetlink_rcv+0x1c/0x24) from [<c03361d8>] (netlink_unicast_kernel+0x88/0xd4)
      [<c03361d8>] (netlink_unicast_kernel+0x88/0xd4) from [<c0337dd0>] (netlink_unicast+0x138/0x180)
      [<c0337dd0>] (netlink_unicast+0x138/0x180) from [<c0338020>] (netlink_sendmsg+0x208/0x32c)
      [<c0338020>] (netlink_sendmsg+0x208/0x32c) from [<c030ab48>] (sock_sendmsg+0x84/0xa4)
      [<c030ab48>] (sock_sendmsg+0x84/0xa4) from [<c030aef4>] (__sys_sendmsg+0x2ac/0x2c4)
      [<c030aef4>] (__sys_sendmsg+0x2ac/0x2c4) from [<c030c8ec>] (sys_sendmsg+0x3c/0x68)
      [<c030c8ec>] (sys_sendmsg+0x3c/0x68) from [<c000e2e0>] (ret_fast_syscall+0x0/0x3c)
      
      It seems that txq_reclaim() takes the netif tx lock:
      
              __netif_tx_lock(nq, smp_processor_id());
      
      in a context outside of softirq context, and thus is susceptible to
      deadlock should an interrupt occur.
      
      Use __netif_tx_lock_bh()/__netif_tx_unlock_bh() instead.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aefe2b4
  11. 16 5月, 2013 3 次提交
    • F
      fec: Invert the order of function calls in fec_restart() · 1ed0d56c
      Fabio Estevam 提交于
      commit 54309fa6 ("net: fec: fix kernel oops when plug/unplug cable many times")
      introduced the following 'if' block in the beginning of fec_start():
      
      	if (netif_running(ndev)) {
      		netif_device_detach(ndev);
      		napi_disable(&fep->napi);
      		netif_stop_queue(ndev);
      		netif_tx_lock_bh(ndev);
      	}
      
      Then later in the end of fec_restart() there is another block that calls the
      opposite of each one of these functions.
      
      The correct approach would be to also call them with in the reverse order, so
      that we have as result:
      
      	if (netif_running(ndev)) {
      		netif_tx_unlock_bh(ndev);
      		netif_wake_queue(ndev);
      		napi_enable(&fep->napi);
      		netif_device_attach(ndev);
      	}
      Suggested-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ed0d56c
    • F
      fec: Fix inconsistent lock state · 31691344
      Fabio Estevam 提交于
      fec_restart() runs in softirq context and we should use the
      netif_tx_lock_bh/netif_tx_unlock_bh() variants to avoid the following warning
      that happens since commit 54309fa6 ("net: fec: fix kernel oops when plug/unplug
      cable many times"):
      
      [    9.753168] =================================
      [    9.757540] [ INFO: inconsistent lock state ]
      [    9.761921] 3.10.0-rc1-next-20130514 #13 Not tainted
      [    9.766897] ---------------------------------
      [    9.771264] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [    9.777288] swapper/0 [HC0[0]:SC1[3]:HE1:SE0] takes:
      [    9.782261]  (_xmit_ETHER#2){+.?...}, at: [<c03c24a4>] sch_direct_xmit+0xa0/0x2d4
      [    9.789879] {SOFTIRQ-ON-W} state was registered at:
      [    9.794769]   [<c0059c60>] __lock_acquire+0x528/0x1bc0
      [    9.799953]   [<c005b838>] lock_acquire+0xa0/0x108
      [    9.804780]   [<c0441320>] _raw_spin_lock+0x28/0x38
      [    9.809702]   [<c02f9fc8>] fec_restart+0x5d0/0x664
      [    9.814542]   [<c02fa738>] fec_enet_adjust_link+0xa8/0xc0
      [    9.819978]   [<c02f7a28>] phy_state_machine+0x2fc/0x370
      [    9.825323]   [<c0035ee0>] process_one_work+0x1c0/0x4a0
      [    9.830589]   [<c0036594>] worker_thread+0x138/0x394
      [    9.835587]   [<c003c620>] kthread+0xa4/0xb0
      [    9.839890]   [<c000e820>] ret_from_fork+0x14/0x34
      [    9.844728] irq event stamp: 185984
      [    9.848226] hardirqs last  enabled at (185984): [<c00232b0>] local_bh_enable_ip+0x84/0xf0
      [    9.856450] hardirqs last disabled at (185983): [<c0023270>] local_bh_enable_ip+0x44/0xf0
      [    9.864667] softirqs last  enabled at (185966): [<c0023470>] irq_enter+0x64/0x68
      [    9.872099] softirqs last disabled at (185967): [<c0023510>] irq_exit+0x9c/0xd8
      [    9.879440]
      [    9.879440] other info that might help us debug this:
      [    9.885981]  Possible unsafe locking scenario:
      [    9.885981]
      [    9.891912]        CPU0
      [    9.894364]        ----
      [    9.896814]   lock(_xmit_ETHER#2);
      [    9.900259]   <Interrupt>
      [    9.902884]     lock(_xmit_ETHER#2);
      [    9.906500]
      [    9.906500]  *** DEADLOCK ***
      Reported-by: NShawn Guo <shawn.guo@linaro.org>
      Suggested-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31691344
    • D
      ipg: fix an unsigned widening cast of '~' truncation issue · 0d709d91
      Dan Carpenter 提交于
      The bug here is this code from ipg_nic_hard_start_xmit():
      
      	txfd->tfc &= cpu_to_le64(~IPG_TFC_TFDDONE);
      
      IPG_TFC_TFDDONE is 0x0000000080000000 so it's an unsigned int.  The
      negated value is 0x7fffffff but 0xffffffff7fffffff was intended.
      
      The other values in this file don't need to be changed but I did it for
      consistency.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d709d91
  12. 15 5月, 2013 7 次提交