summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2014-05-29 22:32:29 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-06-04 04:18:43 +0200
commitcee6029ecfc2494e7869da20e3ff5aa7f5c4368e (patch)
treefdb025c65f407188d55a1b25f99d62fd8c8df941 /drivers/target
parentiscsi-target: Reject zero-length payloads during SecurityNegotiation (diff)
downloadlinux-cee6029ecfc2494e7869da20e3ff5aa7f5c4368e.tar.xz
linux-cee6029ecfc2494e7869da20e3ff5aa7f5c4368e.zip
iscsi-target: Put length of failed allocation in error message
If the message "Unable to allocate…" pops up, it's useful to know whether the problem is that the system is genuinely out of memory, or that some bug has led to a crazy allocation length. In particular this helped debug a corruption of login headers in iscsi_login_non_zero_tsih_s1(). Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_parameters.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index 4d2e23fc76fd..8ca82ab43054 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -1605,7 +1605,7 @@ int iscsi_decode_text_input(
tmpbuf = kzalloc(length + 1, GFP_KERNEL);
if (!tmpbuf) {
- pr_err("Unable to allocate memory for tmpbuf.\n");
+ pr_err("Unable to allocate %u + 1 bytes for tmpbuf.\n", length);
return -1;
}