18 Jun, 2015

1 commit

  • Driver authors seem to get the ordering of irq_set_chained_handler()
    and irq_set_handler_data() wrong - ordering the former before the
    latter. This opens a race window where, if there is an interrupt
    pending, the handler will be called between these two calls,
    potentially resulting in an oops.

    Provide a single interface to set both of these together, especially
    as that's commonly what is required.

    Signed-off-by: Russell King
    Cc: Alexandre Courbot
    Cc: Hans Ulli Kroll
    Cc: Jason Cooper
    Cc: Lee Jones
    Cc: Linus Walleij
    Cc: Thierry Reding
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/E1Z4yzs-0002Rw-4B@rmk-PC.arm.linux.org.uk
    Signed-off-by: Thomas Gleixner

    Russell King
     

06 Jun, 2015

1 commit


23 May, 2015

1 commit

  • Pull block fixes from Jens Axboe:
    "Three small fixes that have been picked up the last few weeks.
    Specifically:

    - Fix a memory corruption issue in NVMe with malignant user
    constructed request. From Christoph.

    - Kill (now) unused blk_queue_bio(), dm was changed to not need this
    anymore. From Mike Snitzer.

    - Always use blk_schedule_flush_plug() from the io_schedule() path
    when flushing a plug, fixing a !TASK_RUNNING warning with md. From
    Shaohua"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    sched: always use blk_schedule_flush_plug in io_schedule_out
    nvme: fix kernel memory corruption with short INQUIRY buffers
    block: remove export for blk_queue_bio

    Linus Torvalds
     

22 May, 2015

