]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2013 15:56:06 +0000 (08:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2013 15:56:06 +0000 (08:56 -0700)
added patches:
target-fix-trailing-ascii-space-usage-in-inquiry-vendor-model.patch

queue-3.10/series
queue-3.10/target-fix-trailing-ascii-space-usage-in-inquiry-vendor-model.patch [new file with mode: 0644]

index c342386c9c7cdbf4e7bcb74dc3ead21ba0ee6cc5..a3d71ac4abddcbdc7655b3a28b8c492a901af963 100644 (file)
@@ -22,3 +22,4 @@ ath9k-enable-pll-fix-only-for-ar9340-ar9330.patch
 mac80211-add-missing-channel-context-release.patch
 mac80211-add-a-flag-to-indicate-cck-support-for-ht-clients.patch
 iwl4965-fix-rfkill-set-state-regression.patch
+target-fix-trailing-ascii-space-usage-in-inquiry-vendor-model.patch
diff --git a/queue-3.10/target-fix-trailing-ascii-space-usage-in-inquiry-vendor-model.patch b/queue-3.10/target-fix-trailing-ascii-space-usage-in-inquiry-vendor-model.patch
new file mode 100644 (file)
index 0000000..725c248
--- /dev/null
@@ -0,0 +1,44 @@
+From ee60bddba5a5f23e39598195d944aa0eb2d455e5 Mon Sep 17 00:00:00 2001
+From: Nicholas Bellinger <nab@linux-iscsi.org>
+Date: Wed, 24 Jul 2013 16:15:08 -0700
+Subject: target: Fix trailing ASCII space usage in INQUIRY vendor+model
+
+From: Nicholas Bellinger <nab@linux-iscsi.org>
+
+commit ee60bddba5a5f23e39598195d944aa0eb2d455e5 upstream.
+
+This patch fixes spc_emulate_inquiry_std() to add trailing ASCII
+spaces for INQUIRY vendor + model fields following SPC-4 text:
+
+  "ASCII data fields described as being left-aligned shall have any
+   unused bytes at the end of the field (i.e., highest offset) and
+   the unused bytes shall be filled with ASCII space characters (20h)."
+
+This addresses a problem with Falconstor NSS multipathing.
+
+Reported-by: Tomas Molota <tomas.molota@lightstorm.sk>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/target/target_core_spc.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/target/target_core_spc.c
++++ b/drivers/target/target_core_spc.c
+@@ -97,9 +97,12 @@ spc_emulate_inquiry_std(struct se_cmd *c
+       buf[7] = 0x2; /* CmdQue=1 */
+-      snprintf(&buf[8], 8, "LIO-ORG");
+-      snprintf(&buf[16], 16, "%s", dev->t10_wwn.model);
+-      snprintf(&buf[32], 4, "%s", dev->t10_wwn.revision);
++      memcpy(&buf[8], "LIO-ORG ", 8);
++      memset(&buf[16], 0x20, 16);
++      memcpy(&buf[16], dev->t10_wwn.model,
++             min_t(size_t, strlen(dev->t10_wwn.model), 16));
++      memcpy(&buf[32], dev->t10_wwn.revision,
++             min_t(size_t, strlen(dev->t10_wwn.revision), 4));
+       buf[4] = 31; /* Set additional length to 31 */
+       return 0;