11 Dec, 2008

11 commits

  • Fix a total bootup freeze on ia64.

    Signed-off-by: KAMEZAWA Hiroyuki
    Tested-by: Li Zefan
    Reported-by: Li Zefan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Fix build error when RTC_INTF_DEV=n:

    drivers/rtc/rtc-twl4030.c:402: error: 'twl4030_rtc_ioctl' undeclared here (not in a function)
    make[3]: *** [drivers/rtc/rtc-twl4030.o] Error 1

    Signed-off-by: Randy Dunlap
    Cc: David Brownell
    Cc: Tony Lindgren
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Add a call to cancel_work_sync() in fbcon_exit() to cancel any pending
    work in the fbcon workqueue.

    The current implementation of fbcon_exit() sets the fbcon workqueue
    function info->queue.func to NULL, but does not assure that there is no
    work pending when it does so. On occasion, depending on system timing,
    there will still be pending work in the queue when fbcon_exit() is
    called. This results in a null pointer deference when run_workqueue()
    tries to call the queue's work function.

    Fixes errors on shutdown similar to these:

    Console: switching to colour dummy device 80x25
    Unable to handle kernel paging request for data at address 0x00000000

    Signed-off-by: Geoff Levand
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geoff Levand
     
  • Currently, lru_add_drain_all() has two version.
    (1) use schedule_on_each_cpu()
    (2) don't use schedule_on_each_cpu()

    Gerald Schaefer reported it doesn't work well on SMP (not NUMA) S390
    machine.

    offline_pages() calls lru_add_drain_all() followed by drain_all_pages().
    While drain_all_pages() works on each cpu, lru_add_drain_all() only runs
    on the current cpu for architectures w/o CONFIG_NUMA. This let us run
    into the BUG_ON(!PageBuddy(page)) in __offline_isolated_pages() during
    memory hotplug stress test on s390. The page in question was still on the
    pcp list, because of a race with lru_add_drain_all() and drain_all_pages()
    on different cpus.

    Actually, Almost machine has CONFIG_UNEVICTABLE_LRU=y. Then almost machine use
    (1) version lru_add_drain_all although the machine is UP.

    Then this ifdef is not valueable.
    simple removing is better.

    Signed-off-by: KOSAKI Motohiro
    Cc: Christoph Lameter
    Cc: Lee Schermerhorn
    Acked-by: Gerald Schaefer
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • Revert

    commit e8ced39d5e8911c662d4d69a342b9d053eaaac4e
    Author: Mingming Cao
    Date: Fri Jul 11 19:27:31 2008 -0400

    percpu_counter: new function percpu_counter_sum_and_set

    As described in

    revert "percpu counter: clean up percpu_counter_sum_and_set()"

    the new percpu_counter_sum_and_set() is racy against updates to the
    cpu-local accumulators on other CPUs. Revert that change.

    This means that ext4 will be slow again. But correct.

    Reported-by: Eric Dumazet
    Cc: "David S. Miller"
    Cc: Peter Zijlstra
    Cc: Mingming Cao
    Cc:
    Cc: [2.6.27.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Revert

    commit 1f7c14c62ce63805f9574664a6c6de3633d4a354
    Author: Mingming Cao
    Date: Thu Oct 9 12:50:59 2008 -0400

    percpu counter: clean up percpu_counter_sum_and_set()

    Before this patch we had the following:

    percpu_counter_sum(): return the percpu_counter's value

    percpu_counter_sum_and_set(): return the percpu_counter's value, copying
    that value into the central value and zeroing the per-cpu counters before
    returning.

    After this patch, percpu_counter_sum_and_set() has gone, and
    percpu_counter_sum() gets the old percpu_counter_sum_and_set()
    functionality.

    Problem is, as Eric points out, the old percpu_counter_sum_and_set()
    functionality was racy and wrong. It zeroes out counters on "other" cpus,
    without holding any locks which will prevent races agaist updates from
    those other CPUS.

    This patch reverts 1f7c14c62ce63805f9574664a6c6de3633d4a354. This means
    that percpu_counter_sum_and_set() still has the race, but
    percpu_counter_sum() does not.

    Note that this is not a simple revert - ext4 has since started using
    percpu_counter_sum() for its dirty_blocks counter as well.

    Note that this revert patch changes percpu_counter_sum() semantics.

    Before the patch, a call to percpu_counter_sum() will bring the counter's
    central counter mostly up-to-date, so a following percpu_counter_read()
    will return a close value.

    After this patch, a call to percpu_counter_sum() will leave the counter's
    central accumulator unaltered, so a subsequent call to
    percpu_counter_read() can now return a significantly inaccurate result.

    If there is any code in the tree which was introduced after
    e8ced39d5e8911c662d4d69a342b9d053eaaac4e was merged, and which depends
    upon the new percpu_counter_sum() semantics, that code will break.

    Reported-by: Eric Dumazet
    Cc: "David S. Miller"
    Cc: Peter Zijlstra
    Cc: Mingming Cao
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • We should first delete the counter from percpu_counters list
    before freeing memory, or a percpu_counter_hotcpu_callback()
    could dereference a NULL pointer.

    Signed-off-by: Eric Dumazet
    Acked-by: David S. Miller
    Cc: Peter Zijlstra
    Cc: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Add missing id_table to the drivers in subject. Patch is against the
    latest git. It should go in with 2.6.28 if possible, the drivers won't
    work without the id_table bits.

    Signed-off-by: Alessandro Zummo
    Reported-by: Imre Kaloz
    Tested-by: Imre Kaloz
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • Running kmemtraced, which uses splice() on relayfs, causes a hard lock on
    x86-64 SMP. As described by Tom Zanussi:

    It looks like you hit the same problem as described here:

    commit 8191ecd1d14c6914c660dfa007154860a7908857

    splice: fix infinite loop in generic_file_splice_read()

    relay uses the same loop but it never got noticed or fixed.

    Cc: Mathieu Desnoyers
    Tested-by: Pekka Enberg
    Signed-off-by: Tom Zanussi
    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tom Zanussi
     
  • mconsole_init() passed 256 bytes as length in os_create_unix_socket, while
    the sizeof UNIX_PATH_MAX is 108. This patch fixes that problem and avoids
    a big overrun bug reported on UML bootup.

    sockaddr_un.sun_path is UNIX_PATH_MAX long which causes the problem.
    Reported-by: Vikas K Managutte
    Reported-by: Sarvesh Kumar Lal Das
    Signed-off-by: Balbir Singh
    Reviewed-by: Pekka Enberg
    Reviewed-by: WANG Cong
    Cc: Jeff Dike
    Cc: [please check with Jeff]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Balbir Singh
     
  • On second thoughts, this is just going to disturb people while telling us
    things which we already knew.

    Cc: Peter Korsgaard
    Cc: Peter Zijlstra
    Cc: Kay Sievers
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

10 Dec, 2008

7 commits


09 Dec, 2008

20 commits

  • Timestamp in audit_context is valid only if ->in_syscall is set.

    Signed-off-by: Al Viro

    Al Viro
     
  • Delete excess kernel-doc notation in kernel/auditsc.c:

    Warning(linux-2.6.27-git10//kernel/auditsc.c:1481): Excess function parameter or struct member 'tsk' description in 'audit_syscall_entry'
    Warning(linux-2.6.27-git10//kernel/auditsc.c:1564): Excess function parameter or struct member 'tsk' description in 'audit_syscall_exit'

    Signed-off-by: Randy Dunlap
    Cc: Al Viro
    Cc: Eric Paris
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Randy Dunlap
     
  • If you enable some common audit code, the kernel fails to build.

    In file included from lib/audit.c:17:
    include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function)
    make[1]: *** [lib/audit.o] Error 1
    make: *** [lib] Error 2

    So do not use __NR_swapon if it isnt defined for a port.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Signed-off-by: Al Viro

    Mike Frysinger
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Currently audit=0 on the kernel command line does absolutely nothing.
    Audit always loads and always uses its resources such as creating the
    kernel netlink socket. This patch causes audit=0 to actually disable
    audit. Audit will use no resources and starting the userspace auditd
    daemon will not cause the kernel audit system to activate.

    Signed-off-by: Eric Paris
    Signed-off-by: Al Viro

    Eric Paris
     
  • Various tags are now way out of date

    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Some systems report SIS 5513 as both vendor/id and subvendor/id
    string. In that case we can't distinguish the system by the id
    svid/sdid and in fact the entry here breaks some boxes. At some
    point we need to find another way to detect the Targa Visionary 1000,
    until then this trades a hang for some users with lower performance
    for others.

    Closes: #12092

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Hi,

    I've found this issue in the mmotm 2008-12-02-17-08.

    --

    Commit
    ata_piix: add borked Tecra M4 to broken suspend list
    introduced DMI variables checking, but they can be null, so that
    we possibly dereference null.

    Check if they are null and avoid checks in that case.

    Solves:
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
    IP: [] piix_pci_device_suspend+0x117/0x230

    Signed-off-by: Jiri Slaby
    Cc: Jeff Garzik
    Cc: Alexandru Romanescu
    Cc: Tejun Heo
    Signed-off-by: Jeff Garzik

    Jiri Slaby
     
  • pata_hpt366 had its clock detection wrong and detected 25Mhz as 40Mhz
    and vice-versa. Fix it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Since applying the fix suggested by the errata (disabling MSI), we've had
    issues with interrupts being stuck on despite IIR being 0 on GM965 hardware.
    Most reporters of the issue have confirmed that turning MSI back on fixes
    things, and given the difficulties experienced in getting reliable MSI working
    on Linux, it's believable that the errata was about software issues and not
    actual hardware issues.

    Signed-off-by: Dave Airlie

    Keith Packard
     
  • Returning -ENOMEM errored all the way out of execbuf, so the rendering never
    occurred.

    Signed-off-by: Dave Airlie

    Owain Ainsworth
     
  • vblank can try and enable the IRQ registers before we've set the interrupt
    handler up.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • Paul Mackerras
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    tproxy: fixe a possible read from an invalid location in the socket match
    zd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr()
    mac80211: use unaligned safe memcmp() in-place of compare_ether_addr()
    ipw2200: fix netif_*_queue() removal regression
    iwlwifi: clean key table in iwl_clear_stations_table function
    tcp: tcp_vegas ssthresh bug fix
    can: omit received RTR frames for single ID filter lists
    ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
    netx-eth: initialize per device spinlock
    tcp: make urg+gso work for real this time
    enc28j60: Fix sporadic packet loss (corrected again)
    hysdn: fix writing outside the field on 64 bits
    b1isa: fix b1isa_exit() to really remove registered capi controllers
    can: Fix CAN_(EFF|RTR)_FLAG handling in can_filter
    Phonet: do not dump addresses from other namespaces
    netlabel: Fix a potential NULL pointer dereference
    bnx2: Add workaround to handle missed MSI.
    xfrm: Fix kernel panic when flush and dump SPD entries

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: fix default_spin_lock_flags() prototype
    AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0
    AMD IOMMU: fix WARN_ON in dma_ops unmap path
    AMD IOMMU: fix typo in comment
    AMD IOMMU: fix loop counter in free_pagetable function
    AMD IOMMU: fix iommu_map_page function

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n
    Revert "ide: respect current DMA setting during resume"

    Linus Torvalds
     
  • While 440037287c5 "[PATCH] switch all filesystems over to
    d_obtain_alias" removed some cases where fh_to_dentry() and
    fh_to_parent() could return NULL, there are still a few NULL returns
    left in individual filesystems. Thus it was a mistake for that commit
    to remove the handling of NULL returns in the callers.

    Revert those parts of 440037287c5 which removed the NULL handling.

    (We could, alternatively, modify all implementations to return -ESTALE
    instead of NULL, but that proves to require fixing a number of
    filesystems, and in some cases it's arguably more natural to return
    NULL.)

    Thanks to David for original patch and Linus, Christoph, and Hugh for
    review.

    Signed-off-by: J. Bruce Fields
    Cc: David Howells
    Cc: Christoph Hellwig
    Cc: Hugh Dickins
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • IDE pmac host driver build fails with CONFIG_BLK_DEV_IDEDMA_PMAC=n
    as reported by Kamalesh:

    > drivers/ide/pmac.c: In function 'pmac_ide_set_pio_mode':
    > drivers/ide/pmac.c:527: error: implicit declaration of function 'kauai_lookup_timing'
    > drivers/ide/pmac.c:527: error: 'shasta_pio_timings' undeclared (first use in this function)
    > drivers/ide/pmac.c:527: error: (Each undeclared identifier is reported only once
    > drivers/ide/pmac.c:527: error: for each function it appears in.)
    > drivers/ide/pmac.c:534: error: 'kauai_pio_timings' undeclared (first use in this function)
    > drivers/ide/pmac.c: In function 'pmac_ide_do_resume':
    > drivers/ide/pmac.c:914: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
    > drivers/ide/pmac.c: At top level:
    > drivers/ide/pmac.c:1007: error: 'pmac_ide_init_dma' undeclared here (not in a function)
    > drivers/ide/pmac.c: In function 'pmac_ide_setup_device':
    > drivers/ide/pmac.c:1107: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
    > drivers/ide/pmac.c: In function 'pmac_ide_macio_attach':
    > drivers/ide/pmac.c:1209: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
    > drivers/ide/pmac.c:1210: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
    > make[2]: *** [drivers/ide/pmac.o] Error 1

    Fix it by removing the superfluous config option.

    Reported-and-tested-by: Kamalesh Babulal
    Cc: Benjamin Herrenschmidt
    Cc: Sergei Shtylyov
    Cc: Stephen Rothwell
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • This reverts commit e9eb8388306364295308132265c00bea685f409f since
    it could break resume (thanks to Paul Collins for the report).

    I'll look into sorting this out properly for 2.6.29
    but for 2.6.28 it is the best to just revert my patch.

    Reported-by: Paul Collins
    Cc: rjw@sisk.pl
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

08 Dec, 2008

2 commits