<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/infiniband/core/uverbs_cmd.c, branch v3.10.15</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>IB/core: convert to idr_alloc()</title>
<updated>2013-02-28T03:10:16+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3b069c5d857a5f1b8cb6bb74c70d9446089f5077'/>
<id>3b069c5d857a5f1b8cb6bb74c70d9446089f5077</id>
<content type='text'>
Convert to the much saner new idr interface.

v2: Mike triggered WARN_ON() in idr_preload() because send_mad(),
    which may be used from non-process context, was calling
    idr_preload() unconditionally.  Preload iff @gfp_mask has
    __GFP_WAIT.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Reported-by: "Marciniszyn, Mike" &lt;mike.marciniszyn@intel.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert to the much saner new idr interface.

v2: Mike triggered WARN_ON() in idr_preload() because send_mad(),
    which may be used from non-process context, was calling
    idr_preload() unconditionally.  Preload iff @gfp_mask has
    __GFP_WAIT.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Reported-by: "Marciniszyn, Mike" &lt;mike.marciniszyn@intel.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Hal Rosenstock &lt;hal.rosenstock@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2013-02-27T04:16:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-27T04:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d895cb1af15c04c522a25c79cc429076987c089b'/>
<id>d895cb1af15c04c522a25c79cc429076987c089b</id>
<content type='text'>
Pull vfs pile (part one) from Al Viro:
 "Assorted stuff - cleaning namei.c up a bit, fixing -&gt;d_name/-&gt;d_parent
  locking violations, etc.

  The most visible changes here are death of FS_REVAL_DOT (replaced with
  "has -&gt;d_weak_revalidate()") and a new helper getting from struct file
  to inode.  Some bits of preparation to xattr method interface changes.

  Misc patches by various people sent this cycle *and* ocfs2 fixes from
  several cycles ago that should've been upstream right then.

  PS: the next vfs pile will be xattr stuff."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
  saner proc_get_inode() calling conventions
  proc: avoid extra pde_put() in proc_fill_super()
  fs: change return values from -EACCES to -EPERM
  fs/exec.c: make bprm_mm_init() static
  ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
  ocfs2: fix possible use-after-free with AIO
  ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
  get_empty_filp()/alloc_file() leave both -&gt;f_pos and -&gt;f_version zero
  target: writev() on single-element vector is pointless
  export kernel_write(), convert open-coded instances
  fs: encode_fh: return FILEID_INVALID if invalid fid_type
  kill f_vfsmnt
  vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
  nfsd: handle vfs_getattr errors in acl protocol
  switch vfs_getattr() to struct path
  default SET_PERSONALITY() in linux/elf.h
  ceph: prepopulate inodes only when request is aborted
  d_hash_and_lookup(): export, switch open-coded instances
  9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
  9p: split dropping the acls from v9fs_set_create_acl()
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull vfs pile (part one) from Al Viro:
 "Assorted stuff - cleaning namei.c up a bit, fixing -&gt;d_name/-&gt;d_parent
  locking violations, etc.

  The most visible changes here are death of FS_REVAL_DOT (replaced with
  "has -&gt;d_weak_revalidate()") and a new helper getting from struct file
  to inode.  Some bits of preparation to xattr method interface changes.

  Misc patches by various people sent this cycle *and* ocfs2 fixes from
  several cycles ago that should've been upstream right then.

  PS: the next vfs pile will be xattr stuff."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
  saner proc_get_inode() calling conventions
  proc: avoid extra pde_put() in proc_fill_super()
  fs: change return values from -EACCES to -EPERM
  fs/exec.c: make bprm_mm_init() static
  ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
  ocfs2: fix possible use-after-free with AIO
  ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
  get_empty_filp()/alloc_file() leave both -&gt;f_pos and -&gt;f_version zero
  target: writev() on single-element vector is pointless
  export kernel_write(), convert open-coded instances
  fs: encode_fh: return FILEID_INVALID if invalid fid_type
  kill f_vfsmnt
  vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
  nfsd: handle vfs_getattr errors in acl protocol
  switch vfs_getattr() to struct path
  default SET_PERSONALITY() in linux/elf.h
  ceph: prepopulate inodes only when request is aborted
  d_hash_and_lookup(): export, switch open-coded instances
  9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
  9p: split dropping the acls from v9fs_set_create_acl()
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>new helper: file_inode(file)</title>
<updated>2013-02-23T04:31:31+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-23T22:07:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=496ad9aa8ef448058e36ca7a787c61f2e63f0f54'/>
<id>496ad9aa8ef448058e36ca7a787c61f2e63f0f54</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Implement memory windows support in uverbs</title>
<updated>2013-02-21T19:59:09+00:00</updated>
<author>
<name>Shani Michaeli</name>
<email>shanim@mellanox.com</email>
</author>
<published>2013-02-06T16:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6b52a12bc3fc39053b5bac4d4927ec8d974f8f60'/>
<id>6b52a12bc3fc39053b5bac4d4927ec8d974f8f60</id>
<content type='text'>
The existing user/kernel uverbs API has IB_USER_VERBS_CMD_ALLOC/DEALLOC_MW.
Implement these calls, along with destroying user memory windows during
process cleanup.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Shani Michaeli &lt;shanim@mellanox.com&gt;
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>
The existing user/kernel uverbs API has IB_USER_VERBS_CMD_ALLOC/DEALLOC_MW.
Implement these calls, along with destroying user memory windows during
process cleanup.

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Shani Michaeli &lt;shanim@mellanox.com&gt;
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>switch simple cases of fget_light to fdget</title>
<updated>2012-09-27T02:20:08+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-08-28T16:52:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2903ff019b346ab8d36ebbf54853c3aaf6590608'/>
<id>2903ff019b346ab8d36ebbf54853c3aaf6590608</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>switch infinibarf users of fget() to fget_light()</title>
<updated>2012-09-27T01:10:10+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-08-27T16:47:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88b428d6e191affae79b5c1f4764dfdebab9fae6'/>
<id>88b428d6e191affae79b5c1f4764dfdebab9fae6</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</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.toradex.cn/cgit/linux-toradex.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: 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.toradex.cn/cgit/linux-toradex.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>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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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>
</feed>
