14 Apr, 2012

2 commits

  • Pull system.h fixups for less common arch's from Paul Gortmaker:
    "Here is what is hopefully the last of the system.h related fixups.

    The fixes for Alpha and ia64 are code relocations consistent with what
    was done for the more mainstream architectures. Note that the
    diffstat lines removed vs lines added are not the same since I've
    fixed some of the whitespace issues in the relocated code blocks.
    However they are functionally the same. Compile tested locally, plus
    these two have been in linux-next for a while.

    There is also a trivial one line system.h related fix for the Tilera
    arch from Chris Metcalf to fix an implict include.."

    * 'systemh-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    irq_work: fix compile failure on tile from missing include
    ia64: populate the cmpxchg header with appropriate code
    alpha: fix build failures from system.h dismemberment

    Linus Torvalds
     
  • Building with IRQ_WORK configured results in

    kernel/irq_work.c: In function ‘irq_work_run’:
    kernel/irq_work.c:110: error: implicit declaration of function ‘irqs_disabled’

    The appropriate header just needs to be included.

    Signed-off-by: Chris Metcalf
    Signed-off-by: Paul Gortmaker

    Chris Metcalf
     

13 Apr, 2012

6 commits

  • Pull a fix for the recent irqdomain bug fixes from Grant Likely:
    "I flubbed one patch in the last pull request which broke a format
    string on 64 bit platforms. Here's the fix."

    * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    irq_domain: fix type mismatch in debugfs output format

    Linus Torvalds
     
  • sizeof(void*) returns an unsigned long, but it was being used as a width parameter to a "%-*s" format string which requires an int. On 64 bit platforms this causes a type mismatch:

    linux/kernel/irq/irqdomain.c:575: warning: field width should have type
    'int', but argument 6 has type 'long unsigned int'

    This change casts the size to an int so printf gets the right data type.

    Reported-by: Andreas Schwab
    Signed-off-by: Grant Likely
    Cc: David Daney

    Grant Likely
     
  • Pull timer fixes from Thomas Gleixner:
    "The itimer removal one is not strictly a fix, but I really wanted to
    avoid a rebase of the urgent ones."

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    Revert "clocksource: Load the ACPI PM clocksource asynchronously"
    clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot()
    itimer: Use printk_once instead of WARN_ONCE
    nohz: Fix stale jiffies update in tick_nohz_restart()
    tick: Document TICK_ONESHOT config option
    proc: stats: Use arch_idle_time for idle and iowait times if available
    itimer: Schedule silent NULL pointer fixup in setitimer() for removal

    Linus Torvalds
     
  • Merge fixes from Andrew Morton.

    * emailed from Andrew Morton : (14 patches)
    panic: fix stack dump print on direct call to panic()
    drivers/rtc/rtc-pl031.c: enable clock on all ST variants
    Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()"
    hugetlb: fix race condition in hugetlb_fault()
    drivers/rtc/rtc-twl.c: use static register while reading time
    drivers/rtc/rtc-s3c.c: add placeholder for driver private data
    drivers/rtc/rtc-s3c.c: fix compilation error
    MAINTAINERS: add PCDP console maintainer
    memcg: do not open code accesses to res_counter members
    drivers/rtc/rtc-efi.c: fix section mismatch warning
    drivers/rtc/rtc-r9701.c: reset registers if invalid values are detected
    drivers/char/random.c: fix boot id uniqueness race
    memcg: fix broken boolen expression
    memcg: fix up documentation on global LRU

    Linus Torvalds
     
  • Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops")
    causes a regression where no stack trace will be printed at all for the
    case where kernel code calls panic() directly while not processing an
    oops, and of course there are 100's of instances of this type of call.

    The original commit executed the check (!oops_in_progress), but this will
    always be false because just before the dump_stack() there is a call to
    bust_spinlocks(1), which does the following:

    void __attribute__((weak)) bust_spinlocks(int yes)
    {
    if (yes) {
    ++oops_in_progress;

    The proper way to resolve the problem that original commit tried to
    solve is to avoid printing a stack dump from panic() when the either of
    the following conditions is true:

    1) TAINT_DIE has been set (this is done by oops_end())
    This indicates and oops has already been printed.
    2) oops_in_progress > 1
    This guards against the rare case where panic() is invoked
    a second time, or in between oops_begin() and oops_end()

    Signed-off-by: Jason Wessel
    Cc: Andi Kleen
    Cc: [3.3+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Wessel
     
  • Pull irqdomain bug fixes from Grant Likely:
    "This branch fixes a bug in irq_create_mapping() where an error return
    from irq_alloc_desc_from() gets ignored.

    It also removes irq_virq_count to fix a bug on powerpc where the
    irqdomain code does not find irqs allocated above the CONFIG_NR_IRQS
    boundary.

    The remaining patches get rid of an completely pointless export and
    fix some minor bugs in the irqdomain debug output."

    * tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
    irq_domain: Move irq_virq_count into NOMAP revmap
    irqdomain: Fix debugfs formatting
    irq_domain: correct the debugfs file name
    irq: Kill pointless irqd_to_hw export
    irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().

    Linus Torvalds
     

12 Apr, 2012

1 commit

  • This patch replaces the old global setting of irq_virq_count that is only
    used by the NOMAP mapping and instead uses a revmap_data property so that
    the maximum NOMAP allocation can be set per NOMAP irq_domain.

    There is exactly one user of irq_virq_count in-tree right now: PS3.
    Also, irq_virq_count is only useful for the NOMAP mapping. So,
    instead of having a single global irq_virq_count values, this change
    drops it entirely and added a max_irq argument to irq_domain_add_nomap().
    That makes it a property of an individual nomap irq domain instead of
    a global system settting.

    Signed-off-by: Grant Likely
    Tested-by: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Cc: Milton Miller

    Grant Likely
     

11 Apr, 2012

4 commits

  • keyctl_session_to_parent(task) sets ->replacement_session_keyring,
    it should be processed and cleared by key_replace_session_keyring().

    However, this task can fork before it notices TIF_NOTIFY_RESUME and
    the new child gets the bogus ->replacement_session_keyring copied by
    dup_task_struct(). This is obviously wrong and, if nothing else, this
    leads to put_cred(already_freed_cred).

    change copy_creds() to clear this member. If copy_process() fails
    before this point the wrong ->replacement_session_keyring doesn't
    matter, exit_creds() won't be called.

    Cc:
    Signed-off-by: Oleg Nesterov
    Acked-by: David Howells
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • This patch fixes the irq_domain_mapping debugfs output to pad pointer
    values with leading zeros so that pointer values are displayed
    correctly. Otherwise you get output similar to "0x 5e0000000000000".
    Also, when the irq_domain is set to 'null'

    Signed-off-by: Grant Likely
    Cc: David Daney
    Cc: Mika Westerberg

    Grant Likely
     
  • The actual name of the irq_domain mapping debugfs file is
    "irq_domain_mapping" not "virq_mapping".

    Signed-off-by: Mika Westerberg
    Signed-off-by: Grant Likely

    Mika Westerberg
     
  • In commit 4bbdd45a (irq_domain/powerpc: eliminate irq_map; use
    irq_alloc_desc() instead) code was added that ignores error returns
    from irq_alloc_desc_from() by (silently) casting the return value to
    unsigned. The negitive value error return now suddenly looks like a
    valid irq number.

    Commits cc79ca69 (irq_domain: Move irq_domain code from powerpc to
    kernel/irq) and 1bc04f2c (irq_domain: Add support for base irq and
    hwirq in legacy mappings) move this code to its current location in
    irqdomain.c

    The result of all of this is a null pointer dereference OOPS if one of
    the error cases is hit.

    The fix: Don't cast away the negativeness of the return value and then
    check for errors.

    Signed-off-by: David Daney
    Acked-by: Rob Herring
    [grant.likely: dropped addition of new 'irq' variable]
    Signed-off-by: Grant Likely

    David Daney
     

10 Apr, 2012

2 commits

  • In the commit 77b0d60c5adf39c74039e2142a1d3cd1e4d53799,
    "clockevents: Leave the broadcast device in shutdown mode when not needed",
    we were bailing out too quickly in tick_broadcast_switch_to_oneshot(),
    with out tracking the broadcast device mode change to 'TICKDEV_MODE_ONESHOT'.

    This breaks the platforms which need broadcast device oneshot services during
    deep idle states. tick_broadcast_oneshot_control() thinks that it is
    in periodic mode and fails to take proper decisions based on the
    CLOCK_EVT_NOTIFY_BROADCAST_[ENTER, EXIT] notifications during deep
    idle entry/exit.

    Fix this by tracking the broadcast device mode as 'TICKDEV_MODE_ONESHOT',
    before leaving the broadcast HW device in shutdown mode if there are no active
    requests for the moment.

    Reported-and-tested-by: Santosh Shilimkar
    Signed-off-by: Suresh Siddha
    Cc: johnstul@us.ibm.com
    Link: http://lkml.kernel.org/r/1334011304.12400.81.camel@sbsiddha-desk.sc.intel.com
    Signed-off-by: Thomas Gleixner

    Suresh Siddha
     
  • David pointed out, that WARN_ONCE() to report usage of an deprecated
    misfeature make folks unhappy. Use printk_once() instead.

    Andrew told me to stop grumbling and to remove the silly typecast
    while touching the file.

    Reported-by: David Rientjes
    Cc: Andrew Morton
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

08 Apr, 2012

1 commit


06 Apr, 2012

3 commits

  • Fix tick_nohz_restart() to not use a stale ktime_t "now" value when
    calling tick_do_update_jiffies64(now).

    If we reach this point in the loop it means that we crossed a tick
    boundary since we grabbed the "now" timestamp, so at this point "now"
    refers to a time in the old jiffy, so using the old value for "now" is
    incorrect, and is likely to give us a stale jiffies value.

    In particular, the first time through the loop the
    tick_do_update_jiffies64(now) call is always a no-op, since the
    caller, tick_nohz_restart_sched_tick(), will have already called
    tick_do_update_jiffies64(now) with that "now" value.

    Note that tick_nohz_stop_sched_tick() already uses the correct
    approach: when we notice we cross a jiffy boundary, grab a new
    timestamp with ktime_get(), and *then* update jiffies.

    Signed-off-by: Neal Cardwell
    Cc: Ben Segall
    Cc: Ingo Molnar
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1332875377-23014-1-git-send-email-ncardwell@google.com
    Signed-off-by: Thomas Gleixner

    Neal Cardwell
     
  • Merge batch of fixes from Andrew Morton:
    "The simple_open() cleanup was held back while I wanted for laggards to
    merge things.

    I still need to send a few checkpoint/restore patches. I've been
    wobbly about merging them because I'm wobbly about the overall
    prospects for success of the project. But after speaking with Pavel
    at the LSF conference, it sounds like they're further toward
    completion than I feared - apparently davem is at the "has stopped
    complaining" stage regarding the net changes. So I need to go back
    and re-review those patchs and their (lengthy) discussion."

    * emailed from Andrew Morton : (16 patches)
    memcg swap: use mem_cgroup_uncharge_swap fix
    backlight: add driver for DA9052/53 PMIC v1
    C6X: use set_current_blocked() and block_sigmask()
    MAINTAINERS: add entry for sparse checker
    MAINTAINERS: fix REMOTEPROC F: typo
    alpha: use set_current_blocked() and block_sigmask()
    simple_open: automatically convert to simple_open()
    scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
    libfs: add simple_open()
    hugetlbfs: remove unregister_filesystem() when initializing module
    drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
    fs/xattr.c:setxattr(): improve handling of allocation failures
    fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
    fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
    sysrq: use SEND_SIG_FORCED instead of force_sig()
    proc: fix mount -t proc -o AAA

    Linus Torvalds
     
  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

05 Apr, 2012

3 commits

  • Commit bfdc0b4 adds code to restrict access to dmesg_restrict,
    however, it incorrectly alters kptr_restrict rather than
    dmesg_restrict.

    The original patch from Richard Weinberger
    (https://lkml.org/lkml/2011/3/14/362) alters dmesg_restrict as
    expected, and so the patch seems to have been misapplied.

    This adds the CAP_SYS_ADMIN check to both dmesg_restrict and
    kptr_restrict, since both are sensitive.

    Reported-by: Phillip Lougher
    Signed-off-by: Kees Cook
    Acked-by: Serge Hallyn
    Acked-by: Richard Weinberger
    Cc: stable@vger.kernel.org
    Signed-off-by: James Morris

    Kees Cook
     
  • Pull KGDB/KDB regression fixes from Jason Wessel:
    - Fix a Smatch warning that appeared in the 3.4 merge window
    - Fix kgdb test suite with SMP for all archs without HW single stepping
    - Fix kgdb sw breakpoints with CONFIG_DEBUG_RODATA=y limitations on x86
    - Fix oops on kgdb test suite with CONFIG_DEBUG_RODATA
    - Fix kgdb test suite with SMP for all archs with HW single stepping

    * tag 'for_linus-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb:
    x86,kgdb: Fix DEBUG_RODATA limitation using text_poke()
    kgdb,debug_core: pass the breakpoint struct instead of address and memory
    kgdbts: (2 of 2) fix single step awareness to work correctly with SMP
    kgdbts: (1 of 2) fix single step awareness to work correctly with SMP
    kgdbts: Fix kernel oops with CONFIG_DEBUG_RODATA
    kdb: Fix smatch warning on dbg_io_ops->is_console

    Linus Torvalds
     
  • Pull more power management updates from Rafael Wysocki:
    - Patch series that hopefully fixes races between the freezer and
    request_firmware() and request_firmware_nowait() for good, with two
    cleanups from Stephen Boyd on top.
    - Runtime PM fix from Alan Stern preventing tasks from getting stuck
    indefinitely in the runtime PM wait queue.
    - Device PM QoS update from MyungJoo Ham introducing a new variant of
    pm_qos_update_request() allowing the callers to specify a timeout.

    * tag 'pm-for-3.4-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / QoS: add pm_qos_update_request_timeout() API
    firmware_class: Move request_firmware_nowait() to workqueues
    firmware_class: Reorganize fw_create_instance()
    PM / Sleep: Mitigate race between the freezer and request_firmware()
    PM / Sleep: Move disabling of usermode helpers to the freezer
    PM / Hibernate: Disable usermode helpers right before freezing tasks
    firmware_class: Do not warn that system is not ready from async loads
    firmware_class: Split _request_firmware() into three functions, v2
    firmware_class: Rework usermodehelper check
    PM / Runtime: don't forget to wake up waitqueue on failure

    Linus Torvalds
     

03 Apr, 2012

2 commits

  • This merges some of the fixes from Paul Gortmaker for the header file
    cleanup fallout.

    Some of the patches are going through arch maintainer trees, and David
    Howells suggested another be done differently, but this at least fixes a
    few cases.

    * emailed from Paul Gortmaker :
    asm-generic: add linux/types.h to cmpxchg.h
    firewire: restore the device.h include in linux/firewire.h
    frv: fix warnings in mb93090-mb00/pci-dma.c about implicit EXPORT_SYMBOL
    parisc: fix missing cmpxchg file error from system.h split
    blackfin: fix cmpxchg build fails from system.h fallout
    avr32: fix build failures from mis-naming of atmel_nand.h
    ARM: mach-msm: fix compile fail from system.h fallout
    irq_work: fix compile failure on MIPS from system.h split

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    - Fix for CPU hotplug hang in padata.
    - Avoid using cpu_active inappropriately in pcrypt and padata.
    - Fix for user-space algorithm lookup hang with IV generators.
    - Fix for netlink dump of algorithms where stuff went missing due to
    incorrect calculation of message size.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: user - Fix size of netlink dump message
    crypto: user - Fix lookup of algorithms with IV generator
    crypto: pcrypt - Use the online cpumask as the default
    padata: Fix cpu hotplug
    padata: Use the online cpumask as the default
    padata: Add a reference to the api documentation

    Linus Torvalds
     

02 Apr, 2012

2 commits

  • Pull cpumask cleanups from Rusty Russell:
    "(Somehow forgot to send this out; it's been sitting in linux-next, and
    if you don't want it, it can sit there another cycle)"

    I'm a sucker for things that actually delete lines of code.

    Fix up trivial conflict in arch/arm/kernel/kprobes.c, where Rusty fixed
    a user of &cpu_online_map to be cpu_online_mask, but that code got
    deleted by commit b21d55e98ac2 ("ARM: 7332/1: extract out code patch
    function from kprobes").

    * tag 'for-linus' of git://github.com/rustyrussell/linux:
    cpumask: remove old cpu_*_map.
    documentation: remove references to cpu_*_map.
    drivers/cpufreq/db8500-cpufreq: remove references to cpu_*_map.
    remove references to cpu_*_map in arch/

    Linus Torvalds
     
  • Builds of the MIPS platform ip32_defconfig fails as of commit
    0195c00244dc ("Merge tag 'split-asm_system_h ...") because MIPS xchg()
    macro uses BUILD_BUG_ON and it was moved in commit b81947c646bf
    ("Disintegrate asm/system.h for MIPS").

    The root cause is that the system.h split wasn't tested on a baseline
    with commit 6c03438edeb5 ("kernel.h: doesn't explicitly use bug.h, so
    don't include it.")

    Since this file uses BUG code in several other places besides the xchg
    call, simply make the inclusion explicit.

    Signed-off-by: Paul Gortmaker
    Acked-by: David Howells
    Signed-off-by: Linus Torvalds

    Paul Gortmaker
     

01 Apr, 2012

2 commits

  • Pull scheduler fixes from Ingo Molnar.

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()
    sched: Fix __schedule_bug() output when called from an interrupt
    sched/arch: Introduce the finish_arch_post_lock_switch() scheduler callback

    Linus Torvalds
     
  • Pull perf updates and fixes from Ingo Molnar:
    "It's mostly fixes, but there's also two late items:

    - preliminary GTK GUI support for perf report
    - PMU raw event format descriptors in sysfs, to be parsed by tooling

    The raw event format in sysfs is a new ABI. For example for the 'CPU'
    PMU we have:

    aldebaran:~> ll /sys/bus/event_source/devices/cpu/format/*
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/any
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/cmask
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/edge
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/event
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/inv
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/offcore_rsp
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/pc
    -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/umask

    those lists of fields contain a specific format:

    aldebaran:~> cat /sys/bus/event_source/devices/cpu/format/offcore_rsp
    config1:0-63

    So, those who wish to specify raw events can now use the following
    event format:

    -e cpu/cmask=1,event=2,umask=3

    Most people will not want to specify any events (let alone raw
    events), they'll just use whatever default event the tools use.

    But for more obscure PMU events that have no cross-architecture
    generic events the above syntax is more usable and a bit more
    structured than specifying hex numbers."

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
    perf tools: Remove auto-generated bison/flex files
    perf annotate: Fix off by one symbol hist size allocation and hit accounting
    perf tools: Add missing ref-cycles event back to event parser
    perf annotate: addr2line wants addresses in same format as objdump
    perf probe: Finder fails to resolve function name to address
    tracing: Fix ent_size in trace output
    perf symbols: Handle NULL dso in dso__name_len
    perf symbols: Do not include libgen.h
    perf tools: Fix bug in raw sample parsing
    perf tools: Fix display of first level of callchains
    perf tools: Switch module.h into export.h
    perf: Move mmap page data_head offset assertion out of header
    perf: Fix mmap_page capabilities and docs
    perf diff: Fix to work with new hists design
    perf tools: Fix modifier to be applied on correct events
    perf tools: Fix various casting issues for 32 bits
    perf tools: Simplify event_read_id exit path
    tracing: Fix ftrace stack trace entries
    tracing: Move the tracing_on/off() declarations into CONFIG_TRACING
    perf report: Add a simple GTK2-based 'perf report' browser
    ...

    Linus Torvalds
     

31 Mar, 2012

5 commits

  • This option has been selected from arch code as it was assumed that
    it's necessary to support oneshot mode clockevent devices. But it's
    just a core internal helper to compile tick-oneshot.c if NOHZ or
    HIG_RES_TIMERS are selected.

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • The function for_each_cpu_mask() expects a *pointer* to struct
    cpumask as its second argument, whereas select_fallback_rq()
    passes the value itself.

    And moreover, for_each_cpu_mask() has been marked as obselete
    in include/linux/cpumask.h. So move to the more appropriate
    for_each_cpu() variant.

    Reported-by: Sasha Levin
    Signed-off-by: Srivatsa S. Bhat
    Acked-by: Peter Zijlstra
    Cc: Dave Jones
    Cc: Liu Chuansheng
    Cc: vapier@gentoo.org
    Cc: rusty@rustcorp.com.au
    Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Srivatsa S. Bhat
     
  • Pull genirq updates from Thomas Gleixner.

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
    genirq: Respect NUMA node affinity in setup_irq_irq affinity()
    genirq: Get rid of unneeded force parameter in irq_finalize_oneshot()
    genirq: Minor readablity improvement in irq_wake_thread()

    Linus Torvalds
     
  • Pull core locking updates from Thomas Gleixner.

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    futex: Mark get_robust_list as deprecated
    futex: Do not leak robust list to unprivileged process

    Linus Torvalds
     
  • irq_move_masked_irq() checks the return code of
    chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is
    also a valid return code, which is there to avoid a redundant copy of
    the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid
    the redundant copy, we also fail to adjust the thread affinity of an
    eventually threaded interrupt handler.

    Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return
    values correctly by checking the valid return values seperately.

    Signed-off-by: Jiang Liu
    Cc: Jiang Liu
    Cc: Keping Chen
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1333120296-13563-2-git-send-email-jiang.liu@huawei.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

30 Mar, 2012

7 commits

  • setitimer() should return -EFAULT if called with an invalid pointer
    for value. The current code excludes a NULL pointer from this rule and
    silently uses it to stop the timer. This violates the spec.

    Warn about user space apps which rely on that feature and schedule it
    for removal.

    [ tglx: Massaged changelog, warn message and Doc entry ]

    Signed-off-by: Sasikantha babu
    Link: http://lkml.kernel.org/r/1332340854-26053-1-git-send-email-sasikanth.v19@gmail.com
    Signed-off-by: Thomas Gleixner

    Sasikantha babu
     
  • Pull urgent cgroup fix from Tejun Heo:
    "Commit 61d1d219c4c0 ('cgroup: remove extra calls to
    find_existing_css_set') which was part of the rc1 cgroup pull request
    made writes to the cgroup "tasks" file return an uninitialized retval
    on success which can cause boot failures with systemd.

    The change stayed in linux-next for quite some time but gcc
    interestingly failed to emit warning about using uninitialized
    variable and the problem seems to materialize only for certain build
    combinations (probably depends on register allocation).

    It's just missing local variable initialization and the fix is trivial
    & safe. As the problem is critical when it materializes, I'm
    fast-tracking it. Also included is Li's email address change in
    MAINTAINERS."

    * 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup: cgroup_attach_task() could return -errno after success
    cgroup: update MAINTAINERS entry

    Linus Torvalds
     
  • 61d1d219c4 "cgroup: remove extra calls to find_existing_css_set" made
    cgroup_task_migrate() return void. An unfortunate side effect was
    that cgroup_attach_task() was depending on that function's return
    value to clear its @retval on the success path. On cgroup mounts
    without any subsystem with ->can_attach() callback,
    cgroup_attach_task() ended up returning @retval without initializing
    it on success.

    For some reason, gcc failed to warn about it and it didn't cause
    cgroup_attach_task() to return non-zero value in many cases, probably
    due to difference in register allocation. When the problem
    materializes, systemd fails to populate /systemd cgroup mount and
    fails to boot.

    Fix it by initializing @retval to zero on declaration.

    Signed-off-by: Tejun Heo
    Reported-by: Jiri Kosina
    LKML-Reference:
    Reviewed-by: Mandeep Singh Baines
    Acked-by: Li Zefan

    Tejun Heo
     
  • Pull x32 support for x86-64 from Ingo Molnar:
    "This tree introduces the X32 binary format and execution mode for x86:
    32-bit data space binaries using 64-bit instructions and 64-bit kernel
    syscalls.

    This allows applications whose working set fits into a 32 bits address
    space to make use of 64-bit instructions while using a 32-bit address
    space with shorter pointers, more compressed data structures, etc."

    Fix up trivial context conflicts in arch/x86/{Kconfig,vdso/vma.c}

    * 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
    x32: Fix alignment fail in struct compat_siginfo
    x32: Fix stupid ia32/x32 inversion in the siginfo format
    x32: Add ptrace for x32
    x32: Switch to a 64-bit clock_t
    x32: Provide separate is_ia32_task() and is_x32_task() predicates
    x86, mtrr: Use explicit sizing and padding for the 64-bit ioctls
    x86/x32: Fix the binutils auto-detect
    x32: Warn and disable rather than error if binutils too old
    x32: Only clear TIF_X32 flag once
    x32: Make sure TS_COMPAT is cleared for x32 tasks
    fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
    fs: Fix close_on_exec pointer in alloc_fdtable
    x32: Drop non-__vdso weak symbols from the x32 VDSO
    x32: Fix coding style violations in the x32 VDSO code
    x32: Add x32 VDSO support
    x32: Allow x32 to be configured
    x32: If configured, add x32 system calls to system call tables
    x32: Handle process creation
    x32: Signal-related system calls
    x86: Add #ifdef CONFIG_COMPAT to
    ...

    Linus Torvalds
     
  • Pull more ARM updates from Russell King.

    This got a fair number of conflicts with the split, but
    also with some other sparse-irq and header file include cleanups. They
    all looked pretty trivial, though.

    * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
    ARM: fix Kconfig warning for HAVE_BPF_JIT
    ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
    ARM: 7349/1: integrator: convert to sparse irqs
    ARM: 7259/3: net: JIT compiler for packet filters
    ARM: 7334/1: add jump label support
    ARM: 7333/2: jump label: detect %c support for ARM
    ARM: 7338/1: add support for early console output via semihosting
    ARM: use set_current_blocked() and block_sigmask()
    ARM: exec: remove redundant set_fs(USER_DS)
    ARM: 7332/1: extract out code patch function from kprobes
    ARM: 7331/1: extract out insn generation code from ftrace
    ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
    ARM: 7351/1: ftrace: remove useless memory checks
    ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
    ARM: Versatile Express: add NO_IOPORT
    ARM: get rid of asm/irq.h in asm/prom.h
    ARM: 7319/1: Print debug info for SIGBUS in user faults
    ARM: 7318/1: gic: refactor irq_start assignment
    ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
    ARM: 7315/1: perf: add support for the Cortex-A7 PMU
    ...

    Linus Torvalds
     
  • There is extra state information that needs to be exposed in the
    kgdb_bpt structure for tracking how a breakpoint was installed. The
    debug_core only uses the the probe_kernel_write() to install
    breakpoints, but this is not enough for all the archs. Some arch such
    as x86 need to use text_poke() in order to install a breakpoint into a
    read only page.

    Passing the kgdb_bpt structure to kgdb_arch_set_breakpoint() and
    kgdb_arch_remove_breakpoint() allows other archs to set the type
    variable which indicates how the breakpoint was installed.

    Cc: stable@vger.kernel.org # >= 2.6.36
    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • The Smatch tool warned that the change from commit b8adde8dd
    (kdb: Avoid using dbg_io_ops until it is initialized) should
    add another null check later in the kdb_printf().

    It is worth noting that the second use of dbg_io_ops->is_console
    is protected by the KDB_PAGER state variable which would only
    get set when kdb is fully active and initialized. If we
    ever encounter changes or defects in the KDB_PAGER state
    we do not want to crash the kernel in a kdb_printf/printk.

    CC: Tim Bird
    Reported-by: Dan Carpenter
    Signed-off-by: Jason Wessel

    Jason Wessel