Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jul 13, 2008
  2. Jul 02, 2008
    • Greg Kroah-Hartman's avatar
      Linux 2.6.25.10 · 76605033
      Greg Kroah-Hartman authored
      v2.6.25.10
      76605033
    • Max Asbock's avatar
      x86: shift bits the right way in native_read_tscp · 8ede7cd0
      Max Asbock authored
      Commit 41aefdcc
      
       upstream
      
      x86: shift bits the right way in native_read_tscp
      
      native_read_tscp shifts the bits in the high order value in the
      wrong direction, the attached patch fixes that.
      
      Signed-off-by: default avatarMax Asbock <masbock@linux.vnet.ibm.com>
      Acked-by: default avatarGlauber Costa <gcosta@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8ede7cd0
    • Yanmin Zhang's avatar
      x86: fix cpu hotplug crash · 712a9da4
      Yanmin Zhang authored
      Commit fcb43042 upstream
      
      x86: fix cpu hotplug crash
      
      Vegard Nossum reported crashes during cpu hotplug tests:
      
        http://marc.info/?l=linux-kernel&m=121413950227884&w=4
      
      
      
      In function _cpu_up, the panic happens when calling
      __raw_notifier_call_chain at the second time. Kernel doesn't panic when
      calling it at the first time. If just say because of nr_cpu_ids, that's
      not right.
      
      By checking the source code, I found that function do_boot_cpu is the culprit.
      Consider below call chain:
       _cpu_up=>__cpu_up=>smp_ops.cpu_up=>native_cpu_up=>do_boot_cpu.
      
      So do_boot_cpu is called in the end. In do_boot_cpu, if
      boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
      on, when _cpu_up calls __raw_notifier_call_chain at the second time to
      report CPU_UP_CANCELED, because this cpu is already cleared from
      cpu_possible_map, get_cpu_sysdev returns NULL.
      
      Many resources are related to cpu_possible_map, so it's better not to
      change it.
      
      Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
      cpu_possible_map.
      
      Signed-off-by: default avatarZhang Yanmin <yanmin_zhang@linux.intel.com>
      Tested-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      712a9da4
    • TAKADA Yoshihito's avatar
      ptrace GET/SET FPXREGS broken · 66f10038
      TAKADA Yoshihito authored
      Commit 11dbc963
      
       upstream
      
      ptrace GET/SET FPXREGS broken
      
      When I update kernel 2.6.25 from 2.6.24, gdb does not work.
      On 2.6.25, ptrace(PTRACE_GETFPXREGS, ...) returns ENODEV.
      
      But 2.6.24 kernel's ptrace() returns EIO.
      It is issue of compatibility.
      
      I attached test program as pt.c and patch for fix it.
      
      #include <stdio.h>
      #include <stdlib.h>
      #include <unistd.h>
      #include <signal.h>
      #include <errno.h>
      #include <sys/ptrace.h>
      #include <sys/types.h>
      
      struct user_fxsr_struct {
      	unsigned short	cwd;
      	unsigned short	swd;
      	unsigned short	twd;
      	unsigned short	fop;
      	long	fip;
      	long	fcs;
      	long	foo;
      	long	fos;
      	long	mxcsr;
      	long	reserved;
      	long	st_space[32];	/* 8*16 bytes for each FP-reg = 128 bytes */
      	long	xmm_space[32];	/* 8*16 bytes for each XMM-reg = 128 bytes */
      	long	padding[56];
      };
      
      int main(void)
      {
        pid_t pid;
      
        pid = fork();
      
        switch(pid){
        case -1:/*  error */
          break;
        case 0:/*  child */
          child();
          break;
        default:
          parent(pid);
          break;
        }
        return 0;
      }
      
      int child(void)
      {
        ptrace(PTRACE_TRACEME);
        kill(getpid(), SIGSTOP);
        sleep(10);
        return 0;
      }
      int parent(pid_t pid)
      {
        int ret;
        struct user_fxsr_struct fpxregs;
      
        ret = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpxregs);
        if(ret < 0){
          printf("%d: %s.\n", errno, strerror(errno));
        }
        kill(pid, SIGCONT);
        wait(pid);
        return 0;
      }
      
      /* in the kerel, at kernel/i387.c get_fpxregs() */
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      66f10038
    • Dmitry Adamushko's avatar
      sched: fix cpu hotplug · 0758c2f3
      Dmitry Adamushko authored
      Commit 79c53799
      
       upstream
      
      the CPU hotplug problems (crashes under high-volume unplug+replug
      tests) seem to be related to migrate_dead_tasks().
      
      Firstly I added traces to see all tasks being migrated with
      migrate_live_tasks() and migrate_dead_tasks(). On my setup the problem
      pops up (the one with "se == NULL" in the loop of
      pick_next_task_fair()) shortly after the traces indicate that some has
      been migrated with migrate_dead_tasks()). btw., I can reproduce it
      much faster now with just a plain cpu down/up loop.
      
      [disclaimer] Well, unless I'm really missing something important in
      this late hour [/desclaimer] pick_next_task() is not something
      appropriate for migrate_dead_tasks() :-)
      
      the following change seems to eliminate the problem on my setup
      (although, I kept it running only for a few minutes to get a few
      messages indicating migrate_dead_tasks() does move tasks and the
      system is still ok)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0758c2f3
    • Roland McGrath's avatar
      x86_64 ptrace: fix sys32_ptrace task_struct leak · 1e9a615b
      Roland McGrath authored
      Commit 5a4646a4 introduced a leak of
      task_struct refs into sys32_ptrace.  This bug has already gone away in
      for 2.6.26 in commit 562b80ba
      
      .
      
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1e9a615b
    • Jie Luo's avatar
      DRM: enable bus mastering on i915 at resume time · 20dc9a89
      Jie Luo authored
      commit ea7b44c8
      
       upstream
      
      On 9xx chips, bus mastering needs to be enabled at resume time for much of the
      chip to function.  With this patch, vblank interrupts will work as expected
      on resume, along with other chip functions.   Fixes kernel bugzilla #10844.
      
      Signed-off-by: default avatarJie Luo <clotho67@gmail.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      20dc9a89
    • Eli Cohen's avatar
      IB/mthca: Clear ICM pages before handing to FW · 6f139f63
      Eli Cohen authored
      commit 87afd448 upstream
      
      Current memfree FW has a bug which in some cases, assumes that ICM
      pages passed to it are cleared.  This patch uses __GFP_ZERO to
      allocate all ICM pages passed to the FW.  Once firmware with a fix is
      released, we can make the workaround conditional on firmware version.
      
      This fixes the bug reported by Arthur Kepner <akepner@sgi.com> here:
      http://lists.openfabrics.org/pipermail/general/2008-May/050026.html
      
      
      
      [ Rewritten to be a one-liner using __GFP_ZERO instead of vmap()ing
        ICM memory and memset()ing it to 0. - Roland ]
      
      Signed-off-by: default avatarEli Cohen <eli@mellanox.co.il>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6f139f63
    • Thomas Gleixner's avatar
      futexes: fix fault handling in futex_lock_pi · 935cfe23
      Thomas Gleixner authored
      commit 1b7558e4
      
       upstream
      
      This patch addresses a very sporadic pi-futex related failure in
      highly threaded java apps on large SMP systems.
      
      David Holmes reported that the pi_state consistency check in
      lookup_pi_state triggered with his test application. This means that
      the kernel internal pi_state and the user space futex variable are out
      of sync. First we assumed that this is a user space data corruption,
      but deeper investigation revieled that the problem happend because the
      pi-futex code is not handling a fault in the futex_lock_pi path when
      the user space variable needs to be fixed up.
      
      The fault happens when a fork mapped the anon memory which contains
      the futex readonly for COW or the page got swapped out exactly between
      the unlock of the futex and the return of either the new futex owner
      or the task which was the expected owner but failed to acquire the
      kernel internal rtmutex. The current futex_lock_pi() code drops out
      with an inconsistent in case it faults and returns -EFAULT to user
      space. User space has no way to fixup that state.
      
      When we wrote this code we thought that we could not drop the hash
      bucket lock at this point to handle the fault.
      
      After analysing the code again it turned out to be wrong because there
      are only two tasks involved which might modify the pi_state and the
      user space variable:
      
       - the task which acquired the rtmutex
       - the pending owner of the pi_state which did not get the rtmutex
      
      Both tasks drop into the fixup_pi_state() function before returning to
      user space. The first task which acquired the hash bucket lock faults
      in the fixup of the user space variable, drops the spinlock and calls
      futex_handle_fault() to fault in the page. Now the second task could
      acquire the hash bucket lock and tries to fixup the user space
      variable as well. It either faults as well or it succeeds because the
      first task already faulted the page in.
      
      One caveat is to avoid a double fixup. After returning from the fault
      handling we reacquire the hash bucket lock and check whether the
      pi_state owner has been modified already.
      
      Reported-by: default avatarDavid Holmes <david.holmes@sun.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Holmes <david.holmes@sun.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      935cfe23
    • Alan Cox's avatar
      TTY: fix for tty operations bugs · 2a739dd5
      Alan Cox authored
      
      This is fixed with the recent tty operations rewrite in mainline in a
      different way, this is a selective backport of the relevant portions to
      the -stable tree.
      
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2a739dd5
  3. Jun 24, 2008
  4. Jun 22, 2008
  5. Jun 16, 2008