12 Jun, 2009

5 commits

  • * 'for-linus' of git://linux-arm.org/linux-2.6:
    kmemleak: Add the corresponding MAINTAINERS entry
    kmemleak: Simple testing module for kmemleak
    kmemleak: Enable the building of the memory leak detector
    kmemleak: Remove some of the kmemleak false positives
    kmemleak: Add modules support
    kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash
    kmemleak: Add the vmalloc memory allocation/freeing hooks
    kmemleak: Add the slub memory allocation/freeing hooks
    kmemleak: Add the slob memory allocation/freeing hooks
    kmemleak: Add the slab memory allocation/freeing hooks
    kmemleak: Add documentation on the memory leak detector
    kmemleak: Add the base support

    Manual conflict resolution (with the slab/earlyboot changes) in:
    drivers/char/vt.c
    init/main.c
    mm/slab.c

    Linus Torvalds
     
  • …/git/penberg/slab-2.6

    * 'topic/slab/earlyboot' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
    vgacon: use slab allocator instead of the bootmem allocator
    irq: use kcalloc() instead of the bootmem allocator
    sched: use slab in cpupri_init()
    sched: use alloc_cpumask_var() instead of alloc_bootmem_cpumask_var()
    memcg: don't use bootmem allocator in setup code
    irq/cpumask: make memoryless node zero happy
    x86: remove some alloc_bootmem_cpumask_var calling
    vt: use kzalloc() instead of the bootmem allocator
    sched: use kzalloc() instead of the bootmem allocator
    init: introduce mm_init()
    vmalloc: use kzalloc() instead of alloc_bootmem()
    slab: setup allocators earlier in the boot sequence
    bootmem: fix slab fallback on numa
    bootmem: use slab if bootmem is no longer available

    Linus Torvalds
     
  • Now that we set up the slab allocator earlier, we can get rid of some
    alloc_bootmem_cpumask_var() calls in boot code.

    Cc: Ingo Molnar
    Cc: Johannes Weiner
    Cc: Linus Torvalds
    Signed-off-by: Yinghai Lu
    Signed-off-by: Pekka Enberg

    Yinghai Lu
     
  • This patch adds a loadable module that deliberately leaks memory. It
    is used for testing various memory leaking scenarios.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • This patch adds the Kconfig.debug and Makefile entries needed for
    building kmemleak into the kernel.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     

11 Jun, 2009

4 commits

  • * serial-from-alan: (79 commits)
    moxa: prevent opening unavailable ports
    imx: serial: use tty_encode_baud_rate to set true rate
    imx: serial: add IrDA support to serial driver
    imx: serial: use rational library function
    lib: isolate rational fractions helper function
    imx: serial: handle initialisation failure correctly
    imx: serial: be sure to stop xmit upon shutdown
    imx: serial: notify higher layers in case xmit IRQ was not called
    imx: serial: fix one bit field type
    imx: serial: fix whitespaces (no changes in functionality)
    tty: use prepare/finish_wait
    tty: remove sleep_on
    sierra: driver interface blacklisting
    sierra: driver urb handling improvements
    tty: resolve some sierra breakage
    timbuart: Fix the termios logic
    serial: Added Timberdale UART driver
    tty: Add URL for ttydev queue
    devpts: unregister the file system on error
    tty: Untangle termios and mm mutex dependencies
    ...

    Linus Torvalds
     
  • Provide a helper function to determine optimum numerator
    denominator value pairs taking into account restricted
    register size. Useful especially with PLL and other clock
    configurations.

    Signed-off-by: Oskar Schirmer
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Oskar Schirmer
     
  • * 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    vsprintf: introduce %pf format specifier
    printk: add support of hh length modifier for printk

    Linus Torvalds
     
  • * 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (61 commits)
    amd-iommu: remove unnecessary "AMD IOMMU: " prefix
    amd-iommu: detach device explicitly before attaching it to a new domain
    amd-iommu: remove BUS_NOTIFY_BOUND_DRIVER handling
    dma-debug: simplify logic in driver_filter()
    dma-debug: disable/enable irqs only once in device_dma_allocations
    dma-debug: use pr_* instead of printk(KERN_* ...)
    dma-debug: code style fixes
    dma-debug: comment style fixes
    dma-debug: change hash_bucket_find from first-fit to best-fit
    x86: enable GART-IOMMU only after setting up protection methods
    amd_iommu: fix lock imbalance
    dma-debug: add documentation for the driver filter
    dma-debug: add dma_debug_driver kernel command line
    dma-debug: add debugfs file for driver filter
    dma-debug: add variables and checks for driver filter
    dma-debug: fix debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device
    dma-debug: use sg_dma_len accessor
    dma-debug: use sg_dma_address accessor instead of using dma_address directly
    amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESS
    amd-iommu: don't preallocate page tables with CONFIG_IOMMU_STRESS
    ...

    Linus Torvalds
     

09 Jun, 2009

1 commit


08 Jun, 2009

5 commits


07 Jun, 2009

3 commits


02 Jun, 2009

4 commits


29 May, 2009

3 commits

  • DMA-mapping.txt says that debug_dma_sync_sg family must be called with
    the _same_ one you passed into the dma_map_sg call, it should _NOT_ be
    the 'count' value _returned_ from the dma_map_sg call.

    debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device can't
    handle this properly; they need to use the sg_mapped_ents in struct
    dma_debug_entry as debug_dma_unmap_sg() does.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     
  • debug_dma_map_sg() and debug_dma_unmap_sg() use length in struct
    scatterlist while debug_dma_sync_sg_for_cpu() and
    debug_dma_sync_sg_for_device() use dma_length. This causes bugs
    warnings on some IOMMU implementations since these values are not
    same; the length doesn't represent the dma length.

    We always need to use sg_dma_len() accessor to get the dma length of a
    scatterlist entry.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     
  • Architectures might not have dma_address in struct scatterlist (PARISC
    doesn't). Directly accessing to dma_address in struct scatterlist is
    wrong; we need to use sg_dma_address() accesssor instead.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     

28 May, 2009

1 commit


11 May, 2009

1 commit


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


30 Apr, 2009

1 commit

  • A printf format specifier which would allow us to print a pure
    function name has been suggested by Andrew Morton a couple of
    months ago.

    The current %pF is very convenient to print a function symbol,
    but often we only want to print the name of the function, without
    its asm offset.

    That's what %pf does in this patch. The lowecase f has been chosen
    for its intuitive meaning of a 'weak kind of %pF'.

    The support for this new format would be welcome by the tracing code
    where the need to print pure function names is often needed. This is
    also true for other parts of the kernel:

    $ git-grep -E "kallsyms_lookup\(.+?\)"
    arch/blackfin/kernel/traps.c: symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf);
    arch/powerpc/xmon/xmon.c: name = kallsyms_lookup(pc, &size, &offset, NULL, tmpstr);
    arch/sh/kernel/cpu/sh5/unwind.c: sym = kallsyms_lookup(pc, NULL, &offset, NULL, namebuf);
    arch/x86/kernel/ftrace.c: kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
    kernel/kprobes.c: sym = kallsyms_lookup((unsigned long)p->addr, NULL,
    kernel/lockdep.c: return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup((unsigned long)rec->ops->func, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
    kernel/trace/ftrace.c: kallsyms_lookup(rec->ip, NULL, NULL, &modname, str);
    kernel/trace/ftrace.c: kallsyms_lookup(*ptr, NULL, NULL, NULL, str);
    kernel/trace/trace_functions.c: kallsyms_lookup(ip, NULL, NULL, NULL, str);
    kernel/trace/trace_output.c: kallsyms_lookup(address, NULL, NULL, NULL, str);

    Changes in v2:

    - Add the explanation of the %pf role for vsnprintf() and bstr_printf()

    - Change the comments by dropping the "asm offset" notion and only
    define the %pf against the actual function offset notion.

    Signed-off-by: Frederic Weisbecker
    Acked-by: Mike Frysinger
    Cc: Linus Torvalds
    Cc: Zhaolei
    Cc: Tom Zanussi
    Cc: Li Zefan
    Cc: Andrew Morton
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

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
     

15 Apr, 2009

1 commit

  • We use a static value for the number of dma_debug_entries. It can be
    overwritten by a kernel command line option.

    Some IOMMUs (e.g. GART) can't set an appropriate value by a kernel
    command line option because they can't know such value until they
    finish initializing up their hardware.

    This patch adds dma_debug_resize_entries() enables IOMMUs to adjust
    the number of dma_debug_entries anytime.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Joerg Roedel
    Cc: fujita.tomonori@lab.ntt.co.jp
    Cc: akpm@linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

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