1. 17 Jul, 2008 6 commits
    • Roland McGrath's avatar
      fix dangling zombie when new parent ignores children · 666f164f
      Roland McGrath authored
      This fixes an arcane bug that we think was a regression introduced
      by commit b2b2cbc4.  When a parent
      ignores SIGCHLD (or uses SA_NOCLDWAIT), its children would self-reap
      but they don't if it's using ptrace on them.  When the parent thread
      later exits and ceases to ptrace a child but leaves other live
      threads in the parent's thread group, any zombie children are left
      dangling.  The fix makes them self-reap then, as they would have
      done earlier if ptrace had not been in use.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      666f164f
    • Roland McGrath's avatar
      do_wait: return security_task_wait() error code in place of -ECHILD · 14dd0b81
      Roland McGrath authored
      This reverts the effect of commit f2cc3eb1
      "do_wait: fix security checks".  That change reverted the effect of commit
      73243284.  The rationale for the original
      commit still stands.  The inconsistent treatment of children hidden by
      ptrace was an unintended omission in the original change and in no way
      invalidates its purpose.
      
      This makes do_wait return the error returned by security_task_wait()
      (usually -EACCES) in place of -ECHILD when there are some children the
      caller would be able to wait for if not for the permission failure.  A
      permission error will give the user a clue to look for security policy
      problems, rather than for mysterious wait bugs.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      14dd0b81
    • Roland McGrath's avatar
      ptrace children revamp · f470021a
      Roland McGrath authored
      ptrace no longer fiddles with the children/sibling links, and the
      old ptrace_children list is gone.  Now ptrace, whether of one's own
      children or another's via PTRACE_ATTACH, just uses the new ptraced
      list instead.
      
      There should be no user-visible difference that matters.  The only
      change is the order in which do_wait() sees multiple stopped
      children and stopped ptrace attachees.  Since wait_task_stopped()
      was changed earlier so it no longer reorders the children list, we
      already know this won't cause any new problems.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      f470021a
    • Roland McGrath's avatar
      do_wait reorganization · 98abed02
      Roland McGrath authored
      This breaks out the guts of do_wait into three subfunctions.
      The control flow is less nonobvious without so much goto.
      do_wait_thread and ptrace_do_wait contain the main work of the outer loop.
      wait_consider_task contains the main work of the inner loop.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      98abed02
    • Chandra Seetharaman's avatar
      scsi_dh: Verify "dev" is a sdev before accessing it. · 33af79d1
      Chandra Seetharaman authored
      Before accessing the device data structure in hardware handlers,
      make sure it is a indeed a sdev device.
      
      Yinghai Lu <yhlu.kernel@gmail.com> found the bug on Jul 16, 2008,
      and later tested/verified the following fix.
      Signed-off-by: default avatarChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      33af79d1
    • Linus Torvalds's avatar
      Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · dc7c65db
      Linus Torvalds authored
      * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
        Revert "x86/PCI: ACPI based PCI gap calculation"
        PCI: remove unnecessary volatile in PCIe hotplug struct controller
        x86/PCI: ACPI based PCI gap calculation
        PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
        PCI PM: Fix pci_prepare_to_sleep
        x86/PCI: Fix PCI config space for domains > 0
        Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
        PCI: Simplify PCI device PM code
        PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
        PCI ACPI: Rework PCI handling of wake-up
        ACPI: Introduce new device wakeup flag 'prepared'
        ACPI: Introduce acpi_device_sleep_wake function
        PCI: rework pci_set_power_state function to call platform first
        PCI: Introduce platform_pci_power_manageable function
        ACPI: Introduce acpi_bus_power_manageable function
        PCI: make pci_name use dev_name
        PCI: handle pci_name() being const
        PCI: add stub for pci_set_consistent_dma_mask()
        PCI: remove unused arch pcibios_update_resource() functions
        PCI: fix pci_setup_device()'s sprinting into a const buffer
        ...
      
      Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
      arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
      drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
      and ACPI updates manually.
      dc7c65db
  2. 16 Jul, 2008 34 commits