1 commit

  • If no_irq_chip is used for wake up (e.g. gpio-keys with a simple GPIO
    controller), the following warning is printed on resume from s2ram:

    WANING: CPU: 0 PID: 1046 at kernel/irq/manage.c:537 irq_set_irq_wake+0x9c/0xf8()
    Unbalanced IRQ 113 wake disable

    This happens because no_irq_chip does not implement
    irq_chip.irq_set_wake(), causing set_irq_wake_real() to return -ENXIO,
    and irq_set_irq_wake() to reset the wake_depth to zero.

    Set IRQCHIP_SKIP_SET_WAKE to indicate that irq_chip.irq_set_wake() is
    not implemented.

    Cfr. commit 10a50f1ab5f06c9a ("genirq: Set IRQCHIP_SKIP_SET_WAKE flag
    for dummy_irq_chip").

    Signed-off-by: Geert Uytterhoeven
    Cc: Roger Quadros
    Cc: Gregory Clement
    Link: http://lkml.kernel.org/r/1432281529-23325-1-git-send-email-geert%2Brenesas@glider.be
    Signed-off-by: Thomas Gleixner

    Geert Uytterhoeven
     

20 May, 2015

1 commit

  • Commit ab992dc38f9a ("watchdog: Fix merge 'conflict'") has introduced an
    obvious deadlock because of a typo. watchdog_proc_mutex should be
    unlocked on exit.

    Thanks to Miroslav Benes who was staring at the code with me and noticed
    this.

    Signed-off-by: Michal Hocko
    Duh-by: Peter Zijlstra
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

19 May, 2015

5 commits

  • Pull in the branch which can be consumed by x86 to build their changes
    on top.

    Thomas Gleixner
     
  • With Posted-Interrupts support in Intel CPU and IOMMU, an external
    interrupt from assigned-devices could be directly delivered to a
    virtual CPU in a virtual machine. Instead of hacking KVM and Intel
    IOMMU drivers, we propose a platform independent interface to target
    an interrupt to a specific virtual CPU in a virtual machine, or set
    virtual CPU affinity for an interrupt.

    By adopting this new interface and the hierarchy irqdomain, we could
    easily support posted-interrupts on Intel platforms, and also provide
    flexible enough interfaces for other platforms to support similar
    features.

    Here is the usage scenario for this interface:
    Guest update MSI/MSI-X interrupt configuration
    -->QEMU and KVM handle this
    -->KVM call this interface (passing posted interrupts descriptor
    and guest vector)
    -->irq core will transfer the control to IOMMU
    -->IOMMU will do the real work of updating IRTE (IRTE has new
    format for VT-d Posted-Interrupts)

    Signed-off-by: Jiang Liu
    Signed-off-by: Feng Wu
    Link: http://lkml.kernel.org/r/1432026437-16560-2-git-send-email-feng.wu@intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • block plug callback could sleep, so we introduce a parameter
    'from_schedule' and corresponding drivers can use it to destinguish a
    schedule plug flush or a plug finish. Unfortunately io_schedule_out
    still uses blk_flush_plug(). This causes below output (Note, I added a
    might_sleep() in raid1_unplug to make it trigger faster, but the whole
    thing doesn't matter if I add might_sleep). In raid1/10, this can cause
    deadlock.

    This patch makes io_schedule_out always uses blk_schedule_flush_plug.
    This should only impact drivers (as far as I know, raid 1/10) which are
    sensitive to the 'from_schedule' parameter.

    [ 370.817949] ------------[ cut here ]------------
    [ 370.817960] WARNING: CPU: 7 PID: 145 at ../kernel/sched/core.c:7306 __might_sleep+0x7f/0x90()
    [ 370.817969] do not call blocking ops when !TASK_RUNNING; state=2 set at [] prepare_to_wait+0x2f/0x90
    [ 370.817971] Modules linked in: raid1
    [ 370.817976] CPU: 7 PID: 145 Comm: kworker/u16:9 Tainted: G W 4.0.0+ #361
    [ 370.817977] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140709_153802- 04/01/2014
    [ 370.817983] Workqueue: writeback bdi_writeback_workfn (flush-9:1)
    [ 370.817985] ffffffff81cd83be ffff8800ba8cb298 ffffffff819dd7af 0000000000000001
    [ 370.817988] ffff8800ba8cb2e8 ffff8800ba8cb2d8 ffffffff81051afc ffff8800ba8cb2c8
    [ 370.817990] ffffffffa00061a8 000000000000041e 0000000000000000 ffff8800ba8cba28
    [ 370.817993] Call Trace:
    [ 370.817999] [] dump_stack+0x4f/0x7b
    [ 370.818002] [] warn_slowpath_common+0x8c/0xd0
    [ 370.818004] [] warn_slowpath_fmt+0x46/0x50
    [ 370.818006] [] ? prepare_to_wait+0x2f/0x90
    [ 370.818008] [] ? prepare_to_wait+0x2f/0x90
    [ 370.818010] [] __might_sleep+0x7f/0x90
    [ 370.818014] [] raid1_unplug+0xd3/0x170 [raid1]
    [ 370.818024] [] blk_flush_plug_list+0x8a/0x1e0
    [ 370.818028] [] ? bit_wait+0x50/0x50
    [ 370.818031] [] io_schedule_timeout+0x130/0x140
    [ 370.818033] [] bit_wait_io+0x36/0x50
    [ 370.818034] [] __wait_on_bit+0x65/0x90
    [ 370.818041] [] ? ext4_read_block_bitmap_nowait+0xbc/0x630
    [ 370.818043] [] ? bit_wait+0x50/0x50
    [ 370.818045] [] out_of_line_wait_on_bit+0x72/0x80
    [ 370.818047] [] ? autoremove_wake_function+0x40/0x40
    [ 370.818050] [] __wait_on_buffer+0x44/0x50
    [ 370.818053] [] ext4_wait_block_bitmap+0xe0/0xf0
    [ 370.818058] [] ext4_mb_init_cache+0x206/0x790
    [ 370.818062] [] ? lru_cache_add+0x1c/0x50
    [ 370.818064] [] ext4_mb_init_group+0x11e/0x200
    [ 370.818066] [] ext4_mb_load_buddy+0x341/0x360
    [ 370.818068] [] ext4_mb_find_by_goal+0x93/0x2f0
    [ 370.818070] [] ? ext4_mb_normalize_request+0x1e4/0x5b0
    [ 370.818072] [] ext4_mb_regular_allocator+0x67/0x460
    [ 370.818074] [] ? ext4_mb_normalize_request+0x1e4/0x5b0
    [ 370.818076] [] ext4_mb_new_blocks+0x4cb/0x620
    [ 370.818079] [] ext4_ext_map_blocks+0x4c6/0x14d0
    [ 370.818081] [] ? ext4_es_lookup_extent+0x4e/0x290
    [ 370.818085] [] ext4_map_blocks+0x14d/0x4f0
    [ 370.818088] [] ext4_writepages+0x76d/0xe50
    [ 370.818094] [] do_writepages+0x21/0x50
    [ 370.818097] [] __writeback_single_inode+0x60/0x490
    [ 370.818099] [] writeback_sb_inodes+0x2da/0x590
    [ 370.818103] [] ? trylock_super+0x1b/0x50
    [ 370.818105] [] ? trylock_super+0x1b/0x50
    [ 370.818107] [] __writeback_inodes_wb+0x9f/0xd0
    [ 370.818109] [] wb_writeback+0x34b/0x3c0
    [ 370.818111] [] bdi_writeback_workfn+0x23f/0x550
    [ 370.818116] [] process_one_work+0x1c8/0x570
    [ 370.818117] [] ? process_one_work+0x14b/0x570
    [ 370.818119] [] worker_thread+0x11b/0x470
    [ 370.818121] [] ? process_one_work+0x570/0x570
    [ 370.818124] [] kthread+0xf8/0x110
    [ 370.818126] [] ? kthread_create_on_node+0x210/0x210
    [ 370.818129] [] ret_from_fork+0x42/0x70
    [ 370.818131] [] ? kthread_create_on_node+0x210/0x210
    [ 370.818132] ---[ end trace 7b4deb71e68b6605 ]---

    V2: don't change ->in_iowait

    Cc: NeilBrown
    Signed-off-by: Shaohua Li
    Reviewed-by: Jeff Moyer
    Signed-off-by: Jens Axboe

    Shaohua Li
     
  • Pull in the branch which can be consumed by ARM to build their changes
    on top.

    Thomas Gleixner
     
  • Two watchdog changes that came through different trees had a non
    conflicting conflict, that is, one changed the semantics of a variable
    but no actual code conflict happened. So the merge appeared fine, but
    the resulting code did not behave as expected.

    Commit 195daf665a62 ("watchdog: enable the new user interface of the
    watchdog mechanism") changes the semantics of watchdog_user_enabled,
    which thereafter is only used by the functions introduced by
    b3738d293233 ("watchdog: Add watchdog enable/disable all functions").

    There further appears to be a distinct lack of serialization between
    setting and using watchdog_enabled, so perhaps we should wrap the
    {en,dis}able_all() things in watchdog_proc_mutex.

    This patch fixes a s2r failure reported by Michal; which I cannot
    readily explain. But this does make the code internally consistent
    again.

    Reported-and-tested-by: Michal Hocko
    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

18 May, 2015

4 commits

  • Use the new helper function irq_domain_set_info to make sure the
    function irq_domain_set_hwirq_and_chip is being called, which is
    crucial to save irqdomain specific data to irq_data.

    Signed-off-by: Stefan Agner
    Cc: marc.zyngier@arm.com
    Cc: linux@arm.linux.org.uk
    Cc: u.kleine-koenig@pengutronix.de
    Cc: olof@lixom.net
    Cc: arnd@arndb.de
    Cc: daniel.lezcano@linaro.org
    Cc: mark.rutland@arm.com
    Cc: pawel.moll@arm.com
    Cc: robh+dt@kernel.org
    Cc: ijc+devicetree@hellion.org.uk
    Cc: galak@codeaurora.org
    Cc: mcoquelin.stm32@gmail.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: shawn.guo@linaro.org
    Cc: kernel@pengutronix.de
    Cc: jason@lakedaemon.net
    Link: http://lkml.kernel.org/r/1431769465-26867-4-git-send-email-stefan@agner.ch
    Signed-off-by: Thomas Gleixner

    Stefan Agner
     
  • Add helper irq_chip_enable_parent and irq_chip_disable_parent. The
    helper implement the default behavior in case irq_enable or irq_disable
    is not implemented for the parent interrupt chip, which is calling the
    irq_mask or irq_unmask respectively.

    Signed-off-by: Stefan Agner
    Cc: marc.zyngier@arm.com
    Cc: linux@arm.linux.org.uk
    Cc: u.kleine-koenig@pengutronix.de
    Cc: olof@lixom.net
    Cc: arnd@arndb.de
    Cc: daniel.lezcano@linaro.org
    Cc: mark.rutland@arm.com
    Cc: pawel.moll@arm.com
    Cc: robh+dt@kernel.org
    Cc: ijc+devicetree@hellion.org.uk
    Cc: galak@codeaurora.org
    Cc: mcoquelin.stm32@gmail.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: shawn.guo@linaro.org
    Cc: kernel@pengutronix.de
    Cc: jason@lakedaemon.net
    Link: http://lkml.kernel.org/r/1431769465-26867-3-git-send-email-stefan@agner.ch
    Signed-off-by: Thomas Gleixner

    Stefan Agner
     
  • This adds the helper irq_domain_set_info() in a non-domain hierarchy
    variant. This allows to use the helper for generic chip since not
    all chips using generic chip support domain hierarchy.

    Signed-off-by: Stefan Agner
    Cc: marc.zyngier@arm.com
    Cc: linux@arm.linux.org.uk
    Cc: u.kleine-koenig@pengutronix.de
    Cc: olof@lixom.net
    Cc: arnd@arndb.de
    Cc: daniel.lezcano@linaro.org
    Cc: mark.rutland@arm.com
    Cc: pawel.moll@arm.com
    Cc: robh+dt@kernel.org
    Cc: ijc+devicetree@hellion.org.uk
    Cc: galak@codeaurora.org
    Cc: mcoquelin.stm32@gmail.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: shawn.guo@linaro.org
    Cc: kernel@pengutronix.de
    Cc: jason@lakedaemon.net
    Link: http://lkml.kernel.org/r/1431769465-26867-2-git-send-email-stefan@agner.ch
    Signed-off-by: Thomas Gleixner

    Stefan Agner
     
  • Nested IRQs can only fire when the parent irq fires. So when the
    parent is suspended, there is no need to suspend the child irq.

    Suspending nested irqs can cause a problem is they are suspended or
    resumed in the wrong order. If an interrupt fires while the parent is
    active but the child is suspended, then the interrupt will not be
    acknowledged properly and so an interrupt storm can result. This is
    particularly likely if the parent is resumed before the child, and the
    interrupt was raised during suspend.

    Ensuring correct ordering would be possible, but it is simpler to just
    never suspend nested interrupts.

    Signed-off-by: NeilBrown
    Cc: GTA04 owners
    Cc: Kalle Jokiniemi
    Acked-by: Peter Zijlstra
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/20150517151934.2393e8f8@notabene.brown
    Signed-off-by: Thomas Gleixner

    NeilBrown
     

16 May, 2015

2 commits


13 May, 2015

1 commit

  • request_any_context_irq() returns a negative value on failure.
    It returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED on success.
    So fix testing return value of request_any_context_irq().

    Also fixup the return value of devm_request_any_context_irq() to make it
    consistent with request_any_context_irq().

    Fixes: 0668d3065128 ("genirq: Add devm_request_any_context_irq()")
    Signed-off-by: Axel Lin
    Reviewed-by: Stephen Boyd
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1431334978.17783.4.camel@ingics.com
    Signed-off-by: Thomas Gleixner

    Axel Lin
     

10 May, 2015

2 commits


09 May, 2015

1 commit

  • …t/rostedt/linux-trace

    Pull tracing fix from Steven Rostedt:
    "The newly added ftrace_print_array_seq() function had a bug in it.
    Luckily, the only user of it didn't make the 4.1 merge window.

    But the helper function should be fixed before 4.2 when the users
    start coming in"

    * tag 'trace-fixes-v4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Make ftrace_print_array_seq compute buf_len

    Linus Torvalds
     

08 May, 2015

3 commits

  • While fuzzing Sasha tripped over another ctx->mutex recursion lockdep
    splat. Annotate this.

    Reported-by: Sasha Levin
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Commit 3c18d447b3b3 ("sched/core: Check for available DL bandwidth in
    cpuset_cpu_inactive()"), a SCHED_DEADLINE bugfix, had a logic error that
    caused a regression in setting a CPU inactive during suspend. I ran into
    this when a program was failing pthread_setaffinity_np() with EINVAL after
    a suspend+wake up.

    A simple reproducer:

    $ ./a.out
    sched_setaffinity: Success
    $ systemctl suspend
    $ ./a.out
    sched_setaffinity: Invalid argument

    ... where ./a.out is:

    #define _GNU_SOURCE
    #include
    #include
    #include
    #include
    #include
    #include

    int main(void)
    {
    long num_cores;
    cpu_set_t cpu_set;
    int ret;

    num_cores = sysconf(_SC_NPROCESSORS_ONLN);
    CPU_ZERO(&cpu_set);
    CPU_SET(num_cores - 1, &cpu_set);
    errno = 0;
    ret = sched_setaffinity(getpid(), sizeof(cpu_set), &cpu_set);
    perror("sched_setaffinity");
    return ret ? EXIT_FAILURE : EXIT_SUCCESS;
    }

    The mistake is that suspend is handled in the action ==
    CPU_DOWN_PREPARE_FROZEN case of the switch statement in
    cpuset_cpu_inactive().

    However, the commit in question masked out CPU_TASKS_FROZEN
    from the action, making this case dead.

    The fix is straightforward.

    Signed-off-by: Omar Sandoval
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Juri Lelli
    Cc: Thomas Gleixner
    Fixes: 3c18d447b3b3 ("sched/core: Check for available DL bandwidth in cpuset_cpu_inactive()")
    Link: http://lkml.kernel.org/r/1cb5ecb3d6543c38cce5790387f336f54ec8e2bc.1430733960.git.osandov@osandov.com
    Signed-off-by: Ingo Molnar

    Omar Sandoval
     
  • Ronny reported that the following scenario is not handled correctly:

    T1 (prio = 10)
    lock(rtmutex);

    T2 (prio = 20)
    lock(rtmutex)
    boost T1

    T1 (prio = 20)
    sys_set_scheduler(prio = 30)
    T1 prio = 30
    ....
    sys_set_scheduler(prio = 10)
    T1 prio = 30

    The last step is wrong as T1 should now be back at prio 20.

    Commit c365c292d059 ("sched: Consider pi boosting in setscheduler()")
    only handles the case where a boosted tasks tries to lower its
    priority.

    Fix it by taking the new effective priority into account for the
    decision whether a change of the priority is required.

    Reported-by: Ronny Meeus
    Tested-by: Steven Rostedt
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Steven Rostedt
    Cc:
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Mike Galbraith
    Fixes: c365c292d059 ("sched: Consider pi boosting in setscheduler()")
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1505051806060.4225@nanos
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

07 May, 2015

2 commits


05 May, 2015

3 commits

  • The return type of kstat_irqs_usr() is unsigned int and kstat_irqs() also
    returns unsigned int so sum should be unsigned int here as well.

    Signed-off-by: Nicholas Mc Guire
    Link: http://lkml.kernel.org/r/1430642951-23964-1-git-send-email-hofrat@osadl.org
    Signed-off-by: Thomas Gleixner

    Nicholas Mc Guire
     
  • kstat_irqs is unsigned int and the return type of kstat_irqs() is also
    unsigned int so sum should be unsigned int as well even if the result
    is correct due to automatic type conversion.

    Signed-off-by: Nicholas Mc Guire
    Link: http://lkml.kernel.org/r/1430642930-23929-1-git-send-email-hofrat@osadl.org
    Signed-off-by: Thomas Gleixner

    Nicholas Mc Guire
     
  • The irq_domain_ops are not modified. The irqdomain core code accepts
    pointer to a const data.

    Signed-off-by: Krzysztof Kozlowski
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Stephen Warren
    Cc: Lee Jones
    Cc: Matthias Brugger
    Cc: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-mediatek@lists.infradead.org
    Link: http://lkml.kernel.org/r/1430139264-4362-1-git-send-email-k.kozlowski.k@gmail.com
    Signed-off-by: Thomas Gleixner

    Krzysztof Kozlowski
     

02 May, 2015

1 commit

  • Pull networking fixes from David Miller:

    1) Receive packet length needs to be adjust by 2 on RX to accomodate
    the two padding bytes in altera_tse driver. From Vlastimil Setka.

    2) If rx frame is dropped due to out of memory in macb driver, we leave
    the receive ring descriptors in an undefined state. From Punnaiah
    Choudary Kalluri

    3) Some netlink subsystems erroneously signal NLM_F_MULTI. That is
    only for dumps. Fix from Nicolas Dichtel.

    4) Fix mis-use of raw rt->rt_pmtu value in ipv4, one must always go via
    the ipv4_mtu() helper. From Herbert Xu.

    5) Fix null deref in bridge netfilter, and miscalculated lengths in
    jump/goto nf_tables verdicts. From Florian Westphal.

    6) Unhash ping sockets properly.

    7) Software implementation of BPF divide did 64/32 rather than 64/64
    bit divide. The JITs got it right. Fix from Alexei Starovoitov.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits)
    ipv4: Missing sk_nulls_node_init() in ping_unhash().
    net: fec: Fix RGMII-ID mode
    net/mlx4_en: Schedule napi when RX buffers allocation fails
    netxen_nic: use spin_[un]lock_bh around tx_clean_lock
    net/mlx4_core: Fix unaligned accesses
    mlx4_en: Use correct loop cursor in error path.
    cxgb4: Fix MC1 memory offset calculation
    bnx2x: Delay during kdump load
    net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
    net: dsa: Fix scope of eeprom-length property
    net: macb: Fix race condition in driver when Rx frame is dropped
    hv_netvsc: Fix a bug in netvsc_start_xmit()
    altera_tse: Correct rx packet length
    mlx4: Fix tx ring affinity_mask creation
    tipc: fix problem with parallel link synchronization mechanism
    tipc: remove wrong use of NLM_F_MULTI
    bridge/nl: remove wrong use of NLM_F_MULTI
    bridge/mdb: remove wrong use of NLM_F_MULTI
    net: sched: act_connmark: don't zap skb->nfct
    trivial: net: systemport: bcmsysport.h: fix 0x0x prefix
    ...

    Linus Torvalds
     

