]> git.baikalelectronics.ru Git - kernel.git/commit
iser-target: Fix variable-length response error completion
authorSagi Grimberg <sagig@mellanox.com>
Thu, 4 Jun 2015 16:49:19 +0000 (19:49 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 9 Jun 2015 05:16:17 +0000 (22:16 -0700)
commit51e49932ea6fbaf9af4857198c68cfa298e689e6
tree9dbaca3c21b23740733e578e175795e5a47e7564
parentdc77b82f1ca4fea3d6d15aa90efeac315903d5e0
iser-target: Fix variable-length response error completion

Since commit "a26bb4843b4 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>
drivers/infiniband/ulp/isert/ib_isert.c