Added dump_stack() to know who is calling scst_set_resp_data_len() with invalid resp_data_len

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4813 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2013-03-26 00:26:57 +00:00
parent 829172f232
commit 870478c32e
+5
View File
@@ -2872,6 +2872,11 @@ void scst_set_resp_data_len(struct scst_cmd *cmd, int resp_data_len)
PRINT_ERROR("Too big response data len %d (max %d), limiting "
"it to the max (dev %s)", resp_data_len, cmd->bufflen,
cmd->dev ? cmd->dev->virt_name : "(no LUN)");
/*
* It's a bug in the lower level code, so dump stack to know
* who is the cause
*/
dump_stack();
cmd->resp_data_len = cmd->bufflen;
goto out;
}