1. 13 Dec, 2005 1 commit
  2. 09 Dec, 2005 1 commit
  3. 02 Dec, 2005 1 commit
  4. 08 Nov, 2005 1 commit
    • goggin, edward's avatar
      [SCSI] fix usb storage oops · 34ea80ec
      goggin, edward authored
      
      
      The problem is that scsi_run_queue is called from scsi_next_command()
      after doing a scsi_put_command.  If the command was the only thing
      holding the reference on the scsi_device then the resulting device put
      will tear down the block queue.  Fix this by taking a reference to the
      device and holding it around scsi_run_queue()
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      34ea80ec
  5. 06 Nov, 2005 1 commit
  6. 28 Oct, 2005 3 commits
  7. 16 Oct, 2005 1 commit
    • 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
  8. 19 Sep, 2005 1 commit
  9. 17 Sep, 2005 1 commit
  10. 14 Sep, 2005 2 commits
    • James Bottomley's avatar
      [SCSI] fix sym scsi boot hang · 59897dad
      James Bottomley authored
      
      
      On Wed, 2005-09-14 at 18:06 +1000, Anton Blanchard wrote:
      > And in particular it looks like the scsi_unprep_request in
      > scsi_queue_insert is causing it. The following patch fixes the boot
      > problems on the vscsi machine:
      
      OK, my fault.  Your fix is almost correct .. I was going to do this
      eventually, honest, because there's no need to unprep and reprep a
      command that comes in through scsi_queue_insert().
      
      However, I decided to leave it in to exercise the scsi_unprep_request()
      path just to make sure it was working.  What's happening, I think, is
      that we also use this path for retries.  Since we kill and reget the
      command each time, the retries decrement is never seen, so we're
      retrying forever.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      59897dad
    • Timothy Thelin's avatar
      [SCSI] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd · 186d330e
      Timothy Thelin authored
      
      
      This fixes an issue in scsi command initialization from a request
      where sd, sr, st, and scsi_lib all fail to copy the request's
      cmd_len to the scsi command's cmd_len field.
      Signed-off-by: default avatarTimothy Thelin <timothy.thelin@wdc.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      186d330e
  11. 10 Sep, 2005 1 commit
  12. 09 Sep, 2005 3 commits
    • James Bottomley's avatar
      [SCSI] SCSI core: fix leakage of scsi_cmnd's · 788ce43a
      James Bottomley authored
      
      
      Actually, just one problem and one cosmetic fix:
      
      1) We need to dequeue for the loop and kill case (it seems easiest
      simply to dequeue in the scsi_kill_request() routine)
      2) There's no real need to drop the queue lock.  __scsi_done() is lock
      agnostic, so since there's no requirement, let's just leave it in to
      avoid any locking issues.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      788ce43a
    • James Bottomley's avatar
      [SCSI] SCSI core: fix leakage of scsi_cmnd's · e91442b6
      James Bottomley authored
      
      
      From: 	Alan Stern <stern@rowland.harvard.edu>
      
      This patch (as559b) adds a new routine, scsi_unprep_request, which
      gets called every place a request is requeued.  (That includes
      scsi_queue_insert as well as scsi_requeue_command.)  It also changes
      scsi_kill_requests to make it call __scsi_done with result equal to
      DID_NO_CONNECT << 16.  (I'm not sure if it's necessary to call
      scsi_init_cmd_errh here; maybe you can check on that.)  Finally, the
      patch changes the return value from scsi_end_request, to avoid
      returning a stale pointer in the case where the request was requeued.
      Fortunately the return value is used in only place, and the change
      actually simplified it.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      
      Rejections fixed up and
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      e91442b6
    • Neil Brown's avatar
      [SCSI] fix possible deadlock in scsi_lib.c · 286f3e13
      Neil Brown authored
      
      
        If a filesystem, while writing out data, decides that it is good
      to issue a cache flush on a SCSI drive (or other 'sd' device), it will
      call blkdev_issue_flush which calls ->issue_flush_fn which is
      scsi_issue_flush_fn.
      This calls sd_issue_flush which calls sd_sync_cache, which calls
      scsi_execute_request.
      This will (as sshdr != NULL) call
          kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL)
      
      If memory is tight, the presence of GFP_KERNEL may cause write
      requests to be sent to some filesystem to free up memory, however if
      that filesystem is waiting for the issue_flush_fn to complete, you
      could get a deadlock.
      
      I wonder if it might be more appropriate to use GFP_NOIO as in the
      following patch.
      
      I wonder if it might be even more appropriate to cope better with a
      kmalloc failure, especially as in this use, sd_sync_cache only will
      use the sense information to print out a more informative error
      message.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      286f3e13
  13. 06 Sep, 2005 1 commit
    • James Bottomley's avatar
      [SCSI] quieten messages on scsi_execute commands · 3173d8c3
      James Bottomley authored
      
      
      scsi_io_completion() can be a bit noisy about certain conditions.
      Previously this wasn't a problem for internally generated commands,
      since they never hit it.  However, since we do all SCSI commands via
      bios, now they do.  user CD testers like magicdev are now getting not
      ready messages every time they touch the CD to see if there's anything
      in it.
      
      Fix this by making all scsi_execute commands REQ_QUIET and making
      scsi_finish_io() not say anything for REQ_QUIET.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      3173d8c3
  14. 28 Aug, 2005 8 commits
  15. 30 Jul, 2005 1 commit
  16. 14 Jul, 2005 1 commit
  17. 28 Jun, 2005 1 commit
  18. 26 Jun, 2005 3 commits
  19. 24 Jun, 2005 1 commit
  20. 20 May, 2005 5 commits
  21. 18 Apr, 2005 2 commits