<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/infiniband/core, branch v3.5</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>RDMA/cma: QP type check on received REQs should be AND not OR</title>
<updated>2012-06-20T03:04:04+00:00</updated>
<author>
<name>Sean Hefty</name>
<email>sean.hefty@intel.com</email>
</author>
<published>2012-06-14T20:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4dd81e895655c59bd19d7a8f03a5de1310f4aeb6'/>
<id>4dd81e895655c59bd19d7a8f03a5de1310f4aeb6</id>
<content type='text'>
Change || check to the intended &amp;&amp; when checking the QP type in a
received connection request against the listening endpoint.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change || check to the intended &amp;&amp; when checking the QP type in a
received connection request against the listening endpoint.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband</title>
<updated>2012-05-22T00:54:55+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-05-22T00:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c23ddf7857bdb2e8001b0a058603497c765a580d'/>
<id>c23ddf7857bdb2e8001b0a058603497c765a580d</id>
<content type='text'>
Pull InfiniBand/RDMA changes from Roland Dreier:
 - Add ocrdma hardware driver for Emulex IB-over-Ethernet adapters
 - Add generic and mlx4 support for "raw" QPs: allow suitably privileged
   applications to send and receive arbitrary packets directly to/from
   the hardware
 - Add "doorbell drop" handling to the cxgb4 driver
 - A fairly large batch of qib hardware driver changes
 - A few fixes for lockdep-detected issues
 - A few other miscellaneous fixes and cleanups

Fix up trivial conflict in drivers/net/ethernet/emulex/benet/be.h.

* tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (53 commits)
  RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree
  IB/mlx4: Fix mlx4_ib_add() error flow
  IB/core: Fix IB_SA_COMP_MASK macro
  IB/iser: Fix error flow in iser ep connection establishment
  IB/mlx4: Increase the number of vectors (EQs) available for ULPs
  RDMA/cxgb4: Add query_qp support
  RDMA/cxgb4: Remove kfifo usage
  RDMA/cxgb4: Use vmalloc() for debugfs QP dump
  RDMA/cxgb4: DB Drop Recovery for RDMA and LLD queues
  RDMA/cxgb4: Disable interrupts in c4iw_ev_dispatch()
  RDMA/cxgb4: Add DB Overflow Avoidance
  RDMA/cxgb4: Add debugfs RDMA memory stats
  cxgb4: DB Drop Recovery for RDMA and LLD queues
  cxgb4: Common platform specific changes for DB Drop Recovery
  cxgb4: Detect DB FULL events and notify RDMA ULD
  RDMA/cxgb4: Drop peer_abort when no endpoint found
  RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
  mlx4_core: Change bitmap allocator to work in round-robin fashion
  RDMA/nes: Don't call event handler if pointer is NULL
  RDMA/nes: Fix for the ORD value of the connecting peer
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull InfiniBand/RDMA changes from Roland Dreier:
 - Add ocrdma hardware driver for Emulex IB-over-Ethernet adapters
 - Add generic and mlx4 support for "raw" QPs: allow suitably privileged
   applications to send and receive arbitrary packets directly to/from
   the hardware
 - Add "doorbell drop" handling to the cxgb4 driver
 - A fairly large batch of qib hardware driver changes
 - A few fixes for lockdep-detected issues
 - A few other miscellaneous fixes and cleanups

Fix up trivial conflict in drivers/net/ethernet/emulex/benet/be.h.

* tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (53 commits)
  RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree
  IB/mlx4: Fix mlx4_ib_add() error flow
  IB/core: Fix IB_SA_COMP_MASK macro
  IB/iser: Fix error flow in iser ep connection establishment
  IB/mlx4: Increase the number of vectors (EQs) available for ULPs
  RDMA/cxgb4: Add query_qp support
  RDMA/cxgb4: Remove kfifo usage
  RDMA/cxgb4: Use vmalloc() for debugfs QP dump
  RDMA/cxgb4: DB Drop Recovery for RDMA and LLD queues
  RDMA/cxgb4: Disable interrupts in c4iw_ev_dispatch()
  RDMA/cxgb4: Add DB Overflow Avoidance
  RDMA/cxgb4: Add debugfs RDMA memory stats
  cxgb4: DB Drop Recovery for RDMA and LLD queues
  cxgb4: Common platform specific changes for DB Drop Recovery
  cxgb4: Detect DB FULL events and notify RDMA ULD
  RDMA/cxgb4: Drop peer_abort when no endpoint found
  RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
  mlx4_core: Change bitmap allocator to work in round-robin fashion
  RDMA/nes: Don't call event handler if pointer is NULL
  RDMA/nes: Fix for the ORD value of the connecting peer
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'core', 'cxgb4', 'ipath', 'iser', 'lockdep', 'mlx4', 'nes', 'ocrdma', 'qib' and 'raw-qp' into for-linus</title>
<updated>2012-05-21T16:00:47+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-05-21T16:00:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cc169165c82e14ea43e313f937a0a475ca97e588'/>
<id>cc169165c82e14ea43e313f937a0a475ca97e588</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/core: Fix mismatch between locked and pinned pages</title>
<updated>2012-05-11T18:38:22+00:00</updated>
<author>
<name>Yishai Hadas</name>
<email>yishaih@mellanox.com</email>
</author>
<published>2012-05-10T20:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c4870eb874ac16dccef40e1bc7a002c7e9156adc'/>
<id>c4870eb874ac16dccef40e1bc7a002c7e9156adc</id>
<content type='text'>
Commit bc3e53f682d9 ("mm: distinguish between mlocked and pinned
pages") introduced a separate counter for pinned pages and used it in
the IB stack.  However, in ib_umem_get() the pinned counter is
incremented, but ib_umem_release() wrongly decrements the locked
counter.  Fix this.

Signed-off-by: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit bc3e53f682d9 ("mm: distinguish between mlocked and pinned
pages") introduced a separate counter for pinned pages and used it in
the IB stack.  However, in ib_umem_get() the pinned counter is
incremented, but ib_umem_release() wrongly decrements the locked
counter.  Fix this.

Signed-off-by: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@linux.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/core: Add raw packet QP type</title>
<updated>2012-05-08T18:18:09+00:00</updated>
<author>
<name>Or Gerlitz</name>
<email>ogerlitz@mellanox.com</email>
</author>
<published>2012-03-01T10:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c938a616aadb621b8e26b0ac09ac13d053c7ed1c'/>
<id>c938a616aadb621b8e26b0ac09ac13d053c7ed1c</id>
<content type='text'>
IB_QPT_RAW_PACKET allows applications to build a complete packet,
including L2 headers, when sending; on the receive side, the HW will
not strip any headers.

This QP type is designed for userspace direct access to Ethernet; for
example by applications that do TCP/IP themselves.  Only processes
with the NET_RAW capability are allowed to create raw packet QPs (the
name "raw packet QP" is supposed to suggest an analogy to AF_PACKET /
SOL_RAW sockets).

Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IB_QPT_RAW_PACKET allows applications to build a complete packet,
including L2 headers, when sending; on the receive side, the HW will
not strip any headers.

This QP type is designed for userspace direct access to Ethernet; for
example by applications that do TCP/IP themselves.  Only processes
with the NET_RAW capability are allowed to create raw packet QPs (the
name "raw packet QP" is supposed to suggest an analogy to AF_PACKET /
SOL_RAW sockets).

Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/cma: Fix lockdep false positive recursive locking</title>
<updated>2012-05-08T18:17:34+00:00</updated>
<author>
<name>Sean Hefty</name>
<email>sean.hefty@intel.com</email>
</author>
<published>2012-04-25T17:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b6cec8aa4a799d1e146095f0ba52454710f5ede4'/>
<id>b6cec8aa4a799d1e146095f0ba52454710f5ede4</id>
<content type='text'>
The following lockdep problem was reported by Or Gerlitz &lt;ogerlitz@mellanox.com&gt;:

    [ INFO: possible recursive locking detected ]
    3.3.0-32035-g1b2649e-dirty #4 Not tainted
    ---------------------------------------------
    kworker/5:1/418 is trying to acquire lock:
     (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0138a41&gt;] rdma_destroy_i    d+0x33/0x1f0 [rdma_cm]

    but task is already holding lock:
     (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0135130&gt;] cma_disable_ca    llback+0x24/0x45 [rdma_cm]

    other info that might help us debug this:
     Possible unsafe locking scenario:

           CPU0
           ----
      lock(&amp;id_priv-&gt;handler_mutex);
      lock(&amp;id_priv-&gt;handler_mutex);

     *** DEADLOCK ***

     May be due to missing lock nesting notation

    3 locks held by kworker/5:1/418:
     #0:  (ib_cm){.+.+.+}, at: [&lt;ffffffff81042ac1&gt;] process_one_work+0x210/0x4a    6
     #1:  ((&amp;(&amp;work-&gt;work)-&gt;work)){+.+.+.}, at: [&lt;ffffffff81042ac1&gt;] process_on    e_work+0x210/0x4a6
     #2:  (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0135130&gt;] cma_disab    le_callback+0x24/0x45 [rdma_cm]

    stack backtrace:
    Pid: 418, comm: kworker/5:1 Not tainted 3.3.0-32035-g1b2649e-dirty #4
    Call Trace:
     [&lt;ffffffff8102b0fb&gt;] ? console_unlock+0x1f4/0x204
     [&lt;ffffffff81068771&gt;] __lock_acquire+0x16b5/0x174e
     [&lt;ffffffff8106461f&gt;] ? save_trace+0x3f/0xb3
     [&lt;ffffffff810688fa&gt;] lock_acquire+0xf0/0x116
     [&lt;ffffffffa0138a41&gt;] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffff81364351&gt;] mutex_lock_nested+0x64/0x2ce
     [&lt;ffffffffa0138a41&gt;] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffff81065a78&gt;] ? trace_hardirqs_on_caller+0x11e/0x155
     [&lt;ffffffff81065abc&gt;] ? trace_hardirqs_on+0xd/0xf
     [&lt;ffffffffa0138a41&gt;] rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffffa0139c02&gt;] cma_req_handler+0x418/0x644 [rdma_cm]
     [&lt;ffffffffa012ee88&gt;] cm_process_work+0x32/0x119 [ib_cm]
     [&lt;ffffffffa0130299&gt;] cm_req_handler+0x928/0x982 [ib_cm]
     [&lt;ffffffffa01302f3&gt;] ? cm_req_handler+0x982/0x982 [ib_cm]
     [&lt;ffffffffa0130326&gt;] cm_work_handler+0x33/0xfe5 [ib_cm]
     [&lt;ffffffff81065a78&gt;] ? trace_hardirqs_on_caller+0x11e/0x155
     [&lt;ffffffffa01302f3&gt;] ? cm_req_handler+0x982/0x982 [ib_cm]
     [&lt;ffffffff81042b6e&gt;] process_one_work+0x2bd/0x4a6
     [&lt;ffffffff81042ac1&gt;] ? process_one_work+0x210/0x4a6
     [&lt;ffffffff813669f3&gt;] ? _raw_spin_unlock_irq+0x2b/0x40
     [&lt;ffffffff8104316e&gt;] worker_thread+0x1d6/0x350
     [&lt;ffffffff81042f98&gt;] ? rescuer_thread+0x241/0x241
     [&lt;ffffffff81046a32&gt;] kthread+0x84/0x8c
     [&lt;ffffffff8136e854&gt;] kernel_thread_helper+0x4/0x10
     [&lt;ffffffff81366d59&gt;] ? retint_restore_args+0xe/0xe
     [&lt;ffffffff810469ae&gt;] ? __init_kthread_worker+0x56/0x56
     [&lt;ffffffff8136e850&gt;] ? gs_change+0xb/0xb

