1. 19 Aug, 2003 4 commits
    • Andrew Morton's avatar
      [PATCH] Local APIC enable fixes · a5bfb7f3
      Andrew Morton authored
      From: mikep@csd.uu.se
      
      There has been a number of problem reports about local APIC
      interacting badly with ACPI on P4s due to the P4 local APIC
      force-enable change in 2.5.74,
      
      This patch reverts the 2.5.74 patch, so if the BIOS disables
      the local APIC on a P4, we don't enable it by default any more.
      
      The rescue the situation for those P4 systems where the local
      APIC _can_ be enabled safely, I've added two kernel parameters
      that can be used to override broken BIOSen:
      - "nolapic" prevents the kernel from enabling or using the local
        APIC. This is stronger than listing a machine in the DMI scan
        blacklist, since it also works for machines that boot with the
        local APIC already enabled.
      - "lapic" tells the kernel to force-enable the P4 local APIC if
        the BIOS disabled it. I haven't changed the logic for P6/K7
        family processors, so we still force-enable those unless
        "nolapic" was passed to the kernel.
      
      The patch also includes a cleanup: the dont_use_local_apic_timer
      flag variable is not set any more since 2.5.74, so it's removed.
      a5bfb7f3
    • Andrew Morton's avatar
      [PATCH] add ASUS l3800P to DMI black list · 14e902a4
      Andrew Morton authored
      From: Eric Valette <eric.valette@free.fr>
      
      The following patch integrated in 2.5.74,
      
      <http://lists.insecure.org/lists/linux-kernel/2003/Jun/5840.html>
      
      really enables the APIC even if BIOS disabled it. Unfortunately,
      enabling APIC really does not seem to work on this ASUS laptop and ACPI
      (which is mandatory) crash the kernel in ACPI code at boot time while
      "Executing all Devices _STA and_INIT methods"
      
      Unless someones find a bug in ACPI code related to APIC management, It
      is safer to add this machine in the DMI black list (along with DELL,
      IBM, ...).
      
      So, as suggested by the author of the problematic change, I added and
      entry in the DMI black list. But my guess is that most laptop will soon
      be present in this list....
      14e902a4
    • Andrew Morton's avatar
      [PATCH] signal handling race condition causing reboot hangs · 3adaf93e
      Andrew Morton authored
      From: Ernie Petrides <petrides@redhat.com>
      
      (I can't get anyone to review this, but I'm sure there's a bug in there, and
      Ernie's patch has been in -mm for some time).
      
      
      There is a long-standing locking hole in the kernel's handling of the
      signals related to stopping and resuming processes.  When a process
      handles SIGSTOP, SIGTSTP, SIGTTIN, or SIGTTOU, the "sighand" lock is
      held while the signal is dequeued and appropriate masks are updated.
      But the "sighand" lock is dropped in several cases before the task's
      state is changed to TASK_STOPPED (or before a group-stop is initiated).
      
      If a process running on another cpu posts a SIGCONT or SIGKILL just after
      the "victim" process releases the lock but before its state is set to
      TASK_STOPPED, the corresponding wakeup will be lost and the victim will
      remain stopped despite the successive SIGCONT or SIGKILL.  In this case,
      a repeated posting of SIGCONT or SIGKILL will have no effect, since the
      original one is already pending (and so causes a repeated posting to be
      discarded).  The occurrence of a SIGSTOP/SIGKILL race where the victim
      has blocked all other signals will result in an unkillable process.
      
      Although a fabricated test program can reproduce a SIGSTOP/SIGCONT race
      hang in less than a minute (on a 2-cpu Dell Precision 450), the scenario
      that has been most frequently encountered is a hang during reboot or
      shutdown.  This occurs because /sbin/killall5 brackets the scanning of
      /proc/* and associated signal posting to (most) of the processes still
      running with kill(-1, SIGSTOP) and kill(-1, SIGCONT) calls to temporarily
      freeze every process except for "init".  Occasionally, its parent (running
      the /etc/rc6.d/S01reboot shell script) gets stuck in TASK_STOPPED state
      with pending SIGCONT and SIGCLD signals, but with no other process left
      to wake it up.
      
      In order to fix the race condition, the locking in do_signal_stop()
      and get_signal_to_deliver() needed reworking to close the hole.  Due
      to lock ordering issues between the "sighand" lock and tasklist_lock,
      there are two cases where the former lock needs to be released and
      then reacquired, thus allowing a tiny hole for a SIGCONT/SIGKILL to
      be posted.  These two cases are resolved by rechecking for a pending
      SIGCONT/SIGKILL after the locks are (re)acquired in the proper order.
      
      Anyone wanting a copy of the test program may e-mail me off-list.
      3adaf93e
    • Andrew Morton's avatar
      [PATCH] Fix si_band type in asm-generic/siginfo.h · b614db14
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      POSIX says si_band in siginfo_t must be long. glibc uses this, except
      for Alpha.
      
      This type must be correct on little endian machines, otherwise
      Konqueror does not get any events from dnotity for created/deleted files.
      
      Currenly asm-generic/siginfo.h uses int, which is wrong.
      
      This patch adds a new macro __ARCH_SI_BAND_T which is int for alpha
      and long for everybody else. This makes the type on x86-64 come out
      correctly
      b614db14
  2. 18 Aug, 2003 36 commits