1. 22 6月, 2007 1 次提交
  2. 21 6月, 2007 4 次提交
  3. 09 6月, 2007 2 次提交
    • A
      x86_64: oops_begin() fix · b39b7036
      Andrew Morton 提交于
      We don't want to see this:
      
      >  BUG: using smp_processor_id() in preemptible [00000001] code: bash/3857
      >  caller is oops_begin+0xb/0x6f
      >
      >  Call Trace:
      >  [<ffffffff8020ab4d>] show_trace+0x34/0x4f
      >  [<ffffffff8020ab7a>] dump_stack+0x12/0x17
      >  [<ffffffff8030d92d>] debug_smp_processor_id+0xad/0xbc
      >  [<ffffffff8042388f>] oops_begin+0xb/0x6f
      >  [<ffffffff8042520b>] do_page_fault+0x66a/0x7c0
      >  [<ffffffff804234bd>] error_exit+0x0/0x84
      >
      
      coming out when the kernel is trying to oops.
      
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b39b7036
    • B
      fix sysrq-m oops · 12710a56
      Bob Picco 提交于
      We aren't sampling for holes in memory.  Thus we encounter a section hole
      with empty section map pointer for SPARSEMEM and OOPs for show_mem.  This
      issue has been seen in 2.6.21, current git and current mm.  The patch below
      is for mainline and mm.  It was boot tested for SPARSEMEM, current VMEMMAP
      of Andy's in mm ml and DISCONTIGMEM.  A slightly different patch will be
      posted to stable for 2.6.21.
      
      Previous to commit f0a5a58a memory_present
      was called for node_start_pfn to node_end_pfn.  This would cover the
      hole(s) with reserved pages and valid sections.  Most SPARSEMEM supported
      arches do a pfn_valid check in show_mem before computing the page structure
      address.
      
      This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo.
      Thanks to Arnaldo for testing.
      Signed-off-by: NBob Picco <bob.picco@hp.com>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12710a56
  4. 08 6月, 2007 1 次提交
    • S
      enable interrupts in user path of page fault. · e5e3c84b
      Steven Rostedt 提交于
      This is a minor fix, but what is currently there is essentially wrong.
      In do_page_fault, if the faulting address from user code happens to be
      in kernel address space (int *p = (int*)-1; p = 0xbed;)  then the
      do_page_fault handler will jump over the local_irq_enable with the
      
        goto bad_area_nosemaphore;
      
      But the first line there sees this is user code and goes through the
      process of sending a signal to send SIGSEGV to the user task. This whole
      time interrupts are disabled and the task can not be preempted by a
      higher priority task.
      
      This patch always enables interrupts in the user path of the
      bad_area_nosemaphore.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e5e3c84b
  5. 01 6月, 2007 1 次提交
  6. 24 5月, 2007 2 次提交
  7. 22 5月, 2007 4 次提交
    • J
      x86_64: vsyscall time() fix · d0aff6e6
      john stultz 提交于
      The vsyscall time() function basically returns the second portion of
      xtime directly.  This however means that there is about a ticks worth of
      time each second where time() will return a second value less then what
      gettimeofday() does.
      
      Additionally, this window where vtime() is behind vgettimeofday() grows
      when dynticks is enabled, so its probably good to get this in before
      dynticks lands.
      
      Big thanks to Sripathi for noticing this issue and creating a test case
      to work with!
      
      This patch changes the vtime() implemenation to call vgettimeofday(),
      much as syscall time() implementation calls gettimeofday().
      
      2.6.21 stable candidate too
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d0aff6e6
    • Y
      x86_64: early_print kernel console should send CRLF not LFCR · d8902bfc
      Yinghai Lu 提交于
      In
      	commit d358788f
      	Author: Russell King <rmk@dyn-67.arm.linux.org.uk>
      	Date:   Mon Mar 20 20:00:09 2006 +0000
      
      Glen Turner reported that writing LFCR rather than the more
      traditional CRLF causes issues with some terminals.
      
      Since this afflicts many serial drivers, extract the common code to a
      library function (uart_console_write) and arrange for each driver to
      supply a "putchar" function.
      
      but early_printk is left out.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d8902bfc
    • A
      x86_64: Update defconfig · 5e200c28
      Andi Kleen 提交于
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5e200c28
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  8. 19 5月, 2007 2 次提交
  9. 15 5月, 2007 1 次提交
    • L
      Revert "ipmi: add new IPMI nmi watchdog handling" · faa8b6c3
      Linus Torvalds 提交于
      This reverts commit f64da958.
      
      Andi Kleen is unhappy with the changes, and they really do not seem
      worth it.  IPMI could use DIE_NMI_IPI instead of the new callback, even
      though that ends up having its own set of problems too, mainly because
      the IPMI code cannot really know the NMI was from IPMI or not.
      
      Manually fix up conflicts in arch/x86_64/kernel/traps.c and
      drivers/char/ipmi/ipmi_watchdog.c.
      
      Cc: Andi Kleen <ak@suse.de>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      faa8b6c3
  10. 13 5月, 2007 2 次提交
  11. 12 5月, 2007 2 次提交
  12. 11 5月, 2007 7 次提交
  13. 10 5月, 2007 2 次提交
  14. 09 5月, 2007 9 次提交
    • R
      Fix misspellings collected by members of KJ list. · beb7dd86
      Robert P. J. Day 提交于
      Fix the misspellings of "propogate", "writting" and (oh, the shame
      :-) "kenrel" in the source tree.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      beb7dd86
    • B
      x86, serial: convert legacy COM ports to platform devices · 7e92b4fc
      Bjorn Helgaas 提交于
      Make x86 COM ports into platform devices and don't probe for them
      if we have PNP.
      
      This prevents double discovery, where a device was found both by
      the legacy probe and by 8250_pnp, e.g.,
      
          serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
          00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
      
      This also means IRDA devices without a UART PNP ID will no longer be
      claimed by the serial driver, which might require changes in IRDA
      drivers and administration.
      
      In addition to this patch, you may need to configure a setserial init
      script, e.g., /etc/init.d/setserial, so it doesn't poke legacy UART
      stuff back in.  On Debian, "dpkg-reconfigure setserial" with the "kernel"
      option does this.
      
      To force the old legacy probe behavior even when we have PNPBIOS or
      ACPI, load the new legacy_serial module (or build 8250 static) with
      the "legacy_serial.force" option.
      
      [akpm@linux-foundation.org: fix makefiles]
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Keith Owens <kaos@ocs.com.au>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: Matthieu CASTET <castet.matthieu@free.fr>
      Cc: Jean Tourrilhes <jt@hpl.hp.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Ville Syrjala <syrjala@sci.fi>
      Cc: Russell King <rmk+serial@arm.linux.org.uk>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7e92b4fc
    • B
      Add IRQF_IRQPOLL flag on x86_64 · e6d828f4
      Bernhard Walle 提交于
      Add IRQF_IRQPOLL for the timer interrupt on x86_64.
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e6d828f4
    • A
      Kprobes: The ON/OFF knob thru debugfs · bf8f6e5b
      Ananth N Mavinakayanahalli 提交于
      This patch provides a debugfs knob to turn kprobes on/off
      
      o A new file /debug/kprobes/enabled indicates if kprobes is enabled or
        not (default enabled)
      o Echoing 0 to this file will disarm all installed probes
      o Any new probe registration when disabled will register the probe but
        not arm it. A message will be printed out in such a case.
      o When a value 1 is echoed to the file, all probes (including ones
        registered in the intervening period) will be enabled
      o Unregistration will happen irrespective of whether probes are globally
        enabled or not.
      o Update Documentation/kprobes.txt to reflect these changes. While there
        also update the doc to make it current.
      
      We are also looking at providing sysrq key support to tie to the disabling
      feature provided by this patch.
      
      [akpm@linux-foundation.org: Use bool like a bool!]
      [akpm@linux-foundation.org: add printk facility levels]
      [cornelia.huck@de.ibm.com: Add the missing arch_trampoline_kprobe() for s390]
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bf8f6e5b
    • C
      kprobes: kretprobes simplifications · 4c4308cb
      Christoph Hellwig 提交于
       - consolidate duplicate code in all arch_prepare_kretprobe instances
         into common code
       - replace various odd helpers that use hlist_for_each_entry to get
         the first elemenet of a list with either a hlist_for_each_entry_save
         or an opencoded access to the first element in the caller
       - inline add_rp_inst into it's only remaining caller
       - use kretprobe_inst_table_head instead of opencoding it
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c4308cb
    • U
      utimensat implementation · 1c710c89
      Ulrich Drepper 提交于
      Implement utimensat(2) which is an extension to futimesat(2) in that it
      
      a) supports nano-second resolution for the timestamps
      b) allows to selectively ignore the atime/mtime value
      c) allows to selectively use the current time for either atime or mtime
      d) supports changing the atime/mtime of a symlink itself along the lines
         of the BSD lutimes(3) functions
      
      For this change the internally used do_utimes() functions was changed to
      accept a timespec time value and an additional flags parameter.
      
      Additionally the sys_utime function was changed to match compat_sys_utime
      which already use do_utimes instead of duplicating the work.
      
      Also, the completely missing futimensat() functionality is added.  We have
      such a function in glibc but we have to resort to using /proc/self/fd/* which
      not everybody likes (chroot etc).
      
      Test application (the syscall number will need per-arch editing):
      
      #include <errno.h>
      #include <fcntl.h>
      #include <time.h>
      #include <sys/time.h>
      #include <stddef.h>
      #include <syscall.h>
      
      #define __NR_utimensat 280
      
      #define UTIME_NOW       ((1l << 30) - 1l)
      #define UTIME_OMIT      ((1l << 30) - 2l)
      
      int
      main(void)
      {
        int status = 0;
      
        int fd = open("ttt", O_RDWR|O_CREAT|O_EXCL, 0666);
        if (fd == -1)
          error (1, errno, "failed to create test file \"ttt\"");
      
        struct stat64 st1;
        if (fstat64 (fd, &st1) != 0)
          error (1, errno, "fstat failed");
      
        struct timespec t[2];
        t[0].tv_sec = 0;
        t[0].tv_nsec = 0;
        t[1].tv_sec = 0;
        t[1].tv_nsec = 0;
        if (syscall(__NR_utimensat, AT_FDCWD, "ttt", t, 0) != 0)
          error (1, errno, "utimensat failed");
      
        struct stat64 st2;
        if (fstat64 (fd, &st2) != 0)
          error (1, errno, "fstat failed");
      
        if (st2.st_atim.tv_sec != 0 || st2.st_atim.tv_nsec != 0)
          {
            puts ("atim not reset to zero");
            status = 1;
          }
        if (st2.st_mtim.tv_sec != 0 || st2.st_mtim.tv_nsec != 0)
          {
            puts ("mtim not reset to zero");
            status = 1;
          }
        if (status != 0)
          goto out;
      
        t[0] = st1.st_atim;
        t[1].tv_sec = 0;
        t[1].tv_nsec = UTIME_OMIT;
        if (syscall(__NR_utimensat, AT_FDCWD, "ttt", t, 0) != 0)
          error (1, errno, "utimensat failed");
      
        if (fstat64 (fd, &st2) != 0)
          error (1, errno, "fstat failed");
      
        if (st2.st_atim.tv_sec != st1.st_atim.tv_sec
            || st2.st_atim.tv_nsec != st1.st_atim.tv_nsec)
          {
            puts ("atim not set");
            status = 1;
          }
        if (st2.st_mtim.tv_sec != 0 || st2.st_mtim.tv_nsec != 0)
          {
            puts ("mtim changed from zero");
            status = 1;
          }
        if (status != 0)
          goto out;
      
        t[0].tv_sec = 0;
        t[0].tv_nsec = UTIME_OMIT;
        t[1] = st1.st_mtim;
        if (syscall(__NR_utimensat, AT_FDCWD, "ttt", t, 0) != 0)
          error (1, errno, "utimensat failed");
      
        if (fstat64 (fd, &st2) != 0)
          error (1, errno, "fstat failed");
      
        if (st2.st_atim.tv_sec != st1.st_atim.tv_sec
            || st2.st_atim.tv_nsec != st1.st_atim.tv_nsec)
          {
            puts ("mtim changed from original time");
            status = 1;
          }
        if (st2.st_mtim.tv_sec != st1.st_mtim.tv_sec
            || st2.st_mtim.tv_nsec != st1.st_mtim.tv_nsec)
          {
            puts ("mtim not set");
            status = 1;
          }
        if (status != 0)
          goto out;
      
        sleep (2);
      
        t[0].tv_sec = 0;
        t[0].tv_nsec = UTIME_NOW;
        t[1].tv_sec = 0;
        t[1].tv_nsec = UTIME_NOW;
        if (syscall(__NR_utimensat, AT_FDCWD, "ttt", t, 0) != 0)
          error (1, errno, "utimensat failed");
      
        if (fstat64 (fd, &st2) != 0)
          error (1, errno, "fstat failed");
      
        struct timeval tv;
        gettimeofday(&tv,NULL);
      
        if (st2.st_atim.tv_sec <= st1.st_atim.tv_sec
            || st2.st_atim.tv_sec > tv.tv_sec)
          {
            puts ("atim not set to NOW");
            status = 1;
          }
        if (st2.st_mtim.tv_sec <= st1.st_mtim.tv_sec
            || st2.st_mtim.tv_sec > tv.tv_sec)
          {
            puts ("mtim not set to NOW");
            status = 1;
          }
      
        if (symlink ("ttt", "tttsym") != 0)
          error (1, errno, "cannot create symlink");
      
        t[0].tv_sec = 0;
        t[0].tv_nsec = 0;
        t[1].tv_sec = 0;
        t[1].tv_nsec = 0;
        if (syscall(__NR_utimensat, AT_FDCWD, "tttsym", t, AT_SYMLINK_NOFOLLOW) != 0)
          error (1, errno, "utimensat failed");
      
        if (lstat64 ("tttsym", &st2) != 0)
          error (1, errno, "lstat failed");
      
        if (st2.st_atim.tv_sec != 0 || st2.st_atim.tv_nsec != 0)
          {
            puts ("symlink atim not reset to zero");
            status = 1;
          }
        if (st2.st_mtim.tv_sec != 0 || st2.st_mtim.tv_nsec != 0)
          {
            puts ("symlink mtim not reset to zero");
            status = 1;
          }
        if (status != 0)
          goto out;
      
        t[0].tv_sec = 1;
        t[0].tv_nsec = 0;
        t[1].tv_sec = 1;
        t[1].tv_nsec = 0;
        if (syscall(__NR_utimensat, fd, NULL, t, 0) != 0)
          error (1, errno, "utimensat failed");
      
        if (fstat64 (fd, &st2) != 0)
          error (1, errno, "fstat failed");
      
        if (st2.st_atim.tv_sec != 1 || st2.st_atim.tv_nsec != 0)
          {
            puts ("atim not reset to one");
            status = 1;
          }
        if (st2.st_mtim.tv_sec != 1 || st2.st_mtim.tv_nsec != 0)
          {
            puts ("mtim not reset to one");
            status = 1;
          }
      
        if (status == 0)
           puts ("all OK");
      
       out:
        close (fd);
        unlink ("ttt");
        unlink ("tttsym");
      
        return status;
      }
      
      [akpm@linux-foundation.org: add missing i386 syscall table entry]
      Signed-off-by: NUlrich Drepper <drepper@redhat.com>
      Cc: Alexey Dobriyan <adobriyan@openvz.org>
      Cc: Michael Kerrisk <mtk-manpages@gmx.net>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c710c89
    • A
      Kprobes: print details of kretprobe on assertion failure · 0f95b7fc
      Ananth N Mavinakayanahalli 提交于
      In certain cases like when the real return address can't be found or when
      the number of tracked calls to a kretprobed function is less than the
      number of returns, we may not be able to find the correct return address
      after processing a kretprobe.  Currently we just do a BUG_ON, but no
      information is provided about the actual failing kretprobe.
      
      Print out details of the kretprobe before calling BUG().
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Maneesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f95b7fc
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
    • C
      move die notifier handling to common code · 1eeb66a1
      Christoph Hellwig 提交于
      This patch moves the die notifier handling to common code.  Previous
      various architectures had exactly the same code for it.  Note that the new
      code is compiled unconditionally, this should be understood as an appel to
      the other architecture maintainer to implement support for it aswell (aka
      sprinkling a notify_die or two in the proper place)
      
      arm had a notifiy_die that did something totally different, I renamed it to
      arm_notify_die as part of the patch and made it static to the file it's
      declared and used at.  avr32 used to pass slightly less information through
      this interface and I brought it into line with the other architectures.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
      [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1eeb66a1