<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/infiniband, branch linux-4.6.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs</title>
<updated>2016-07-27T15:42:08+00:00</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-06-08T23:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7c108b7f61c3b325435c571d64f44fd2399496e'/>
<id>c7c108b7f61c3b325435c571d64f44fd2399496e</id>
<content type='text'>
commit 8c5122e45a10a9262f872b53f151a592e870f905 upstream.

When this code was reworked for IBoE support the order of assignments
for the sl_tclass_flowlabel got flipped around resulting in
TClass &amp; FlowLabel being permanently set to 0 in the packet headers.

This breaks IB routers that rely on these headers, but only affects
kernel users - libmlx4 does this properly for user space.

Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE")
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8c5122e45a10a9262f872b53f151a592e870f905 upstream.

When this code was reworked for IBoE support the order of assignments
for the sl_tclass_flowlabel got flipped around resulting in
TClass &amp; FlowLabel being permanently set to 0 in the packet headers.

This breaks IB routers that rely on these headers, but only affects
kernel users - libmlx4 does this properly for user space.

Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE")
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/rdmavt: Correct qp_priv_alloc() return value test</title>
<updated>2016-07-27T15:42:08+00:00</updated>
<author>
<name>Mike Marciniszyn</name>
<email>mike.marciniszyn@intel.com</email>
</author>
<published>2016-06-22T20:29:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=68439a76dd421a4aa0663ab19291a91c3f876840'/>
<id>68439a76dd421a4aa0663ab19291a91c3f876840</id>
<content type='text'>
commit c755f4afa66ad3ed98870bd3254f37c47fb2c800 upstream.

The current drivers return errors from this calldown
wrapped in an ERR_PTR().

The rdmavt code incorrectly tests for NULL.

The code is fixed to use IS_ERR() and change ret according
to the driver return value.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c755f4afa66ad3ed98870bd3254f37c47fb2c800 upstream.

The current drivers return errors from this calldown
wrapped in an ERR_PTR().

The rdmavt code incorrectly tests for NULL.

The code is fixed to use IS_ERR() and change ret according
to the driver return value.

Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/cm: Fix a recently introduced locking bug</title>
<updated>2016-07-27T15:42:08+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-03-25T15:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=03ea1bce809b176d509d6f5036dcbcbfcb17bf6c'/>
<id>03ea1bce809b176d509d6f5036dcbcbfcb17bf6c</id>
<content type='text'>
commit 943f44d94aa26bfdcaafc40d3701e24eeb58edce upstream.

ib_cm_notify() can be called from interrupt context. Hence do not
reenable interrupts unconditionally in cm_establish().

This patch avoids that lockdep reports the following warning:

