<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-02-10T21:11:16Z</updated>
<entry>
<title>IPoIB: Fix use-after-free of multicast object</title>
<updated>2014-02-10T21:11:16Z</updated>
<author>
<name>Patrick McHardy</name>
</author>
<published>2012-08-30T07:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90162eab0fd28b731d67b0b83db3cf434583bcdf'/>
<id>urn:sha1:90162eab0fd28b731d67b0b83db3cf434583bcdf</id>
<content type='text'>
commit bea1e22df494a729978e7f2c54f7bda328f74bc3 upstream.

Fix a crash in ipoib_mcast_join_task().  (with help from Or Gerlitz)

Commit c8c2afe360b7 ("IPoIB: Use rtnl lock/unlock when changing device
flags") added a call to rtnl_lock() in ipoib_mcast_join_task(), which
is run from the ipoib_workqueue, and hence the workqueue can't be
flushed from the context of ipoib_stop().

In the current code, ipoib_stop() (which doesn't flush the workqueue)
calls ipoib_mcast_dev_flush(), which goes and deletes all the
multicast entries.  This takes place without any synchronization with
a possible running instance of ipoib_mcast_join_task() for the same
ipoib device, leading to a crash due to NULL pointer dereference.

Fix this by making sure that the workqueue is flushed before
ipoib_mcast_dev_flush() is called.  To make that possible, we move the
RTNL-lock wrapped code to ipoib_mcast_join_finish().

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>IB/cm: Bump reference count on cm_id before invoking callback</title>
<updated>2011-06-26T16:47:03Z</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=359266a659def27dc40ade54837df7cd96d3d87f'/>
<id>urn:sha1:359266a659def27dc40ade54837df7cd96d3d87f</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: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>RDMA/cma: Fix crash in request handlers</title>
<updated>2011-06-26T16:47:03Z</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=54bfa35b510f8be1678cbf866a30bdef2d3c200e'/>
<id>urn:sha1:54bfa35b510f8be1678cbf866a30bdef2d3c200e</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: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>IB/uverbs: Handle large number of entries in poll CQ</title>
<updated>2011-04-17T20:16:09Z</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=430ed48fcb365a7cc37da414c284930f217a609b'/>
<id>urn:sha1:430ed48fcb365a7cc37da414c284930f217a609b</id>
<content type='text'>
commit 7182afea8d1afd432a17c18162cc3fd441d0da93 upstream.

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.

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;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>RDMA/cxgb3: Turn off RX coalescing for iWARP connections</title>
<updated>2011-01-06T23:08:07Z</updated>
<author>
<name>Steve Wise</name>
</author>
<published>2010-09-19T00:38:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=330dc1be8569f7eb671779928a876002bf69cade'/>
<id>urn:sha1:330dc1be8569f7eb671779928a876002bf69cade</id>
<content type='text'>
commit bec658ff31453a5726b1c188674d587a5d40c482 upstream.

The HW by default has RX coalescing on.  For iWARP connections, this
causes a 100ms delay in connection establishement due to the ingress
MPA Start message being stalled in HW.  So explicitly turn RX
coalescing off when setting up iWARP connections.

This was causing very bad performance for NP64 gather operations using
Open MPI, due to the way it sets up connections on larger jobs.

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>IPoIB: Fix world-writable child interface control sysfs attributes</title>
<updated>2010-08-02T17:29:54Z</updated>
<author>
<name>Or Gerlitz</name>
</author>
<published>2010-06-06T04:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17d2c1ac34544a906cb74a8803e642788f214a55'/>
<id>urn:sha1:17d2c1ac34544a906cb74a8803e642788f214a55</id>
<content type='text'>
commit 7a52b34b07122ff5f45258d47f260f8a525518f0 upstream.

Sumeet Lahorani &lt;sumeet.lahorani@oracle.com&gt; reported that the IPoIB
child entries are world-writable; however we don't want ordinary users
to be able to create and destroy child interfaces, so fix them to be
writable only by root.

Signed-off-by: Or Gerlitz &lt;ogerlitz@voltaire.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband</title>
<updated>2010-04-09T18:53:06Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-04-09T18:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0eddb519b9127c73d53db4bf3ec1d45b13f844d1'/>
<id>urn:sha1:0eddb519b9127c73d53db4bf3ec1d45b13f844d1</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Check correct variable for allocation failure
  RDMA/nes: Correct cap.max_inline_data assignment in nes_query_qp()
  RDMA/cm: Set num_paths when manually assigning path records
  IB/cm: Fix device_create() return value check
</content>
</entry>
<entry>
<title>Merge branches 'cma', 'misc', 'mlx4' and 'nes' into for-linus</title>
<updated>2010-04-09T16:14:21Z</updated>
<author>
<name>Roland Dreier</name>
</author>
<published>2010-04-09T16:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5091b353883ba3358998797efb284f82344531f3'/>
<id>urn:sha1:5091b353883ba3358998797efb284f82344531f3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>IB/mlx4: Check correct variable for allocation failure</title>
<updated>2010-04-07T21:18:14Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2010-04-07T09:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bd912998ec9cdbb0268138b6b51f28adf7865f4'/>
<id>urn:sha1:7bd912998ec9cdbb0268138b6b51f28adf7865f4</id>
<content type='text'>
The intent here is to check the "mfrpl-&gt;mapped_page_list" allocation.
We checked "mfrpl-&gt;ibfrpl.page_list" earlier.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
<entry>
<title>RDMA/nes: Correct cap.max_inline_data assignment in nes_query_qp()</title>
<updated>2010-04-07T21:16:08Z</updated>
<author>
<name>Chien Tung</name>
</author>
<published>2010-03-25T13:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eadde3a1a5291492098e8b0b6435d075fc22486b'/>
<id>urn:sha1:eadde3a1a5291492098e8b0b6435d075fc22486b</id>
<content type='text'>
cap.max_inline_data is incorrectly set in init_attr instead of attr.
Set it in attr so subsequent init_attr.cap assignment will get the
correct value.

Signed-off-by: Chien Tung &lt;chien.tin.tung@intel.com&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
</entry>
</feed>
