Merge of the trunk's r3412:

Fix for crash on retry after double reset UA reported by Matteo Tescione <matteo@rmnet.it>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-04-26 00:23:54 +00:00
parent 9b10914fd8
commit 7d18d72a0c
2 changed files with 6 additions and 1 deletions

View File

@@ -72,7 +72,11 @@ static inline void scst_dec_pr_readers_count(struct scst_cmd *cmd,
{
struct scst_device *dev = cmd->dev;
EXTRACHECKS_BUG_ON(!cmd->dec_pr_readers_count_needed);
/*
* scst_check_local_events() should not be called twice for the
* same cmd
*/
WARN_ON(!cmd->dec_pr_readers_count_needed);
if (!locked)
spin_lock_bh(&dev->dev_lock);

View File

@@ -2939,6 +2939,7 @@ static int scst_check_sense(struct scst_cmd *cmd)
cmd->state = SCST_CMD_STATE_REAL_EXEC;
cmd->retry = 1;
scst_inc_pr_readers_count(cmd, false);
res = 1;
goto out;
}