Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663995 > unrolled thread

[PATCH 4.9 000/119] 4.9.32-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-12 19:00 +0200
Last post2017-06-13 02:50 +0200
Articles 20 on this page of 21 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 052/119] dmaengine: mv_xor_v2: set DMA mask to 40 bits Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 048/119] dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 055/119] ext4: fix SEEK_HOLE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 029/119] crypto: drbg - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 054/119] xen/privcmd: Support correctly 64KB page granularity when mapping memory Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 023/119] serial: ifx6x60: fix use-after-free on module unload Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 030/119] crypto: gcm - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 034/119] efi: Dont issue error message when booted under Xen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 005/119] tcp: disallow cwnd undo when switching congestion control Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
    [PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 016/119] sparc64: reset mm cpumask after wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 011/119] net: stmmac: fix completely hung TX when using TSO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 001/119] bnx2x: Fix Multi-Cos Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 010/119] net: ethoc: enable NAPI before poll may be scheduled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 018/119] sparc64: redefine first version Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    [PATCH 4.9 020/119] sparc64: new context wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
    Re: [PATCH 4.9 000/119] 4.9.32-stable review Guenter Roeck <linux@roeck-us.net> - 2017-06-13 00:00 +0200
      Re: [PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-13 09:30 +0200
    Re: [PATCH 4.9 000/119] 4.9.32-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-06-13 02:50 +0200

Page 1 of 2  [1] 2  Next page →


#1663995 — [PATCH 4.9 000/119] 4.9.32-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 000/119] 4.9.32-stable review
Message-ID<tRzBD-3Tq-3@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.9.32 release.
There are 119 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Wed Jun 14 15:25:24 UTC 2017.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.32-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.9.32-rc1

Pablo Neira Ayuso <pablo@netfilter.org>
    netfilter: nft_set_rbtree: handle element re-addition after deletion

Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()

Viresh Kumar <viresh.kumar@linaro.org>
    cpufreq: schedutil: move cached_raw_freq to struct sugov_policy

Jani Nikula <jani.nikula@intel.com>
    drm/i915/vbt: split out defaults that are set when there is no VBT

Jani Nikula <jani.nikula@intel.com>
    drm/i915/vbt: don't propagate errors from intel_bios_init()

Kees Cook <keescook@chromium.org>
    usercopy: Adjust tests to deal with SMAP/PAN

Amey Telawane <ameyt@codeaurora.org>
    tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline()

Laura Abbott <labbott@redhat.com>
    ARM: 8637/1: Adjust memory boundaries after reservations

Laura Abbott <labbott@redhat.com>
    ARM: 8636/1: Cleanup sanity_check_meminfo

Kristina Martsenko <kristina.martsenko@arm.com>
    arm64: entry: improve data abort handling of tagged pointers

Kristina Martsenko <kristina.martsenko@arm.com>
    arm64: hw_breakpoint: fix watchpoint matching for tagged pointers

Kristina Martsenko <kristina.martsenko@arm.com>
    arm64: traps: fix userspace cache maintenance emulation on a tagged pointer

Takatoshi Akiyama <takatoshi.akiyama.kj@ps.hitachi-solutions.com>
    serial: sh-sci: Fix panic when serial console and DMA are enabled

Julius Werner <jwerner@chromium.org>
    drivers: char: mem: Fix wraparound check to allow mappings up to the end

Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    cpu/hotplug: Drop the device lock on error

Takashi Iwai <tiwai@suse.de>
    ASoC: Fix use-after-free at card unregistration

Takashi Iwai <tiwai@suse.de>
    ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT

Takashi Iwai <tiwai@suse.de>
    ALSA: timer: Fix race between read and ioctl

Ben Skeggs <bskeggs@redhat.com>
    drm/nouveau/tmr: fully separate alarm execution/pending lists

Sinclair Yeh <syeh@vmware.com>
    drm/vmwgfx: Make sure backup_handle is always valid

Vladis Dronov <vdronov@redhat.com>
    drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()

Dan Carpenter <dan.carpenter@oracle.com>
    drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()

Jin Yao <yao.jin@linux.intel.com>
    perf/core: Drop kernel samples even though :u is specified

Breno Leitao <leitao@debian.org>
    powerpc/kernel: Initialize load_tm on task creation

Breno Leitao <leitao@debian.org>
    powerpc/kernel: Fix FP and vector register restoration

Michael Bringmann <mwb@linux.vnet.ibm.com>
    powerpc/hotplug-mem: Fix missing endian conversion of aa_index

Michael Ellerman <mpe@ellerman.id.au>
    powerpc/numa: Fix percpu allocations to be NUMA aware

Christophe Leroy <christophe.leroy@c-s.fr>
    powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function

Joe Carnuccio <joe.carnuccio@qlogic.com>
    scsi: qla2xxx: Fix mailbox pointer error in fwdump capture

Joe Carnuccio <joe.carnuccio@cavium.com>
    scsi: qla2xxx: Set bit 15 for DIAG_ECHO_TEST MBC

Joe Carnuccio <joe.carnuccio@cavium.com>
    scsi: qla2xxx: Modify T262 FW dump template to specify same start/end to debug customer issues

Johannes Thumshirn <jthumshirn@suse.de>
    scsi: qla2xxx: don't disable a not previously enabled PCI device

Marc Zyngier <marc.zyngier@arm.com>
    KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages

Jeff Mahoney <jeffm@suse.com>
    btrfs: fix memory leak in update_space_info failure path

David Sterba <dsterba@suse.com>
    btrfs: use correct types for page indices in btrfs_page_exists_in_range

Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
    cxl: Avoid double free_irq() for psl,slice interrupts

Frederic Barrat <fbarrat@linux.vnet.ibm.com>
    cxl: Fix error path on bad ioctl

Al Viro <viro@zeniv.linux.org.uk>
    ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path

Al Viro <viro@zeniv.linux.org.uk>
    ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()

Al Viro <viro@zeniv.linux.org.uk>
    ufs: set correct ->s_maxsize

Al Viro <viro@zeniv.linux.org.uk>
    ufs: restore maintaining ->i_blocks

Al Viro <viro@zeniv.linux.org.uk>
    fix ufs_isblockset()

Al Viro <viro@zeniv.linux.org.uk>
    ufs: restore proper tail allocation

Fabian Frederick <fabf@skynet.be>
    fs: add i_blocksize()

Tejun Heo <tj@kernel.org>
    cpuset: consider dying css as offline

Ulrik De Bie <ulrik.debie-os@e2big.org>
    Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled

Waiman Long <longman@redhat.com>
    cgroup: Prevent kill_css() from being called more than once

Sui Chen <suichen6@gmail.com>
    ahci: Acer SA5-271 SSD Not Detected Fix

Eric Anholt <eric@anholt.net>
    drm/msm: Expose our reservation object when exporting a dmabuf.

Nicholas Bellinger <nab@linux-iscsi.org>
    target: Re-add check to reject control WRITEs with overflow data

David Arcari <darcari@redhat.com>
    cpufreq: cpufreq_register_driver() should return -ENODEV if init fails

Pratyush Anand <panand@redhat.com>
    mei: make sysfs modalias format similar as uevent modalias

Matt Ranostay <matt.ranostay@konsulko.com>
    iio: proximity: as3935: fix iio_trigger_poll issue

Matt Ranostay <matt.ranostay@konsulko.com>
    iio: proximity: as3935: fix AS3935_INT mask

Franziska Naepelt <franziska.naepelt@idt.com>
    iio: light: ltr501 Fix interchanged als/ps register field

Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
    iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's

Oleg Drokin <green@linuxhacker.ru>
    staging/lustre/lov: remove set_fs() call from lov_getstripe()

Michael Thalmeier <michael.thalmeier@hale.at>
    usb: chipidea: debug: check before accessing ci_role

Jisheng Zhang <jszhang@marvell.com>
    usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

Thinh Nguyen <Thinh.Nguyen@synopsys.com>
    usb: gadget: f_mass_storage: Serialize wake and sleep execution

Hans de Goede <hdegoede@redhat.com>
    drm: Fix oops + Xserver hang when unplugging USB drm devices

Jan Kara <jack@suse.cz>
    ext4: fix fdatasync(2) after extent manipulation operations

Jan Kara <jack@suse.cz>
    ext4: fix data corruption with EXT4_GET_BLOCKS_ZERO

Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    ext4: keep existing extra fields when inode expands

Jan Kara <jack@suse.cz>
    ext4: fix SEEK_HOLE

Julien Grall <julien.grall@arm.com>
    xen/privcmd: Support correctly 64KB page granularity when mapping memory

Hou Tao <houtao1@huawei.com>
    cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: set DMA mask to 40 bits

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: remove interrupt coalescing

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: fix tx_submit() implementation

Hanna Hawa <hannah@marvell.com>
    dmaengine: mv_xor_v2: enable XOR engine after its configuration

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly

Alexander Sverdlin <alexander.sverdlin@gmail.com>
    dmaengine: ep93xx: Don't drain the transfers in terminate_all()

Alexander Sverdlin <alexander.sverdlin@gmail.com>
    dmaengine: ep93xx: Always start from BASE0

Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
    dmaengine: usb-dmac: Fix DMAOR AE bit definition

Marc Zyngier <marc.zyngier@arm.com>
    KVM: arm/arm64: vgic-v2: Do not use Active+Pending state for a HW interrupt

Marc Zyngier <marc.zyngier@arm.com>
    KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt

Wanpeng Li <wanpeng.li@hotmail.com>
    KVM: async_pf: avoid async pf injection when in guest mode

Marc Zyngier <marc.zyngier@arm.com>
    arm: KVM: Allow unaligned accesses at HYP

Marc Zyngier <marc.zyngier@arm.com>
    arm64: KVM: Allow unaligned accesses at EL2

Marc Zyngier <marc.zyngier@arm.com>
    arm64: KVM: Preserve RES1 bits in SCTLR_EL2

Wanpeng Li <wanpeng.li@hotmail.com>
    KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation

Paolo Bonzini <pbonzini@redhat.com>
    kvm: async_pf: fix rcu_irq_enter() with irqs enabled

Juergen Gross <jgross@suse.com>
    efi: Don't issue error message when booted under Xen

Trond Myklebust <trond.myklebust@primarydata.com>
    nfsd: Fix up the "supattr_exclcreat" attributes

J. Bruce Fields <bfields@redhat.com>
    nfsd4: fix null dereference on replay

Alex Deucher <alexander.deucher@amd.com>
    drm/amdgpu/ci: disable mclk switching for high refresh rates (v2)

Gilad Ben-Yossef <gilad@benyossef.com>
    crypto: gcm - wait for crypto op not signal safe

Gilad Ben-Yossef <gilad@benyossef.com>
    crypto: drbg - wait for crypto op not signal safe

Eric Biggers <ebiggers@google.com>
    KEYS: encrypted: avoid encrypting/decrypting stack buffers

Eric Biggers <ebiggers@google.com>
    KEYS: fix freeing uninitialized memory in key_update()

Eric Biggers <ebiggers@google.com>
    KEYS: fix dereferencing NULL payload with nonzero length

Gilad Ben-Yossef <gilad@benyossef.com>
    crypto: asymmetric_keys - handle EBUSY due to backlog correctly

Eric W. Biederman <ebiederm@xmission.com>
    ptrace: Properly initialize ptracer_cred on fork

Johan Hovold <johan@kernel.org>
    serial: ifx6x60: fix use-after-free on module unload

Jane Chu <jane.chu@oracle.com>
    arch/sparc: support NR_CPUS = 4096

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: delete old wrap code

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: new context wrap

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: add per-cpu mm of secondary contexts

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: redefine first version

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: combine activate_mm and switch_mm

Pavel Tatashin <pasha.tatashin@oracle.com>
    sparc64: reset mm cpumask after wrap

James Clarke <jrtc27@jrtc27.com>
    sparc: Machine description indices can vary

Mike Kravetz <mike.kravetz@oracle.com>
    sparc64: mm: fix copy_tsb to correctly copy huge page TSBs

David S. Miller <davem@davemloft.net>
    sparc64: Add __multi3 for gcc 7.x and later.

Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    net: bridge: start hello timer only if device is up

Niklas Cassel <niklas.cassel@axis.com>
    net: stmmac: fix completely hung TX when using TSO

Max Filippov <jcmvbkbc@gmail.com>
    net: ethoc: enable NAPI before poll may be scheduled

Richard Haines <richard_c_haines@btinternet.com>
    net/ipv6: Fix CALIPSO causing GPF with datagram support

Eric Dumazet <edumazet@google.com>
    net: ping: do not abuse udp_poll()

David S. Miller <davem@davemloft.net>
    ipv6: Fix leak in ipv6_gso_segment().

Mark Bloch <markb@mellanox.com>
    vxlan: fix use-after-free on deletion

Yuchung Cheng <ycheng@google.com>
    tcp: disallow cwnd undo when switching congestion control

Ganesh Goudar <ganeshgr@chelsio.com>
    cxgb4: avoid enabling napi twice to the same queue

Ben Hutchings <ben@decadent.org.uk>
    ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()

Lance Richardson <lrichard@redhat.com>
    vxlan: eliminate cached dst leak

Mintz, Yuval <Yuval.Mintz@cavium.com>
    bnx2x: Fix Multi-Cos


-------------

Diffstat:

 Makefile                                           |   4 +-
 arch/arm/kernel/setup.c                            |  10 +-
 arch/arm/kvm/init.S                                |   5 +-
 arch/arm/kvm/mmu.c                                 |   3 +
 arch/arm/mm/mmu.c                                  |  69 +++++--------
 arch/arm/mm/nommu.c                                |   8 +-
 arch/arm64/include/asm/asm-uaccess.h               |  13 +++
 arch/arm64/include/asm/sysreg.h                    |   4 +
 arch/arm64/include/asm/uaccess.h                   |   6 +-
 arch/arm64/kernel/entry.S                          |   6 +-
 arch/arm64/kernel/hw_breakpoint.c                  |   3 +-
 arch/arm64/kernel/traps.c                          |   4 +-
 arch/arm64/kvm/hyp-init.S                          |  11 ++-
 arch/powerpc/include/asm/topology.h                |  14 +++
 arch/powerpc/kernel/process.c                      |   3 +
 arch/powerpc/kernel/setup_64.c                     |   4 +-
 arch/powerpc/platforms/pseries/hotplug-memory.c    |   2 +
 arch/powerpc/sysdev/simple_gpio.c                  |   3 +-
 arch/sparc/Kconfig                                 |   4 +-
 arch/sparc/include/asm/mmu_64.h                    |   2 +-
 arch/sparc/include/asm/mmu_context_64.h            |  32 +-----
 arch/sparc/include/asm/pil.h                       |   1 -
 arch/sparc/include/asm/vio.h                       |   1 +
 arch/sparc/kernel/irq_64.c                         |  17 +++-
 arch/sparc/kernel/kernel.h                         |   1 -
 arch/sparc/kernel/smp_64.c                         |  31 ------
 arch/sparc/kernel/tsb.S                            |  11 ++-
 arch/sparc/kernel/ttable_64.S                      |   2 +-
 arch/sparc/kernel/vio.c                            |  68 ++++++++++++-
 arch/sparc/lib/Makefile                            |   1 +
 arch/sparc/lib/multi3.S                            |  35 +++++++
 arch/sparc/mm/init_64.c                            |  86 ++++++++++------
 arch/sparc/mm/tsb.c                                |   7 +-
 arch/sparc/mm/ultra.S                              |   5 -
 arch/x86/kernel/kvm.c                              |   2 +-
 arch/x86/kvm/cpuid.c                               |  20 ++--
 arch/x86/kvm/mmu.c                                 |   7 +-
 arch/x86/kvm/mmu.h                                 |   1 +
 arch/x86/kvm/x86.c                                 |   3 +-
 arch/x86/platform/efi/quirks.c                     |   3 +
 block/cfq-iosched.c                                |  17 +++-
 crypto/asymmetric_keys/public_key.c                |   2 +-
 crypto/drbg.c                                      |   5 +-
 crypto/gcm.c                                       |   6 +-
 drivers/ata/ahci.c                                 |  38 +++++++
 drivers/char/mem.c                                 |   2 +-
 drivers/cpufreq/cpufreq.c                          |   1 +
 drivers/dma/ep93xx_dma.c                           |  39 +++++++-
 drivers/dma/mv_xor_v2.c                            | 109 +++++++++------------
 drivers/dma/sh/usb-dmac.c                          |   2 +-
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c                |   6 ++
 drivers/gpu/drm/drm_drv.c                          |   7 +-
 drivers/gpu/drm/i915/i915_drv.c                    |   4 +-
 drivers/gpu/drm/i915/i915_drv.h                    |   2 +-
 drivers/gpu/drm/i915/intel_bios.c                  |  46 ++++++---
 drivers/gpu/drm/msm/msm_drv.c                      |   1 +
 drivers/gpu/drm/msm/msm_drv.h                      |   1 +
 drivers/gpu/drm/msm/msm_gem_prime.c                |   7 ++
 .../gpu/drm/nouveau/include/nvkm/subdev/timer.h    |   1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c   |   7 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c               |   2 +
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c            |  21 ++--
 drivers/iio/adc/bcm_iproc_adc.c                    |   8 +-
 drivers/iio/light/ltr501.c                         |   4 +-
 drivers/iio/proximity/as3935.c                     |   8 +-
 drivers/input/mouse/elantech.c                     |  16 +++
 drivers/misc/cxl/file.c                            |   7 +-
 drivers/misc/cxl/native.c                          |  14 ++-
 drivers/misc/mei/bus.c                             |   4 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c    |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |   4 +
 drivers/net/ethernet/ethoc.c                       |   3 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   2 +-
 drivers/net/vxlan.c                                |  39 ++++++--
 drivers/scsi/qla2xxx/qla_bsg.c                     |   9 +-
 drivers/scsi/qla2xxx/qla_dbg.c                     |   4 +-
 drivers/scsi/qla2xxx/qla_mbx.c                     |   4 +-
 drivers/scsi/qla2xxx/qla_os.c                      |   8 +-
 drivers/scsi/qla2xxx/qla_tmpl.c                    |   2 +-
 drivers/staging/lustre/lustre/lov/lov_pack.c       |   9 --
 drivers/target/target_core_transport.c             |  23 ++++-
 drivers/tty/serial/ifx6x60.c                       |   2 +-
 drivers/tty/serial/sh-sci.c                        |  10 +-
 drivers/usb/chipidea/debug.c                       |   3 +-
 drivers/usb/chipidea/udc.c                         |   8 +-
 drivers/usb/gadget/function/f_mass_storage.c       |  13 ++-
 drivers/xen/privcmd.c                              |   4 +-
 fs/block_dev.c                                     |   2 +-
 fs/btrfs/extent-tree.c                             |   1 +
 fs/btrfs/file.c                                    |   2 +-
 fs/btrfs/inode.c                                   |   4 +-
 fs/buffer.c                                        |  12 +--
 fs/ceph/addr.c                                     |   2 +-
 fs/direct-io.c                                     |   2 +-
 fs/ext4/extents.c                                  |  85 ++++++++--------
 fs/ext4/file.c                                     |  50 +++-------
 fs/ext4/inode.c                                    |  15 +--
 fs/ext4/mballoc.c                                  |   2 +-
 fs/ext4/move_extent.c                              |   2 +-
 fs/iomap.c                                         |   4 +-
 fs/jfs/super.c                                     |   4 +-
 fs/mpage.c                                         |   2 +-
 fs/nfsd/blocklayout.c                              |   6 +-
 fs/nfsd/nfs4proc.c                                 |  13 ++-
 fs/nfsd/nfs4xdr.c                                  |  13 ++-
 fs/nilfs2/btnode.c                                 |   2 +-
 fs/nilfs2/inode.c                                  |   4 +-
 fs/nilfs2/mdt.c                                    |   4 +-
 fs/nilfs2/segment.c                                |   2 +-
 fs/ocfs2/aops.c                                    |   2 +-
 fs/ocfs2/file.c                                    |   2 +-
 fs/orangefs/orangefs-utils.c                       |   4 +-
 fs/reiserfs/file.c                                 |   2 +-
 fs/reiserfs/inode.c                                |   2 +-
 fs/stat.c                                          |   3 +-
 fs/udf/inode.c                                     |   2 +-
 fs/ufs/balloc.c                                    |  26 ++++-
 fs/ufs/inode.c                                     |   9 +-
 fs/ufs/super.c                                     |  18 ++++
 fs/ufs/util.h                                      |  10 +-
 fs/xfs/xfs_aops.c                                  |  16 +--
 fs/xfs/xfs_file.c                                  |   4 +-
 include/linux/cgroup-defs.h                        |   1 +
 include/linux/cgroup.h                             |  20 ++++
 include/linux/fs.h                                 |   5 +
 include/linux/ptrace.h                             |   7 +-
 include/net/ipv6.h                                 |   1 +
 kernel/cgroup.c                                    |   5 +
 kernel/cpu.c                                       |   4 +-
 kernel/cpuset.c                                    |   4 +-
 kernel/events/core.c                               |  21 ++++
 kernel/ptrace.c                                    |  20 ++--
 kernel/sched/cpufreq_schedutil.c                   |  28 +++---
 kernel/trace/trace.c                               |   2 +-
 lib/test_user_copy.c                               |  20 +++-
 mm/truncate.c                                      |   2 +-
 net/bridge/br_stp_if.c                             |   3 +-
 net/ipv4/af_inet.c                                 |   2 +-
 net/ipv4/tcp_cong.c                                |   1 +
 net/ipv6/calipso.c                                 |   6 +-
 net/ipv6/ip6_offload.c                             |   4 +-
 net/ipv6/ping.c                                    |   2 +-
 net/ipv6/raw.c                                     |   2 +-
 net/ipv6/xfrm6_mode_ro.c                           |   2 +
 net/ipv6/xfrm6_mode_transport.c                    |   2 +
 net/netfilter/nft_set_rbtree.c                     |  22 ++---
 security/keys/encrypted-keys/encrypted.c           |  17 ++--
 security/keys/key.c                                |   5 +-
 security/keys/keyctl.c                             |   4 +-
 sound/core/timer.c                                 |   7 +-
 sound/soc/soc-core.c                               |   5 +-
 virt/kvm/arm/vgic/vgic-v2.c                        |   7 ++
 virt/kvm/arm/vgic/vgic-v3.c                        |   7 ++
 153 files changed, 1028 insertions(+), 591 deletions(-)

[toc] | [next] | [standalone]


#1663996 — [PATCH 4.9 052/119] dmaengine: mv_xor_v2: set DMA mask to 40 bits

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 052/119] dmaengine: mv_xor_v2: set DMA mask to 40 bits
Message-ID<tRAR5-4Dh-43@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

