Showing error 1080

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/scsi_lib.c
Line in file: 1533
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

1503        struct scsi_device *sdev = cmd->device;
1504        struct scsi_target *starget = scsi_target(sdev);
1505        struct Scsi_Host *shost = sdev->host;
1506
1507        blkdev_dequeue_request(req);
1508
1509        if (unlikely(cmd == NULL)) {
1510                printk(KERN_CRIT "impossible request in %s.\n",
1511                                 __func__);
1512                BUG();
1513        }
1514
1515        scsi_init_cmd_errh(cmd);
1516        cmd->result = DID_NO_CONNECT << 16;
1517        atomic_inc(&cmd->device->iorequest_cnt);
1518
1519        /*
1520         * SCSI request completion path will do scsi_device_unbusy(),
1521         * bump busy counts.  To bump the counters, we need to dance
1522         * with the locks as normal issue path does.
1523         */
1524        sdev->device_busy++;
1525        spin_unlock(sdev->request_queue->queue_lock);
1526        spin_lock(shost->host_lock);
1527        shost->host_busy++;
1528        starget->target_busy++;
1529        spin_unlock(shost->host_lock);
1530        spin_lock(sdev->request_queue->queue_lock);
1531
1532        blk_complete_request(req);
1533}
1534
1535static void scsi_softirq_done(struct request *rq)
1536{
1537        struct scsi_cmnd *cmd = rq->special;
1538        unsigned long wait_for = (cmd->allowed + 1) * rq->timeout;
1539        int disposition;
1540
1541        INIT_LIST_HEAD(&cmd->eh_entry);
1542
1543        /*
Show full sources