01 May, 2015

3 commits

  • Pull power management and ACPI fixes from Rafael Wysocki:
    "Three regression fixes this time, one for a recent regression in the
    cpuidle core affecting multiple systems, one for an inadvertently
    added duplicate typedef in ACPICA that breaks compilation with GCC 4.5
    and one for an ACPI Smart Battery Subsystem driver regression
    introduced during the 3.18 cycle (stable-candidate).

    Specifics:

    - Fix for a regression in the cpuidle core introduced by one of the
    recent commits in the clockevents_notify() removal series that put
    a call to a function which had to be executed with disabled
    interrupts into a code path running with enabled interrupts (Rafael
    J Wysocki)

    - Fix for a build problem in ACPICA (with GCC 4.5) introduced by one
    of the recent ACPICA tools commits that added a duplicate typedef
    to one of the ACPICA's header files by mistake (Olaf Hering)

    - Fix for a regression in the ACPI SBS (Smart Battery Subsystem)
    driver introduced during the 3.18 development cycle causing the
    smart battery manager to be marked as not present when it should be
    marked as present (Chris Bainbridge)"

    * tag 'pm+acpi-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpuidle: Run tick_broadcast_exit() with disabled interrupts
    ACPI / SBS: Enable battery manager when present
    ACPICA: remove duplicate u8 typedef

    Linus Torvalds
     
  • Pull kvm changes from Paolo Bonzini:
    "Remove from guest code the handling of task migration during a pvclock
    read; instead use the correct protocol in KVM.

    This removes the need for task migration notifiers in core scheduler
    code"

    [ The scheduler people really hated the migration notifiers, so this was
    kind of required - Linus ]

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    x86: pvclock: Really remove the sched notifier for cross-cpu migrations
    kvm: x86: fix kvmclock update protocol

    Linus Torvalds
     
  • Change default key details to be more obviously unspecified.

    Reported-by: Linus Torvalds
    Signed-off-by: David Howells
    Acked-by: James Morris
    Signed-off-by: Linus Torvalds

    David Howells
     