commit b2d3c270f9f2fb82518ac500a9849c3aaf503852 upstream.

The XORv2 engine on Armada 7K/8K can only access the first 40 bits of
the physical address space, so the DMA mask must be set accordingly.

Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/dma/mv_xor_v2.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -693,6 +693,10 @@ static int mv_xor_v2_probe(struct platfo
 
 	platform_set_drvdata(pdev, xor_dev);
 
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
+	if (ret)
+		return ret;
+
 	xor_dev->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(xor_dev->clk) && PTR_ERR(xor_dev->clk) == -EPROBE_DEFER)
 		return -EPROBE_DEFER;

[toc] | [prev] | [next] | [standalone]


#1663997 — [PATCH 4.9 048/119] dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 048/119] dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx
Message-ID<tRAR5-4Dh-47@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

commit bc473da1ed726c975ad47f8d7d27631de11356d8 upstream.

Descriptors that have not been acknowledged by the async_tx layer
should not be re-used, so this commit adjusts the implementation of
mv_xor_v2_prep_sw_desc() to skip descriptors for which
async_tx_test_ack() is false.

Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/dma/mv_xor_v2.c |   32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -344,6 +344,7 @@ static struct mv_xor_v2_sw_desc	*
 mv_xor_v2_prep_sw_desc(struct mv_xor_v2_device *xor_dev)
 {
 	struct mv_xor_v2_sw_desc *sw_desc;
+	bool found = false;
 
 	/* Lock the channel */
 	spin_lock_bh(&xor_dev->lock);
@@ -355,19 +356,23 @@ mv_xor_v2_prep_sw_desc(struct mv_xor_v2_
 		return NULL;
 	}
 
-	/* get a free SW descriptor from the SW DESQ */
-	sw_desc = list_first_entry(&xor_dev->free_sw_desc,
-				   struct mv_xor_v2_sw_desc, free_list);
+	list_for_each_entry(sw_desc, &xor_dev->free_sw_desc, free_list) {
+		if (async_tx_test_ack(&sw_desc->async_tx)) {
+			found = true;
+			break;
+		}
+	}
+
+	if (!found) {
+		spin_unlock_bh(&xor_dev->lock);
+		return NULL;
+	}
+
 	list_del(&sw_desc->free_list);
 
 	/* Release the channel */
 	spin_unlock_bh(&xor_dev->lock);
 
-	/* set the async tx descriptor */
-	dma_async_tx_descriptor_init(&sw_desc->async_tx, &xor_dev->dmachan);
-	sw_desc->async_tx.tx_submit = mv_xor_v2_tx_submit;
-	async_tx_ack(&sw_desc->async_tx);
-
 	return sw_desc;
 }
 
