13 Mar, 2009

3 commits

  • It is currently impossible to run a user-mode linux machine inside another
    user-mode linux (UML on UML). It breaks after a few instructions. When
    it tries to check whether SYSEMU is installed (the inner) UML receives an
    inconsistent result (from the outer UML).

    This is the output of a broken attempt:
    $ ./linux mem=256m ubd0=cow
    Locating the bottom of the address space ... 0x0
    Locating the top of the address space ... 0xc0000000
    Core dump limits :
    soft - 0
    hard - NONE
    Checking that ptrace can change system call numbers...OK
    Checking ptrace new tags for syscall emulation...unsupported
    Checking syscall emulation patch for ptrace...check_sysemu : expected SIGTRAP, got status = 256
    $

    The problem is the following:

    PTRACE_SYSCALL/SINGLESTEP is currently managed inside arch_ptrace for ARCH=um.

    PTRACE_SYSEMU/SUSEMU_SINGLESTEP is not captured in arch_ptrace's switch,
    therefore it is erroneously passed back to ptrace_request (in
    kernel/ptrace).

    This simple patch simply forces ptrace to return an error on
    PTRACE_SYSEMU/SUSEMU_SINGLESTEP as it is unsupported on ARCH=um, and fixes
    the problem.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Renzo Davoli
    Reviewed-by: WANG Cong
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Renzo Davoli
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sunhme: Fix qfe parent detection.
    sparc64: Fix lost interrupts on sun4u.
    sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
    jsflash: stop defining MAJOR_NR

    Linus Torvalds
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
    MIPS: IP27: Enable RAID5 module
    MIPS: TXx9: update defconfigs
    MIPS: NEC VR5500 processor support fixup
    MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc

    Linus Torvalds
     

12 Mar, 2009

13 commits


11 Mar, 2009