29 Apr, 2015

2 commits

  • Commit 335f49196fd6 (sched/idle: Use explicit broadcast oneshot
    control function) replaced clockevents_notify() invocations in
    cpuidle_idle_call() with direct calls to tick_broadcast_enter()
    and tick_broadcast_exit(), but it overlooked the fact that
    interrupts were already enabled before calling the latter which
    led to functional breakage on systems using idle states with the
    CPUIDLE_FLAG_TIMER_STOP flag set.

    Fix that by moving the invocations of tick_broadcast_enter()
    and tick_broadcast_exit() down into cpuidle_enter_state() where
    interrupts are still disabled when tick_broadcast_exit() is
    called. Also ensure that interrupts will be disabled before
    running tick_broadcast_exit() even if they have been enabled by
    the idle state's ->enter callback. Trigger a WARN_ON_ONCE() in
    that case, as we generally don't want that to happen for states
    with CPUIDLE_FLAG_TIMER_STOP set.

    Fixes: 335f49196fd6 (sched/idle: Use explicit broadcast oneshot control function)
    Reported-and-tested-by: Linus Walleij
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Daniel Lezcano
    Reported-and-tested-by: Sudeep Holla
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Pull s390 updates from Martin Schwidefsky:
    "One additional new feature for 4.1, a new PRNG based on SHA-512 for
    the zcrypt driver.

    Two memory management related changes, the page table reallocation for
    KVM is removed, and with file ptes gone the encoding of page table
    entries is improved.

    And three bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/zcrypt: Introduce new SHA-512 based Pseudo Random Generator.
    s390/mm: change swap pte encoding and pgtable cleanup
    s390/mm: correct transfer of dirty & young bits in __pmd_to_pte
    s390/bpf: add dependency to z196 features
    s390/3215: free memory in error path
    s390/kvm: remove delayed reallocation of page tables for KVM
    kexec: allocate the kexec control page with KEXEC_CONTROL_MEMORY_GFP

    Linus Torvalds
     