@@ -785,8 +790,15 @@ static int mv_xor_v2_probe(struct platfo
 
 	/* add all SW descriptors to the free list */
 	for (i = 0; i < MV_XOR_V2_DESC_NUM; i++) {
-		xor_dev->sw_desq[i].idx = i;
-		list_add(&xor_dev->sw_desq[i].free_list,
+		struct mv_xor_v2_sw_desc *sw_desc =
+			xor_dev->sw_desq + i;
+		sw_desc->idx = i;
+		dma_async_tx_descriptor_init(&sw_desc->async_tx,
+					     &xor_dev->dmachan);
+		sw_desc->async_tx.tx_submit = mv_xor_v2_tx_submit;
+		async_tx_ack(&sw_desc->async_tx);
+
+		list_add(&sw_desc->free_list,
 			 &xor_dev->free_sw_desc);
 	}
 

[toc] | [prev] | [next] | [standalone]


#1663999 — [PATCH 4.9 055/119] ext4: fix SEEK_HOLE

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 055/119] ext4: fix SEEK_HOLE
Message-ID<tRAR5-4Dh-51@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 7d95eddf313c88b24f99d4ca9c2411a4b82fef33 upstream.

Currently, SEEK_HOLE implementation in ext4 may both return that there's
a hole at some offset although that offset already has data and skip
some holes during a search for the next hole. The first problem is
demostrated by:

xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "seek -h 0" file
wrote 57344/57344 bytes at offset 0
56 KiB, 14 ops; 0.0000 sec (2.054 GiB/sec and 538461.5385 ops/sec)
Whence	Result
HOLE	0

Where we can see that SEEK_HOLE wrongly returned offset 0 as containing
a hole although we have written data there. The second problem can be
demonstrated by:

xfs_io -c "falloc 0 256k" -c "pwrite 0 56k" -c "pwrite 128k 8k"
       -c "seek -h 0" file

wrote 57344/57344 bytes at offset 0
56 KiB, 14 ops; 0.0000 sec (1.978 GiB/sec and 518518.5185 ops/sec)
wrote 8192/8192 bytes at offset 131072
8 KiB, 2 ops; 0.0000 sec (2 GiB/sec and 500000.0000 ops/sec)
Whence	Result
HOLE	139264

Where we can see that hole at offsets 56k..128k has been ignored by the
SEEK_HOLE call.

The underlying problem is in the ext4_find_unwritten_pgoff() which is
just buggy. In some cases it fails to update returned offset when it
finds a hole (when no pages are found or when the first found page has
higher index than expected), in some cases conditions for detecting hole
are just missing (we fail to detect a situation where indices of
returned pages are not contiguous).

Fix ext4_find_unwritten_pgoff() to properly detect non-contiguous page
indices and also handle all cases where we got less pages then expected
in one place and handle it properly there.

Fixes: c8c0df241cc2719b1262e627f999638411934f60
CC: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ext4/file.c |   50 ++++++++++++++------------------------------------
 1 file changed, 14 insertions(+), 36 deletions(-)

--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -432,47 +432,27 @@ static int ext4_find_unwritten_pgoff(str
 		num = min_t(pgoff_t, end - index, PAGEVEC_SIZE);
 		nr_pages = pagevec_lookup(&pvec, inode->i_mapping, index,
 					  (pgoff_t)num);
-		if (nr_pages == 0) {
-			if (whence == SEEK_DATA)
-				break;
-
-			BUG_ON(whence != SEEK_HOLE);
-			/*
-			 * If this is the first time to go into the loop and
-			 * offset is not beyond the end offset, it will be a
-			 * hole at this offset
-			 */
-			if (lastoff == startoff || lastoff < endoff)
-				found = 1;
+		if (nr_pages == 0)
 			break;
-		}
-
-		/*
-		 * If this is the first time to go into the loop and
-		 * offset is smaller than the first page offset, it will be a
-		 * hole at this offset.
-		 */
-		if (lastoff == startoff && whence == SEEK_HOLE &&
-		    lastoff < page_offset(pvec.pages[0])) {
-			found = 1;
-			break;
-		}
 
 		for (i = 0; i < nr_pages; i++) {
 			struct page *page = pvec.pages[i];
 			struct buffer_head *bh, *head;
 
 			/*
-			 * If the current offset is not beyond the end of given
-			 * range, it will be a hole.
+			 * If current offset is smaller than the page offset,
+			 * there is a hole at this offset.
 			 */
-			if (lastoff < endoff && whence == SEEK_HOLE &&
-			    page->index > end) {
+			if (whence == SEEK_HOLE && lastoff < endoff &&
+			    lastoff < page_offset(pvec.pages[i])) {
 				found = 1;
 				*offset = lastoff;
 				goto out;
 			}
 
+			if (page->index > end)
+				goto out;
+
 			lock_page(page);
 
 			if (unlikely(page->mapping != inode->i_mapping)) {
@@ -512,20 +492,18 @@ static int ext4_find_unwritten_pgoff(str
 			unlock_page(page);
 		}
 
-		/*
-		 * The no. of pages is less than our desired, that would be a
-		 * hole in there.
-		 */
-		if (nr_pages < num && whence == SEEK_HOLE) {
-			found = 1;
-			*offset = lastoff;
+		/* The no. of pages is less than our desired, we are done. */
+		if (nr_pages < num)
 			break;
-		}
 
 		index = pvec.pages[i - 1]->index + 1;
 		pagevec_release(&pvec);
 	} while (index <= end);
 
+	if (whence == SEEK_HOLE && lastoff < endoff) {
+		found = 1;
+		*offset = lastoff;
+	}
 out:
 	pagevec_release(&pvec);
 	return found;

[toc] | [prev] | [next] | [standalone]


#1664000 — [PATCH 4.9 029/119] crypto: drbg - wait for crypto op not signal safe

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 029/119] crypto: drbg - wait for crypto op not signal safe
Message-ID<tRAR5-4Dh-49@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gilad Ben-Yossef <gilad@benyossef.com>

commit a5dfefb1c3f3db81662556393fd9283511e08430 upstream.

drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to
wait for completion of async crypto op but if a signal occurs it
may return before DMA ops of HW crypto provider finish, thus
corrupting the output buffer.

Resolve this by using wait_for_completion() instead.

Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/drbg.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1768,9 +1768,8 @@ static int drbg_kcapi_sym_ctr(struct drb
 			break;
 		case -EINPROGRESS:
 		case -EBUSY:
-			ret = wait_for_completion_interruptible(
-				&drbg->ctr_completion);
-			if (!ret && !drbg->ctr_async_err) {
+			wait_for_completion(&drbg->ctr_completion);
+			if (!drbg->ctr_async_err) {
 				reinit_completion(&drbg->ctr_completion);
 				break;
 			}

[toc] | [prev] | [next] | [standalone]


#1664001 — [PATCH 4.9 054/119] xen/privcmd: Support correctly 64KB page granularity when mapping memory

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 054/119] xen/privcmd: Support correctly 64KB page granularity when mapping memory
Message-ID<tRAR5-4Dh-55@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Julien Grall <julien.grall@arm.com>

commit 753c09b5652bb4fe53e2db648002ec64b32b8827 upstream.

Commit 5995a68 "xen/privcmd: Add support for Linux 64KB page granularity" did
not go far enough to support 64KB in mmap_batch_fn.

The variable 'nr' is the number of 4KB chunk to map. However, when Linux
is using 64KB page granularity the array of pages (vma->vm_private_data)
contain one page per 64KB. Fix it by incrementing st->index correctly.

Furthermore, st->va is not correctly incremented as PAGE_SIZE !=
XEN_PAGE_SIZE.

Fixes: 5995a68 ("xen/privcmd: Add support for Linux 64KB page granularity")
Reported-by: Feng Kan <fkan@apm.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/privcmd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -335,8 +335,8 @@ static int mmap_batch_fn(void *data, int
 				st->global_error = 1;
 		}
 	}
-	st->va += PAGE_SIZE * nr;
-	st->index += nr;
+	st->va += XEN_PAGE_SIZE * nr;
+	st->index += nr / XEN_PFN_PER_PAGE;
 
 	return 0;
 }

[toc] | [prev] | [next] | [standalone]


#1664002 — [PATCH 4.9 023/119] serial: ifx6x60: fix use-after-free on module unload

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 023/119] serial: ifx6x60: fix use-after-free on module unload
Message-ID<tRAR5-4Dh-59@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Johan Hovold <johan@kernel.org>

commit 1e948479b3d63e3ac0ecca13cbf4921c7d17c168 upstream.

Make sure to deregister the SPI driver before releasing the tty driver
to avoid use-after-free in the SPI remove callback where the tty
devices are deregistered.

Fixes: 72d4724ea54c ("serial: ifx6x60: Add modem power off function in the platform reboot process")
Cc: Jun Chen <jun.d.chen@intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/ifx6x60.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1381,9 +1381,9 @@ static struct spi_driver ifx_spi_driver
 static void __exit ifx_spi_exit(void)
 {
 	/* unregister */
+	spi_unregister_driver(&ifx_spi_driver);
 	tty_unregister_driver(tty_drv);
 	put_tty_driver(tty_drv);
-	spi_unregister_driver(&ifx_spi_driver);
 	unregister_reboot_notifier(&ifx_modem_reboot_notifier_block);
 }
 

[toc] | [prev] | [next] | [standalone]


#1664004 — [PATCH 4.9 030/119] crypto: gcm - wait for crypto op not signal safe

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 030/119] crypto: gcm - wait for crypto op not signal safe
Message-ID<tRAR5-4Dh-57@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gilad Ben-Yossef <gilad@benyossef.com>