24 commits

  • Fix kpf_copy_bit(src,dst) to be kpf_copy_bit(dst,src) to match the
    actual call patterns, e.g. kpf_copy_bit(kflags, KPF_LOCKED, PG_locked).

    This misplacement of src/dst only affected reporting of PG_writeback,
    PG_reclaim and PG_buddy. For others kflags==uflags so not affected.

    Signed-off-by: Wu Fengguang
    Reviewed-by: KOSAKI Motohiro
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • We need to check and report if there are no available fences - or else we
    spin endlessly waiting for a buffer to magically unpin itself.

    Signed-off-by: Chris Wilson
    Signed-off-by: Eric Anholt

    Chris Wilson
     
  • As we may steal the fence register of an unpinned buffer for another,
    every time we repin the buffer we need to recheck whether it needs to be
    allocated a fence.

    Signed-off-by: Chris Wilson
    Signed-off-by: Eric Anholt

    Chris Wilson
     
  • If we wait upon a request and successfully unbind a buffer occupying a
    fence register, then that slot will be freed and cause a NULL derefrence
    upon rescanning.

    Signed-off-by: Chris Wilson
    Signed-off-by: Eric Anholt

    Chris Wilson
     
  • Comparing the layouts of struct detail_pixel_timing with
    x.org's struct detailed_timings and how those are handled,
    it appears that the hsync_positive and vsync_positive
    fields are backwards.

    This patch fixes https://bugs.freedesktop.org/show_bug.cgi?id=20019
    for me. It was tested on 2 monitors, LG FLATRON L225WS 22" and
    a YAKUMO 17" for which more details are unknown.

    Signed-off-by: Pantelis Koukousoulas
    Signed-off-by: Dave Airlie

    Pantelis Koukousoulas
     
  • radeonfb and aty128fb have a special hook called by the PowerMac platform
    code very very early on resume from sleep to bring the screen back. This
    is useful for debugging wakup problems, but unfortunately, this also became
    a source of problems of its own.

    The hook is called extremely early, with interrupts still off, and the code
    path involved with that code nowadays rely on things like taking mutexes,
    GFP_KERNEL allocations, etc...

    In addition, the driver now relies on the PCI core to restore the standard
    config space before calling resume which doesn't happen with this early
    code path.

    I'm keeping the code in but commented out along with a fixup call to
    pci_restore_state(). The reason is that I still want to make it easy to
    re-enable temporarily to track wake up problems, and it's possible that
    I can revive it at some stage if we make sleeping things save to call
    in early resume using a system state.

    In the meantime, this should fix several reported regressions.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The hvcs and hvsi backends both set tty->low_latency to one, along
    with more or less scary comments regarding bugs or races that would
    happen if not doing so.

    However, they also both call tty_flip_buffer_push() in conexts where
    it's illegal to do so since some recent tty changes (or at least it
    may have been illegal always but it nows blows) when low_latency is
    set (ie, hard interrupt or with spinlock held and irqs disabled).

    This removes the setting for now to get them back to working condition,
    we'll have to address the races described in the comments separately
    if they are still an issue (some of this might have been fixed already).

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Benjamin Herrenschmidt
     
  • Prevent the kernel from being crashed by a divide-by-zero operation when
    supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

    Previously i810_main.c:1005 (i810_check_params) was using the global
    'yres' symbol previously defined at i810_main.c:145 as a module parameter
    value holder (i810_main.c:2174). If i810fb is compiled-in or if this
    param doesn't get a default value, this direct usage leads to a
    divide-by-zero at i810_main.c:1005 (i810_check_params). The patch simply
    replace the 'yres' global, perhaps undefined symbol usage by a given
    parameter structure lookup.

    This problem occurs with directfb, mplayer -vo fbdev, SDL library.
    It was also reported ( but non solved ) at:

    http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.html

    Signed-off-by: Samuel CUELLA
    Cc: Jiri Kosina
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel CUELLA
     
  • There isn't any mcfqspi.h in the tree, and without it everything inside the
    #ifdef CONFIG_SPI is uncompilable.

    Signed-off-by: Steven King
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven King
     
  • Signed-off-by: Steven King
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven King
     
  • Update the RCU documentation to call out the need for callers of
    primitives like call_rcu() and synchronize_rcu() to prevent subsequent RCU
    readers from hazard.

    Signed-off-by: Paul E. McKenney
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • We were returning early in the sysfs directory cleanup function if the
    user belonged to a non init usernamespace. Due to this a lot of the
    cleanup was not done and we were left with a leak. Fix the leak.

    Reported-by: Serge Hallyn
    Signed-off-by: Dhaval Giani
    Acked-by: Serge Hallyn
    Tested-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dhaval Giani
     
  • commit e480814f138cd5d78a8efe397756ba6b6518fdb6 ("[MTD] [MAPS] physmap:
    fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
    dereference in physmap_flash_remove when called from the error path in
    physmap_flash_probe (if map_probe failed).

    Call del_mtd_{partition,device} only if info->cmtd was not NULL.

    Reported-by: pHilipp Zabel
    Signed-off-by: Atsushi Nemoto
    Cc: David Woodhouse
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • When GTT size is equal to amount of video memory, the amount of GTT
    entries is computed lower than zero, which is invalid and leads to
    off-by-one error in intel_i915_configure()

    Originally posted here:
    http://bugzilla.kernel.org/show_bug.cgi?id=12539
    http://bugzilla.redhat.com/show_bug.cgi?id=445592

    Signed-off-by: Lubomir Rintel
    Cc: Lubomir Rintel
    Cc: Dave Airlie
    Reviewed-by: Eric Anholt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lubomir Rintel
     
  • Commit 771999b65f79264acde4b855e5d35696eca5e80c ("[MTD] DataFlash: bugfix,
    binary page sizes now handled") broke support for probing AT45DB321C flash
    chips. These chips do not support the "page size" status bit, so if we
    match the JEDEC id return early.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Will Newton
    Cc: David Woodhouse
    Acked-by: David Brownell
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Newton
     
  • Fix a problem in the IDR system, where an idr_remove_all() hands a data
    element to call_rcu() (via free_layer()) before making that data element
    inaccessible to new readers. This is very bad, and results in readers
    still having a reference to this data element at the end of the grace
    period.

    Tests on large machines that concurrently map and unmap user-space memory
    within the same multithreaded process result in crashes within about five
    minutes. Applying this patch increases the kernel's longevity to the
    three-to-eight-hour range.

    There appear to be other similar problems in idr_get_empty_slot() and
    sub_remove(), but I fixed the easy one in idr_remove_all() first. It is
    therefore no surprise that failures still occur.

    Located-by: Milton Miller II
    Tested-by: Milton Miller II
    Signed-off-by: Paul E. McKenney
    Cc: Manfred Spraul
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • Very annoying when working with containters.

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Impact: fix bug to make agp work with dri

    Jeffrey reported that dri does work with 64bit, but doesn't work with
    32bit it turns out NB aperture is 32M, aperture on agp is 128M

    64bit is using 64M for vaidation for 64 iommu/gart 32bit is only using
    32M..., and will not update the nb aperture.

    So try to compare nb apterture and agp apterture before leaving not
    touch nb aperture.

    Reported-by: Jeffrey Trull
    Tested-by: Jeffrey Trull
    Signed-off-by: Yinghai Lu
    Acked-by: Dave Airlie
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • * ->put_char changes
    * HIGHMEM is bogus it seems, there is no kmap_atomic() et al
    * some includes

    Signed-off-by: Alexey Dobriyan
    Acked-by: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • The adt7468 chip supports VRM10 sensors just like the adt7463; add a
    missing check for it.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     
  • The verstep check in the lm85 driver fails because the upper nibble of
    the version register is 0x7, not 0x6, on the adt7468 chip. Probing of
    all adt7468s was broken by 69fc1feba2d5856ff74dedb6ae9d8c490210825c
    ("hwmon: (lm85) Rework the device detection"), and this patch fixes
    that. Also add in a missing i2c_device_id that accidentally got dropped
    from the original patch.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     
  • The COMPAT_BRK kconfig symbol does not depend on EMBEDDED, but it is in
    the midst of the EMBEDDED menu symbols, so it mucks up the EMBEDDED menu.
    Fix by moving it to just after all of the EMBEDDED menu symbols. Also,
    ANON_INODES has a similar problem, so move it to just above the EMBEDDED
    menu items since it is used in the EMBEDDED menu.

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

    Randy Dunlap
     
  • get_nid_for_pfn() returns int

    Presumably the (nid < 0) case has never happened.

    We do know that it is happening on one system while creating a symlink for
    a memory section so it should also happen on the same system if
    unregister_mem_sect_under_nodes() were called to remove the same symlink.

    The test was actually added in response to a problem with an earlier
    version reported by Yasunori Goto where one or more of the leading pages
    of a memory section on the 2nd node of one of his systems was
    uninitialized because I believe they coincided with a memory hole.

    That earlier version did not ignore uninitialized pages and determined
    the nid by considering only the 1st page of each memory section. This
    caused the symlink to the 1st memory section on the 2nd node to be
    incorrectly created in /sys/devices/system/node/node0 instead of
    /sys/devices/system/node/node1. The problem was fixed by adding the
    test to skip over uninitialized pages.

    I suspect we have not seen any reports of the non-removal
    of a symlink due to the incorrect declaration of the nid
    variable in unregister_mem_sect_under_nodes() because
    - systems where a memory section could have an uninitialized
    range of leading pages are probably rare.
    - memory remove is probably not done very frequently on the
    systems that are capable of demonstrating the problem.
    - lingering symlink(s) that should have been removed may
    have simply gone unnoticed.

    [garyhade@us.ibm.com: wrote changelog]
    Signed-off-by: Roel Kluin
    Cc: Gary Hade
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin