1. 28 4月, 2018 1 次提交
  2. 02 2月, 2018 1 次提交
  3. 03 1月, 2018 1 次提交
    • E
      IB/ipoib: Fix race condition in neigh creation · 16ba3def
      Erez Shitrit 提交于
      When using enhanced mode for IPoIB, two threads may execute xmit in
      parallel to two different TX queues while the target is the same.
      In this case, both of them will add the same neighbor to the path's
      neigh link list and we might see the following message:
      
        list_add double add: new=ffff88024767a348, prev=ffff88024767a348...
        WARNING: lib/list_debug.c:31__list_add_valid+0x4e/0x70
        ipoib_start_xmit+0x477/0x680 [ib_ipoib]
        dev_hard_start_xmit+0xb9/0x3e0
        sch_direct_xmit+0xf9/0x250
        __qdisc_run+0x176/0x5d0
        __dev_queue_xmit+0x1f5/0xb10
        __dev_queue_xmit+0x55/0xb10
      
      Analysis:
      Two SKB are scheduled to be transmitted from two cores.
      In ipoib_start_xmit, both gets NULL when calling ipoib_neigh_get.
      Two calls to neigh_add_path are made. One thread takes the spin-lock
      and calls ipoib_neigh_alloc which creates the neigh structure,
      then (after the __path_find) the neigh is added to the path's neigh
      link list. When the second thread enters the critical section it also
      calls ipoib_neigh_alloc but in this case it gets the already allocated
      ipoib_neigh structure, which is already linked to the path's neigh
      link list and adds it again to the list. Which beside of triggering
      the list, it creates a loop in the linked list. This loop leads to
      endless loop inside path_rec_completion.
      
      Solution:
      Check list_empty(&neigh->list) before adding to the list.
      Add a similar fix in "ipoib_multicast.c::ipoib_mcast_send"
      
      Fixes: b63b70d8 ('IPoIB: Use a private hash table for path lookup in xmit path')
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Reviewed-by: NAlex Vesker <valex@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      16ba3def
  4. 19 12月, 2017 3 次提交
  5. 14 12月, 2017 1 次提交
  6. 12 12月, 2017 1 次提交
  7. 26 10月, 2017 1 次提交
  8. 10 10月, 2017 1 次提交
    • K
      IB/ipoib: Convert timers to use timer_setup() · 6d290d69
      Kees Cook 提交于
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: Alex Vesker <valex@mellanox.com>
      Cc: Erez Shitrit <erezsh@mellanox.com>
      Cc: Zhu Yanjun <yanjun.zhu@oracle.com>
      Cc: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Yuval Shaia <yuval.shaia@oracle.com>
      Cc: linux-rdma@vger.kernel.org
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      6d290d69
  9. 27 9月, 2017 2 次提交
  10. 25 9月, 2017 1 次提交
  11. 25 8月, 2017 3 次提交
  12. 24 7月, 2017 1 次提交
  13. 23 7月, 2017 5 次提交
  14. 20 7月, 2017 1 次提交
  15. 18 7月, 2017 2 次提交
  16. 06 7月, 2017 1 次提交
  17. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  18. 15 6月, 2017 3 次提交
  19. 02 6月, 2017 1 次提交
  20. 02 5月, 2017 5 次提交
  21. 29 4月, 2017 1 次提交
  22. 21 4月, 2017 3 次提交