commit f3ad587070d6bd961ab942b3fd7a85d00dfc934b upstream.

crypto_gcm_setkey() was using wait_for_completion_interruptible() to
wait for completion of async crypto op but if a signal occurs it
may return before DMA ops of HW crypto provider finish, thus
corrupting the data buffer that is kfree'ed in this case.

Resolve this by using wait_for_completion() instead.

Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/gcm.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/crypto/gcm.c
+++ b/crypto/gcm.c
@@ -152,10 +152,8 @@ static int crypto_gcm_setkey(struct cryp
 
 	err = crypto_skcipher_encrypt(&data->req);
 	if (err == -EINPROGRESS || err == -EBUSY) {
-		err = wait_for_completion_interruptible(
-			&data->result.completion);
-		if (!err)
-			err = data->result.err;
+		wait_for_completion(&data->result.completion);
+		err = data->result.err;
 	}
 
 	if (err)

[toc] | [prev] | [next] | [standalone]


#1664008 — [PATCH 4.9 034/119] efi: Dont issue error message when booted under Xen

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 034/119] efi: Dont issue error message when booted under Xen
Message-ID<tRAR5-4Dh-69@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Juergen Gross <jgross@suse.com>

commit 1ea34adb87c969b89dfd83f1905a79161e9ada26 upstream.

