21 Feb, 2009

4 commits

  • kzfree() is a wrapper for kfree() that additionally zeroes the underlying
    memory before releasing it to the slab allocator.

    Currently there is code which memset()s the memory region of an object
    before releasing it back to the slab allocator to make sure
    security-sensitive data are really zeroed out after use.

    These callsites can then just use kzfree() which saves some code, makes
    users greppable and allows for a stupid destructor that isn't necessarily
    aware of the actual object size.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Pekka Enberg
    Cc: Matt Mackall
    Acked-by: Christoph Lameter
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Fix the typo && -> ||.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wei Yongjun
     
  • oprofile for MN10300 seems to have been broken by the advent of the new
    tracing framework.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • * Replace kmalloc() with uml_kmalloc() (fix build failure)

    * Remove unnecessary UM_KERN_INFO in printk() (don't display '' while
    printing info)

    Signed-off-by: Luca Bigliardi
    Cc: Jiri Kosina
    Reviewed-by: WANG Cong
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luca Bigliardi
     

20 Feb, 2009

16 commits

  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    Revert "[XFS] remove old vmap cache"
    Revert "[XFS] use scalable vmap API"

    Linus Torvalds
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] xen_domu build fix
    [IA64] fixes configs and add default config for ia64 xen domU
    [IA64] Remove redundant cpu_clear() in __cpu_disable path
    [IA64] Revert "prevent ia64 from invoking irq handlers on offline CPUs"
    [IA64] bte_copy of BTE_MAX_XFER trips BUG_ON.
    [IA64] Build fix for __early_pfn_to_nid() undefined link error

    Linus Torvalds
     
  • arch/ia64/xen/xen_pv_ops.c:156: error: xen_init_ops causes a section type conflict
    arch/ia64/xen/xen_pv_ops.c:340: error: xen_iosapic_ops causes a section type conflict

    Signed-off-by: Tony Luck

    Tony Luck
     
  • This patch fixes xen related Kconfigs and add default config
    file for ia64 xen domU.

    Signed-off-by: Isaku Yamahata
    Signed-off-by: Tony Luck

    Isaku Yamahata
     
  • The second call to cpu_clear() is redundant, as we've already removed
    the CPU from cpu_online_map before calling migrate_platform_irqs().

    Signed-off-by: Alex Chiang
    Signed-off-by: Tony Luck

    Alex Chiang
     
  • This reverts commit e7b140365b86aaf94374214c6f4e6decbee2eb0a.

    Commit e7b14036 removes the targetted disabled CPU from the
    cpu_online_map after calls to migrate_platform_irqs and fixup_irqs.

    Paul McKenney states that the reasoning behind the patch was to
    prevent irq handlers from running on CPUs marked offline because:

    RCU happily ignores CPUs that don't have their bits set in
    cpu_online_map, so if there are RCU read-side critical sections
    in the irq handlers being run, RCU will ignore them. If the
    other CPUs were running, they might sequence through the RCU
    state machine, which could result in data structures being
    yanked out from under those irq handlers, which in turn could
    result in oopses or worse.

    Unfortunately, both ia64 functions above look at cpu_online_map to find
    a new CPU to migrate interrupts onto. This means we can potentially
    migrate an interrupt off ourself back to... ourself. Uh oh.

    This causes an oops when we finally try to process pending interrupts on
    the CPU we want to disable. The oops results from calling __do_IRQ with
    a NULL pt_regs:

    Unable to handle kernel NULL pointer dereference (address 0000000000000040)
    Call Trace:
    [] show_stack+0x50/0xa0
    sp=e0000009c922fa00 bsp=e0000009c92214d0
    [] show_regs+0x820/0x860
    sp=e0000009c922fbd0 bsp=e0000009c9221478
    [] die+0x1a0/0x2e0
    sp=e0000009c922fbd0 bsp=e0000009c9221438
    [] ia64_do_page_fault+0x950/0xa80
    sp=e0000009c922fbd0 bsp=e0000009c92213d8
    [] ia64_native_leave_kernel+0x0/0x270
    sp=e0000009c922fc60 bsp=e0000009c92213d8
    [] profile_tick+0xd0/0x1c0
    sp=e0000009c922fe30 bsp=e0000009c9221398
    [] timer_interrupt+0x170/0x3e0
    sp=e0000009c922fe30 bsp=e0000009c9221330
    [] handle_IRQ_event+0x80/0x120
    sp=e0000009c922fe30 bsp=e0000009c92212f8
    [] __do_IRQ+0x160/0x4a0
    sp=e0000009c922fe30 bsp=e0000009c9221290
    [] ia64_process_pending_intr+0x2b0/0x360
    sp=e0000009c922fe30 bsp=e0000009c9221208
    [] fixup_irqs+0xf0/0x2a0
    sp=e0000009c922fe30 bsp=e0000009c92211a8
    [] __cpu_disable+0x140/0x240
    sp=e0000009c922fe30 bsp=e0000009c9221168
    [] take_cpu_down+0x50/0xa0
    sp=e0000009c922fe30 bsp=e0000009c9221148
    [] stop_cpu+0xd0/0x200
    sp=e0000009c922fe30 bsp=e0000009c92210f0
    [] kthread+0xc0/0x140
    sp=e0000009c922fe30 bsp=e0000009c92210c8
    [] kernel_thread_helper+0xd0/0x100
    sp=e0000009c922fe30 bsp=e0000009c92210a0
    [] start_kernel_thread+0x20/0x40
    sp=e0000009c922fe30 bsp=e0000009c92210a0

    I don't like this revert because it is fragile. ia64 is getting lucky
    because we seem to only ever process timer interrupts in this path, but
    if we ever race with an IPI here, we definitely use RCU and have the
    potential of hitting an oops that Paul describes above.

    Patching ia64's timer_interrupt() to check for NULL pt_regs is
    insufficient though, as we still hit the above oops.

    As a short term solution, I do think that this revert is the right
    answer. The revert hold up under repeated testing (24+ hour test runs)
    with this setup:

    - 8-way rx6600
    - randomly toggling CPU online/offline state every 2 seconds
    - running CPU exercisers, memory hog, disk exercisers, and
    network stressors
    - average system load around ~160

    In the long term, we really need to figure out why we set pt_regs = NULL
    in ia64_process_pending_intr(). If it turns out that it is unnecessary
    to do so, then we could safely re-introduce e7b14036 (along with some
    other logic to be smarter about migrating interrupts).

    One final note: x86 also removes the disabled CPU from cpu_online_map
    and then re-enables interrupts for 1ms, presumably to handle any pending
    interrupts:

    arch/x86/kernel/irq_32.c (and irq_64.c):
    cpu_disable_common:
    [remove cpu from cpu_online_map]

    fixup_irqs():
    for_each_irq:
    [break CPU affinities]

    local_irq_enable();
    mdelay(1);
    local_irq_disable();

    So they are doing implicitly what ia64 is doing explicitly.

    Signed-off-by: Alex Chiang
    Signed-off-by: Tony Luck

    Alex Chiang
     
  • BTE_MAX_XFER is wrong. It is one greater than the number of cache
    lines the BTE is actually able to transfer. If you request a transfer
    of exactly BTE_MAX_XFER size, you trip a very cryptic BUG_ON() which
    should certainly be made more clear.

    This patch fixes that constant and also cleans up the BUG_ON()s in
    arch/ia64/sn/kernel/bte.c to test one condition per line.

    Signed-off-by: Robin Holt
    Signed-off-by: Tony Luck

    Robin Holt
     
  • ia64 only defines __early_pfn_to_nid() for SPARSEMEM && NUMA configurations,
    so the recent:

    commit: f2dbcfa738368c8a40d4a5f0b65dc9879577cb21
    mm: clean up for early_pfn_to_nid()

    ends up with some link problems for certain configuration files.

    Fix arch/ia64/Kconfig to only define HAVE_ARCH_EARLY_PFN_TO_NID in the
    cases where we do provide this function.

    Signed-off-by: Tony Luck

    Tony Luck
     
  • This reverts commit d2859751cd0bf586941ffa7308635a293f943c17.

    This commit caused regression. We'll try to fix use of new
    vmap API for next release.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Felix Blyakher

    Felix Blyakher
     
  • This reverts commit 95f8e302c04c0b0c6de35ab399a5551605eeb006.

    This commit caused regression. We'll try to fix use of new
    vmap API for next release.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Felix Blyakher

    Felix Blyakher
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 5405/1: ep93xx: remove unused gesbc9312.h header
    [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to set READ_IMPLIES_EXEC
    [ARM] omap: fix clock reparenting in omap2_clk_set_parent()
    [ARM] 5403/1: pxa25x_ep_fifo_flush() *ep->reg_udccs always set to 0
    [ARM] 5402/1: fix a case of wrap-around in sanity_check_meminfo()
    [ARM] 5401/1: Orion: fix edge triggered GPIO interrupt support
    [ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller
    [ARM] 5391/1: AT91: Enable GPIO clocks earlier
    [ARM] 5390/1: AT91: Watchdog fixes
    [ARM] 5398/1: Add Wan ZongShun to MAINTAINERS for W90P910
    [ARM] omap: fix _omap2_clksel_get_src_field()
    [ARM] omap: fix omap2_divisor_to_clksel() error return value

    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, mce: fix ifdef for 64bit thermal apic vector clear on shutdown
    x86, mce: use force_sig_info to kill process in machine check
    x86, mce: reinitialize per cpu features on resume
    x86, rcu: fix strange load average and ksoftirqd behavior

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

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tracing: limit the number of loops the ring buffer self test can make
    tracing: have function trace select kallsyms
    tracing: disable tracing while testing ring buffer
    tracing/function-graph-tracer: trace the idle tasks

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] fix "mem=" handling in case of standby memory
    [S390] Fix timeval regression on s390
    [S390] sclp: handle empty event buffers

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    sound: virtuoso: revert "do not overwrite EEPROM on Xonar D2/D2X"
    ALSA: jack - Use card->shortname for input name
    ALSA: usb-audio - Workaround for misdetected sample rate with CM6207
    ALSA: usb-audio - Fix non-continuous rate detection
    sound: usb-audio: fix uninitialized variable with M-Audio MIDI interfaces
    Revert "Sound: hda - Restore PCI configuration space with interrupts off"

    Linus Torvalds
     
  • Remove the gesbc9312.h header since it is unused.

    Signed-off-by: H Hartley Sweeten
    Signed-off-by: Russell King

    Hartley Sweeten
     

19 Feb, 2009

20 commits

  • READ_IMPLIES_EXEC must be set when:
    o binary _is_ an executable stack (i.e. not EXSTACK_DISABLE_X)
    o processor architecture is _under_ ARMv6 (XN bit is supported from ARMv6)

    Signed-off-by: Makito SHIOKAWA
    Signed-off-by: Russell King

    Makito SHIOKAWA
     
  • Standby memory detected with the sclp interface gets always registered
    with add_memory calls without considering the limitationt that the
    "mem=" kernel paramater implies.
    So fix this and only register standby memory that is below the specified
    limit.
    This fixes zfcpdump since it uses "mem=32M". In case there is appr.
    2GB standby memory present all of usable memory would be used for the
    struct pages needed for standby memory.

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

    Heiko Carstens
     
  • commit aa5e97ce4bbc9d5daeec16b1d15bb3f6b7b4f4d4
    [PATCH] improve precision of process accounting.

    Introduced a timing regression:
    -bash-3.2# time ls
    real 0m0.006s
    user 0m1.754s
    sys 0m1.094s

    The problem was introduced by an error in cputime_to_timeval.
    Cputime is now 1/4096 microsecond, therefore, we have to divide
    the remainder with 4096 to get the microseconds.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • Handle a malformed hardware response which some versions of the
    Support Element (SE) may present during SE restart and which otherwise
    would result in an endless loop in function sclp_dispatch_evbufs.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     
  • When changing the parent of a clock, it is necessary to keep the
    clock use counts balanced otherwise things the parent state will
    get corrupted. Since we already disable and re-enable the clock,
    we might as well use the recursive versions instead.

    Signed-off-by: Russell King

    Russell King
     
  • Takashi Iwai
     
  • Takashi Iwai
     
  • Takashi Iwai
     
  • *ep->reg_udccs is always set to 0.

    Signed-off-by: Roel Kluin
    Acked-by: Eric Miao
    Signed-off-by: Russell King

    Roel Kluin
     
  • In the non highmem case, if two memory banks of 1GB each are provided,
    the second bank would evade suppression since its virtual base would
    be 0. Fix this by disallowing any memory bank which virtual base
    address is found to be lower than PAGE_OFFSET.

    Reported-by: Lennert Buytenhek

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Russell King

    Nicolas Pitre
     
  • …it/rostedt/linux-2.6-trace into tracing/urgent

    Ingo Molnar
     
  • This reverts commit 7e86c0e6850504ec9516b953f316a47277825e33 ("do not
    overwrite EEPROM on Xonar D2/D2X") because it did not actually help with
    the problem.

    More user reports show that the overwriting of the EEPROM is not
    triggered by using this driver but by installing Linux, and that the
    installation of any other operating system (even one without any CMI8788
    driver) has the same effect. In other words, the presence of this
    driver does not have any effect on the occurrence of the error. (So
    far, the available evidence seems to point to a BIOS bug.)

    Furthermore, it turns out that the EEPROM chip is protected against
    stray write commands by the command format and by requiring a separate
    write-enable command, so the error scenario in the previous commit (that
    SPI writes can be misinterpreted as an EEPROM write command) is not even
    theoretically possible.

    The mixer control that was removed as a consequence of the previous
    commit can only be partially emulated in userspace, which also means it
    cannot be seen be the in-kernel OSS API emulation, so it is better to
    revert that change.

    Signed-off-by: Clemens Ladisch
    Cc:
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • Impact: prevent deadlock if ring buffer gets corrupted

    This patch adds a paranoid check to make sure the ring buffer consumer
    does not go into an infinite loop. Since the ring buffer has been set
    to read only, the consumer should not loop for more than the ring buffer
    size. A check is added to make sure the consumer does not loop more than
    the ring buffer size.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: fix output of function tracer to be useful

    The function tracer is pretty useless if KALLSYMS is not configured.
    Unless you are good at reading hex values, the function tracer should
    select the KALLSYMS configuration.

    Also, the dynamic function tracer will fail its self test if KALLSYMS
    is not selected.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Impact: fix to prevent hard lockup on self tests

    If one of the tracers are broken and is constantly filling the ring
    buffer while the test of the ring buffer is running, it will hang
    the box. The reason is that the test is a consumer that will not
    stop till the ring buffer is empty. But if the tracer is broken and
    is constantly producing input to the buffer, this test will never
    end. The result is a lockup of the box.

    This happened when KALLSYMS was not defined and the dynamic ftrace
    test constantly filled the ring buffer, because the filter failed
    and all functions were being traced. Something was being called
    that constantly filled the buffer.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: fix deadlock in blk_abort_queue() for drivers that readd to timeout list
    block: fix booting from partitioned md array
    block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
    cciss: PCI power management reset for kexec
    paride/pg.c: xs(): &&/|| confusion
    fs/bio: bio_alloc_bioset: pass right object ptr to mempool_free
    block: fix bad definition of BIO_RW_SYNC
    bsg: Fix sense buffer bug in SG_IO

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
    omap_hsmmc: Change while(); loops with finite version
    omap_hsmmc: recover from transfer failures
    omap_hsmmc: only MMC1 allows HCTL.SDVS != 1.8V
    omap_hsmmc: card detect irq bugfix
    sdhci: fix led naming
    mmc_test: fix basic read test
    s3cmci: Fix hangup in do_pio_write()
    Revert "sdhci: force high speed capability on some controllers"
    MMC: fix bug - SDHC card capacity not correct

    Linus Torvalds
     
  • Enhanced lockdep coverage of __GFP_NOFS turned up this new lockdep
    assert:

    [ 1093.677775]
    [ 1093.677781] =================================
    [ 1093.680031] [ INFO: inconsistent lock state ]
    [ 1093.680031] 2.6.29-rc5-tip-01504-gb49eca1-dirty #1
    [ 1093.680031] ---------------------------------
    [ 1093.680031] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
    [ 1093.680031] kswapd0/308 [HC0[0]:SC0[0]:HE1:SE1] takes:
    [ 1093.680031] (&inode->inotify_mutex){+.+.?.}, at: [] inotify_inode_is_dead+0x20/0x80
    [ 1093.680031] {RECLAIM_FS-ON-W} state was registered at:
    [ 1093.680031] [] mark_held_locks+0x43/0x5b
    [ 1093.680031] [] lockdep_trace_alloc+0x6c/0x6e
    [ 1093.680031] [] kmem_cache_alloc+0x20/0x150
    [ 1093.680031] [] idr_pre_get+0x27/0x6c
    [ 1093.680031] [] inotify_handle_get_wd+0x25/0xad
    [ 1093.680031] [] inotify_add_watch+0x7a/0x129
    [ 1093.680031] [] sys_inotify_add_watch+0x20f/0x250
    [ 1093.680031] [] sysenter_do_call+0x12/0x35
    [ 1093.680031] [] 0xffffffff
    [ 1093.680031] irq event stamp: 60417
    [ 1093.680031] hardirqs last enabled at (60417): [] call_rcu+0x53/0x59
    [ 1093.680031] hardirqs last disabled at (60416): [] call_rcu+0x17/0x59
    [ 1093.680031] softirqs last enabled at (59656): [] __do_softirq+0x157/0x16b
    [ 1093.680031] softirqs last disabled at (59651): [] do_softirq+0x74/0x15d
    [ 1093.680031]
    [ 1093.680031] other info that might help us debug this:
    [ 1093.680031] 2 locks held by kswapd0/308:
    [ 1093.680031] #0: (shrinker_rwsem){++++..}, at: [] shrink_slab+0x36/0x189
    [ 1093.680031] #1: (&type->s_umount_key#4){+++++.}, at: [] shrink_dcache_memory+0x110/0x1fb
    [ 1093.680031]
    [ 1093.680031] stack backtrace:
    [ 1093.680031] Pid: 308, comm: kswapd0 Not tainted 2.6.29-rc5-tip-01504-gb49eca1-dirty #1
    [ 1093.680031] Call Trace:
    [ 1093.680031] [] valid_state+0x12a/0x13d
    [ 1093.680031] [] mark_lock+0xc1/0x1e9
    [ 1093.680031] [] ? check_usage_forwards+0x0/0x3f
    [ 1093.680031] [] __lock_acquire+0x2c6/0xac8
    [ 1093.680031] [] ? register_lock_class+0x17/0x228
    [ 1093.680031] [] lock_acquire+0x5d/0x7a
    [ 1093.680031] [] ? inotify_inode_is_dead+0x20/0x80
    [ 1093.680031] [] __mutex_lock_common+0x3a/0x4cb
    [ 1093.680031] [] ? inotify_inode_is_dead+0x20/0x80
    [ 1093.680031] [] mutex_lock_nested+0x2e/0x36
    [ 1093.680031] [] ? inotify_inode_is_dead+0x20/0x80
    [ 1093.680031] [] inotify_inode_is_dead+0x20/0x80
    [ 1093.680031] [] dentry_iput+0x90/0xc2
    [ 1093.680031] [] d_kill+0x21/0x45
    [ 1093.680031] [] __shrink_dcache_sb+0x27f/0x355
    [ 1093.680031] [] shrink_dcache_memory+0x15e/0x1fb
    [ 1093.680031] [] shrink_slab+0x121/0x189
    [ 1093.680031] [] kswapd+0x39f/0x561
    [ 1093.680031] [] ? isolate_pages_global+0x0/0x233
    [ 1093.680031] [] ? autoremove_wake_function+0x0/0x43
    [ 1093.680031] [] ? kswapd+0x0/0x561
    [ 1093.680031] [] kthread+0x41/0x82
    [ 1093.680031] [] ? kthread+0x0/0x82
    [ 1093.680031] [] kernel_thread_helper+0x7/0x10

    inotify_handle_get_wd() does idr_pre_get() which does a
    kmem_cache_alloc() without __GFP_FS - and is hence deadlockable under
    extreme MM pressure.

    Signed-off-by: Ingo Molnar
    Acked-by: Peter Zijlstra
    Cc: MinChan Kim
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • gpio_get_value() returns 0 or nonzero, but getmiso() expects 0 or 1.
    Sanitize the value to a 0/1 boolean.

    Signed-off-by: Michael Buesch
    Acked-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     
  • Since I don't work for SUSE any more and the bwalle@suse.de address is
    invalid, correct it in the copyright headers and documentation.

    Signed-off-by: Bernhard Walle
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle