1. 15 12月, 2012 2 次提交
    • R
      fcoe: Use the fcoe_sysfs control interface · 435c8667
      Robert Love 提交于
      This patch adds support for the new fcoe_sysfs
      control interface to fcoe.ko. It keeps the deprecated
      interface in tact and therefore either the legacy
      or the new control interfaces can be used. A mixed mode
      is not supported. A user must either use the new
      interfaces or the old ones, but not both.
      
      The fcoe_ctlr's link state is now driven by both the
      netdev link state as well as the fcoe_ctlr_device's
      enabled attribute. The link must be up and the
      fcoe_ctlr_device must be enabled before the FCoE
      Controller starts discovery or login.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      435c8667
    • R
      libfcoe, fcoe, bnx2fc: Add new fcoe control interface · 6a891b07
      Robert Love 提交于
      This patch does a few things.
      
      1) Makes /sys/bus/fcoe/ctlr_{create,destroy} interfaces.
         These interfaces take an <ifname> and will either
         create an FCoE Controller or destroy an FCoE
         Controller depending on which file is written to.
      
         The new FCoE Controller will start in a DISABLED
         state and will not do discovery or login until it
         is ENABLED. This pause will allow us to configure
         the FCoE Controller before enabling it.
      
      2) Makes the 'mode' attribute of a fcoe_ctlr_device
         writale. This allows the user to configure the mode
         in which the FCoE Controller will start in when it
         is ENABLED.
      
         Possible modes are 'Fabric', or 'VN2VN'.
      
         The default mode for a fcoe_ctlr{,_device} is 'Fabric'.
         Drivers must implement the set_fcoe_ctlr_mode routine
         to support this feature.
      
         libfcoe offers an exported routine to set a FCoE
         Controller's mode. The mode can only be changed
         when the FCoE Controller is DISABLED.
      
         This patch also removes the get_fcoe_ctlr_mode pointer
         in the fcoe_sysfs function template, the code in
         fcoe_ctlr.c to get the mode and the assignment of
         the fcoe_sysfs function pointer to the fcoe_ctlr.c
         implementation (in fcoe and bnx2fc). fcoe_sysfs can
         return that value for the mode without consulting the
         LLD.
      
      3) Make a 'enabled' attribute of a fcoe_ctlr_device. On a
         read, fcoe_sysfs will return the attribute's value. On
         a write, fcoe_sysfs will call the LLD (if there is a
         callback) to notifiy that the enalbed state has changed.
      
      This patch maintains the old FCoE control interfaces as
      module parameters, but it adds comments pointing out that
      the old interfaces are deprecated.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      6a891b07
  2. 07 10月, 2012 1 次提交
  3. 20 7月, 2012 2 次提交
  4. 23 5月, 2012 2 次提交
    • R
      [SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs · 8d55e507
      Robert Love 提交于
      This patch has the SW FCoE driver and the bnx2fc
      driver make use of the new fcoe_sysfs API added
      earlier in this patch series.
      
      After this patch a fcoe_ctlr_device is allocated with
      private data in this order.
      
      +------------------+   +------------------+
      | fcoe_ctlr_device |   | fcoe_ctlr_device |
      +------------------+   +------------------+
      | fcoe_ctlr        |   | fcoe_ctlr        |
      +------------------+   +------------------+
      | fcoe_interface   |   | bnx2fc_interface |
      +------------------+   +------------------+
      
      libfcoe also takes part in this new model since it
      discovers and manages fcoe_fcf instances. The memory
      allocation is different for FCFs. I didn't want to
      impact libfcoe's fcoe_fcf processing, so this patch
      creates fcoe_fcf_device instances for each discovered
      fcoe_fcf. The two are paired using a (void * priv)
      member of the fcoe_ctlr_device. This allows libfcoe
      to continue maintaining its list of fcoe_fcf instances
      and simply attaches and detaches them from existing
      or new fcoe_fcf_device instances.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      8d55e507
    • R
      [SCSI] fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member · 619fe4be
      Robert Love 提交于
      Currently the fcoe_ctlr associated with an interface is allocated
      as a member of struct fcoe_interface. This causes problems when
      attempting to use the new fcoe_sysfs APIs which allow us to allocate
      the fcoe_interface as private data to the fcoe_ctlr_device instance.
      The problem is that libfcoe wants to be able use pointer math to find a
      fcoe_ctlr's fcoe_ctlr_device as well as finding a fcoe_ctlr_device's
      assocated fcoe_ctlr. To do this we need to allocate the
      fcoe_ctlr_device, with private data for the LLD. The private data
      contains the fcoe_ctlr and its private data is the fcoe_interface.
      This patch only allocates the fcoe_interface with the fcoe_ctlr, the
      fcoe_ctlr_device will be added in a later patch, which will complete
      the below diagram-
      
      +------------------+
      | fcoe_ctlr_device |
      +------------------+
      | fcoe_ctlr        |
      +------------------+
      | fcoe_interface   |
      +------------------+
      
      This prep work will allow us to go from a fcoe_ctlr_device instance
      to its fcoe_ctlr as well as from a fcoe_ctlr to its fcoe_ctlr_device
      once the fcoe_sysfs API is in use (later patches in this series).
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      619fe4be
  5. 10 5月, 2012 4 次提交
  6. 28 3月, 2012 5 次提交
    • R
      [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up · 22805123
      Robert Love 提交于
      The rtnl_lock is primarily used to serialize networking
      driver changes as well as to ensure that a networking driver
      is not removed when making changes to it. fcoe also uses
      the rtnl_lock to protect the fcoe hostlist.
      
      fcoe_create holds the rtnl_lock over the entirity of the
      routine including a the call to fcoe_ctlr_link_up.
      This causes the below deadlock because fcoe_ctlr_link_up
      acquires the fcoe_ctlr ctlr_mutex and this deadlocks with
      a libfcoe thread that acquires the fcoe_ctlr ctlr_mutex and
      then the rtnl_lock (to update a MAC address).
      
      This patch drops the rtnl_lock before calling
      fcoe_ctlr_link_up and therefore the deadlock is prevented.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=42918
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (&fip->ctlr_mutex){+.+...}:
             [<c1091f70>] lock_acquire+0x80/0x1b0
             [<c147655d>] mutex_lock_nested+0x6d/0x340
             [<f8970c32>] fcoe_ctlr_link_up+0x22/0x180 [libfcoe]
             [<f894620e>] fcoe_create+0x47e/0x6e0 [fcoe]
             [<f8973dd3>] fcoe_transport_create+0x143/0x250 [libfcoe]
             [<c10527e0>] param_attr_store+0x30/0x60
             [<c1052696>] module_attr_store+0x26/0x40
             [<c11a201e>] sysfs_write_file+0xae/0x100
             [<c11449df>] vfs_write+0x8f/0x160
             [<c1144cbd>] sys_write+0x3d/0x70
             [<c147a0c4>] syscall_call+0x7/0xb
      
      -> #0 (rtnl_mutex){+.+.+.}:
             [<c109164b>] __lock_acquire+0x140b/0x1720
             [<c1091f70>] lock_acquire+0x80/0x1b0
             [<c147655d>] mutex_lock_nested+0x6d/0x340
             [<c13a10c4>] rtnl_lock+0x14/0x20
             [<f89445ac>] fcoe_update_src_mac+0x2c/0xb0 [fcoe]
             [<f8971712>] fcoe_ctlr_timer_work+0x712/0xb60 [libfcoe]
             [<c104fb69>] process_one_work+0x179/0x5d0
             [<c10502f1>] worker_thread+0x121/0x2d0
             [<c10550ed>] kthread+0x7d/0x90
             [<c1481a82>] kernel_thread_helper+0x6/0x10
      
      other info that might help us debug this:
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&fip->ctlr_mutex);
                                     lock(rtnl_mutex);
                                     lock(&fip->ctlr_mutex);
        lock(rtnl_mutex);
      
       *** DEADLOCK ***
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      22805123
    • N
      [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2] · 20dc3811
      Neil Horman 提交于
      There is potentially lots of contention for the rx_list_lock.  On a cpu that is
      receiving lots of fcoe traffic, the softirq context has to add and release the
      lock for every frame it receives, as does the receiving per-cpu thread.  We can
      reduce this contention somewhat by altering the per-cpu threads loop such that
      when traffic is detected on the fcoe_rx_list, we splice it to a temporary list.
      In this way, we can process multiple skbs while only having to acquire and
      release the fcoe_rx_list lock once.
      
      [ Braces around single statement while loop removed by Robert Love
        to satisfy checkpath.pl. ]
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      20dc3811
    • N
      [SCSI] fcoe: remove frame dropping code from fcoe_percpu_clean · dd060e74
      Neil Horman 提交于
      commit e7a51997 ([SCSI] fcoe: flush per-cpu
      thread work when destroying interface) added a skb flush to the fcoe_rx_list,
      which ensures that we push any pending frames on the list through the per-cpu
      receive thread.  Because of this, its redundant to lock and scan the list
      first, dropping any arriving frames.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      dd060e74
    • N
      [SCSI] foce: remove bh disable from fcoe sw transport rcv function · 94aa29f2
      Neil Horman 提交于
      The fcoe sw recive packet function (fcoe_rcv) only ever executes in softirq
      context.  Given that, and the fact that no use of the fcoe_rx_list is made in
      irq context, its not necessecary to disable bottom halves while actually
      receiving the frame.  Convert spin_*_bh calls in that function to their
      lock-only equivalents
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      94aa29f2
    • N
      [SCSI] fcoe: Ensure fcoe_recv_frame is always called in process context · 5e70c4c4
      Neil Horman 提交于
      commit 859b7b64 introduced the ability to call
      fcoe_recv_frame in softirq context.  While this is beneficial to performance,
      its not safe to do, as it breaks the serialization of access to the lport
      structure (i.e. when an fcoe interface is being torn down, theres no way to
      serialize the teardown effort with the completion of receieve operations
      occuring in softirq context.  As a result, lport (and other) data structures can
      be read and modified in parallel leading to corruption.  Most notable is the
      vport list, which is protected by a mutex, that will cause a panic if a softirq
      receive while said mutex is locked.  Additionaly, the ema_list, discussed here:
      
      http://lists.open-fcoe.org/pipermail/devel/2012-February/011947.html
      
      Can be corrupted if a list traversal occurs in softirq context at the same time
      as a list delete in process context.  And generally the lport state variables
      will not be stable, and may lead to unpredictable results.
      
      The most direct fix is to remove the bits from the above commit that allowed
      fcoe_recv_frame to be called in softirq context.  We just force all frames to be
      handled by the per-cpu rx threads.  This will allow the fcoe_if_destroy's use of
      fcoe_percpu_clean to function properly, ensuring that no frames are being
      received while the lport is being torn down.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reviewed-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      5e70c4c4
  7. 20 3月, 2012 2 次提交
  8. 17 3月, 2012 1 次提交
  9. 19 2月, 2012 6 次提交
  10. 16 1月, 2012 2 次提交
  11. 11 1月, 2012 1 次提交
  12. 15 12月, 2011 1 次提交
  13. 14 12月, 2011 1 次提交
  14. 31 10月, 2011 1 次提交
  15. 16 10月, 2011 1 次提交
  16. 03 10月, 2011 3 次提交
  17. 16 9月, 2011 1 次提交
    • J
      net: consolidate and fix ethtool_ops->get_settings calling · 4bc71cb9
      Jiri Pirko 提交于
      This patch does several things:
      - introduces __ethtool_get_settings which is called from ethtool code and
        from drivers as well. Put ASSERT_RTNL there.
      - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
      - changes calling in drivers so rtnl locking is respected. In
        iboe_get_rate was previously ->get_settings() called unlocked. This
        fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
        problem. Also fixed by calling __dev_get_by_index() instead of
        dev_get_by_index() and holding rtnl_lock for both calls.
      - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
        so bnx2fc_if_create() and fcoe_if_create() are called locked as they
        are from other places.
      - use __ethtool_get_settings() in bonding code
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
      v2->v3:
      	-removed dev_ethtool_get_settings()
      	-added ASSERT_RTNL into __ethtool_get_settings()
      	-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
      	 around it and __ethtool_get_settings() call
      v1->v2:
              add missing export_symbol
      Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> [except FCoE bits]
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bc71cb9
  18. 15 9月, 2011 1 次提交
  19. 29 8月, 2011 1 次提交
    • R
      [SCSI] fcoe: Fix deadlock between fip's recv_work and rtnl · 848e7d5b
      Robert Love 提交于
      The rtnl cannot be held durrng the fcoe_interface_put.
      If it is the last reference on the fcoe_interface the
      fcoe_ctlr_destroy will be called as a part of the
      cleanup, ultimately calling cancel_work_sync(&fip->recv_work);
      
      If we are processing a flogi response we will be in
      the recv_work context and we will lock the rtnl to
      add a new unicast MAC address. This is how the deadlock
      can occur.
      
      The fix is simply to move the rtnl_lock/unlock into
      fcoe_interface_cleanup so that it can be unlocked before
      fcoe_interface_put is called.
      
      Here is the lockdep report:
      
      Jul 21 11:26:35 bubba [  223.870702]
      ul 21 11:26:35 bubba [  223.870704] =======================================================
      Jul 21 11:26:35 bubba [  223.871255] [ INFO: possible circular locking dependency detected ]
      Jul 21 11:26:35 bubba [  223.871530] 3.0.0-rc7+ #1
      Jul 21 11:26:35 bubba [  223.871797] -------------------------------------------------------
      Jul 21 11:26:35 bubba [  223.872072] lockdeptest.sh/3464 is trying to acquire lock:
      Jul 21 11:26:35 bubba [  223.872345]  ((&fip->recv_work)
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff810531f1>] wait_on_work+0x0/0xbd
      Jul 21 11:26:35 bubba [  223.873022]
      Jul 21 11:26:35 bubba [  223.873023] but task is already holding lock:
      Jul 21 11:26:35 bubba [  223.873555]  (rtnl_mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff813e8233>] rtnl_lock+0x12/0x14
      Jul 21 11:26:35 bubba [  223.874229]
      Jul 21 11:26:35 bubba [  223.874230] which lock already depends on the new lock.
      Jul 21 11:26:35 bubba [  223.874231]
      Jul 21 11:26:35 bubba [  223.875032]
      Jul 21 11:26:35 bubba [  223.875033] the existing dependency chain (in reverse order) is:
      Jul 21 11:26:35 bubba [  223.875573]
      Jul 21 11:26:35 bubba [  223.875573] -> #1
      Jul 21 11:26:35 bubba (rtnl_mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba :
      Jul 21 11:26:35 bubba [  223.876301]
      Jul 21 11:26:35 bubba [<ffffffff8106c14a>] lock_acquire+0xd2/0xf7
      Jul 21 11:26:35 bubba [  223.876645]
      Jul 21 11:26:35 bubba [<ffffffff8151d975>] __mutex_lock_common+0x47/0x30d
      Jul 21 11:26:35 bubba [  223.876991]
      Jul 21 11:26:35 bubba [<ffffffff8151dd36>] mutex_lock_nested+0x3b/0x40
      Jul 21 11:26:35 bubba [  223.877334]
      Jul 21 11:26:35 bubba [<ffffffff813e8233>] rtnl_lock+0x12/0x14
      Jul 21 11:26:35 bubba [  223.877675]
      Jul 21 11:26:35 bubba [<ffffffffa003d5a0>] fcoe_update_src_mac+0x2b/0x80 [fcoe]
      Jul 21 11:26:35 bubba [  223.878022]
      Jul 21 11:26:35 bubba [<ffffffffa003d698>] fcoe_flogi_resp+0x5e/0x79 [fcoe]
      Jul 21 11:26:35 bubba [  223.878366]
      Jul 21 11:26:35 bubba [<ffffffffa001566f>] fc_exch_recv+0x7f5/0x9da [libfc]
      Jul 21 11:26:35 bubba [  223.878713]
      Jul 21 11:26:35 bubba [<ffffffffa00327d8>] fcoe_ctlr_recv_work+0x71f/0x10dc [libfcoe]
      Jul 21 11:26:35 bubba [  223.879258]
      Jul 21 11:26:35 bubba [<ffffffff81053761>] process_one_work+0x1d7/0x347
      Jul 21 11:26:35 bubba [  223.879601]
      Jul 21 11:26:35 bubba [<ffffffff81054ade>] worker_thread+0xf8/0x17c
      Jul 21 11:26:35 bubba [  223.879944]
      Jul 21 11:26:35 bubba [<ffffffff81058184>] kthread+0x7d/0x85
      Jul 21 11:26:35 bubba [  223.880287]
      Jul 21 11:26:35 bubba [<ffffffff81526414>] kernel_thread_helper+0x4/0x10
      Jul 21 11:26:35 bubba [  223.880634]
      Jul 21 11:26:35 bubba [  223.880635] -> #0
      Jul 21 11:26:35 bubba ((&fip->recv_work)
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba :
      Jul 21 11:26:35 bubba [  223.881357]
      Jul 21 11:26:35 bubba [<ffffffff8106b93e>] __lock_acquire+0xb1d/0xe2c
      Jul 21 11:26:35 bubba [  223.881695]
      Jul 21 11:26:35 bubba [<ffffffff8106c14a>] lock_acquire+0xd2/0xf7
      Jul 21 11:26:35 bubba [  223.882033]
      Jul 21 11:26:35 bubba [<ffffffff81053241>] wait_on_work+0x50/0xbd
      Jul 21 11:26:35 bubba [  223.882378]
      Jul 21 11:26:35 bubba [<ffffffff81053b32>] __cancel_work_timer+0xb6/0xf4
      Jul 21 11:26:35 bubba [  223.882718]
      Jul 21 11:26:35 bubba [<ffffffff81053b8a>] cancel_work_sync+0xb/0xd
      Jul 21 11:26:35 bubba [  223.883057]
      Jul 21 11:26:35 bubba [<ffffffffa00317e6>] fcoe_ctlr_destroy+0x1d/0x67 [libfcoe]
      Jul 21 11:26:35 bubba [  223.883399]
      Jul 21 11:26:35 bubba [<ffffffffa003e51e>] fcoe_interface_release+0x21/0x45 [fcoe]
      Jul 21 11:26:35 bubba [  223.883940]
      Jul 21 11:26:35 bubba [<ffffffff811fbbe6>] kref_put+0x43/0x4d
      Jul 21 11:26:35 bubba [  223.884280]
      Jul 21 11:26:35 bubba [<ffffffffa003ebba>] fcoe_interface_put+0x17/0x19 [fcoe]
      Jul 21 11:26:35 bubba [  223.884624]
      Jul 21 11:26:35 bubba [<ffffffffa003f2a6>] fcoe_interface_cleanup+0x188/0x193 [fcoe]
      Jul 21 11:26:35 bubba [  223.885163]
      Jul 21 11:26:35 bubba [<ffffffffa003f303>] fcoe_destroy+0x52/0x72 [fcoe]
      Jul 21 11:26:35 bubba [  223.885502]
      Jul 21 11:26:35 bubba [<ffffffffa00340a4>] fcoe_transport_destroy+0xab/0x110 [libfcoe]
      Jul 21 11:26:35 bubba [  223.886045]
      Jul 21 11:26:35 bubba [<ffffffff81056153>] param_attr_store+0x43/0x62
      Jul 21 11:26:35 bubba [  223.886385]
      Jul 21 11:26:35 bubba [<ffffffff8105602d>] module_attr_store+0x21/0x25
      Jul 21 11:26:35 bubba [  223.886728]
      Jul 21 11:26:35 bubba [<ffffffff8114c23d>] sysfs_write_file+0x103/0x13f
      Jul 21 11:26:35 bubba [  223.887068]
      Jul 21 11:26:35 bubba [<ffffffff810f3e7b>] vfs_write+0xa7/0xfa
      Jul 21 11:26:35 bubba [  223.887406]
      Jul 21 11:26:35 bubba [<ffffffff810f4073>] sys_write+0x45/0x69
      Jul 21 11:26:35 bubba [  223.887742]
      Jul 21 11:26:35 bubba [<ffffffff815252bb>] system_call_fastpath+0x16/0x1b
      Jul 21 11:26:35 bubba [  223.888083]
      Jul 21 11:26:35 bubba [  223.888084] other info that might help us debug this:
      Jul 21 11:26:35 bubba [  223.888085]
      Jul 21 11:26:35 bubba [  223.888879]  Possible unsafe locking scenario:
      Jul 21 11:26:35 bubba [  223.888881]
      Jul 21 11:26:35 bubba [  223.889411]        CPU0                    CPU1
      Jul 21 11:26:35 bubba [  223.889683]        ----                    ----
      Jul 21 11:26:35 bubba [  223.889955]   lock(
      Jul 21 11:26:35 bubba rtnl_mutex
      Jul 21 11:26:35 bubba );
      Jul 21 11:26:35 bubba [  223.890349]                                lock(
      Jul 21 11:26:35 bubba (&fip->recv_work)
      Jul 21 11:26:35 bubba );
      Jul 21 11:26:35 bubba [  223.890751]                                lock(
      Jul 21 11:26:35 bubba rtnl_mutex
      Jul 21 11:26:35 bubba );
      Jul 21 11:26:35 bubba [  223.891154]   lock(
      Jul 21 11:26:35 bubba (&fip->recv_work)
      Jul 21 11:26:35 bubba );
      Jul 21 11:26:35 bubba [  223.891549]
      Jul 21 11:26:35 bubba [  223.891550]  *** DEADLOCK ***
      Jul 21 11:26:35 bubba [  223.891551]
      Jul 21 11:26:35 bubba [  223.892347] 6 locks held by lockdeptest.sh/3464:
      Jul 21 11:26:35 bubba [  223.892621]  #0:
      Jul 21 11:26:35 bubba (&buffer->mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff8114c171>] sysfs_write_file+0x37/0x13f
      Jul 21 11:26:35 bubba [  223.893359]  #1:
      Jul 21 11:26:35 bubba (s_active
      Jul 21 11:26:35 bubba ){++++.+}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff8114c21c>] sysfs_write_file+0xe2/0x13f
      Jul 21 11:26:35 bubba [  223.894094]  #2:
      Jul 21 11:26:35 bubba (param_lock
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff81056146>] param_attr_store+0x36/0x62
      Jul 21 11:26:35 bubba [  223.894835]  #3:
      Jul 21 11:26:35 bubba (ft_mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffffa0034017>] fcoe_transport_destroy+0x1e/0x110 [libfcoe]
      Jul 21 11:26:35 bubba [  223.895574]  #4:
      Jul 21 11:26:35 bubba (fcoe_config_mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffffa003f2c9>] fcoe_destroy+0x18/0x72 [fcoe]
      Jul 21 11:26:35 bubba [  223.896314]  #5:
      Jul 21 11:26:35 bubba (rtnl_mutex
      Jul 21 11:26:35 bubba ){+.+.+.}
      Jul 21 11:26:35 bubba , at:
      Jul 21 11:26:35 bubba [<ffffffff813e8233>] rtnl_lock+0x12/0x14
      Jul 21 11:26:35 bubba [  223.897047]
      Jul 21 11:26:35 bubba [  223.897048] stack backtrace:
      Jul 21 11:26:35 bubba [  223.897578] Pid: 3464, comm: lockdeptest.sh Not tainted 3.0.0-rc7+ #1
      Jul 21 11:26:35 bubba [  223.897853] Call Trace:
      Jul 21 11:26:35 bubba [  223.898128]  [<ffffffff81068e16>] print_circular_bug+0x1f8/0x209
      Jul 21 11:26:35 bubba [  223.898416]  [<ffffffff8106b93e>] __lock_acquire+0xb1d/0xe2c
      Jul 21 11:26:35 bubba [  223.898699]  [<ffffffff810531f1>] ? wait_on_cpu_work+0xe6/0xe6
      Jul 21 11:26:35 bubba [  223.898982]  [<ffffffff8106c14a>] lock_acquire+0xd2/0xf7
      Jul 21 11:26:35 bubba [  223.899263]  [<ffffffff810531f1>] ? wait_on_cpu_work+0xe6/0xe6
      Jul 21 11:26:35 bubba [  223.899547]  [<ffffffff8104a097>] ? mod_timer+0x8f/0x98
      Jul 21 11:26:35 bubba [  223.899827]  [<ffffffff81053241>] wait_on_work+0x50/0xbd
      Jul 21 11:26:35 bubba [  223.900108]  [<ffffffff810531f1>] ? wait_on_cpu_work+0xe6/0xe6
      Jul 21 11:26:35 bubba [  223.900390]  [<ffffffff81053b32>] __cancel_work_timer+0xb6/0xf4
      Jul 21 11:26:35 bubba [  223.900671]  [<ffffffff81053b8a>] cancel_work_sync+0xb/0xd
      Jul 21 11:26:35 bubba [  223.900953]  [<ffffffffa00317e6>] fcoe_ctlr_destroy+0x1d/0x67 [libfcoe]
      Jul 21 11:26:35 bubba [  223.901237]  [<ffffffffa003e51e>] fcoe_interface_release+0x21/0x45 [fcoe]
      Jul 21 11:26:35 bubba [  223.901522]  [<ffffffffa003e4fd>] ? fcoe_enable+0x6b/0x6b [fcoe]
      Jul 21 11:26:35 bubba [  223.901803]  [<ffffffff811fbbe6>] kref_put+0x43/0x4d
      Jul 21 11:26:35 bubba [  223.902083]  [<ffffffffa003ebba>] fcoe_interface_put+0x17/0x19 [fcoe]
      Jul 21 11:26:35 bubba [  223.902367]  [<ffffffffa003f2a6>] fcoe_interface_cleanup+0x188/0x193 [fcoe]
      Jul 21 11:26:35 bubba [  223.902653]  [<ffffffff8151dd36>] ? mutex_lock_nested+0x3b/0x40
      Jul 21 11:26:35 bubba [  223.902939]  [<ffffffffa003f303>] fcoe_destroy+0x52/0x72 [fcoe]
      Jul 21 11:26:35 bubba [  223.903223]  [<ffffffffa00340a4>] fcoe_transport_destroy+0xab/0x110 [libfcoe]
      Jul 21 11:26:35 bubba [  223.903508]  [<ffffffff81056153>] param_attr_store+0x43/0x62
      Jul 21 11:26:35 bubba [  223.903792]  [<ffffffff8105602d>] module_attr_store+0x21/0x25
      Jul 21 11:26:35 bubba [  223.904075]  [<ffffffff8114c23d>] sysfs_write_file+0x103/0x13f
      Jul 21 11:26:35 bubba [  223.904357]  [<ffffffff810f3e7b>] vfs_write+0xa7/0xfa
      Jul 21 11:26:35 bubba [  223.904642]  [<ffffffff810f51d6>] ? fget_light+0x35/0x96
      Jul 21 11:26:35 bubba [  223.904923]  [<ffffffff810f4073>] sys_write+0x45/0x69
      Jul 21 11:26:35 bubba [  223.905204]  [<ffffffff815252bb>] system_call_fastpath+0x16/0x1b
      Jul 21 11:26:36 bubba [  223.964438] ixgbe 0000:05:00.0: eth3: detected SFP+: 5
      Jul 21 11:26:37 bubba [  225.196702] ixgbe 0000:05:00.0: eth3: NIC Link is Up 10 Gbps, Flow Control: None
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Reviewed-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      848e7d5b
  20. 27 8月, 2011 2 次提交