<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/core, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-03-23T19:50:07Z</updated>
<entry>
<title>IB/cm: Bump reference count on cm_id before invoking callback</title>
<updated>2011-03-23T19:50:07Z</updated>
<author>
<name>Sean Hefty</name>
</author>
<published>2011-02-23T16:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35e6f483095855c0efcf9da7c82f138f3ea04e15'/>
<id>urn:sha1:35e6f483095855c0efcf9da7c82f138f3ea04e15</id>
<content type='text'>
commit 29963437a48475036353b95ab142bf199adb909e upstream.

When processing a SIDR REQ, the ib_cm allocates a new cm_id.  The
refcount of the cm_id is initialized to 1.  However, cm_process_work
will decrement the refcount after invoking all callbacks.  The result
is that the cm_id will end up with refcount set to 0 by the end of the
sidr req handler.

If a user tries to destroy the cm_id, the destruction will proceed,
under the incorrect assumption that no other threads are referencing
the cm_id.  This can lead to a crash when the cm callback thread tries
to access the cm_id.

This problem was noticed as part of a larger investigation with kernel
crashes in the rdma_cm when running on a real time OS.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Acked-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>RDMA/cma: Fix crash in request handlers</title>
<updated>2011-03-23T19:50:06Z</updated>
<author>
<name>Sean Hefty</name>
</author>
<published>2011-02-23T16:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ca3a935992de6b8da9725377b8667bab22de38e'/>
<id>urn:sha1:1ca3a935992de6b8da9725377b8667bab22de38e</id>
<content type='text'>
commit 25ae21a10112875763c18b385624df713a288a05 upstream.

Doug Ledford and Red Hat reported a crash when running the rdma_cm on
a real-time OS.  The crash has the following call trace:

    cm_process_work
       cma_req_handler
          cma_disable_callback
          rdma_create_id
             kzalloc
             init_completion
          cma_get_net_info
          cma_save_net_info
          cma_any_addr
             cma_zero_addr
          rdma_translate_ip
             rdma_copy_addr
          cma_acquire_dev
             rdma_addr_get_sgid
             ib_find_cached_gid
             cma_attach_to_dev
          ucma_event_handler
             kzalloc
             ib_copy_ah_attr_to_user
          cma_comp

[ preempted ]

    cma_write
        copy_from_user
        ucma_destroy_id
           copy_from_user
           _ucma_find_context
           ucma_put_ctx
           ucma_free_ctx
              rdma_destroy_id
                 cma_exch
                 cma_cancel_operation
                 rdma_node_get_transport

        rt_mutex_slowunlock
        bad_area_nosemaphore
        oops_enter

They were able to reproduce the crash multiple times with the
following details:

    Crash seems to always happen on the:
            mutex_unlock(&amp;conn_id-&gt;handler_mutex);
    as conn_id looks to have been freed during this code path.

An examination of the code shows that a race exists in the request
handlers.  When a new connection request is received, the rdma_cm
allocates a new connection identifier.  This identifier has a single
reference count on it.  If a user calls rdma_destroy_id() from another
thread after receiving a callback, rdma_destroy_id will proceed to
destroy the id and free the associated memory.  However, the request
handlers may still be in the process of running.  When control returns
to the request handlers, they can attempt to access the newly created
identifiers.

Fix this by holding a reference on the newly created rdma_cm_id until
the request handler is through accessing it.

Signed-off-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Acked-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>IB/uverbs: Handle large number of entries in poll CQ</title>
<updated>2010-12-08T23:23:49Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2010-10-13T09:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7182afea8d1afd432a17c18162cc3fd441d0da93'/>
<id>urn:sha1:7182afea8d1afd432a17c18162cc3fd441d0da93</id>
<content type='text'>
In ib_uverbs_poll_cq() code there is a potential integer overflow if
userspace passes in a large cmd.ne.  The calls to kmalloc() would
allocate smaller buffers than intended, leading to memory corruption.
There iss also an information leak if resp wasn't all used.
Unprivileged userspace may call this function, although only if an
RDMA device that uses this function is present.

Fix this by copying CQ entries one at a time, which avoids the
allocation entirely, and also by moving this copying into a function
that makes sure to initialize all memory copied to userspace.

Special thanks to Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
for his help and advice.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;

