User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | drivers/scsi/aacraid/commsup.c |
Line in file: | 1272 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
Stanse (1.2) |
Entered: | 2012-03-04 17:07:06 UTC |
1242 * is important. 1243 */ 1244 command_list = NULL; 1245 __shost_for_each_device(dev, host) { 1246 unsigned long flags; 1247 spin_lock_irqsave(&dev->list_lock, flags); 1248 list_for_each_entry(command, &dev->cmd_list, list) 1249 if (command->SCp.phase == AAC_OWNER_FIRMWARE) { 1250 command->SCp.buffer = (struct scatterlist *)command_list; 1251 command_list = command; 1252 } 1253 spin_unlock_irqrestore(&dev->list_lock, flags); 1254 } 1255 while ((command = command_list)) { 1256 command_list = (struct scsi_cmnd *)command->SCp.buffer; 1257 command->SCp.buffer = NULL; 1258 command->result = DID_OK << 16 1259 | COMMAND_COMPLETE << 8 1260 | SAM_STAT_TASK_SET_FULL; 1261 command->SCp.phase = AAC_OWNER_ERROR_HANDLER; 1262 command->scsi_done(command); 1263 } 1264 retval = 0; 1265 1266out: 1267 aac->in_reset = 0; 1268 scsi_unblock_requests(host); 1269 if (jafo) { 1270 spin_lock_irq(host->host_lock); 1271 } 1272 return retval; 1273} 1274 1275int aac_reset_adapter(struct aac_dev * aac, int forced) 1276{ 1277 unsigned long flagv = 0; 1278 int retval; 1279 struct Scsi_Host * host; 1280 1281 if (spin_trylock_irqsave(&aac->fib_lock, flagv) == 0) 1282 return -EBUSY;