09 May, 2009

1 commit

  • On Tue, Apr 21, 2009 at 01:55:53PM +0200, Stefan Richter wrote:
    > Robert P. J. Day wrote:
    > > lib/Kconfig.debug: select PRINTK_DEBUG
    > >
    > > should that perhaps refer to "DYNAMIC_PRINTK_DEBUG"? since there is
    > > no such thing as a PRINTK_DEBUG Kconfig variable.
    >
    > Looks like a rudiment from an earlier version of Jason's "driver core:
    > basic infrastructure for per-module dynamic debug messages",
    > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=346e15beb5343c2eb8216d820f2ed8f150822b08
    > Search an LKML archive for '+#ifdef CONFIG_PRINTK_DEBUG'.
    >
    > Jason, should it be deleted or replaced by something?

    We re-named 'DYNAMIC_PRINTK_DEBUG' to 'DYNAMIC_DEBUG' in 2.6.30....
    'PRINTK_DEBUG' as pointed out never existed. So, it appears to be
    extraneous, and should be removed. thanks for pointing it out.

    Signed-off-by: Jason Baron
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron
     

06 May, 2009

1 commit


27 Apr, 2009

1 commit

  • The feature needs some more work because the notfier which is used to
    check for pending allocations is called before the device drivers
    ->remove() function. Therefore this feature reports false positives.

    A real fix for this issue is to introduce a new notifier event which sent
    _after_ the driver has deinitialized itself. That will done for the next
    kernel version.

    [ Impact: reduce the scope of CONFIG_DMA_API_DEBUG=y checks ]

    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     

25 Apr, 2009

1 commit

  • Currently, although find_last_bit is EXPORTed, it is statically linked
    with the kernel and is referenced only under CONFIG_SMP.

    When CONFIG_SMP is undefined and find_last_bit is referenced only by
    modules, linking fails with:

    ERROR: "find_last_bit" [fs/nfs/nfs.ko] undefined!

    Cc: Rusty Russell
    Cc: Trond Myklebust
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Linus Torvalds

    Fred Isaman
     

24 Apr, 2009

1 commit


23 Apr, 2009

1 commit

  • Always omit frame pointers on s390. They aren't too useful for the
    kernel since we have already the kernel stack backchain which allows
    us to walk the kernel stack.
    So eleminate the extra code for frame pointers. Only allow the extra
    code for the function tracer since the gcc compile options -pg and
    -fomit-frame-pointer are incompatible.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

22 Apr, 2009

1 commit


20 Apr, 2009

1 commit

  • notice one system /proc/iomem some entries missed the name for pci_devices

    it turns that dev->dev.kobj name is changed after device_add.

    for pci code: via acpi_pci_root_driver.ops.add (aka acpi_pci_root_add)
    ==> pci_acpi_scan_root is used to scan pci bus/device, and at the same
    time we read the resource for pci_dev in the pci_read_bases, we have
    res->name = pci_name(pci_dev); pci_name is calling dev_name.

    later via acpi_pci_root_driver.ops.start (aka acpi_pci_root_start) ==>
    pci_bus_add_device to add all pci_dev in kobj tree. pci_bus_add_device
    will call device_add.

    actually in device_add

    /* first, register with generic layer. */
    error = kobject_add(&dev->kobj, dev->kobj.parent, "%s", dev_name(dev));
    if (error)
    goto Error;

    will get one new name for that kobj, old name is freed.

    [Impact: fix corrupted names in /proc/iomem ]

    Signed-off-by: Yinghai Lu
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

17 Apr, 2009

2 commits

  • Users can read sysfs files, there is no reason they should not be
    allowed to listen to uevents. This lets xorg and other userspace
    programs properly get these messages without having to be root.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • This reverts commit f520360d93cdc37de5d972dac4bf3bdef6a7f6a7.

    Tetsuo Handa, running a kernel with CONFIG_DEBUG_PAGEALLOC=y and
    CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug, has been hitting RCU detected
    CPU stalls: it's been spinning in the loop where do_execve() counts up
    the args (but why wasn't fixup_exception working? dunno).

    The recent change, switching kobject_uevent_env() from UMH_WAIT_EXEC
    to UMH_NO_WAIT, is broken: the exec uses args on the local stack here,
    and an env which is kfreed as soon as call_usermodehelper() returns.
    It very much needs to wait for the exec to be done.

    An alternative would be to keep the UMH_NO_WAIT, and complicate the code
    to allocate and free these resources correctly? but no, as GregKH
    pointed out when making the commit, CONFIG_UEVENT_HELPER_PATH="" is a
    much better optimization - though some distros are still saying
    /sbin/hotplug in their .config, yet with no such binary in their initrd
    or their root.

    Reported-by: Tetsuo Handa
    Signed-off-by: Hugh Dickins
    Acked-by: Greg Kroah-Hartman
    Acked-by: Arjan van de Ven
    Acked-by: Will Newton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

12 Apr, 2009

1 commit

  • Impact: provide useful missing info for developers

    Kernel taint can occur in several situations such as warnings,
    load of prorietary or staging modules, bad page, etc...

    But when such taint happens, a developer might still be working on
    the kernel, expecting that lockdep is still enabled. But a taint
    disables lockdep without ever warning about it.
    Such a kernel behaviour doesn't really help for kernel development.

    This patch adds this missing warning.

    Since the taint is done most of the time after the main message that
    explain the real source issue, it seems safe to warn about it inside
    add_taint() so that it appears at last, without hurting the main
    information.

    v2: Use a generic helper to disable lockdep instead of an
    open coded xchg().

    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

08 Apr, 2009

2 commits

  • printk("%Q");

    Output before patch: %QQ
    Output after patch: %Q

    Signed-off-by: Zhao Lei
    Acked-by: Lai Jiangshan
    Acked-by: Frederic Weisbecker
    Cc: torvalds@linux-foundation.org
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • * 'core/softlockup' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    softlockup: make DETECT_HUNG_TASK default depend on DETECT_SOFTLOCKUP
    softlockup: move 'one' to the softlockup section in sysctl.c
    softlockup: ensure the task has been switched out once
    softlockup: remove timestamp checking from hung_task
    softlockup: convert read_lock in hung_task to rcu_read_lock
    softlockup: check all tasks in hung_task
    softlockup: remove unused definition for spawn_softlockup_task
    softlockup: fix potential race in hung_task when resetting timeout
    softlockup: fix to allow compiling with !DETECT_HUNG_TASK
    softlockup: decouple hung tasks check from softlockup detection

    Linus Torvalds
     

07 Apr, 2009

4 commits

  • Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

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

    Yang Hongyang
     
  • Conflicts:
    kernel/sysctl.c

    Ingo Molnar
     
  • Don't offer a default-y option when the user has turned off
    CONFIG_DETECT_SOFTLOCKUP already.

    Do offer it as 'y' only if DETECT_SOFTLOCKUP is on already.

    This makes it match previous behavior - where the hung-task check was
    embedded i CONFIG_DETECT_SOFTLOCKUP code.

    Cc: Linus Torvalds
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • …git/tip/linux-2.6-tip

    * 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    kmemtrace: trace kfree() calls with NULL or zero-length objects
    kmemtrace: small cleanups
    kmemtrace: restore original tracing data binary format, improve ABI
    kmemtrace: kmemtrace_alloc() must fill type_id
    kmemtrace: use tracepoints
    kmemtrace, rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints
    kmemtrace, rcu: fix rcupreempt.c data structure dependencies
    kmemtrace, rcu: fix rcu_tree_trace.c data structure dependencies
    kmemtrace, rcu: fix linux/rcutree.h and linux/rcuclassic.h dependencies
    kmemtrace, mm: fix slab.h dependency problem in mm/failslab.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_unlzma.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_bunzip2.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_inflate.c
    kmemtrace, squashfs: fix slab.h dependency problem in squasfs
    kmemtrace, befs: fix slab.h dependency problem
    kmemtrace, security: fix linux/key.h header file dependencies
    kmemtrace, fs: fix linux/fdtable.h header file dependencies
    kmemtrace, fs: uninline simple_transaction_set()
    kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h

    Linus Torvalds
     

06 Apr, 2009

2 commits


04 Apr, 2009

1 commit


03 Apr, 2009

5 commits

  • Impact: cleanup

    lib/decompress_unlzma.c depends on slab.h without including it:

    CC lib/decompress_unlzma.o
    lib/decompress_unlzma.c: In function ‘rc_free’:
    lib/decompress_unlzma.c:122: error: implicit declaration of function ‘kfree’
    lib/decompress_unlzma.c: In function ‘unlzma’:
    lib/decompress_unlzma.c:551: error: implicit declaration of function ‘kmalloc’
    lib/decompress_unlzma.c:551: warning: assignment makes pointer from integer without a cast
    make[1]: *** [lib/decompress_unlzma.o] Error 1
    make: *** [lib/] Error 2

    It gets included implicitly currently - but this will not be the
    case with upcoming kmemtrace changes.

    Signed-off-by: Pekka Enberg
    Cc: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Pekka Enberg
     
  • Impact: cleanup

    lib/decompress_bunzip2.c depends on slab.h without including it:

    CC lib/decompress_bunzip2.o
    lib/decompress_bunzip2.c: In function ‘start_bunzip’:
    lib/decompress_bunzip2.c:636: error: implicit declaration of function ‘kmalloc’
    lib/decompress_bunzip2.c:636: warning: assignment makes pointer from integer without a cast
    lib/decompress_bunzip2.c: In function ‘bunzip2’:
    lib/decompress_bunzip2.c:682: warning: assignment makes pointer from integer without a cast
    lib/decompress_bunzip2.c:693: warning: assignment makes pointer from integer without a cast
    lib/decompress_bunzip2.c:726: error: implicit declaration of function ‘kfree’
    make[1]: *** [lib/decompress_bunzip2.o] Error 1
    make: *** [lib/] Error 2

    It gets included implicitly currently - but this will not be the
    case with upcoming kmemtrace changes.

    Signed-off-by: Pekka Enberg
    Cc: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Pekka Enberg
     
  • Impact: fix build

    lib/decompress_inflate.c depends on slab.h without including it:

    CC lib/decompress_inflate.o
    lib/decompress_inflate.c: In function ‘gunzip’:
    lib/decompress_inflate.c:45: error: implicit declaration of function ‘kmalloc’
    lib/decompress_inflate.c:45: warning: assignment makes pointer from integer without a cast
    lib/decompress_inflate.c:57: warning: assignment makes pointer from integer without a cast
    lib/decompress_inflate.c:65: warning: assignment makes pointer from integer without a cast
    lib/decompress_inflate.c:71: warning: assignment makes pointer from integer without a cast
    lib/decompress_inflate.c:154: error: implicit declaration of function ‘kfree’
    make[1]: *** [lib/decompress_inflate.o] Error 1
    make: *** [lib/] Error 2

    It gets included implicitly currently - but this will not be the
    case with upcoming kmemtrace changes.

    Signed-off-by: Pekka Enberg
    Cc: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Pekka Enberg
     
  • Fix slab corruption caused by alloc_cpumask_var_node() overwriting the
    tail end of an off-stack cpumask.

    The function zeros out cpumask bits beyond the last possible cpu. The
    starting point for zeroing should be the beginning of the mask offset by a
    byte count derived from the number of possible cpus. The offset was
    calculated in bits instead of bytes. This resulted in overwriting the end
    of the cpumask.

    Signed-off-by: Jack Steiner
    Acked-by: Mike Travis
    Acked-by: Ingo Molnar
    Cc: Rusty Russell
    Cc: Stephen Rothwell
    Cc: [2.6.29.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jack Steiner
     
  • Patch for Per-CSS(Cgroup Subsys State) ID and private hierarchy code.

    This patch attaches unique ID to each css and provides following.

    - css_lookup(subsys, id)
    returns pointer to struct cgroup_subysys_state of id.
    - css_get_next(subsys, id, rootid, depth, foundid)
    returns the next css under "root" by scanning

    When cgroup_subsys->use_id is set, an id for css is maintained.

    The cgroup framework only parepares
    - css_id of root css for subsys
    - id is automatically attached at creation of css.
    - id is *not* freed automatically. Because the cgroup framework
    don't know lifetime of cgroup_subsys_state.
    free_css_id() function is provided. This must be called by subsys.

    There are several reasons to develop this.
    - Saving space .... For example, memcg's swap_cgroup is array of
    pointers to cgroup. But it is not necessary to be very fast.
    By replacing pointers(8bytes per ent) to ID (2byes per ent), we can
    reduce much amount of memory usage.

    - Scanning without lock.
    CSS_ID provides "scan id under this ROOT" function. By this, scanning
    css under root can be written without locks.
    ex)
    do {
    rcu_read_lock();
    next = cgroup_get_next(subsys, id, root, &found);
    /* check sanity of next here */
    css_tryget();
    rcu_read_unlock();
    id = found + 1
    } while(...)

    Characteristics:
    - Each css has unique ID under subsys.
    - Lifetime of ID is controlled by subsys.
    - css ID contains "ID" and "Depth in hierarchy" and stack of hierarchy
    - Allowed ID is 1-65535, ID 0 is UNUSED ID.

    Design Choices:
    - scan-by-ID v.s. scan-by-tree-walk.
    As /proc's pid scan does, scan-by-ID is robust when scanning is done
    by following kind of routine.
    scan -> rest a while(release a lock) -> conitunue from interrupted
    memcg's hierarchical reclaim does this.

    - When subsys->use_id is set, # of css in the system is limited to
    65535.

    [bharata@linux.vnet.ibm.com: remove rcu_read_lock() from css_get_next()]
    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Paul Menage
    Cc: Li Zefan
    Cc: Balbir Singh
    Cc: Daisuke Nishimura
    Signed-off-by: Bharata B Rao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

02 Apr, 2009

1 commit


01 Apr, 2009

2 commits

  • Tfour 4 redundant if-conditions in function __rb_erase_color() in
    lib/rbtree.c are removed.

    In pseudo-source-code, the structure of the code is as follows:

    if ((!A || B) && (!C || D)) {
    .
    .
    .
    } else {
    if (!C || D) {//if this is true, it implies: (A == true) && (B == false)
    if (A) {//hence this always evaluates to 'true'...
    .
    }
    .
    //at this point, C always becomes true, because of:
    __rb_rotate_right/left();
    //and:
    other = parent->rb_right/left;
    }
    .
    .
    if (C) {//...and this too !
    .
    }
    }

    Signed-off-by: Wolfram Strepp
    Acked-by: Peter Zijlstra
    Cc: Andrea Arcangeli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Strepp
     
  • CONFIG_DEBUG_PAGEALLOC is now supported by x86, powerpc, sparc64, and
    s390. This patch implements it for the rest of the architectures by
    filling the pages with poison byte patterns after free_pages() and
    verifying the poison patterns before alloc_pages().

    This generic one cannot detect invalid page accesses immediately but
    invalid read access may cause invalid dereference by poisoned memory and
    invalid write access can be detected after a long delay.

    Signed-off-by: Akinobu Mita
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

31 Mar, 2009

3 commits

  • Conflicts:
    lib/Kconfig.debug

    Ingo Molnar
     
  • Fix printk format warnings in dma-debug:

    lib/dma-debug.c:645: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:662: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:676: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:686: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'

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

    Randy Dunlap
     
  • * 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
    dma-debug: make memory range checks more consistent
    dma-debug: warn of unmapping an invalid dma address
    dma-debug: fix dma_debug_add_bus() definition for !CONFIG_DMA_API_DEBUG
    dma-debug/x86: register pci bus for dma-debug leak detection
    dma-debug: add a check dma memory leaks
    dma-debug: add checks for kernel text and rodata
    dma-debug: print stacktrace of mapping path on unmap error
    dma-debug: Documentation update
    dma-debug: x86 architecture bindings
    dma-debug: add function to dump dma mappings
    dma-debug: add checks for sync_single_sg_*
    dma-debug: add checks for sync_single_range_*
    dma-debug: add checks for sync_single_*
    dma-debug: add checking for [alloc|free]_coherent
    dma-debug: add add checking for map/unmap_sg
    dma-debug: add checking for map/unmap_page/single
    dma-debug: add core checking functions
    dma-debug: add debugfs interface
    dma-debug: add kernel command line parameters
    dma-debug: add initialization code
    ...

    Fix trivial conflicts due to whitespace changes in arch/x86/kernel/pci-nommu.c

    Linus Torvalds
     

30 Mar, 2009

1 commit


29 Mar, 2009

4 commits

  • Ingo Molnar
     
  • Conflicts:
    arch/x86/Kconfig

    Ingo Molnar
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
    [ARM] 5435/1: fix compile warning in sanity_check_meminfo()
    [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
    [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
    [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
    imxfb: Fix TFT mode
    i.MX21/27: remove ifdef CONFIG_FB_IMX
    imxfb: add clock support
    mxc: add arch_reset() function
    clkdev: add possibility to get a clock based on the device name
    i.MX1: remove fb support from mach-imx
    [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
    Gemini: Add support for Teltonika RUT100
    Gemini: gpiolib based GPIO support v2
    MAINTAINERS: add myself as Gemini architecture maintainer
    ARM: Add Gemini architecture v3
    [ARM] OMAP: Fix compile for omap2_init_common_hw()
    MAINTAINERS: Add myself as Faraday ARM core variant maintainer
    ARM: Add support for FA526 v2
    [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
    [ARM] collie: fix two minor formatting nits
    ...

    Linus Torvalds
     
  • Conflicts:
    sound/soc/pxa/pxa2xx-i2s.c

    Russell King
     

28 Mar, 2009

2 commits


27 Mar, 2009

2 commits

  • David S. Miller
     
  • * 'sched-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (46 commits)
    sched: Add comments to find_busiest_group() function
    sched: Refactor the power savings balance code
    sched: Optimize the !power_savings_balance during fbg()
    sched: Create a helper function to calculate imbalance
    sched: Create helper to calculate small_imbalance in fbg()
    sched: Create a helper function to calculate sched_domain stats for fbg()
    sched: Define structure to store the sched_domain statistics for fbg()
    sched: Create a helper function to calculate sched_group stats for fbg()
    sched: Define structure to store the sched_group statistics for fbg()
    sched: Fix indentations in find_busiest_group() using gotos
    sched: Simple helper functions for find_busiest_group()
    sched: remove unused fields from struct rq
    sched: jiffies not printed per CPU
    sched: small optimisation of can_migrate_task()
    sched: fix typos in documentation
    sched: add avg_overlap decay
    x86, sched_clock(): mark variables read-mostly
    sched: optimize ttwu vs group scheduling
    sched: TIF_NEED_RESCHED -> need_reshed() cleanup
    sched: don't rebalance if attached on NULL domain
    ...

    Linus Torvalds