28 Apr, 2015

1 commit

  • ALU64_DIV instruction should be dividing 64-bit by 64-bit,
    whereas do_div() does 64-bit by 32-bit divide.
    x64 and arm64 JITs correctly implement 64 by 64 unsigned divide.
    llvm BPF backend emits code assuming that ALU64_DIV does 64 by 64.

    Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be attached to sockets")
    Reported-by: Michael Holzheu
    Acked-by: Daniel Borkmann
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

27 Apr, 2015

2 commits

  • This reverts commits 0a4e6be9ca17c54817cf814b4b5aa60478c6df27
    and 80f7fdb1c7f0f9266421f823964fd1962681f6ce.

    The task migration notifier was originally introduced in order to support
    the pvclock vsyscall with non-synchronized TSC, but KVM only supports it
    with synchronized TSC. Hence, on KVM the race condition is only needed
    due to a bad implementation on the host side, and even then it's so rare
    that it's mostly theoretical.

    As far as KVM is concerned it's possible to fix the host, avoiding the
    additional complexity in the vDSO and the (re)introduction of the task
    migration notifier.

    Xen, on the other hand, hasn't yet implemented vsyscall support at
    all, so we do not care about its plans for non-synchronized TSC.

    Reported-by: Peter Zijlstra
    Suggested-by: Marcelo Tosatti
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • Pull fourth vfs update from Al Viro:
    "d_inode() annotations from David Howells (sat in for-next since before
    the beginning of merge window) + four assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    RCU pathwalk breakage when running into a symlink overmounting something
    fix I_DIO_WAKEUP definition
    direct-io: only inc/dec inode->i_dio_count for file systems
    fs/9p: fix readdir()
    VFS: assorted d_backing_inode() annotations
    VFS: fs/inode.c helpers: d_inode() annotations
    VFS: fs/cachefiles: d_backing_inode() annotations
    VFS: fs library helpers: d_inode() annotations
    VFS: assorted weird filesystems: d_inode() annotations
    VFS: normal filesystems (and lustre): d_inode() annotations
    VFS: security/: d_inode() annotations
    VFS: security/: d_backing_inode() annotations
    VFS: net/: d_inode() annotations
    VFS: net/unix: d_backing_inode() annotations
    VFS: kernel/: d_inode() annotations
    VFS: audit: d_backing_inode() annotations
    VFS: Fix up some ->d_inode accesses in the chelsio driver
    VFS: Cachefiles should perform fs modifications on the top layer only
    VFS: AF_UNIX sockets should call mknod on the top layer only

    Linus Torvalds
     

