Skip to content

Commit cee6029

Browse files
rolanddNicholas Bellinger
authored andcommitted
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>
1 parent 91f0abf commit cee6029

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/target/iscsi/iscsi_target_parameters.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ int iscsi_decode_text_input(
16051605

16061606
tmpbuf = kzalloc(length + 1, GFP_KERNEL);
16071607
if (!tmpbuf) {
1608-
pr_err("Unable to allocate memory for tmpbuf.\n");
1608+
pr_err("Unable to allocate %u + 1 bytes for tmpbuf.\n", length);
16091609
return -1;
16101610
}
16111611

0 commit comments

Comments
 (0)