1. 09 Sep, 2005 3 commits
    • 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
    • Alan Stern's avatar
      [SCSI] fix callers of scsi_remove_device() who already hold the scan muted · 903f4fed
      Alan Stern authored
      This patch (as544) adds a private entry point to scsi_remove_device, for
      use when callers already own the scan_mutex.  The appropriate callers are
      modified to use the new entry point.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      903f4fed
    • Alan Stern's avatar
      [SCSI] add missing scan mutex to scsi_scan_target() · e517d313
      Alan Stern authored
      This patch (as543) adds a private entry point to scsi_scan_target, for use
      when the caller already owns the scan_mutex, and updates the kerneldoc for
      that routine (which was badly out-of-date).  It converts scsi_scan_channel
      to use the new entry point.  Lastly, it modifies scsi_get_host_dev to make
      it acquire the scan_mutex, necessary since the routine adds a new
      scsi_device even if it doesn't do any actual scanning.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      e517d313
  2. 08 Sep, 2005 27 commits
  3. 07 Sep, 2005 10 commits