Skip to content
  • Alan Stern's avatar
    [SCSI] Fix leak of Scsi_Cmnds · 7c72ce81
    Alan Stern authored
    
    
    When a request is deferred in scsi_init_io because the sg table could not
    be allocated, the associated scsi_cmnd is not released and the request is
    not marked with REQ_DONTPREP.  When the command is retried, if
    scsi_prep_fn decides to kill it then the scsi_cmnd will never be released.
    
    This patch (as573) changes scsi_init_io so that it calls scsi_put_command
    before deferring a request.
    
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    7c72ce81