[ Monkey around with things a bit to avoid bad code generation by gcc
  when designated initializers are used.  - Roland ]

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
<entry>
<title>IB: Fix information leak in marshalling code</title>
<updated>2010-12-02T00:33:18Z</updated>
<author>
<name>Vasiliy Kulikov</name>
</author>
<published>2010-11-14T09:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91a4d157d0c18bd18fd95f90b67cb10d11701cca'/>
<id>urn:sha1:91a4d157d0c18bd18fd95f90b67cb10d11701cca</id>
<content type='text'>
ib_ucm_init_qp_attr() and ucma_init_qp_attr() pass struct ib_uverbs_qp_attr
with reserved, qp_state, {ah_attr,alt_ah_attr}{reserved,-&gt;grh.reserved}
fields uninitialized to copy_to_user().  This leads to leaking of
contents of kernel stack memory to userspace.

Signed-off-by: Vasiliy Kulikov &lt;segoon@openwall.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
<entry>
<title>IB/pack: Remove some unused code added by the IBoE patches</title>
<updated>2010-12-02T00:30:18Z</updated>
<author>
<name>Or Gerlitz</name>
</author>
<published>2010-11-29T07:20:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f55864a4f435e47ad413be7016f38877b096bb5b'/>
<id>urn:sha1:f55864a4f435e47ad413be7016f38877b096bb5b</id>
<content type='text'>
Remove unused functions added by commit ff7f5aab354d ("IB/pack: IBoE UD
packet packing support").

Signed-off-by: Or Gerlitz &lt;ogerlitz@voltaire.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'amso1100', 'cma', 'cxgb3', 'cxgb4', 'ehca', 'iboe', 'ipoib', 'misc', 'mlx4', 'nes', 'qib' and 'srp' into for-next</title>
<updated>2010-10-26T23:09:11Z</updated>
<author>
<name>Roland Dreier</name>
</author>
<published>2010-10-26T23:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=116e9535fe5e00bafab7a637f306b110cf95cff5'/>
<id>urn:sha1:116e9535fe5e00bafab7a637f306b110cf95cff5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>IB/core: Add link layer type information to sysfs</title>
<updated>2010-10-25T17:20:39Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2010-10-22T12:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ad330a002ffbc422f32a77398666832f0df8a3d'/>
<id>urn:sha1:8ad330a002ffbc422f32a77398666832f0df8a3d</id>
<content type='text'>
Since an IB transport port may use either IB or Ethernet as its link layer,
add the file /sys/class/infiniband/&lt;device&gt;/ports/&lt;port_num&gt;/link_layer to
show the link layer for the port.

Signed-off-by: Eli Cohen &lt;eli@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Add VLAN support for IBoE</title>
<updated>2010-10-25T17:20:39Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2010-08-26T14:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af7bd463761c6abd8ca8d831f9cc0ac19f3b7d4b'/>
<id>urn:sha1:af7bd463761c6abd8ca8d831f9cc0ac19f3b7d4b</id>
<content type='text'>
Add 802.1q VLAN support to IBoE. The VLAN tag is encoded within the
GID derived from a link local address in the following way:

    GID[11] GID[12] contain the VLAN ID when the GID contains a VLAN.

The 3 bits user priority field of the packets are identical to the 3
bits of the SL.

In case of rdma_cm apps, the TOS field is used to generate the SL
field by doing a shift right of 5 bits effectively taking to 3 MS bits
of the TOS field.

Signed-off-by: Eli Cohen &lt;eli@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
<entry>
<title>IB/uverbs: Return link layer type to userspace for query port operation</title>
<updated>2010-10-25T17:20:39Z</updated>
<author>
<name>Eli Cohen</name>
</author>
<published>2010-10-18T21:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2420b60b1dc4ed98cb1788e928bc57ff2efa1a8d'/>
<id>urn:sha1:2420b60b1dc4ed98cb1788e928bc57ff2efa1a8d</id>
<content type='text'>
Signed-off-by: Eli Cohen &lt;eli@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;

</content>
</entry>
<entry>
<title>RDMA/ucma: Allow tuning the max listen backlog</title>
<updated>2010-10-23T20:41:40Z</updated>
<author>
<name>Steve Wise</name>
</author>
<published>2010-08-13T20:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97cb7e40c69618ba03030b467faf60dc3ee982ee'/>
<id>urn:sha1:97cb7e40c69618ba03030b467faf60dc3ee982ee</id>
<content type='text'>
For iWARP connections, the connect request is carried in a TCP payload
on an already established TCP connection.  So if the ucma's backlog is
full, the connection request is transmitted and acked at the TCP level
by the time the connect request gets dropped in the ucma.  The end
result is the connection gets rejected by the iWARP provider.
Further, a 32 node 256NP OpenMPI job will generate &gt; 128 connect
requests on some ranks.

This patch increases the default max backlog to 1024, and adds a
sysctl variable so the backlog can be adjusted at run time.

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
</feed>