When booted as Xen dom0 there won't be an EFI memmap allocated. Avoid
issuing an error message in this case:

  [    0.144079] efi: Failed to allocate new EFI memmap

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170526113652.21339-2-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/platform/efi/quirks.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -358,6 +358,9 @@ void __init efi_free_boot_services(void)
 		free_bootmem_late(start, size);
 	}
 
+	if (!num_entries)
+		return;
+
 	new_size = efi.memmap.desc_size * num_entries;
 	new_phys = efi_memmap_alloc(num_entries);
 	if (!new_phys) {

[toc] | [prev] | [next] | [standalone]


#1664009 — [PATCH 4.9 005/119] tcp: disallow cwnd undo when switching congestion control

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:00 +0200
Subject[PATCH 4.9 005/119] tcp: disallow cwnd undo when switching congestion control
Message-ID<tRAR6-4Dh-71@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yuchung Cheng <ycheng@google.com>


[ Upstream commit 44abafc4cc094214a99f860f778c48ecb23422fc ]

When the sender switches its congestion control during loss
recovery, if the recovery is spurious then it may incorrectly
revert cwnd and ssthresh to the older values set by a previous
congestion control. Consider a congestion control (like BBR)
that does not use ssthresh and keeps it infinite: the connection
may incorrectly revert cwnd to an infinite value when switching
from BBR to another congestion control.

This patch fixes it by disallowing such cwnd undo operation
upon switching congestion control.  Note that undo_marker
is not reset s.t. the packets that were incorrectly marked
lost would be corrected. We only avoid undoing the cwnd in
tcp_undo_cwnd_reduction().

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/tcp_cong.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -179,6 +179,7 @@ void tcp_init_congestion_control(struct
 {
 	const struct inet_connection_sock *icsk = inet_csk(sk);
 
+	tcp_sk(sk)->prior_ssthresh = 0;
 	if (icsk->icsk_ca_ops->init)
 		icsk->icsk_ca_ops->init(sk);
 	if (tcp_ca_needs_ecn(sk))

[toc] | [prev] | [next] | [standalone]


#1664012 — [PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm
Message-ID<tRB0J-4VC-5@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pavel Tatashin <pasha.tatashin@oracle.com>


[ Upstream commit 14d0334c6748ff2aedb3f2f7fdc51ee90a9b54e7 ]

The only difference between these two functions is that in activate_mm we
unconditionally flush context. However, there is no need to keep this
difference after fixing a bug where cpumask was not reset on a wrap. So, in
this patch we combine these.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/include/asm/mmu_context_64.h |   21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -131,26 +131,7 @@ static inline void switch_mm(struct mm_s
 }
 
 #define deactivate_mm(tsk,mm)	do { } while (0)
-
-/* Activate a new MM instance for the current task. */
-static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm)
-{
-	unsigned long flags;
-	int cpu;
-
-	spin_lock_irqsave(&mm->context.lock, flags);
-	if (!CTX_VALID(mm->context))
-		get_new_mmu_context(mm);
-	cpu = smp_processor_id();
-	if (!cpumask_test_cpu(cpu, mm_cpumask(mm)))
-		cpumask_set_cpu(cpu, mm_cpumask(mm));
-
-	load_secondary_context(mm);
-	__flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT);
-	tsb_context_switch(mm);
-	spin_unlock_irqrestore(&mm->context.lock, flags);
-}
-
+#define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL)
 #endif /* !(__ASSEMBLY__) */
 
 #endif /* !(__SPARC64_MMU_CONTEXT_H) */

[toc] | [prev] | [next] | [standalone]


#1664021 — [PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later.
Message-ID<tRB0K-4VC-27@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "David S. Miller" <davem@davemloft.net>


[ Upstream commit 1b4af13ff2cc6897557bb0b8d9e2fad4fa4d67aa ]

Reported-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/lib/Makefile |    1 +
 arch/sparc/lib/multi3.S |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/sparc/lib/multi3.S

--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -15,6 +15,7 @@ lib-$(CONFIG_SPARC32) += copy_user.o loc
 lib-$(CONFIG_SPARC64) += atomic_64.o
 lib-$(CONFIG_SPARC32) += lshrdi3.o ashldi3.o
 lib-$(CONFIG_SPARC32) += muldi3.o bitext.o cmpdi2.o
+lib-$(CONFIG_SPARC64) += multi3.o
 
 lib-$(CONFIG_SPARC64) += copy_page.o clear_page.o bzero.o
 lib-$(CONFIG_SPARC64) += csum_copy.o csum_copy_from_user.o csum_copy_to_user.o
--- /dev/null
+++ b/arch/sparc/lib/multi3.S
@@ -0,0 +1,35 @@
+#include <linux/linkage.h>
+#include <asm/export.h>
+
+	.text
+	.align	4
+ENTRY(__multi3) /* %o0 = u, %o1 = v */
+	mov	%o1, %g1
+	srl	%o3, 0, %g4
+	mulx	%g4, %g1, %o1
+	srlx	%g1, 0x20, %g3
+	mulx	%g3, %g4, %g5
+	sllx	%g5, 0x20, %o5
+	srl	%g1, 0, %g4
+	sub	%o1, %o5, %o5
+	srlx	%o5, 0x20, %o5
+	addcc	%g5, %o5, %g5
+	srlx	%o3, 0x20, %o5
+	mulx	%g4, %o5, %g4
+	mulx	%g3, %o5, %o5
+	sethi	%hi(0x80000000), %g3
+	addcc	%g5, %g4, %g5
+	srlx	%g5, 0x20, %g5
+	add	%g3, %g3, %g3
+	movcc	%xcc, %g0, %g3
+	addcc	%o5, %g5, %o5
+	sllx	%g4, 0x20, %g4
+	add	%o1, %g4, %o1
+	add	%o5, %g3, %g2
+	mulx	%g1, %o2, %g1
+	add	%g1, %g2, %g1
+	mulx	%o0, %o3, %o0
+	retl
+	 add	%g1, %o0, %o0
+ENDPROC(__multi3)
+EXPORT_SYMBOL(__multi3)

[toc] | [prev] | [next] | [standalone]


#1664024 — [PATCH 4.9 016/119] sparc64: reset mm cpumask after wrap

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 016/119] sparc64: reset mm cpumask after wrap
Message-ID<tRB0K-4VC-29@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pavel Tatashin <pasha.tatashin@oracle.com>


