03 Sep, 2008

34 commits

  • 1. Check if virtual resolution fits into memory.
    Otherwise, Linux hangs during panning.
    2. When selected use all available memory to
    maximize yres_virtual to speed up panning
    (previously also xres_virtual was increased).
    3. Simplify memory restriction calculations.

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

    Krzysztof Helt
     
  • We don't change pid_ns->child_reaper when the main thread of the
    subnamespace init exits. As Robert Rex pointed
    out this is wrong.

    Yes, the re-parenting itself works correctly, but if the reparented task
    exits it needs ->parent->nsproxy->pid_ns in do_notify_parent(), and if the
    main thread is zombie its ->nsproxy was already cleared by
    exit_task_namespaces().

    Introduce the new function, find_new_reaper(), which finds the new
    ->parent for the re-parenting and changes ->child_reaper if needed. Kill
    the now unneeded exit_child_reaper().

    Also move the changing of ->child_reaper from zap_pid_ns_processes() to
    find_new_reaper(), this consolidates the games with ->child_reaper and
    makes it stable under tasklist_lock.

    Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11391

    Reported-by: Robert Rex
    Signed-off-by: Oleg Nesterov
    Acked-by: Serge Hallyn
    Acked-by: Pavel Emelyanov
    Acked-by: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • zap_pid_ns_processes() sets pid_ns->child_reaper = NULL, this is wrong.

    Yes, we have already killed all tasks in this namespace, and sys_wait4()
    doesn't see any child. But this doesn't mean ->children list is empty, we
    may have EXIT_DEAD tasks which are not visible to do_wait(). In that case
    the subsequent forget_original_parent() will crash the kernel because it
    will try to re-parent these tasks to the NULL reaper.

    Even if there are no childs, it is not good that forget_original_parent()
    uses reaper == NULL.

    Change the code to set ->child_reaper = init_pid_ns.child_reaper instead.
    We could use pid_ns->parent->child_reaper as well, I think this does not
    really matter. These EXIT_DEAD tasks are not visible to the new ->parent
    after re-parenting, they will silently do release_task() eventually.

    Note that we must change ->child_reaper, otherwise
    forget_original_parent() will use reaper == father, and in that case we
    will hit the (correct) BUG_ON(!list_empty(&father->children)).

    Signed-off-by: Oleg Nesterov
    Acked-by: Serge Hallyn
    Acked-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelyanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • At91_mci is abusing dma_free_coherent(), which may not be called with IRQs
    disabled. I saw "mkfs.ext3" on an MMC card objecting voluminously as each
    write completed:

    WARNING: at arch/arm/mm/consistent.c:368 dma_free_coherent+0x2c/0x224()
    [] (dump_stack+0x0/0x14) from [] (warn_on_slowpath+0x4c/0x68)
    [] (warn_on_slowpath+0x0/0x68) from [] (dma_free_coherent+0x2c/0x224)
    r6:00008008 r5:ffc06000 r4:00000000
    [] (dma_free_coherent+0x0/0x224) from [] (at91_mci_irq+0x374/0x420)
    [] (at91_mci_irq+0x0/0x420) from [] (handle_IRQ_event+0x2c/0x6c)
    ...

    This bug has been around for a LONG time. The MM warning is from late
    2005, but the driver merged a year later ... so I'm puzzled why nobody
    noticed this before now.

    The fix involves noting that this buffer shouldn't be DMA-coherent; it's
    just used for normal DMA writes. So replace it with standard kmalloc()
    buffering and DMA mapping calls.

    This is the quickie fix. A better one would not rely on allocating large
    bounce buffers. (Note that dma_alloc_coherent could have failed too, but
    that case was ignored... kmalloc is a bit more likely to fail though.)

    Signed-off-by: David Brownell
    Acked-by: Pierre Ossman
    Cc: Andrew Victor
    Acked-by: Nicolas Ferre
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Recent changes to tighten the check for UARTs that don't correctly
    re-assert THRE (01c194d9278efc15d4785ff205643e9c0bdcef53: "serial 8250:
    tighten test for using backup timer") caused problems when such a UART was
    opened for the second time - the bug could only successfully be detected
    at first initialization. For users of this version of this particular
    UART IP it is fatal.

    This patch stores the information about the bug in the bugs field of the
    port structure when the port is first started up so subsequent opens can
    check this bit even if the test for the bug fails.

    David Brownell: "My own exposure to this is that the UART on DaVinci
    hardware, which TI allegedly derived from its original 16550 logic, has
    periodically gone from working to unusable with the mainline 8250.c ...
    and back and forth a bunch. Currently it's "unusable", a regression from
    some previous versions. With this patch from Will, it's usable."

    Signed-off-by: Will Newton
    Acked-by: Alex Williamson
    Cc: Alan Cox
    Cc: David Brownell
    Cc: [2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Newton
     
  • Signed-off-by: Henrik Rydberg
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Henrik Rydberg
     
  • WARNING: vmlinux.o(.data+0x1f5c0): Section mismatch in reference from the variable contig_page_data to the variable .init.data:bootmem_node_data
    The variable contig_page_data references
    the variable __initdata bootmem_node_data
    If the reference is valid then annotate the
    variable with __init* (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

    Signed-off-by: Marcin Slusarz
    Cc: Johannes Weiner
    Cc: Sean MacLennan
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     
  • The exit function neglects to remove debugfs entries, leading to a BUG
    on reload.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Russ Dill
    Acked-by: Carlos Corbacho
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russ Dill
     
  • Dio write returns EIO when try_to_release_page fails because bh is
    still referenced.

    The patch

    commit 3f31fddfa26b7594b44ff2b34f9a04ba409e0f91
    Author: Mingming Cao
    Date: Fri Jul 25 01:46:22 2008 -0700

    jbd: fix race between free buffer and commit transaction

    was merged into 2.6.27-rc1, but I noticed that this patch is not enough
    to fix the race.

    I did fsstress test heavily to 2.6.27-rc1, and found that dio write still
    sometimes got EIO through this test.

    The patch above fixed race between freeing buffer(dio) and committing
    transaction(jbd) but I discovered that there is another race, freeing
    buffer(dio) and ext3/4_ordered_writepage.

    : background_writeout()
    ->write_cache_pages()
    ->ext3_ordered_writepage()
    walk_page_buffers() -> take a bh ref
    block_write_full_page() -> unlock_page
    : try_to_release_page fails)
    walk_page_buffers() ->release a bh ref

    ext3_ordered_writepage holds bh ref and does unlock_page remaining
    taking a bh ref, so this causes the race and failure of
    try_to_release_page.

    To fix this race, I used the approach of falling back to buffered
    writes if try_to_release_page() fails on a page.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Hisashi Hifumi
    Cc: Chris Mason
    Cc: Jan Kara
    Cc: Mingming Cao
    Cc: Zach Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hisashi Hifumi
     
  • I have gotten to the root cause of the hugetlb badness I reported back on
    August 15th. My system has the following memory topology (note the
    overlapping node):

    Node 0 Memory: 0x8000000-0x44000000
    Node 1 Memory: 0x0-0x8000000 0x44000000-0x80000000

    setup_zone_migrate_reserve() scans the address range 0x0-0x8000000 looking
    for a pageblock to move onto the MIGRATE_RESERVE list. Finding no
    candidates, it happily continues the scan into 0x8000000-0x44000000. When
    a pageblock is found, the pages are moved to the MIGRATE_RESERVE list on
    the wrong zone. Oops.

    setup_zone_migrate_reserve() should skip pageblocks in overlapping nodes.

    Signed-off-by: Adam Litke
    Acked-by: Mel Gorman
    Cc: Dave Hansen
    Cc: Nishanth Aravamudan
    Cc: Andy Whitcroft
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adam Litke
     
  • Update the location of the NTFS homepage in several files.

    Signed-off-by: Adrian Bunk
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide/Kconfig: mark ide-scsi as deprecated
    ide-disk: remove stale init_idedisk_capacity() documentation
    palm_bk3710: improve IDE registration
    ide: fix hwif_to_node()
    IDE: palm_bk3710: fix compile warning for unused variable
    IDE: compile fix for sff_dma_ops

    Linus Torvalds
     
  • Mark ide-scsi as deprecated and remove stale/bogus documentation.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * fix device tree ... don't forget to set the parent device

    * let init/exit code be removed where practical

    Signed-off-by: David Brownell
    [bart: splitted it from bigger DaVinci patch, s/hw.parent/hw.dev/]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    David Brownell
     
  • hwif_to_node() incorrectly assumes that hwif->dev always belongs to
    a PCI device. This results in ide-cs oopsing in init_irq() after
    commit c56c5648a3bd15ff14c50f284b261140cd5b5472 accidentally fixed
    device tree registration for ide-cs. Fix it by using dev_to_node().

    Thanks to Martin Michlmayr and Larry Finger for help with debugging
    the issue.

    Reported-by: Martin Michlmayr
    Tested-by: Martin Michlmayr
    Cc: Larry Finger
    Cc: Dominik Brodowski
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Kevin Hilman
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kevin Hilman
     
  • The sff_dma_ops struct should be wrapped by BLK_DEV_IDEDMA_SFF instead
    of BLK_DEV_IDEDMA_PCI.

    Signed-off-by: Kevin Hilman
    Cc: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kevin Hilman
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda - Add mic-boost controls to ALC662/663 auto configuration
    ALSA: hda - Fix ALC663 auto-probe
    ALSA: ASoC: fix pxa2xx-i2s clk_get call
    ALSA: hda: Distortion fix for dell_m6_core_init

    Linus Torvalds
     
  • * 'audit.b57' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
    [PATCH] audit: Moved variable declaration to beginning of function

    Linus Torvalds
     
  • * 'for-linus' of git://neil.brown.name/md:
    Fix problem with waiting while holding rcu read lock in md/bitmap.c
    Remove invalidate_partition call from do_md_stop.

    Linus Torvalds
     
  • With the new firmware infrastructure in 2.6.27, some files are generated and shouldn't be
    diffed; add these 2 to the "dontdiff" file

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • This fixes a typo in commit 2a2a64714d9c40f7705c4de1e79a5b855c7211a9 "Disable MWAIT via DMI on broken Compal board".

    It allows the nomwait dmi check to actually detect the Acer 5220.

    Signed-off-by: Dennis Jansen
    Tested-by: Dennis Jansen
    Acked-by: Zhao Yakui
    Signed-off-by: Linus Torvalds

    Dennis Jansen
     
  • * git://git.infradead.org/users/dwmw2/random-2.6:
    [MTD] mtdchar.c: Fix regression in MEMGETREGIONINFO ioctl()
    dabusb_fpga_download(): fix a memory leak
    Remove '#include ' from mm/page_isolation.c
    Fix modules_install on RO nfs-exported trees.

    Linus Torvalds
     
  • * 'for-2.6.27' of git://linux-nfs.org/~bfields/linux:
    nfsd: fix buffer overrun decoding NFSv4 acl
    sunrpc: fix possible overrun on read of /proc/sys/sunrpc/transports
    nfsd: fix compound state allocation error handling
    svcrdma: Fix race between svc_rdma_recvfrom thread and the dto_tasklet

    Linus Torvalds
     
  • Fix operator precedence bug in atari_keyb_init, which caused a failure on CT60

    Signed-off-by: Michael Schmitz
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Michael Schmitz
     
  • A parisc allmodconfig build produces this:

    arch/parisc/hpux/fs.c:107: error: 'buffer' undeclared (first use in this function)

    Introduced by commit da574983de9f9283ba35662c8723627096e160de ("[PATCH]
    fix hpux_getdents()").

    Helge Dille also reported this in bugzilla 11461:

    http://bugzilla.kernel.org/show_bug.cgi?id=11461

    and he posted an identical patch.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Helge Deller
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • The recent commit 16d9679f33caf7e683471647d1472bfe133d858 changed
    check_hung_task() to filter out the TASK_KILLABLE tasks. We can
    move this check to the caller which has to test t->state anyway.

    Signed-off-by: Oleg Nesterov
    Acked-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Fix kernel-doc warning for new function:

    Warning(linux-2.6.27-rc5-git2//kernel/resource.c:448): No description found for parameter 'root'

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

    Randy Dunlap
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon: downgrade debug message from info to debug.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    [CIFS] Turn off Unicode during session establishment for plaintext authentication
    [CIFS] update cifs change log
    cifs: fix O_APPEND on directio mounts
    [CIFS] Fix plaintext authentication

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: restore original behavior of /proc/partition when there's no partition
    remove blk_register_filter and blk_unregister_filter in gendisk

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: setup_valid_addr_bitmap_from_pavail() should be __init
    sparc: Fix resource flags for PCI children in OF device tree.
    sparc32: Implement smp_call_function_single().

    Linus Torvalds
     
  • Breaking lines due to some imaginary problem with a long line length is
    often stupid and wrong, but never more so when it splits a string that
    is printed out into multiple lines. This really ended up making it much
    harder to find where some error strings were printed out, because a
    simple 'grep' didn't work.

    I'm sure there is tons more of this particular idiocy hiding in other
    places, but this particular case hit me once more last week. So fix it.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

02 Sep, 2008

6 commits