1. 24 5月, 2018 1 次提交
    • A
      IB/isert: Fix for lib/dma_debug check_sync warning · 763b6965
      Alex Estrin 提交于
      The following error message occurs on a target host in a debug build
      during session login:
      
      [ 3524.411874] WARNING: CPU: 5 PID: 12063 at lib/dma-debug.c:1207 check_sync+0x4ec/0x5b0
      [ 3524.421057] infiniband hfi1_0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x0000000000000000] [size=76 bytes]
      ......snip .....
      
      [ 3524.535846] CPU: 5 PID: 12063 Comm: iscsi_np Kdump: loaded Not tainted 3.10.0-862.el7.x86_64.debug #1
      [ 3524.546764] Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.2.6 06/08/2015
      [ 3524.555740] Call Trace:
      [ 3524.559102]  [<ffffffffa5fe915b>] dump_stack+0x19/0x1b
      [ 3524.565477]  [<ffffffffa58a2f58>] __warn+0xd8/0x100
      [ 3524.571557]  [<ffffffffa58a2fdf>] warn_slowpath_fmt+0x5f/0x80
      [ 3524.578610]  [<ffffffffa5bf5b8c>] check_sync+0x4ec/0x5b0
      [ 3524.585177]  [<ffffffffa58efc3f>] ? set_cpus_allowed_ptr+0x5f/0x1c0
      [ 3524.592812]  [<ffffffffa5bf5cd0>] debug_dma_sync_single_for_cpu+0x80/0x90
      [ 3524.601029]  [<ffffffffa586add3>] ? x2apic_send_IPI_mask+0x13/0x20
      [ 3524.608574]  [<ffffffffa585ee1b>] ? native_smp_send_reschedule+0x5b/0x80
      [ 3524.616699]  [<ffffffffa58e9b76>] ? resched_curr+0xf6/0x140
      [ 3524.623567]  [<ffffffffc0879af0>] isert_create_send_desc.isra.26+0xe0/0x110 [ib_isert]
      [ 3524.633060]  [<ffffffffc087af95>] isert_put_login_tx+0x55/0x8b0 [ib_isert]
      [ 3524.641383]  [<ffffffffa58ef114>] ? try_to_wake_up+0x1a4/0x430
      [ 3524.648561]  [<ffffffffc098cfed>] iscsi_target_do_tx_login_io+0xdd/0x230 [iscsi_target_mod]
      [ 3524.658557]  [<ffffffffc098d827>] iscsi_target_do_login+0x1a7/0x600 [iscsi_target_mod]
      [ 3524.668084]  [<ffffffffa59f9bc9>] ? kstrdup+0x49/0x60
      [ 3524.674420]  [<ffffffffc098e976>] iscsi_target_start_negotiation+0x56/0xc0 [iscsi_target_mod]
      [ 3524.684656]  [<ffffffffc098c2ee>] __iscsi_target_login_thread+0x90e/0x1070 [iscsi_target_mod]
      [ 3524.694901]  [<ffffffffc098ca50>] ? __iscsi_target_login_thread+0x1070/0x1070 [iscsi_target_mod]
      [ 3524.705446]  [<ffffffffc098ca50>] ? __iscsi_target_login_thread+0x1070/0x1070 [iscsi_target_mod]
      [ 3524.715976]  [<ffffffffc098ca78>] iscsi_target_login_thread+0x28/0x60 [iscsi_target_mod]
      [ 3524.725739]  [<ffffffffa58d60ff>] kthread+0xef/0x100
      [ 3524.732007]  [<ffffffffa58d6010>] ? insert_kthread_work+0x80/0x80
      [ 3524.739540]  [<ffffffffa5fff1b7>] ret_from_fork_nospec_begin+0x21/0x21
      [ 3524.747558]  [<ffffffffa58d6010>] ? insert_kthread_work+0x80/0x80
      [ 3524.755088] ---[ end trace 23f8bf9238bd1ed8 ]---
      [ 3595.510822] iSCSI/iqn.1994-05.com.redhat:537fa56299: Unsupported SCSI Opcode 0xa3, sending CHECK_CONDITION.
      
      The code calls dma_sync on login_tx_desc->dma_addr prior to initializing it
      with dma-mapped address.
      login_tx_desc is a part of iser_conn structure and is used only once
      during login negotiation, so the issue is fixed by eliminating
      dma_sync call for this buffer using a special case routine.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Reviewed-by: NDon Dutile <ddutile@redhat.com>
      Signed-off-by: NAlex Estrin <alex.estrin@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      763b6965
  2. 23 5月, 2018 2 次提交
    • E
      RDMA/ipoib: drop skb on path record lookup failure · 15517080
      Evgenii Smirnov 提交于
      In unicast_arp_send function there is an inconsistency in error handling
      of path_rec_start call. If path_rec_start is called because of an absent
      ah field, skb will be dropped. But if it is called on a creation of a
      new path, or if the path is invalid, skb will be added to the tail of
      path queue.  In case of a new path it will be dropped on path_free, but
      in case of invalid path it can stay in the queue forever.
      
      This patch unifies the behavior, dropping skb in all cases
      of path_rec_start failure.
      Signed-off-by: NEvgenii Smirnov <evgenii.smirnov@profitbricks.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      15517080
    • D
      RDMA/ipoib: Update paths on CLIENT_REREG/SM_CHANGE events · fa9391db
      Doug Ledford 提交于
      We do a light flush on CLIENT_REREG and SM_CHANGE events.  This goes
      through and marks paths invalid. But we weren't always checking for this
      validity when we needed to, and so we could keep using a path marked
      invalid.  What's more, once we establish a path with a valid ah, we put
      a pointer to the ah in the neigh struct directly, so even if we mark the
      path as invalid, as long as the neigh has a direct pointer to the ah, it
      keeps using the old, outdated ah.
      
      To fix this we do several things.
      
      1) Put the valid flag in the ah instead of the path struct, so when we
      put the ah pointer directly in the neigh struct, we can easily check the
      validity of the ah on send events.
      2) Check the neigh->ah and neigh->ah->valid elements in the needed
      places, and if we have an ah, but it's invalid, then invoke a refresh of
      the ah.
      3) Fix the various places that check for path, but didn't check for
      path->valid (now path->ah && path->ah->valid).
      Reported-by: NEvgenii Smirnov <evgenii.smirnov@profitbricks.com>
      Fixes: ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM change events")
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      fa9391db
  3. 17 5月, 2018 1 次提交
    • S
      IB/ipoib: replace local_irq_disable() with proper locking · 112f5c81
      Sebastian Andrzej Siewior 提交于
      In ipoib_mcast_restart_task() the netif_addr_lock() is invoked prior
      local_irq_save(). netif_addr_lock() should not be invoked in interrupt disabled
      section, only in BH disabled sections.
      The priv->lock is always acquired with disabled interrupts. The only place
      where netif_addr_lock() and priv->lock nest ist ipoib_mcast_restart_task().
      
      Drop the local_irq_save() and acquire priv->lock with spin_lock_irq() inside
      the netif_addr locked section. It's safe to do so because the caller is either
      a worker function or __ipoib_ib_dev_flush() which are both calling with
      interrupts enabled (and since BH is enabled here, too so
      netif_addr_lock_bh() needs to be used).
      
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      112f5c81
  4. 09 5月, 2018 1 次提交
  5. 28 4月, 2018 1 次提交
  6. 27 4月, 2018 2 次提交
  7. 04 4月, 2018 1 次提交
  8. 20 3月, 2018 1 次提交
    • B
      IB/srp: Disallow duplicate RDMA/CM connections · b470c154
      Bart Van Assche 提交于
      According to the SRP standard the INITIATOR and TARGET PORT IDENTIFIER
      fields from the login request specify the I_T nexus. Whether or not an
      SRP target closes an existing connection for an I_T nexus when a login
      request is received depends on the value of the MULTICHANNEL field in
      the login request. The SRP initiator derives the value of the
      INITIATOR and TARGET PORT IDENTIFIER fields from the .id_ext,
      .ioc_guid, .initiator_ext .sgid members of the srp_target_port
      structure. This means that the .rdma_cm.dst check must be removed from
      srp_conn_unique(). This patch avoids that for target ports that have
      multiple addresses, e.g. an IPv4 and an IPv6 address, and if a
      connection is established to both target port addresses, that the
      initiator logs in alternatingly every 10 seconds to the other target
      port address. An SRP target must namely terminate all but one
      connections for a given I_T nexus if the MULTICHANNEL field has not
      been set in the login request.
      
      Fixes: 19f31343 ("IB/srp: Add RDMA/CM support")
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      b470c154
  9. 16 3月, 2018 1 次提交
  10. 15 3月, 2018 2 次提交
  11. 08 3月, 2018 1 次提交
    • B
      IB/srpt: Add RDMA/CM support · 63cf1a90
      Bart Van Assche 提交于
      Add a parameter for configuring the port on which the ib_srpt driver
      listens for incoming RDMA/CM connections, namely
      /sys/kernel/config/target/srpt/discovery_auth/rdma_cm_port. The default
      value for this parameter is 0 which means "do not listen for incoming
      RDMA/CM connections". Add RDMA/CM support to all code that handles
      connection state changes. Modify srpt_init_nodeacl() such that ACLs can
      be configured for IPv4 and IPv6 addresses.
      
      Note: incoming connection requests are only accepted for ports that
      have been enabled. See also the "if (!sport->enabled)" code in the
      connection request handler. See also the following configfs attribute:
      /sys/kernel/config/target/srpt/$port/$port/enable.
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      63cf1a90
  12. 07 3月, 2018 2 次提交
  13. 01 3月, 2018 3 次提交
  14. 16 2月, 2018 2 次提交
  15. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  16. 02 2月, 2018 1 次提交
  17. 29 1月, 2018 3 次提交
  18. 26 1月, 2018 1 次提交
  19. 25 1月, 2018 1 次提交
    • L
      RDMA/srpt: Fix RCU debug build error · f97f43c9
      Leon Romanovsky 提交于
      Combination of CONFIG_DEBUG_OBJECTS_RCU_HEAD=y and
      CONFIG_INFINIBAND_SRPT=m produces the following build error.
      
      ERROR: "init_rcu_head" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined!
      make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
      make: *** [Makefile:1216: modules] Error 2
      
      The reason to it that init_rcu_head() is not exported and not supposed
      to be used in modules. It is needed for dynamic initialization of
      statically allocated rcu_head structures.
      
      Fixes: 795bc112 ("IB/srpt: Make it safe to use RCU for srpt_device.rch_list")
      Fixes: a1125314 ("IB/srpt: Rework multi-channel support")
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      f97f43c9
  20. 24 1月, 2018 2 次提交
  21. 19 1月, 2018 10 次提交