[ Upstream commit 588974857359861891f478a070b1dc7ae04a3880 ]

After a wrap (getting a new context version) a process must get a new
context id, which means that we would need to flush the context id from
the TLB before running for the first time with this ID on every CPU. But,
we use mm_cpumask to determine if this process has been running on this CPU
before, and this mask is not reset after a wrap. So, there are two possible
fixes for this issue:

1. Clear mm cpumask whenever mm gets a new context id
2. Unconditionally flush context every time process is running on a CPU

This patch implements the first solution

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/mm/init_64.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -710,6 +710,8 @@ void get_new_mmu_context(struct mm_struc
 			goto out;
 		}
 	}
+	if (mm->context.sparc64_ctx_val)
+		cpumask_clear(mm_cpumask(mm));
 	mmu_context_bmap[new_ctx>>6] |= (1UL << (new_ctx & 63));
 	new_ctx |= (tlb_context_cache & CTX_VERSION_MASK);
 out:

[toc] | [prev] | [next] | [standalone]


#1664026 — [PATCH 4.9 011/119] net: stmmac: fix completely hung TX when using TSO

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 011/119] net: stmmac: fix completely hung TX when using TSO
Message-ID<tRB0L-4VC-37@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Niklas Cassel <niklas.cassel@axis.com>


