All of lore.kernel.org
 help / color / mirror / Atom feed
* [added to the 3.18 stable tree] iser-target: Fix variable-length response error completion
@ 2015-07-02 21:40 Sasha Levin
  2015-07-02 21:40 ` [added to the 3.18 stable tree] drm/mgag200: Reject non-character-cell-aligned mode widths Sasha Levin
                   ` (35 more replies)
  0 siblings, 36 replies; 39+ messages in thread
From: Sasha Levin @ 2015-07-02 21:40 UTC (permalink / raw)
  To: stable, stable-commits
  Cc: Sagi Grimberg, Jenny Falkovich, Nicholas Bellinger, Sasha Levin

From: Sagi Grimberg <sagig@mellanox.com>

This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.

===============

This patch has been added to the 3.18 stable tree. If you have any
objections, please let us know.

===============

[ Upstream commit 9253e667ab50fd4611a60e1cdd6a6e05a1d91cf1 ]

Since commit "2426bd456a6 target: Report correct response ..."
we might get a command with data_size that does not fit to
the number of allocated data sg elements. Given that we rely on
cmd t_data_nents which might be different than the data_size,
we sometimes receive local length error completion. The correct
approach would be to take the command data_size into account when
constructing the ib sg_list.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jenny Falkovich <jennyf@mellanox.com>
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 0618e40..9fdf1a4 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2485,7 +2485,6 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
 	page_off = offset % PAGE_SIZE;
 
 	send_wr->sg_list = ib_sge;
-	send_wr->num_sge = sg_nents;
 	send_wr->wr_id = (unsigned long)&isert_cmd->tx_desc;
 	/*
 	 * Perform mapping of TCM scatterlist memory ib_sge dma_addr.
@@ -2504,14 +2503,17 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
 			 ib_sge->addr, ib_sge->length, ib_sge->lkey);
 		page_off = 0;
 		data_left -= ib_sge->length;
+		if (!data_left)
+			break;
 		ib_sge++;
 		pr_debug("Incrementing ib_sge pointer to %p\n", ib_sge);
 	}
 
+	send_wr->num_sge = ++i;
 	pr_debug("Set outgoing sg_list: %p num_sg: %u from TCM SGLs\n",
 		 send_wr->sg_list, send_wr->num_sge);
 
-	return sg_nents;
+	return send_wr->num_sge;
 }
 
 static int
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2015-07-03 16:36 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 21:40 [added to the 3.18 stable tree] iser-target: Fix variable-length response error completion Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] drm/mgag200: Reject non-character-cell-aligned mode widths Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query Sasha Levin
2015-07-03  1:34   ` Michel Dänzer
2015-07-03 16:36     ` Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] ath3k: Add support of 0489:e076 AR3012 device Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] ath3k: add support of 13d3:3474 " Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] b43: fix support for 14e4:4321 PCI dev with BCM4321 chipset Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] cdc-acm: Add support of ATOL FPrint fiscal printers Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] ALSA: hda - Fix mute-LED fixed mode Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] net: socket: Fix the wrong returns for recvmsg and sendmsg Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724 Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling" Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] iio: adis16400: Report pressure channel scale Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] iio: adis16400: Use != channel indices for the two voltage channels Sasha Levin
2015-07-02 21:40 ` [added to the 3.18 stable tree] iio: adis16400: Compute the scan mask from channel indices Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] n_tty: Fix auditing support for cannonical mode Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ALSA: usb-audio: add MAYA44 USB+ mixer control names Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] Input: synaptics - add min/max quirk for Lenovo S540 Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] Input: elantech - fix detection of touchpads where the revision matches a known rate Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] block: fix ext_dev_lock lockdep report Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ring-buffer-benchmark: Fix the wrong sched_priority of producer Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ozwpan: Use proper check to prevent heap overflow Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ozwpan: divide-by-zero leading to panic Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] ozwpan: unchecked signed subtraction leads to DoS Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] pata_octeon_cf: fix broken build Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] drm/i915: Fix DDC probe for passive adapters Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] serial: imx: Fix DMA handling for IDLE condition aborts Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Sasha Levin
2015-07-02 21:41 ` [added to the 3.18 stable tree] cfg80211: wext: clear sinfo struct before calling driver Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.