WARNING: CPU: 0 PID: 23317 at kernel/locking/lockdep.c:2624 trace _hardirqs_on_caller+0x112/0x1b0
DEBUG_LOCKS_WARN_ON(current-&gt;hardirq_context)
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff812bd0e5&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff81056f21&gt;] __warn+0xc1/0xe0
 [&lt;ffffffff81056f8a&gt;] warn_slowpath_fmt+0x4a/0x50
 [&lt;ffffffff810a5932&gt;] trace_hardirqs_on_caller+0x112/0x1b0
 [&lt;ffffffff810a59dd&gt;] trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff815992c7&gt;] _raw_spin_unlock_irq+0x27/0x40
 [&lt;ffffffffa0382e9c&gt;] ib_cm_notify+0x25c/0x290 [ib_cm]
 [&lt;ffffffffa068fbc1&gt;] srpt_qp_event+0xa1/0xf0 [ib_srpt]
 [&lt;ffffffffa04efb97&gt;] mlx4_ib_qp_event+0x67/0xd0 [mlx4_ib]
 [&lt;ffffffffa034ec0a&gt;] mlx4_qp_event+0x5a/0xc0 [mlx4_core]
 [&lt;ffffffffa03365f8&gt;] mlx4_eq_int+0x3d8/0xcf0 [mlx4_core]
 [&lt;ffffffffa0336f9c&gt;] mlx4_msi_x_interrupt+0xc/0x20 [mlx4_core]
 [&lt;ffffffff810b0914&gt;] handle_irq_event_percpu+0x64/0x100
 [&lt;ffffffff810b09e4&gt;] handle_irq_event+0x34/0x60
 [&lt;ffffffff810b3a6a&gt;] handle_edge_irq+0x6a/0x150
 [&lt;ffffffff8101ad05&gt;] handle_irq+0x15/0x20
 [&lt;ffffffff8101a66c&gt;] do_IRQ+0x5c/0x110
 [&lt;ffffffff8159a2c9&gt;] common_interrupt+0x89/0x89
 [&lt;ffffffff81297a17&gt;] blk_run_queue_async+0x37/0x40
 [&lt;ffffffffa0163e53&gt;] rq_completed+0x43/0x70 [dm_mod]
 [&lt;ffffffffa0164896&gt;] dm_softirq_done+0x176/0x280 [dm_mod]
 [&lt;ffffffff812a26c2&gt;] blk_done_softirq+0x52/0x90
 [&lt;ffffffff8105bc1f&gt;] __do_softirq+0x10f/0x230
 [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0
 [&lt;ffffffff8103653e&gt;] smp_trace_call_function_single_interrupt+0x2e/0x30
 [&lt;ffffffff81036549&gt;] smp_call_function_single_interrupt+0x9/0x10
 [&lt;ffffffff8159a959&gt;] call_function_single_interrupt+0x89/0x90
 &lt;EOI&gt;

Fixes: commit be4b499323bf (IB/cm: Do not queue work to a device that's going away)
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Nikolay Borisov &lt;kernel@kyup.com&gt;
Acked-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 943f44d94aa26bfdcaafc40d3701e24eeb58edce upstream.

ib_cm_notify() can be called from interrupt context. Hence do not
reenable interrupts unconditionally in cm_establish().

This patch avoids that lockdep reports the following warning:

WARNING: CPU: 0 PID: 23317 at kernel/locking/lockdep.c:2624 trace _hardirqs_on_caller+0x112/0x1b0
DEBUG_LOCKS_WARN_ON(current-&gt;hardirq_context)
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff812bd0e5&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff81056f21&gt;] __warn+0xc1/0xe0
 [&lt;ffffffff81056f8a&gt;] warn_slowpath_fmt+0x4a/0x50
 [&lt;ffffffff810a5932&gt;] trace_hardirqs_on_caller+0x112/0x1b0
 [&lt;ffffffff810a59dd&gt;] trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff815992c7&gt;] _raw_spin_unlock_irq+0x27/0x40
 [&lt;ffffffffa0382e9c&gt;] ib_cm_notify+0x25c/0x290 [ib_cm]
 [&lt;ffffffffa068fbc1&gt;] srpt_qp_event+0xa1/0xf0 [ib_srpt]
 [&lt;ffffffffa04efb97&gt;] mlx4_ib_qp_event+0x67/0xd0 [mlx4_ib]
 [&lt;ffffffffa034ec0a&gt;] mlx4_qp_event+0x5a/0xc0 [mlx4_core]
 [&lt;ffffffffa03365f8&gt;] mlx4_eq_int+0x3d8/0xcf0 [mlx4_core]
 [&lt;ffffffffa0336f9c&gt;] mlx4_msi_x_interrupt+0xc/0x20 [mlx4_core]
 [&lt;ffffffff810b0914&gt;] handle_irq_event_percpu+0x64/0x100
 [&lt;ffffffff810b09e4&gt;] handle_irq_event+0x34/0x60
 [&lt;ffffffff810b3a6a&gt;] handle_edge_irq+0x6a/0x150
 [&lt;ffffffff8101ad05&gt;] handle_irq+0x15/0x20
 [&lt;ffffffff8101a66c&gt;] do_IRQ+0x5c/0x110
 [&lt;ffffffff8159a2c9&gt;] common_interrupt+0x89/0x89
 [&lt;ffffffff81297a17&gt;] blk_run_queue_async+0x37/0x40
 [&lt;ffffffffa0163e53&gt;] rq_completed+0x43/0x70 [dm_mod]
 [&lt;ffffffffa0164896&gt;] dm_softirq_done+0x176/0x280 [dm_mod]
 [&lt;ffffffff812a26c2&gt;] blk_done_softirq+0x52/0x90
 [&lt;ffffffff8105bc1f&gt;] __do_softirq+0x10f/0x230
 [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0
 [&lt;ffffffff8103653e&gt;] smp_trace_call_function_single_interrupt+0x2e/0x30
 [&lt;ffffffff81036549&gt;] smp_call_function_single_interrupt+0x9/0x10
 [&lt;ffffffff8159a959&gt;] call_function_single_interrupt+0x89/0x90
 &lt;EOI&gt;

Fixes: commit be4b499323bf (IB/cm: Do not queue work to a device that's going away)
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Cc: Sean Hefty &lt;sean.hefty@intel.com&gt;
Cc: Nikolay Borisov &lt;kernel@kyup.com&gt;
Acked-by: Erez Shitrit &lt;erezsh@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/srp: Fix srp_create_target() error handling</title>
<updated>2016-06-01T19:18:04+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-05-12T17:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=80772cfb1c98f38b939a776df6ebcca4e80726a3'/>
<id>80772cfb1c98f38b939a776df6ebcca4e80726a3</id>
<content type='text'>
commit f83b2561a6d4ff12959660ad597580097b744941 upstream.

Avoid that the following kernel oops occurs if memory pool
allocation fails:

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [&lt;ffffffffa048d0a0&gt;] ib_drain_rq+0x0/0x20 [ib_core]
Call Trace:
 [&lt;ffffffffa04af386&gt;] srp_create_target+0xca6/0x13a9 [ib_srp]
 [&lt;ffffffff813cc863&gt;] dev_attr_store+0x13/0x20
 [&lt;ffffffff81214b50&gt;] sysfs_kf_write+0x40/0x50
 [&lt;ffffffff81213f1c&gt;] kernfs_fop_write+0x13c/0x180
 [&lt;ffffffff81197683&gt;] __vfs_write+0x23/0xf0
 [&lt;ffffffff81198744&gt;] vfs_write+0xa4/0x1a0
 [&lt;ffffffff81199a44&gt;] SyS_write+0x44/0xa0
 [&lt;ffffffff8159e3e9&gt;] entry_SYSCALL_64_fastpath+0x1c/0xac

Fixes: 1dc7b1f10dcb ("IB/srp: use the new CQ API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Tested-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f83b2561a6d4ff12959660ad597580097b744941 upstream.

Avoid that the following kernel oops occurs if memory pool
allocation fails:

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [&lt;ffffffffa048d0a0&gt;] ib_drain_rq+0x0/0x20 [ib_core]
Call Trace:
 [&lt;ffffffffa04af386&gt;] srp_create_target+0xca6/0x13a9 [ib_srp]
 [&lt;ffffffff813cc863&gt;] dev_attr_store+0x13/0x20
 [&lt;ffffffff81214b50&gt;] sysfs_kf_write+0x40/0x50
 [&lt;ffffffff81213f1c&gt;] kernfs_fop_write+0x13c/0x180
 [&lt;ffffffff81197683&gt;] __vfs_write+0x23/0xf0
 [&lt;ffffffff81198744&gt;] vfs_write+0xa4/0x1a0
 [&lt;ffffffff81199a44&gt;] SyS_write+0x44/0xa0
 [&lt;ffffffff8159e3e9&gt;] entry_SYSCALL_64_fastpath+0x1c/0xac

Fixes: 1dc7b1f10dcb ("IB/srp: use the new CQ API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Tested-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/srp: Fix a debug kernel crash</title>
<updated>2016-06-01T19:18:04+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-04-12T21:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a1e9e0f4f2176938bb1f0bad7d70f9dba27992de'/>
<id>a1e9e0f4f2176938bb1f0bad7d70f9dba27992de</id>
<content type='text'>
commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 upstream.

Avoid that the following BUG() is triggered against a debug
kernel:

kernel BUG at include/linux/scatterlist.h:92!
RIP: 0010:[&lt;ffffffffa0467199&gt;]  [&lt;ffffffffa0467199&gt;] srp_map_idb+0x199/0x1a0 [ib_srp]
Call Trace:
 [&lt;ffffffffa04685fa&gt;] srp_map_data+0x84a/0x890 [ib_srp]
 [&lt;ffffffffa0469674&gt;] srp_queuecommand+0x1e4/0x610 [ib_srp]
 [&lt;ffffffff813f5a5e&gt;] scsi_dispatch_cmd+0x9e/0x180
 [&lt;ffffffff813f8b07&gt;] scsi_request_fn+0x477/0x610
 [&lt;ffffffff81298ffe&gt;] __blk_run_queue+0x2e/0x40
 [&lt;ffffffff81299070&gt;] blk_delay_work+0x20/0x30
 [&lt;ffffffff81071f07&gt;] process_one_work+0x197/0x480
 [&lt;ffffffff81072239&gt;] worker_thread+0x49/0x490
 [&lt;ffffffff810787ea&gt;] kthread+0xea/0x100
 [&lt;ffffffff8159b632&gt;] ret_from_fork+0x22/0x40

Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 upstream.

Avoid that the following BUG() is triggered against a debug
kernel:

kernel BUG at include/linux/scatterlist.h:92!
RIP: 0010:[&lt;ffffffffa0467199&gt;]  [&lt;ffffffffa0467199&gt;] srp_map_idb+0x199/0x1a0 [ib_srp]
Call Trace:
 [&lt;ffffffffa04685fa&gt;] srp_map_data+0x84a/0x890 [ib_srp]
 [&lt;ffffffffa0469674&gt;] srp_queuecommand+0x1e4/0x610 [ib_srp]
 [&lt;ffffffff813f5a5e&gt;] scsi_dispatch_cmd+0x9e/0x180
 [&lt;ffffffff813f8b07&gt;] scsi_request_fn+0x477/0x610
 [&lt;ffffffff81298ffe&gt;] __blk_run_queue+0x2e/0x40
 [&lt;ffffffff81299070&gt;] blk_delay_work+0x20/0x30
 [&lt;ffffffff81071f07&gt;] process_one_work+0x197/0x480
 [&lt;ffffffff81072239&gt;] worker_thread+0x49/0x490
 [&lt;ffffffff810787ea&gt;] kthread+0xea/0x100
 [&lt;ffffffff8159b632&gt;] ret_from_fork+0x22/0x40

Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma</title>
<updated>2016-05-07T15:10:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-07T15:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b4184cbff393d9ede2d80efd7088126706c1ce08'/>
<id>b4184cbff393d9ede2d80efd7088126706c1ce08</id>
<content type='text'>
Pull rdma fix from Doug Ledford:
 "Fix for max sector calculation in iSER"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/iser: Fix max_sectors calculation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull rdma fix from Doug Ledford:
 "Fix for max sector calculation in iSER"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/iser: Fix max_sectors calculation
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/iser: Fix max_sectors calculation</title>
<updated>2016-05-05T16:41:24+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-04-18T21:06:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9c674815d346305068b27bf03b5e86b659a1b111'/>
<id>9c674815d346305068b27bf03b5e86b659a1b111</id>
<content type='text'>
iSER currently has a couple places that set max_sectors in either the host
template or SCSI host, and all of them get it wrong.

This patch instead uses a single assignment that (hopefully) gets it right:
the max_sectors value must be derived from the number of segments in the
FR or FMR structure, but actually be one lower than the page size multiplied
by the number of sectors, as it has to handle the case of non-aligned I/O.

Without this I get trivial to reproduce hangs when running xfstests
(on XFS) over iSER to Linux targets.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Acked-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
iSER currently has a couple places that set max_sectors in either the host
template or SCSI host, and all of them get it wrong.

This patch instead uses a single assignment that (hopefully) gets it right:
the max_sectors value must be derived from the number of segments in the
FR or FMR structure, but actually be one lower than the page size multiplied
by the number of sectors, as it has to handle the case of non-aligned I/O.

Without this I get trivial to reproduce hangs when running xfstests
(on XFS) over iSER to Linux targets.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Acked-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma</title>
<updated>2016-04-30T00:07:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-30T00:07:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=925d96a0c9af72e419dbca1db325e09d78f31502'/>
<id>925d96a0c9af72e419dbca1db325e09d78f31502</id>
<content type='text'>
Pull rdma fixes from Doug Ledford:
 "Final set of -rc fixes for 4.6.

  I've collected up a number of patches that are all pretty small with
  the exception of only a couple.  The hfi1 driver has a number of
  important patches, and it is what really drives the line count of this
  pull request up.  These are all small and I've got this kernel built
  and running in the test lab (I have most of the hardware, I think nes
  is the only thing in this patch set that I can't say I've personally
  tested and have up and running).

  Summary:

   - A number of collected fixes for oopses, memory corruptions,
     deadlocks, etc.  All of these fixes are small (many only 5-10
     lines), obvious, and tested.

   - Fix for the security issue related to the use of write for
     bi-directional communications"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  RDMA/nes: don't leak skb if carrier down
  IB/security: Restrict use of the write() interface
  IB/hfi1: Use kernel default llseek for ui device
  IB/hfi1: Don't attempt to free resources if initialization failed
  IB/hfi1: Fix missing lock/unlock in verbs drain callback
  IB/rdmavt: Fix send scheduling
  IB/hfi1: Prevent unpinning of wrong pages
  IB/hfi1: Fix deadlock caused by locking with wrong scope
  IB/hfi1: Prevent NULL pointer deferences in caching code
  MAINTAINERS: Update iser/isert maintainer contact info
  IB/mlx5: Expose correct max_sge_rd limit
  RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
  iw_cxgb4: handle draining an idle qp
  iw_cxgb3: initialize ibdev.iwcm-&gt;ifname for port mapping
  iw_cxgb4: initialize ibdev.iwcm-&gt;ifname for port mapping
  IB/core: Don't drain non-existent rq queue-pair
  IB/core: Fix oops in ib_cache_gid_set_default_gid
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull rdma fixes from Doug Ledford:
 "Final set of -rc fixes for 4.6.

  I've collected up a number of patches that are all pretty small with
  the exception of only a couple.  The hfi1 driver has a number of
  important patches, and it is what really drives the line count of this
  pull request up.  These are all small and I've got this kernel built
  and running in the test lab (I have most of the hardware, I think nes
  is the only thing in this patch set that I can't say I've personally
  tested and have up and running).

  Summary:

   - A number of collected fixes for oopses, memory corruptions,
     deadlocks, etc.  All of these fixes are small (many only 5-10
     lines), obvious, and tested.

   - Fix for the security issue related to the use of write for
     bi-directional communications"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  RDMA/nes: don't leak skb if carrier down
  IB/security: Restrict use of the write() interface
  IB/hfi1: Use kernel default llseek for ui device
  IB/hfi1: Don't attempt to free resources if initialization failed
  IB/hfi1: Fix missing lock/unlock in verbs drain callback
  IB/rdmavt: Fix send scheduling
  IB/hfi1: Prevent unpinning of wrong pages
  IB/hfi1: Fix deadlock caused by locking with wrong scope
  IB/hfi1: Prevent NULL pointer deferences in caching code
  MAINTAINERS: Update iser/isert maintainer contact info
  IB/mlx5: Expose correct max_sge_rd limit
  RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
  iw_cxgb4: handle draining an idle qp
  iw_cxgb3: initialize ibdev.iwcm-&gt;ifname for port mapping
  iw_cxgb4: initialize ibdev.iwcm-&gt;ifname for port mapping
  IB/core: Don't drain non-existent rq queue-pair
  IB/core: Fix oops in ib_cache_gid_set_default_gid
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/nes: don't leak skb if carrier down</title>
<updated>2016-04-29T01:11:09+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-04-24T20:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4c8bb95921e9ac01b9dd0c3abbaf6514ce88af92'/>
<id>4c8bb95921e9ac01b9dd0c3abbaf6514ce88af92</id>
<content type='text'>
Alternatively one could free the skb, OTOH I don't think this test is
useful so just remove it.

Cc: &lt;linux-rdma@vger.kernel.org&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alternatively one could free the skb, OTOH I don't think this test is
useful so just remove it.

Cc: &lt;linux-rdma@vger.kernel.org&gt;
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/security: Restrict use of the write() interface</title>
<updated>2016-04-28T16:03:16+00:00</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-04-11T01:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3'/>
<id>e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3</id>
<content type='text'>
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl().  This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.

For the immediate repair, detect and deny suspicious accesses to
the write API.

For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).

The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.

Reported-by: Jann Horn &lt;jann@thejh.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
[ Expanded check to all known write() entry points ]
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl().  This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.

For the immediate repair, detect and deny suspicious accesses to
the write API.

For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).

The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.

Reported-by: Jann Horn &lt;jann@thejh.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
[ Expanded check to all known write() entry points ]
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