[ Upstream commit 426849e6611f2092553f8d53372ae310818a6292 ]

stmmac_tso_allocator can fail to set the Last Descriptor bit
on a descriptor that actually was the last descriptor.

This happens when the buffer of the last descriptor ends
up having a size of exactly TSO_MAX_BUFF_SIZE.

When the IP eventually reaches the next last descriptor,
which actually has the bit set, the DMA will hang.

When the DMA hangs, we get a tx timeout, however,
since stmmac does not do a complete reset of the IP
in stmmac_tx_timeout, we end up in a state with
completely hung TX.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1953,7 +1953,7 @@ static void stmmac_tso_allocator(struct
 
 		priv->hw->desc->prepare_tso_tx_desc(desc, 0, buff_size,
 			0, 1,
-			(last_segment) && (buff_size < TSO_MAX_BUFF_SIZE),
+			(last_segment) && (tmp_len <= TSO_MAX_BUFF_SIZE),
 			0, 0);
 
 		tmp_len -= TSO_MAX_BUFF_SIZE;

[toc] | [prev] | [next] | [standalone]


#1664030 — [PATCH 4.9 001/119] bnx2x: Fix Multi-Cos

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 001/119] bnx2x: Fix Multi-Cos
Message-ID<tRB0L-4VC-43@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "Mintz, Yuval" <Yuval.Mintz@cavium.com>


[ Upstream commit 3968d38917eb9bd0cd391265f6c9c538d9b33ffa ]

Apparently multi-cos isn't working for bnx2x quite some time -
driver implements ndo_select_queue() to allow queue-selection
for FCoE, but the regular L2 flow would cause it to modulo the
fallback's result by the number of queues.
The fallback would return a queue matching the needed tc
[via __skb_tx_hash()], but since the modulo is by the number of TSS
queues where number of TCs is not accounted, transmission would always
be done by a queue configured into using TC0.

Fixes: ada7c19e6d27 ("bnx2x: use XPS if possible for bnx2x_select_queue instead of pure hash")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1931,7 +1931,7 @@ u16 bnx2x_select_queue(struct net_device
 	}
 
 	/* select a non-FCoE queue */
-	return fallback(dev, skb) % BNX2X_NUM_ETH_QUEUES(bp);
+	return fallback(dev, skb) % (BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos);
 }
 
 void bnx2x_set_num_queues(struct bnx2x *bp)

[toc] | [prev] | [next] | [standalone]


#1664034 — [PATCH 4.9 010/119] net: ethoc: enable NAPI before poll may be scheduled

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 010/119] net: ethoc: enable NAPI before poll may be scheduled
Message-ID<tRB0L-4VC-51@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Max Filippov <jcmvbkbc@gmail.com>


[ Upstream commit d220b942a4b6a0640aee78841608f4aa5e8e185e ]

ethoc_reset enables device interrupts, ethoc_interrupt may schedule a
NAPI poll before NAPI is enabled in the ethoc_open, which results in
device being unable to send or receive anything until it's closed and
reopened. In case the device is flooded with ingress packets it may be
unable to recover at all.
Move napi_enable above ethoc_reset in the ethoc_open to fix that.

