08 Feb, 2006

29 commits

  • The spinlock-debug wait-loop was using loops_per_jiffy to detect too long
    spinlock waits - but on fast CPUs this led to a way too fast timeout and false
    messages.

    The fix is to include a __delay(1) call in the loop, to correctly approximate
    the intended delay timeout of 1 second. The code assumes that every
    architecture implements __delay(1) to last around 1/(loops_per_jiffy*HZ)
    seconds.

    Signed-off-by: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Compound pages on SMP systems can now often be freed from pagetables via
    the release_pages path. This uses put_page_testzero which does not handle
    compound pages at all. Releasing constituent pages from process mappings
    decrements their count to a large negative number and leaks the reference
    at the head page - net result is a memory leak.

    The problem was hidden because the debug check in put_page_testzero itself
    actually did take compound pages into consideration.

    Fix the bug and the debug check.

    Signed-off-by: Nick Piggin
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Make SELinux depend on AUDIT as it requires the basic audit support to log
    permission denials at all. Note that AUDITSYSCALL remains optional for
    SELinux, although it can be useful in providing further information upon
    denials.

    Signed-off-by: Stephen Smalley
    Acked-by: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Smalley
     
  • Fix compilation problem in PM headers.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • We had a user trigger this message on a box that had a lot of different
    mounts, all with different options. It might help narrow down wtf happened
    if we print out which device failed.

    Signed-off-by: Dave Jones
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Userspace can alter the string after the kernel has run strlen_user().

    Also: the strlen_user() return value includes the \0, so fix that.

    Also: handle EFAULT from strlen_user().

    It's unlikely anyone is using this code. Very, very unlikely. If I
    remember correctly, CONFIG_HPUX turns this code on, but one would actually
    need CONFIG_BINFMT_SOM to load a binary that could cause a problem, and
    BINFMT_SOM has had an #error in it for quite some time.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • Fix one-shot support in inotify. We currently drop the IN_ONESHOT flag
    during watch addition. Fix is to not do that.

    Signed-off-by: Robert Love
    Cc: John McCutchan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert Love
     
  • Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • A previous patch removed a file from the build without removing it from the
    tree.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • We weren't making sure that we initialized the FP registers of new processes
    to sane values.

    This patch also moves some defines in the affected area closer to where they
    are used.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • The process that UML uses to probe the host's ptrace capabilities can (rarely)
    receive a SIGWINCH, confusing the parent. This fixes that by blocking
    SIGWINCH.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • The network driver added an interface to the "opened" list when it was
    configured, not when it was brought up, and removed it when it was taken down.
    A sequence of ifconfig up, ifconfig down, ... caused it to be removed
    multiple times from the list without being added in between, resulting in a
    crash. This patch moves the add to when the interface is brought up.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • When UML opens a TUN/TAP device, the file descriptor could be copied into
    later, long-lived threads, holding the device open even after the interface is
    taken down, preventing it from being brought up again. This patch makes these
    descriptors close-on-exec so that they disappear from helper processes, and
    adds CLONE_FILES to a UML helper thread so that the descriptors are closed in
    the thread when they are closed elsewhere in UML.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • It doesn't do anything but emit a warning, but there's a user population
    that's used to adding 'debug' to the UML command line in order to gdb it.
    With skas0 mode, that's not necessary, but these users need some indication
    that 'debug' doesn't do what they want.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Fix do_path_lookup() to avoid accessing invalid dentry or inode when the
    link_path_walk() has failed. This should fix Bugme #5897.

    Signed-off-by: Suzuki K P
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Suzuki
     
  • With the latest 2.6.15 kernel builds for alpha on Debian, we ran into a
    problem with undefined references to __cmpxchg_called_with_bad_pointer() in
    a couple of kernel modules (xfs.ko and drm.ko; see
    http://bugs.debian.org/347556).

    It looks like people have been trying to out-clever each other wrt the
    definition of "inline" on this architecture :), with the result that
    __cmpxchg(), which must be inlined so the compiler can see its argument is
    const, is not guaranteed to be inlined. Indeed, it was not being inlined
    when building with -Os.

    The attached patch fixes the issue by adding an
    __attribute__((always_inline)) explicitly to the definition of __cmpxchg()
    instead of relying on redefines of "inline" elsewhere to make this happen.

    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steve Langasek
     
  • This does not show up unless you #define DEBUG in the file, which most
    people wouldn't do. On PPC405, at least, "sector_t" is unsigned long,
    which doesn't match %llx/%llu. Since sector# may well be >32 bits, promote
    the value to match the format.

    Signed-off-by: Michael Richardson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Richardson
     
  • I just noticed that my patch "don't create on open that fails due to
    ERR_GRACE" (recently commited as fb553c0f17444e090db951b96df4d2d71b4f4b6b)
    had an obvious problem that causes a deadlock on reboot recovery. Sending
    in this now since it seems like a clear 2.6.16 candidate.--b.

    We're returning with a lock held in some error cases.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • Remove wrong and misleading comments.

    Return VM_FAULT_OOM if the hugetlbpage fault handler cannot allocate a
    page. do_no_page will end up doing do_exit(SIGKILL).

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • When hugepages are newly allocated to a file in mm/hugetlb.c, we clear them
    with a call to clear_highpage() on each of the subpages. We should be
    using clear_user_highpage(): on powerpc, at least, clear_highpage() doesn't
    correctly mark the page as icache dirty so if the page is executed shortly
    after it's possible to get strange results.

    Signed-off-by: David Gibson
    Acked-by: William Lee Irwin III
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     
  • Currently, x86_64 and ia64 arches do not clear the corresponding bits in
    the node's cpumask when a cpu goes down or cpu bring up is cancelled. This
    is buggy since there are pieces of common code where the cpumask is checked
    in the cpu down code path to decide on things (like in the slab down path).
    PPC does the right thing, but x86_64 and ia64 don't (This was the reason
    Sonny hit upon a slab bug during cpu offline on ppc and could not reproduce
    on other arches). This patch fixes it for x86_64. I won't attempt ia64 as
    I cannot test it.

    Credit for spotting this should go to Alok.

    (akpm: this was applied, then reverted. But it's OK now because we now use
    for_each_cpu() in the right places).

    Signed-off-by: Alok N Kataria
    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Shai Fultheim
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     
  • - Remove unneeded bio_get() which would cause a bio leak

    - Writing doesn't dirty pages. Reading dirties pages.

    - We should dirty the pages after the IO completion, not before

    (Busy-waiting for disk I/O completion isn't very polite.)

    Signed-off-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • drivers/base/bus.c:166: warning: `driver_attr_unbind' defined but not used
    drivers/base/bus.c:194: warning: `driver_attr_bind' defined but not used

    Looks like these two attributes and supporting functions want to be
    #ifdef HOTPLUG'd

    Signed-off-by: Russell King
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     
  • Linus Torvalds
     
  • The softirq rq completion handler needs to save/restore interrupt flags
    appropriately.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • Linus Torvalds
     
  • Fix wrong '!' in bad apic fix

    I forgot to remove the ! when moving the code from x86-64 to i386 x86-64
    tested !disable_apic, but of course for cpu_has_apic it shouldn't be
    negated.

    Credit goes to Jan Beulich for spotting it with eagle eyes.

    Cc: Jan Beulich
    Cc: Ingo Molnar
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Linus Torvalds
     
  • Linus Torvalds
     

07 Feb, 2006

11 commits