From 870478c32e28b98ace164bf650aba1452c5085f1 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 26 Mar 2013 00:26:57 +0000 Subject: [PATCH] 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 --- scst/src/scst_lib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index d6d335453..b4da3bfc5 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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; }