Fixes: a1702857724f ("net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/ethoc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -710,6 +710,8 @@ static int ethoc_open(struct net_device
 	if (ret)
 		return ret;
 
+	napi_enable(&priv->napi);
+
 	ethoc_init_ring(priv, dev->mem_start);
 	ethoc_reset(priv);
 
@@ -722,7 +724,6 @@ static int ethoc_open(struct net_device
 	}
 
 	phy_start(dev->phydev);
-	napi_enable(&priv->napi);
 
 	if (netif_msg_ifup(priv)) {
 		dev_info(&dev->dev, "I/O: %08lx Memory: %08lx-%08lx\n",

[toc] | [prev] | [next] | [standalone]


#1664035 — [PATCH 4.9 018/119] sparc64: redefine first version

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 018/119] sparc64: redefine first version
Message-ID<tRB0L-4VC-53@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pavel Tatashin <pasha.tatashin@oracle.com>


[ Upstream commit c4415235b2be0cc791572e8e7f7466ab8f73a2bf ]

CTX_FIRST_VERSION defines the first context version, but also it defines
first context. This patch redefines it to only include the first context
version.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/include/asm/mmu_64.h |    2 +-
 arch/sparc/mm/init_64.c         |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/sparc/include/asm/mmu_64.h
+++ b/arch/sparc/include/asm/mmu_64.h
@@ -52,7 +52,7 @@
 #define CTX_NR_MASK		TAG_CONTEXT_BITS
 #define CTX_HW_MASK		(CTX_NR_MASK | CTX_PGSZ_MASK)
 
-#define CTX_FIRST_VERSION	((_AC(1,UL) << CTX_VERSION_SHIFT) + _AC(1,UL))
+#define CTX_FIRST_VERSION	BIT(CTX_VERSION_SHIFT)
 #define CTX_VALID(__ctx)	\
 	 (!(((__ctx.sparc64_ctx_val) ^ tlb_context_cache) & CTX_VERSION_MASK))
 #define CTX_HWBITS(__ctx)	((__ctx.sparc64_ctx_val) & CTX_HW_MASK)
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -658,7 +658,7 @@ EXPORT_SYMBOL(__flush_dcache_range);
 
 /* get_new_mmu_context() uses "cache + 1".  */
 DEFINE_SPINLOCK(ctx_alloc_lock);
-unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1;
+unsigned long tlb_context_cache = CTX_FIRST_VERSION;
 #define MAX_CTX_NR	(1UL << CTX_NR_BITS)
 #define CTX_BMAP_SLOTS	BITS_TO_LONGS(MAX_CTX_NR)
 DECLARE_BITMAP(mmu_context_bmap, MAX_CTX_NR);
@@ -689,9 +689,9 @@ void get_new_mmu_context(struct mm_struc
 		if (new_ctx >= ctx) {
 			int i;
 			new_ctx = (tlb_context_cache & CTX_VERSION_MASK) +
-				CTX_FIRST_VERSION;
+				CTX_FIRST_VERSION + 1;
 			if (new_ctx == 1)
-				new_ctx = CTX_FIRST_VERSION;
+				new_ctx = CTX_FIRST_VERSION + 1;
 
 			/* Don't call memset, for 16 entries that's just
 			 * plain silly...

[toc] | [prev] | [next] | [standalone]


#1664038 — [PATCH 4.9 020/119] sparc64: new context wrap

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:10 +0200
Subject[PATCH 4.9 020/119] sparc64: new context wrap
Message-ID<tRB0L-4VC-57@gated-at.bofh.it>
In reply to#1663995
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pavel Tatashin <pasha.tatashin@oracle.com>


[ Upstream commit a0582f26ec9dfd5360ea2f35dd9a1b026f8adda0 ]

The current wrap implementation has a race issue: it is called outside of
the ctx_alloc_lock, and also does not wait for all CPUs to complete the
wrap.  This means that a thread can get a new context with a new version
and another thread might still be running with the same context. The
problem is especially severe on CPUs with shared TLBs, like sun4v. I used
the following test to very quickly reproduce the problem:
- start over 8K processes (must be more than context IDs)
- write and read values at a  memory location in every process.

Very quickly memory corruptions start happening, and what we read back
does not equal what we wrote.

Several approaches were explored before settling on this one:

Approach 1:
Move smp_new_mmu_context_version() inside ctx_alloc_lock, and wait for
every process to complete the wrap. (Note: every CPU must WAIT before
leaving smp_new_mmu_context_version_client() until every one arrives).

This approach ends up with deadlocks, as some threads own locks which other
threads are waiting for, and they never receive softint until these threads
exit smp_new_mmu_context_version_client(). Since we do not allow the exit,
deadlock happens.

Approach 2:
Handle wrap right during mondo interrupt. Use etrap/rtrap to enter into
into C code, and issue new versions to every CPU.
This approach adds some overhead to runtime: in switch_mm() we must add
some checks to make sure that versions have not changed due to wrap while
we were loading the new secondary context. (could be protected by PSTATE_IE
but that degrades performance as on M7 and older CPUs as it takes 50 cycles
for each access). Also, we still need a global per-cpu array of MMs to know
where we need to load new contexts, otherwise we can change context to a
thread that is going way (if we received mondo between switch_mm() and
switch_to() time). Finally, there are some issues with window registers in
rtrap() when context IDs are changed during CPU mondo time.

The approach in this patch is the simplest and has almost no impact on
runtime.  We use the array with mm's where last secondary contexts were
loaded onto CPUs and bump their versions to the new generation without
changing context IDs. If a new process comes in to get a context ID, it
will go through get_new_mmu_context() because of version mismatch. But the
running processes do not need to be interrupted. And wrap is quicker as we
do not need to xcall and wait for everyone to receive and complete wrap.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/mm/init_64.c |   81 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 54 insertions(+), 27 deletions(-)

--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -664,6 +664,53 @@ unsigned long tlb_context_cache = CTX_FI
 DECLARE_BITMAP(mmu_context_bmap, MAX_CTX_NR);
 DEFINE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm) = {0};
 
+static void mmu_context_wrap(void)
+{
+	unsigned long old_ver = tlb_context_cache & CTX_VERSION_MASK;
+	unsigned long new_ver, new_ctx, old_ctx;
+	struct mm_struct *mm;
+	int cpu;
+
+	bitmap_zero(mmu_context_bmap, 1 << CTX_NR_BITS);
+
+	/* Reserve kernel context */
+	set_bit(0, mmu_context_bmap);
+
+	new_ver = (tlb_context_cache & CTX_VERSION_MASK) + CTX_FIRST_VERSION;
+	if (unlikely(new_ver == 0))
+		new_ver = CTX_FIRST_VERSION;
+	tlb_context_cache = new_ver;
+
+	/*
+	 * Make sure that any new mm that are added into per_cpu_secondary_mm,
+	 * are going to go through get_new_mmu_context() path.
+	 */
+	mb();
+
+	/*
+	 * Updated versions to current on those CPUs that had valid secondary
+	 * contexts
+	 */
+	for_each_online_cpu(cpu) {
+		/*
+		 * If a new mm is stored after we took this mm from the array,
+		 * it will go into get_new_mmu_context() path, because we
+		 * already bumped the version in tlb_context_cache.
+		 */
+		mm = per_cpu(per_cpu_secondary_mm, cpu);
+
+		if (unlikely(!mm || mm == &init_mm))
+			continue;
+
+		old_ctx = mm->context.sparc64_ctx_val;
+		if (likely((old_ctx & CTX_VERSION_MASK) == old_ver)) {
+			new_ctx = (old_ctx & ~CTX_VERSION_MASK) | new_ver;
+			set_bit(new_ctx & CTX_NR_MASK, mmu_context_bmap);
+			mm->context.sparc64_ctx_val = new_ctx;
+		}
+	}
+}
+
 /* Caller does TLB context flushing on local CPU if necessary.
  * The caller also ensures that CTX_VALID(mm->context) is false.
  *
@@ -678,50 +725,30 @@ void get_new_mmu_context(struct mm_struc
 {
 	unsigned long ctx, new_ctx;
 	unsigned long orig_pgsz_bits;
-	int new_version;
 
 	spin_lock(&ctx_alloc_lock);
+retry:
+	/* wrap might have happened, test again if our context became valid */
+	if (unlikely(CTX_VALID(mm->context)))
+		goto out;
 	orig_pgsz_bits = (mm->context.sparc64_ctx_val & CTX_PGSZ_MASK);
 	ctx = (tlb_context_cache + 1) & CTX_NR_MASK;
 	new_ctx = find_next_zero_bit(mmu_context_bmap, 1 << CTX_NR_BITS, ctx);
-	new_version = 0;
 	if (new_ctx >= (1 << CTX_NR_BITS)) {
 		new_ctx = find_next_zero_bit(mmu_context_bmap, ctx, 1);
 		if (new_ctx >= ctx) {
-			int i;
-			new_ctx = (tlb_context_cache & CTX_VERSION_MASK) +
-				CTX_FIRST_VERSION + 1;
-			if (new_ctx == 1)
-				new_ctx = CTX_FIRST_VERSION + 1;
-
-			/* Don't call memset, for 16 entries that's just
-			 * plain silly...
-			 */
-			mmu_context_bmap[0] = 3;
-			mmu_context_bmap[1] = 0;
-			mmu_context_bmap[2] = 0;
-			mmu_context_bmap[3] = 0;
-			for (i = 4; i < CTX_BMAP_SLOTS; i += 4) {
-				mmu_context_bmap[i + 0] = 0;
-				mmu_context_bmap[i + 1] = 0;
-				mmu_context_bmap[i + 2] = 0;
-				mmu_context_bmap[i + 3] = 0;
-			}
-			new_version = 1;
-			goto out;
+			mmu_context_wrap();
+			goto retry;
 		}
 	}
 	if (mm->context.sparc64_ctx_val)
 		cpumask_clear(mm_cpumask(mm));
 	mmu_context_bmap[new_ctx>>6] |= (1UL << (new_ctx & 63));
 	new_ctx |= (tlb_context_cache & CTX_VERSION_MASK);
-out:
 	tlb_context_cache = new_ctx;
 	mm->context.sparc64_ctx_val = new_ctx | orig_pgsz_bits;
+out:
 	spin_unlock(&ctx_alloc_lock);
-
-	if (unlikely(new_version))
-		smp_new_mmu_context_version();
 }
 
 static int numa_enabled = 1;

[toc] | [prev] | [next] | [standalone]


#1664257

FromGuenter Roeck <linux@roeck-us.net>
Date2017-06-13 00:00 +0200
Message-ID<tRFxo-7G9-19@gated-at.bofh.it>
In reply to#1663995
On Mon, Jun 12, 2017 at 05:24:22PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.32 release.
> There are 119 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Wed Jun 14 15:25:24 UTC 2017.
> Anything received after that time might be too late.
> 

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 122 pass: 122 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

[toc] | [prev] | [next] | [standalone]


#1664546

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-13 09:30 +0200
Message-ID<tROr0-51u-15@gated-at.bofh.it>
In reply to#1664257
On Mon, Jun 12, 2017 at 02:54:26PM -0700, Guenter Roeck wrote:
> On Mon, Jun 12, 2017 at 05:24:22PM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.9.32 release.
> > There are 119 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Wed Jun 14 15:25:24 UTC 2017.
> > Anything received after that time might be too late.
> > 
> 
> Build results:
> 	total: 145 pass: 145 fail: 0
> Qemu test results:
> 	total: 122 pass: 122 fail: 0
> 
> Details are available at http://kerneltests.org/builders.

Thanks for testing all of these others and letting me know.

greg k-h

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web