25 Apr, 2015

2 commits

  • A clockevent device is marked DETACHED when it is replaced by another
    clockevent device.

    The device is shutdown properly for drivers that implement legacy
    ->set_mode() callback, as we call ->set_mode() for CLOCK_EVT_MODE_UNUSED
    as well.

    But for the new per-state callback interface, we skip shutting down the
    device, as we thought its an internal state change. That wasn't correct.

    The effect is that the device is left programmed in oneshot or periodic
    mode.

    Fall-back to 'case CLOCK_EVT_STATE_SHUTDOWN', to shutdown the device.

    Fixes: bd624d75db21 "clockevents: Introduce mode specific callbacks"
    Reported-by: Daniel Lezcano
    Signed-off-by: Viresh Kumar
    Cc: linaro-kernel@lists.linaro.org
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/eef0a91c51b74d4e52c8e5a95eca27b5a0563f07.1428650683.git.viresh.kumar@linaro.org
    Signed-off-by: Thomas Gleixner

    Viresh Kumar
     
  • Without this system suspend is broken on systems that have
    drivers calling enable/disable_irq_wake() for interrupts based off
    the dummy irq hook. (e.g. drivers/gpio/gpio-pcf857x.c)

    Signed-off-by: Roger Quadros
    Cc:
    Cc:
    Cc:
    Cc: Gregory Clement
    Link: http://lkml.kernel.org/r/552E1DD3.4040106@ti.com
    Signed-off-by: Thomas Gleixner

    Roger Quadros
     

23 Apr, 2015

1 commit

  • Introduce KEXEC_CONTROL_MEMORY_GFP to allow the architecture code
    to override the gfp flags of the allocation for the kexec control
    page. The loop in kimage_alloc_normal_control_pages allocates pages
    with GFP_KERNEL until a page is found that happens to have an
    address smaller than the KEXEC_CONTROL_MEMORY_LIMIT. On systems
    with a large memory size but a small KEXEC_CONTROL_MEMORY_LIMIT
    the loop will keep allocating memory until the oom killer steps in.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky