Showing error 558

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/scsi/gdth.c
Line in file: 452
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

 422    } else {
 423        mdelay(milliseconds);
 424    }
 425}
 426
 427static void gdth_scsi_done(struct scsi_cmnd *scp)
 428{
 429        struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
 430        int internal_command = cmndinfo->internal_command;
 431
 432        TRACE2(("gdth_scsi_done()\n"));
 433
 434        gdth_put_cmndinfo(cmndinfo);
 435        scp->host_scribble = NULL;
 436
 437        if (internal_command)
 438                complete((struct completion *)scp->request);
 439        else
 440                scp->scsi_done(scp);
 441}
 442
 443int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
 444                   int timeout, u32 *info)
 445{
 446    gdth_ha_str *ha = shost_priv(sdev->host);
 447    Scsi_Cmnd *scp;
 448    struct gdth_cmndinfo cmndinfo;
 449    DECLARE_COMPLETION_ONSTACK(wait);
 450    int rval;
 451
 452    scp = kzalloc(sizeof(*scp), GFP_KERNEL);
 453    if (!scp)
 454        return -ENOMEM;
 455
 456    scp->sense_buffer = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
 457    if (!scp->sense_buffer) {
 458        kfree(scp);
 459        return -ENOMEM;
 460    }
 461
 462    scp->device = sdev;
Show full sources