1. 09 9月, 2005 2 次提交
    • M
      [PATCH] USB Storage: close a race condition in disconnect near queuecommand · 26186ba7
      Matthew Dharm 提交于
      This patch started life as as534, and has been re-diffed against the latest
      tree.
      
      usb-storage has a small loophole, a window between the time queuecommand
      accepts a new command and the time the control thread starts to execute
      it.  If disconnect is called during that window, the driver won't cancel
      the pending command -- we've been relying on the SCSI core to cancel it
      for us during host removal.  But it's better for usb-storage to cancel
      it;  this avoids races and reduces reliance on the SCSI core.
      Fortunately cancelling these commands is easy to do; the key is to do it
      _before_ calling scsi_remove_host.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      26186ba7
    • M
      [PATCH] USB Storage: close a race condition in disconnect near probe · 77f46328
      Matthew Dharm 提交于
      This patch started life as as533, and has been re-diffed against the
      current tree.
      
      Disconnect processing in usb-storage naturally divides into two parts:
      one to quiesce the driver (make sure no commands are executing or
      queued) and remove the host, and the other to deallocate all the USB and
      non-USB resources.  This patch creates two subroutines to handle those
      two parts.  Mostly it's just code movement, but there is one significant
      change.  If the scsi-scanning thread fails to initialize but the host
      has successfully been added, we need to quiesce the driver before
      removing the host.  After all, it's possible that scanning could have
      been initiated from somewhere else, such as userspace -- very low
      probability, but it's easily handled by calling the new subroutine.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      77f46328
  2. 26 6月, 2005 1 次提交
    • C
      [PATCH] Cleanup patch for process freezing · 3e1d1d28
      Christoph Lameter 提交于
      1. Establish a simple API for process freezing defined in linux/include/sched.h:
      
         frozen(process)		Check for frozen process
         freezing(process)		Check if a process is being frozen
         freeze(process)		Tell a process to freeze (go to refrigerator)
         thaw_process(process)	Restart process
         frozen_process(process)	Process is frozen now
      
      2. Remove all references to PF_FREEZE and PF_FROZEN from all
         kernel sources except sched.h
      
      3. Fix numerous locations where try_to_freeze is manually done by a driver
      
      4. Remove the argument that is no longer necessary from two function calls.
      
      5. Some whitespace cleanup
      
      6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
         cleared before setting PF_FROZEN, recalc_sigpending does not check
         PF_FROZEN).
      
      This patch does not address the problem of freeze_processes() violating the rule
      that a task may only modify its own flags by setting PF_FREEZE. This is not clean
      in an SMP environment. freeze(process) is therefore not SMP safe!
      Signed-off-by: NChristoph Lameter <christoph@lameter.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e1d1d28
  3. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4