The actual locking is fine, since we're dealing with different locks,
but from the same lock class.  cma_disable_callback() acquires the
listening id mutex, whereas rdma_destroy_id() acquires the mutex for
the new connection id.  To fix this, delay the call to
rdma_destroy_id() until we've released the listening id mutex.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following lockdep problem was reported by Or Gerlitz &lt;ogerlitz@mellanox.com&gt;:

    [ INFO: possible recursive locking detected ]
    3.3.0-32035-g1b2649e-dirty #4 Not tainted
    ---------------------------------------------
    kworker/5:1/418 is trying to acquire lock:
     (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0138a41&gt;] rdma_destroy_i    d+0x33/0x1f0 [rdma_cm]

    but task is already holding lock:
     (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0135130&gt;] cma_disable_ca    llback+0x24/0x45 [rdma_cm]

    other info that might help us debug this:
     Possible unsafe locking scenario:

           CPU0
           ----
      lock(&amp;id_priv-&gt;handler_mutex);
      lock(&amp;id_priv-&gt;handler_mutex);

     *** DEADLOCK ***

     May be due to missing lock nesting notation

    3 locks held by kworker/5:1/418:
     #0:  (ib_cm){.+.+.+}, at: [&lt;ffffffff81042ac1&gt;] process_one_work+0x210/0x4a    6
     #1:  ((&amp;(&amp;work-&gt;work)-&gt;work)){+.+.+.}, at: [&lt;ffffffff81042ac1&gt;] process_on    e_work+0x210/0x4a6
     #2:  (&amp;id_priv-&gt;handler_mutex){+.+.+.}, at: [&lt;ffffffffa0135130&gt;] cma_disab    le_callback+0x24/0x45 [rdma_cm]

    stack backtrace:
    Pid: 418, comm: kworker/5:1 Not tainted 3.3.0-32035-g1b2649e-dirty #4
    Call Trace:
     [&lt;ffffffff8102b0fb&gt;] ? console_unlock+0x1f4/0x204
     [&lt;ffffffff81068771&gt;] __lock_acquire+0x16b5/0x174e
     [&lt;ffffffff8106461f&gt;] ? save_trace+0x3f/0xb3
     [&lt;ffffffff810688fa&gt;] lock_acquire+0xf0/0x116
     [&lt;ffffffffa0138a41&gt;] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffff81364351&gt;] mutex_lock_nested+0x64/0x2ce
     [&lt;ffffffffa0138a41&gt;] ? rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffff81065a78&gt;] ? trace_hardirqs_on_caller+0x11e/0x155
     [&lt;ffffffff81065abc&gt;] ? trace_hardirqs_on+0xd/0xf
     [&lt;ffffffffa0138a41&gt;] rdma_destroy_id+0x33/0x1f0 [rdma_cm]
     [&lt;ffffffffa0139c02&gt;] cma_req_handler+0x418/0x644 [rdma_cm]
     [&lt;ffffffffa012ee88&gt;] cm_process_work+0x32/0x119 [ib_cm]
     [&lt;ffffffffa0130299&gt;] cm_req_handler+0x928/0x982 [ib_cm]
     [&lt;ffffffffa01302f3&gt;] ? cm_req_handler+0x982/0x982 [ib_cm]
     [&lt;ffffffffa0130326&gt;] cm_work_handler+0x33/0xfe5 [ib_cm]
     [&lt;ffffffff81065a78&gt;] ? trace_hardirqs_on_caller+0x11e/0x155
     [&lt;ffffffffa01302f3&gt;] ? cm_req_handler+0x982/0x982 [ib_cm]
     [&lt;ffffffff81042b6e&gt;] process_one_work+0x2bd/0x4a6
     [&lt;ffffffff81042ac1&gt;] ? process_one_work+0x210/0x4a6
     [&lt;ffffffff813669f3&gt;] ? _raw_spin_unlock_irq+0x2b/0x40
     [&lt;ffffffff8104316e&gt;] worker_thread+0x1d6/0x350
     [&lt;ffffffff81042f98&gt;] ? rescuer_thread+0x241/0x241
     [&lt;ffffffff81046a32&gt;] kthread+0x84/0x8c
     [&lt;ffffffff8136e854&gt;] kernel_thread_helper+0x4/0x10
     [&lt;ffffffff81366d59&gt;] ? retint_restore_args+0xe/0xe
     [&lt;ffffffff810469ae&gt;] ? __init_kthread_worker+0x56/0x56
     [&lt;ffffffff8136e850&gt;] ? gs_change+0xb/0xb

The actual locking is fine, since we're dealing with different locks,
but from the same lock class.  cma_disable_callback() acquires the
listening id mutex, whereas rdma_destroy_id() acquires the mutex for
the new connection id.  To fix this, delay the call to
rdma_destroy_id() until we've released the listening id mutex.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Lock SRQ / CQ / PD objects in a consistent order</title>
<updated>2012-05-08T18:17:34+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-04-30T19:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5909ce545db415ae8c26e849df862e8cc1acf571'/>
<id>5909ce545db415ae8c26e849df862e8cc1acf571</id>
<content type='text'>
Since XRC support was added, the uverbs code has locked SRQ, CQ and PD
objects needed during QP and SRQ creation in different orders
depending on the the code path.  This leads to the (at least
theoretical) possibility of deadlock, and triggers the lockdep splat
below.

Fix this by making sure we always lock the SRQ first, then CQs and
finally the PD.

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    3.4.0-rc5+ #34 Not tainted
    -------------------------------------------------------
    ibv_srq_pingpon/2484 is trying to acquire lock:
     (SRQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    but task is already holding lock:
     (CQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #2 (CQ-uobj){+++++.}:
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00b16c3&gt;] ib_uverbs_create_qp+0x180/0x684 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #1 (PD-uobj){++++++}:
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00af8ad&gt;] __uverbs_create_xsrq+0x96/0x386 [ib_uverbs]
           [&lt;ffffffffa00b31b9&gt;] ib_uverbs_detach_mcast+0x1cd/0x1e6 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (SRQ-uobj){+++++.}:
           [&lt;ffffffff81070898&gt;] __lock_acquire+0xa29/0xd06
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00b1728&gt;] ib_uverbs_create_qp+0x1e5/0x684 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    other info that might help us debug this:

    Chain exists of:
      SRQ-uobj --&gt; PD-uobj --&gt; CQ-uobj

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(CQ-uobj);
                                   lock(PD-uobj);
                                   lock(CQ-uobj);
      lock(SRQ-uobj);

     *** DEADLOCK ***

    3 locks held by ibv_srq_pingpon/2484:
     #0:  (QP-uobj){+.+...}, at: [&lt;ffffffffa00b162c&gt;] ib_uverbs_create_qp+0xe9/0x684 [ib_uverbs]
     #1:  (PD-uobj){++++++}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
     #2:  (CQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    stack backtrace:
    Pid: 2484, comm: ibv_srq_pingpon Not tainted 3.4.0-rc5+ #34
    Call Trace:
     [&lt;ffffffff8137eff0&gt;] print_circular_bug+0x1f8/0x209
     [&lt;ffffffff81070898&gt;] __lock_acquire+0xa29/0xd06
     [&lt;ffffffffa00af37c&gt;] ? __idr_get_uobj+0x20/0x5e [ib_uverbs]
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffff81070eee&gt;] ? lock_release+0x166/0x189
     [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
     [&lt;ffffffffa00b1728&gt;] ib_uverbs_create_qp+0x1e5/0x684 [ib_uverbs]
     [&lt;ffffffff81070fec&gt;] ? lock_acquire+0xdb/0xfe
     [&lt;ffffffff81070c09&gt;] ? lock_release_non_nested+0x94/0x213
     [&lt;ffffffff810d470f&gt;] ? might_fault+0x40/0x90
     [&lt;ffffffff810d470f&gt;] ? might_fault+0x40/0x90
     [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
     [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
     [&lt;ffffffff810ff736&gt;] ? fget_light+0x3b/0x99
     [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
     [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since XRC support was added, the uverbs code has locked SRQ, CQ and PD
objects needed during QP and SRQ creation in different orders
depending on the the code path.  This leads to the (at least
theoretical) possibility of deadlock, and triggers the lockdep splat
below.

Fix this by making sure we always lock the SRQ first, then CQs and
finally the PD.

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    3.4.0-rc5+ #34 Not tainted
    -------------------------------------------------------
    ibv_srq_pingpon/2484 is trying to acquire lock:
     (SRQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    but task is already holding lock:
     (CQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #2 (CQ-uobj){+++++.}:
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00b16c3&gt;] ib_uverbs_create_qp+0x180/0x684 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #1 (PD-uobj){++++++}:
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00af8ad&gt;] __uverbs_create_xsrq+0x96/0x386 [ib_uverbs]
           [&lt;ffffffffa00b31b9&gt;] ib_uverbs_detach_mcast+0x1cd/0x1e6 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (SRQ-uobj){+++++.}:
           [&lt;ffffffff81070898&gt;] __lock_acquire+0xa29/0xd06
           [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
           [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
           [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
           [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
           [&lt;ffffffffa00b1728&gt;] ib_uverbs_create_qp+0x1e5/0x684 [ib_uverbs]
           [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
           [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
           [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
           [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

    other info that might help us debug this:

    Chain exists of:
      SRQ-uobj --&gt; PD-uobj --&gt; CQ-uobj

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(CQ-uobj);
                                   lock(PD-uobj);
                                   lock(CQ-uobj);
      lock(SRQ-uobj);

     *** DEADLOCK ***

    3 locks held by ibv_srq_pingpon/2484:
     #0:  (QP-uobj){+.+...}, at: [&lt;ffffffffa00b162c&gt;] ib_uverbs_create_qp+0xe9/0x684 [ib_uverbs]
     #1:  (PD-uobj){++++++}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
     #2:  (CQ-uobj){+++++.}, at: [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]

    stack backtrace:
    Pid: 2484, comm: ibv_srq_pingpon Not tainted 3.4.0-rc5+ #34
    Call Trace:
     [&lt;ffffffff8137eff0&gt;] print_circular_bug+0x1f8/0x209
     [&lt;ffffffff81070898&gt;] __lock_acquire+0xa29/0xd06
     [&lt;ffffffffa00af37c&gt;] ? __idr_get_uobj+0x20/0x5e [ib_uverbs]
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffff81070fd0&gt;] lock_acquire+0xbf/0xfe
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffff81070eee&gt;] ? lock_release+0x166/0x189
     [&lt;ffffffff81384f28&gt;] down_read+0x34/0x43
     [&lt;ffffffffa00af51b&gt;] ? idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffffa00af51b&gt;] idr_read_uobj+0x2f/0x4d [ib_uverbs]
     [&lt;ffffffffa00af542&gt;] idr_read_obj+0x9/0x19 [ib_uverbs]
     [&lt;ffffffffa00b1728&gt;] ib_uverbs_create_qp+0x1e5/0x684 [ib_uverbs]
     [&lt;ffffffff81070fec&gt;] ? lock_acquire+0xdb/0xfe
     [&lt;ffffffff81070c09&gt;] ? lock_release_non_nested+0x94/0x213
     [&lt;ffffffff810d470f&gt;] ? might_fault+0x40/0x90
     [&lt;ffffffff810d470f&gt;] ? might_fault+0x40/0x90
     [&lt;ffffffffa00ae3dd&gt;] ib_uverbs_write+0xb7/0xc2 [ib_uverbs]
     [&lt;ffffffff810fe47f&gt;] vfs_write+0xa7/0xee
     [&lt;ffffffff810ff736&gt;] ? fget_light+0x3b/0x99
     [&lt;ffffffff810fe65f&gt;] sys_write+0x45/0x69
     [&lt;ffffffff8138cdf9&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Make lockdep output more readable</title>
<updated>2012-05-08T18:17:34+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-04-30T17:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3bea57a5fc1762a72fb9ac88b9aa9e48dcbea8bc'/>
<id>3bea57a5fc1762a72fb9ac88b9aa9e48dcbea8bc</id>
<content type='text'>
Add names for our lockdep classes, so instead of having to decipher
lockdep output with mysterious names:

    Chain exists of:
      key#14 --&gt; key#11 --&gt; key#13

lockdep will give us something nicer:

    Chain exists of:
      SRQ-uobj --&gt; PD-uobj --&gt; CQ-uobj

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add names for our lockdep classes, so instead of having to decipher
lockdep output with mysterious names:

    Chain exists of:
      key#14 --&gt; key#11 --&gt; key#13

lockdep will give us something nicer:

    Chain exists of:
      SRQ-uobj --&gt; PD-uobj --&gt; CQ-uobj

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/core: Use qp-&gt;usecnt to track multicast attach/detach</title>
<updated>2012-05-08T18:16:54+00:00</updated>
<author>
<name>Or Gerlitz</name>
<email>ogerlitz@mellanox.com</email>
</author>
<published>2012-04-29T14:04:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1'/>
<id>c3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1</id>
<content type='text'>
Just as we don't allow PDs, CQs, etc. to be destroyed if there are QPs
that are attached to them, don't let a QP be destroyed if there are
multicast group(s) attached to it.  Use the existing usecnt field of
struct ib_qp which was added by commit 0e0ec7e ("RDMA/core: Export
ib_open_qp() to share XRC TGT QPs") to track this.

Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just as we don't allow PDs, CQs, etc. to be destroyed if there are QPs
that are attached to them, don't let a QP be destroyed if there are
multicast group(s) attached to it.  Use the existing usecnt field of
struct ib_qp which was added by commit 0e0ec7e ("RDMA/core: Export
ib_open_qp() to share XRC TGT QPs") to track this.

Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-05-08T03:35:40+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-05-08T03:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0d6c4a2e4641bbc556dd74d3aa158c413a972492'/>
<id>0d6c4a2e4641bbc556dd74d3aa158c413a972492</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/intel/e1000e/param.c
	drivers/net/wireless/iwlwifi/iwl-agn-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans.h

Resolved the iwlwifi conflict with mainline using 3-way diff posted
by John Linville and Stephen Rothwell.  In 'net' we added a bug
fix to make iwlwifi report a more accurate skb-&gt;truesize but this
conflicted with RX path changes that happened meanwhile in net-next.

In e1000e a conflict arose in the validation code for settings of
adapter-&gt;itr.  'net-next' had more sophisticated logic so that
logic was used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/ethernet/intel/e1000e/param.c
	drivers/net/wireless/iwlwifi/iwl-agn-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans.h

Resolved the iwlwifi conflict with mainline using 3-way diff posted
by John Linville and Stephen Rothwell.  In 'net' we added a bug
fix to make iwlwifi report a more accurate skb-&gt;truesize but this
conflicted with RX path changes that happened meanwhile in net-next.

In e1000e a conflict arose in the validation code for settings of
adapter-&gt;itr.  'net-next' had more sophisticated logic so that
logic was used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
