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


Groups > linux.kernel > #1517901 > unrolled thread

[PATCH 4.4 00/69] 4.4.31-stable review

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-11-09 11:50 +0100
Last post2016-11-09 20:40 +0100
Articles 20 on this page of 49 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4.4 00/69] 4.4.31-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 23/69] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 27/69] Fix potential infoleak in older kernels Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 32/69] USB: serial: cp210x: fix tiocmget error handling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 04/69] h8300: fix syscall restarting Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 01/69] i2c: xgene: Avoid dma_buffer overrun Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 19/69] ubifs: Fix regression in ubifs_readdir() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 29/69] hv: do not lose pending heartbeat vmbus packets Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 31/69] tty: limit terminal size to 4M chars Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 06/69] mm/list_lru.c: avoid error-path NULL pointer deref Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 20/69] mei: txe: dont clean an unprocessed interrupt cause. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 22/69] USB: serial: fix potential NULL-dereference at probe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 18/69] ubifs: Abort readdir upon error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 26/69] GenWQE: Fix bad page access during abort of resource allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 11:50 +0100
    [PATCH 4.4 08/69] KEYS: Fix short sprintf buffer in /proc/keys show function Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
    [PATCH 4.4 02/69] i2c: core: fix NULL pointer dereference under race condition Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
    [PATCH 4.4 07/69] mm: memcontrol: do not recurse in direct reclaim Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:00 +0100
    [PATCH 4.4 67/69] kvm: x86: Check memopp before dereference (CVE-2016-8630) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 60/69] cgroup: avoid false positive gcc-6 warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 37/69] parisc: Ensure consistent state when switching to kernel stack at syscall entry Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 46/69] scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 39/69] virtio: console: Unlock vqs while freeing buffers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 47/69] scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 65/69] usb: dwc3: Fix size used in dma_free_coherent() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 54/69] perf build: Fix traceevent plugins build race Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 38/69] virtio_ring: Make interrupt suppression spec compliant Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 57/69] ARM: 8584/1: floppy: avoid gcc-6 warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 51/69] drm/radeon/si_dpm: workaround for SI kickers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 64/69] pwm: Unexport children before chip removal Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 36/69] ovl: fsync after copy-up Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 42/69] firewire: net: guard against rx buffer overflows Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:10 +0100
    [PATCH 4.4 68/69] ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
    [PATCH 4.4 44/69] mac80211: discard multicast and 4-addr A-MSDUs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
    [PATCH 4.4 43/69] firewire: net: fix fragmented datagram_size off-by-one Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
    [PATCH 4.4 45/69] scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
    [PATCH 4.4 69/69] HID: usbhid: add ATEN CS962 to list of quirky devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:40 +0100
    [PATCH 4.4 50/69] drm/radeon/si_dpm: Limit clocks on HD86xx part Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 58/69] mm/cma: silence warnings due to max() usage Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 59/69] drm/exynos: fix error handling in exynos_drm_subdrv_open Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 41/69] Input: i8042 - add XMG C504 to keyboard reset table Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 48/69] mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 63/69] UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 55/69] x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 56/69] powerpc/ptrace: Fix out of bounds array access warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 40/69] dm mirror: fix read error on recovery after default leg failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    [PATCH 4.4 61/69] smc91x: avoid self-comparison warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-09 12:50 +0100
    Re: [PATCH 4.4 00/69] 4.4.31-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-11-09 19:30 +0100
    Re: [PATCH 4.4 00/69] 4.4.31-stable review Guenter Roeck <linux@roeck-us.net> - 2016-11-09 20:40 +0100

Page 1 of 3  [1] 2 3  Next page →


#1517901 — [PATCH 4.4 00/69] 4.4.31-stable review

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 00/69] 4.4.31-stable review
Message-ID<sByC5-69v-3@gated-at.bofh.it>
This is the start of the stable review cycle for the 4.4.31 release.
There are 69 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 Fri Nov 11 10:28:46 UTC 2016.
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.4.31-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.4.y
and the diffstat can be found below.

thanks,

greg k-h

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

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

Oliver Neukum <oneukum@suse.com>
    HID: usbhid: add ATEN CS962 to list of quirky devices

Boris Brezillon <boris.brezillon@free-electrons.com>
    ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()

Owen Hofmann <osh@google.com>
    kvm: x86: Check memopp before dereference (CVE-2016-8630)

Jiri Slaby <jslaby@suse.cz>
    tty: vt, fix bogus division in csi_J

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    usb: dwc3: Fix size used in dma_free_coherent()

David Hsu <davidhsu@google.com>
    pwm: Unexport children before chip removal

Boris Brezillon <boris.brezillon@free-electrons.com>
    UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header

Linus Torvalds <torvalds@linux-foundation.org>
    Disable "frame-address" warning

Arnd Bergmann <arnd@arndb.de>
    smc91x: avoid self-comparison warning

Arnd Bergmann <arnd@arndb.de>
    cgroup: avoid false positive gcc-6 warning

Arnd Bergmann <arnd@arndb.de>
    drm/exynos: fix error handling in exynos_drm_subdrv_open

Stephen Rothwell <sfr@canb.auug.org.au>
    mm/cma: silence warnings due to max() usage

Arnd Bergmann <arnd@arndb.de>
    ARM: 8584/1: floppy: avoid gcc-6 warning

Khem Raj <raj.khem@gmail.com>
    powerpc/ptrace: Fix out of bounds array access warning

Juergen Gross <jgross@suse.com>
    x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()

Jiri Olsa <jolsa@kernel.org>
    perf build: Fix traceevent plugins build race

Ville Syrjälä <ville.syrjala@linux.intel.com>
    drm/dp/mst: Check peer device type before attempting EDID read

Lucas Stach <dev@lynxeye.de>
    drm/radeon: drop register readback in cayman_cp_int_cntl_setup

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon/si_dpm: workaround for SI kickers

Tom St Denis <tom.stdenis@amd.com>
    drm/radeon/si_dpm: Limit clocks on HD86xx part

Michel Dänzer <michel.daenzer@amd.com>
    Revert "drm/radeon: fix DP link training issue with second 4K monitor"

Jaehoon Chung <jh80.chung@samsung.com>
    mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference

Ching Huang <ching2048@areca.com.tw>
    scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware

Ewan D. Milne <emilne@redhat.com>
    scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded

Kashyap Desai <kashyap.desai@broadcom.com>
    scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices

Johannes Berg <johannes.berg@intel.com>
    mac80211: discard multicast and 4-addr A-MSDUs

Stefan Richter <stefanr@s5r6.in-berlin.de>
    firewire: net: fix fragmented datagram_size off-by-one

Stefan Richter <stefanr@s5r6.in-berlin.de>
    firewire: net: guard against rx buffer overflows

Patrick Scheuring <patrick.scheuring.dev@gmail.com>
    Input: i8042 - add XMG C504 to keyboard reset table

Heinz Mauelshagen <heinzm@redhat.com>
    dm mirror: fix read error on recovery after default leg failure

Matt Redfearn <matt.redfearn@imgtec.com>
    virtio: console: Unlock vqs while freeing buffers

Ladi Prosek <lprosek@redhat.com>
    virtio_ring: Make interrupt suppression spec compliant

John David Anglin <dave.anglin@bell.net>
    parisc: Ensure consistent state when switching to kernel stack at syscall entry

Miklos Szeredi <mszeredi@redhat.com>
    ovl: fsync after copy-up

James Hogan <james.hogan@imgtec.com>
    KVM: MIPS: Make ERET handle ERL before EXL

Ido Yariv <ido@wizery.com>
    KVM: x86: fix wbinvd_dirty_mask use-after-free

Tahsin Erdogan <tahsin@google.com>
    dm: free io_barrier after blk_cleanup_queue call

Johan Hovold <johan@kernel.org>
    USB: serial: cp210x: fix tiocmget error handling

Dmitry Vyukov <dvyukov@google.com>
    tty: limit terminal size to 4M chars

Mathias Nyman <mathias.nyman@linux.intel.com>
    xhci: add restart quirk for Intel Wildcatpoint PCH

Long Li <longli@microsoft.com>
    hv: do not lose pending heartbeat vmbus packets

Scot Doyle <lkml14@scotdoyle.com>
    vt: clear selection before resizing

Linus Torvalds <torvalds@linux-foundation.org>
    Fix potential infoleak in older kernels

Gerald Schaefer <gerald.schaefer@de.ibm.com>
    GenWQE: Fix bad page access during abort of resource allocation

Bryan Paluch <bryanpaluch@gmail.com>
    usb: increase ohci watchdog delay to 275 msec

Mathias Nyman <mathias.nyman@linux.intel.com>
    xhci: use default USB_RESUME_TIMEOUT when resuming ports.

Stefan Tauner <stefan.tauner@technikum-wien.at>
    USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

Johan Hovold <johan@kernel.org>
    USB: serial: fix potential NULL-dereference at probe

Felipe Balbi <felipe.balbi@linux.intel.com>
    usb: gadget: function: u_ether: don't starve tx request queue

Alexander Usyskin <alexander.usyskin@intel.com>
    mei: txe: don't clean an unprocessed interrupt cause.

Richard Weinberger <richard@nod.at>
    ubifs: Fix regression in ubifs_readdir()

Richard Weinberger <richard@nod.at>
    ubifs: Abort readdir upon error

Chris Mason <clm@fb.com>
    btrfs: fix races on root_log_ctx lists

Arve Hjønnevåg <arve@android.com>
    ANDROID: binder: Clear binder and cookie when setting handle in flat binder struct

Arve Hjønnevåg <arve@android.com>
    ANDROID: binder: Add strong ref checks

Hui Wang <hui.wang@canonical.com>
    ALSA: hda - Fix headset mic detection problem for two Dell laptops

Hui Wang <hui.wang@canonical.com>
    ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table

Ard Biesheuvel <ard.biesheuvel@linaro.org>
    ALSA: hda - allow 40 bit DMA mask for NVidia devices

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Merge RIRB_PRE_DELAY into CTX_WORKAROUND caps

Marcel Hasler <mahasler@gmail.com>
    ALSA: usb-audio: Add quirk for Syntek STK1160

David Howells <dhowells@redhat.com>
    KEYS: Fix short sprintf buffer in /proc/keys show function

Johannes Weiner <hannes@cmpxchg.org>
    mm: memcontrol: do not recurse in direct reclaim

Alexander Polakov <apolyakov@beget.ru>
    mm/list_lru.c: avoid error-path NULL pointer deref

Darrick J. Wong <darrick.wong@oracle.com>
    libxfs: clean up _calc_dquots_per_chunk

Mark Rutland <mark.rutland@arm.com>
    h8300: fix syscall restarting

Ville Syrjälä <ville.syrjala@linux.intel.com>
    drm/dp/mst: Clear port->pdt when tearing down the i2c adapter

Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
    i2c: core: fix NULL pointer dereference under race condition

Hoan Tran <hotran@apm.com>
    i2c: xgene: Avoid dma_buffer overrun


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

Diffstat:

 Makefile                                  |  5 +--
 arch/arm/include/asm/floppy.h             |  2 +-
 arch/h8300/include/asm/thread_info.h      |  4 ---
 arch/h8300/kernel/signal.c                |  2 +-
 arch/mips/kvm/emulate.c                   |  8 ++---
 arch/parisc/kernel/syscall.S              | 11 ++++--
 arch/powerpc/kernel/ptrace.c              |  4 +--
 arch/x86/include/asm/uaccess.h            | 10 +++---
 arch/x86/kvm/emulate.c                    |  2 +-
 arch/x86/kvm/x86.c                        |  4 ++-
 arch/x86/xen/mmu.c                        |  2 +-
 drivers/android/binder.c                  | 35 +++++++++++++-----
 drivers/char/virtio_console.c             | 22 ++++++++----
 drivers/firewire/net.c                    | 59 ++++++++++++++++++++-----------
 drivers/gpu/drm/drm_dp_mst_topology.c     |  6 +++-
 drivers/gpu/drm/exynos/exynos_drm_core.c  |  2 +-
 drivers/gpu/drm/radeon/ni.c               |  4 +--
 drivers/gpu/drm/radeon/radeon_dp_auxch.c  |  2 +-
 drivers/gpu/drm/radeon/si_dpm.c           | 53 +++++++++++++++++++++------
 drivers/hid/hid-ids.h                     |  1 +
 drivers/hid/usbhid/hid-quirks.c           |  1 +
 drivers/hv/hv_util.c                      | 10 ++++--
 drivers/i2c/busses/i2c-xgene-slimpro.c    |  2 +-
 drivers/i2c/i2c-core.c                    |  2 +-
 drivers/input/serio/i8042-x86ia64io.h     |  7 ++++
 drivers/md/dm-raid1.c                     |  1 +
 drivers/md/dm.c                           |  4 +--
 drivers/misc/genwqe/card_utils.c          | 12 ++++++-
 drivers/misc/mei/hw-txe.c                 |  6 ++--
 drivers/mmc/host/dw_mmc-pltfm.c           |  5 +--
 drivers/mtd/ubi/fastmap.c                 | 17 ++++-----
 drivers/net/ethernet/smsc/smc91x.c        |  2 +-
 drivers/pwm/core.c                        |  2 ++
 drivers/pwm/sysfs.c                       | 18 ++++++++++
 drivers/scsi/arcmsr/arcmsr_hba.c          |  9 -----
 drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++----
 drivers/scsi/scsi_debug.c                 |  1 +
 drivers/tty/vt/vt.c                       |  7 +++-
 drivers/usb/dwc3/gadget.c                 |  4 +--
 drivers/usb/gadget/function/u_ether.c     |  5 +--
 drivers/usb/host/ohci-hcd.c               |  2 +-
 drivers/usb/host/xhci-hub.c               |  4 +--
 drivers/usb/host/xhci-pci.c               |  4 ++-
 drivers/usb/serial/cp210x.c               |  4 ++-
 drivers/usb/serial/ftdi_sio.c             |  3 +-
 drivers/usb/serial/ftdi_sio_ids.h         |  5 +--
 drivers/usb/serial/usb-serial.c           |  3 +-
 drivers/virtio/virtio_ring.c              | 14 +++++---
 fs/btrfs/tree-log.c                       | 20 ++++-------
 fs/overlayfs/copy_up.c                    |  2 ++
 fs/ubifs/dir.c                            | 16 ++++++---
 fs/xfs/libxfs/xfs_dquot_buf.c             |  3 +-
 include/linux/pwm.h                       |  5 +++
 kernel/cgroup.c                           |  3 ++
 mm/cma.c                                  |  7 ++--
 mm/list_lru.c                             |  2 ++
 mm/memcontrol.c                           |  9 +++++
 mm/vmscan.c                               |  2 ++
 net/mac80211/rx.c                         | 24 ++++++++-----
 security/keys/proc.c                      |  2 +-
 sound/pci/hda/hda_controller.c            |  7 +---
 sound/pci/hda/hda_controller.h            |  4 +--
 sound/pci/hda/hda_intel.c                 | 18 ++++++----
 sound/pci/hda/hda_tegra.c                 |  5 +--
 sound/pci/hda/patch_realtek.c             | 18 ++++++++--
 sound/usb/quirks-table.h                  | 17 +++++++++
 tools/perf/Makefile.perf                  |  2 +-
 67 files changed, 385 insertions(+), 186 deletions(-)

[toc] | [next] | [standalone]


#1517902 — [PATCH 4.4 23/69] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 23/69] USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7
Message-ID<sByC6-69v-39@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Stefan Tauner <stefan.tauner@technikum-wien.at>

commit ca006f785fbfd7a5c901900bd3fe2b26e946a1ee upstream.

This adds support to ftdi_sio for the Infineon TriBoard TC2X7
engineering board for first-generation Aurix SoCs with Tricore CPUs.
Mere addition of the device IDs does the job.

Signed-off-by: Stefan Tauner <stefan.tauner@technikum-wien.at>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/ftdi_sio.c     |    3 ++-
 drivers/usb/serial/ftdi_sio_ids.h |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -986,7 +986,8 @@ static const struct usb_device_id id_tab
 	/* ekey Devices */
 	{ USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },
 	/* Infineon Devices */
-	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) },
+	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC1798_PID, 1) },
+	{ USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_TC2X7_PID, 1) },
 	/* GE Healthcare devices */
 	{ USB_DEVICE(GE_HEALTHCARE_VID, GE_HEALTHCARE_NEMO_TRACKER_PID) },
 	/* Active Research (Actisense) devices */
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -626,8 +626,9 @@
 /*
  * Infineon Technologies
  */
-#define INFINEON_VID		0x058b
-#define INFINEON_TRIBOARD_PID	0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_VID		        0x058b
+#define INFINEON_TRIBOARD_TC1798_PID	0x0028 /* DAS JTAG TriBoard TC1798 V1.0 */
+#define INFINEON_TRIBOARD_TC2X7_PID	0x0043 /* DAS JTAG TriBoard TC2X7 V1.0 */
 
 /*
  * Acton Research Corp.

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


#1517903 — [PATCH 4.4 27/69] Fix potential infoleak in older kernels

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 27/69] Fix potential infoleak in older kernels
Message-ID<sByC5-69v-29@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Linus Torvalds <torvalds@linux-foundation.org>

Not upstream as it is not needed there.

So a patch something like this might be a safe way to fix the
potential infoleak in older kernels.

THIS IS UNTESTED. It's a very obvious patch, though, so if it compiles
it probably works. It just initializes the output variable with 0 in
the inline asm description, instead of doing it in the exception
handler.

It will generate slightly worse code (a few unnecessary ALU
operations), but it doesn't have any interactions with the exception
handler implementation.


Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/uaccess.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -332,7 +332,7 @@ do {									\
 #define __get_user_asm_u64(x, ptr, retval, errret) \
 	 __get_user_asm(x, ptr, retval, "q", "", "=r", errret)
 #define __get_user_asm_ex_u64(x, ptr) \
-	 __get_user_asm_ex(x, ptr, "q", "", "=r")
+	 __get_user_asm_ex(x, ptr, "q", "", "=&r")
 #endif
 
 #define __get_user_size(x, ptr, size, retval, errret)			\
@@ -375,13 +375,13 @@ do {									\
 	__chk_user_ptr(ptr);						\
 	switch (size) {							\
 	case 1:								\
-		__get_user_asm_ex(x, ptr, "b", "b", "=q");		\
+		__get_user_asm_ex(x, ptr, "b", "b", "=&q");		\
 		break;							\
 	case 2:								\
-		__get_user_asm_ex(x, ptr, "w", "w", "=r");		\
+		__get_user_asm_ex(x, ptr, "w", "w", "=&r");		\
 		break;							\
 	case 4:								\
-		__get_user_asm_ex(x, ptr, "l", "k", "=r");		\
+		__get_user_asm_ex(x, ptr, "l", "k", "=&r");		\
 		break;							\
 	case 8:								\
 		__get_user_asm_ex_u64(x, ptr);				\
@@ -395,7 +395,7 @@ do {									\
 	asm volatile("1:	mov"itype" %1,%"rtype"0\n"		\
 		     "2:\n"						\
 		     _ASM_EXTABLE_EX(1b, 2b)				\
-		     : ltype(x) : "m" (__m(addr)))
+		     : ltype(x) : "m" (__m(addr)), "0" (0))
 
 #define __put_user_nocheck(x, ptr, size)			\
 ({								\

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


#1517904 — [PATCH 4.4 32/69] USB: serial: cp210x: fix tiocmget error handling

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 32/69] USB: serial: cp210x: fix tiocmget error handling
Message-ID<sByC6-69v-41@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream.

The current tiocmget implementation would fail to report errors up the
stack and instead leaked a few bits from the stack as a mask of
modem-status flags.

Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -845,7 +845,9 @@ static int cp210x_tiocmget(struct tty_st
 	unsigned int control;
 	int result;
 
-	cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	result = cp210x_get_config(port, CP210X_GET_MDMSTS, &control, 1);
+	if (result)
+		return result;
 
 	result = ((control & CONTROL_DTR) ? TIOCM_DTR : 0)
 		|((control & CONTROL_RTS) ? TIOCM_RTS : 0)

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


#1517905 — [PATCH 4.4 04/69] h8300: fix syscall restarting

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 04/69] h8300: fix syscall restarting
Message-ID<sByC6-69v-45@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Mark Rutland <mark.rutland@arm.com>

commit 21753583056d48a5fad964d6f272e28168426845 upstream.

Back in commit f56141e3e2d9 ("all arches, signal: move restart_block to
struct task_struct"), all architectures and core code were changed to
use task_struct::restart_block.  However, when h8300 support was
subsequently restored in v4.2, it was not updated to account for this,
and maintains thread_info::restart_block, which is not kept in sync.

This patch drops the redundant restart_block from thread_info, and moves
h8300 to the common one in task_struct, ensuring that syscall restarting
always works as expected.

Fixes: f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct")
Link: http://lkml.kernel.org/r/1476714934-11635-1-git-send-email-mark.rutland@arm.com
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/h8300/include/asm/thread_info.h |    4 ----
 arch/h8300/kernel/signal.c           |    2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

--- a/arch/h8300/include/asm/thread_info.h
+++ b/arch/h8300/include/asm/thread_info.h
@@ -31,7 +31,6 @@ struct thread_info {
 	int		   cpu;			/* cpu we're on */
 	int		   preempt_count;	/* 0 => preemptable, <0 => BUG */
 	mm_segment_t		addr_limit;
-	struct restart_block restart_block;
 };
 
 /*
@@ -44,9 +43,6 @@ struct thread_info {
 	.cpu =		0,			\
 	.preempt_count = INIT_PREEMPT_COUNT,	\
 	.addr_limit	= KERNEL_DS,		\
-	.restart_block	= {			\
-		.fn = do_no_restart_syscall,	\
-	},					\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
--- a/arch/h8300/kernel/signal.c
+++ b/arch/h8300/kernel/signal.c
@@ -79,7 +79,7 @@ restore_sigcontext(struct sigcontext *us
 	unsigned int er0;
 
 	/* Always make any pending restarted system calls return -EINTR */
-	current_thread_info()->restart_block.fn = do_no_restart_syscall;
+	current->restart_block.fn = do_no_restart_syscall;
 
 	/* restore passed registers */
 #define COPY(r)  do { err |= get_user(regs->r, &usc->sc_##r); } while (0)

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


#1517906 — [PATCH 4.4 01/69] i2c: xgene: Avoid dma_buffer overrun

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 01/69] i2c: xgene: Avoid dma_buffer overrun
Message-ID<sByC6-69v-43@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Hoan Tran <hotran@apm.com>

commit 603616017c35f4d0fbdbcace72adf9bf949c4a65 upstream.

SMBus block command uses the first byte of buffer for the data length.
The dma_buffer should be increased by 1 to avoid the overrun issue.

Reported-by: Phil Endecott <phil_gjouf_endecott@chezphil.org>
Signed-off-by: Hoan Tran <hotran@apm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-xgene-slimpro.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/drivers/i2c/busses/i2c-xgene-slimpro.c
@@ -105,7 +105,7 @@ struct slimpro_i2c_dev {
 	struct mbox_chan *mbox_chan;
 	struct mbox_client mbox_client;
 	struct completion rd_complete;
-	u8 dma_buffer[I2C_SMBUS_BLOCK_MAX];
+	u8 dma_buffer[I2C_SMBUS_BLOCK_MAX + 1]; /* dma_buffer[0] is used for length */
 	u32 *resp_msg;
 };
 

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


#1517907 — [PATCH 4.4 19/69] ubifs: Fix regression in ubifs_readdir()

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 19/69] ubifs: Fix regression in ubifs_readdir()
Message-ID<sByC6-69v-53@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Richard Weinberger <richard@nod.at>

commit a00052a296e54205cf238c75bd98d17d5d02a6db upstream.

Commit c83ed4c9dbb35 ("ubifs: Abort readdir upon error") broke
overlayfs support because the fix exposed an internal error
code to VFS.

Reported-by: Peter Rosin <peda@axentia.se>
Tested-by: Peter Rosin <peda@axentia.se>
Reported-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Tested-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Fixes: c83ed4c9dbb35 ("ubifs: Abort readdir upon error")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ubifs/dir.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -454,6 +454,14 @@ out:
 
 	if (err != -ENOENT)
 		ubifs_err(c, "cannot find next direntry, error %d", err);
+	else
+		/*
+		 * -ENOENT is a non-fatal error in this context, the TNC uses
+		 * it to indicate that the cursor moved past the current directory
+		 * and readdir() has to stop.
+		 */
+		err = 0;
+
 
 	/* 2 is a special value indicating that there are no more direntries */
 	ctx->pos = 2;

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


#1517908 — [PATCH 4.4 29/69] hv: do not lose pending heartbeat vmbus packets

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 29/69] hv: do not lose pending heartbeat vmbus packets
Message-ID<sByC6-69v-55@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Long Li <longli@microsoft.com>

commit 407a3aee6ee2d2cb46d9ba3fc380bc29f35d020c upstream.

The host keeps sending heartbeat packets independent of the
guest responding to them.  Even though we respond to the heartbeat messages at
interrupt level, we can have situations where there maybe multiple heartbeat
messages pending that have not been responded to. For instance this occurs when the
VM is paused and the host continues to send the heartbeat messages.
Address this issue by draining and responding to all
the heartbeat messages that maybe pending.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hv/hv_util.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -283,10 +283,14 @@ static void heartbeat_onchannelcallback(
 	u8 *hbeat_txf_buf = util_heartbeat.recv_buffer;
 	struct icmsg_negotiate *negop = NULL;
 
-	vmbus_recvpacket(channel, hbeat_txf_buf,
-			 PAGE_SIZE, &recvlen, &requestid);
+	while (1) {
+
+		vmbus_recvpacket(channel, hbeat_txf_buf,
+				 PAGE_SIZE, &recvlen, &requestid);
+
+		if (!recvlen)
+			break;
 
-	if (recvlen > 0) {
 		icmsghdrp = (struct icmsg_hdr *)&hbeat_txf_buf[
 				sizeof(struct vmbuspipe_hdr)];
 

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


#1517909 — [PATCH 4.4 31/69] tty: limit terminal size to 4M chars

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 31/69] tty: limit terminal size to 4M chars
Message-ID<sByC6-69v-49@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Dmitry Vyukov <dvyukov@google.com>

commit 32b2921e6a7461fe63b71217067a6cf4bddb132f upstream.

Size of kmalloc() in vc_do_resize() is controlled by user.
Too large kmalloc() size triggers WARNING message on console.
Put a reasonable upper bound on terminal size to prevent WARNINGs.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
CC: David Rientjes <rientjes@google.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Cc: syzkaller@googlegroups.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/vt/vt.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -872,6 +872,8 @@ static int vc_do_resize(struct tty_struc
 	if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)
 		return 0;
 
+	if (new_screen_size > (4 << 20))
+		return -EINVAL;
 	newscreen = kmalloc(new_screen_size, GFP_USER);
 	if (!newscreen)
 		return -ENOMEM;

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


#1517910 — [PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 11/69] ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top drivers
Message-ID<sByC6-69v-57@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>

commit 7d9a180895ee8c301df7f9447429009795c56c21 upstream.

AZX_DCAPS_RIRB_DELAY is dedicated only for Nvidia and its purpose is
just to set a flag in bus.  So it's better to be set in the toplevel
driver, either hda_intel.c or hda_tegra.c, instead of the common
hda_controller.c.  This also allows us to strip this flag from dcaps,
so save one more bit there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_controller.c |    5 -----
 sound/pci/hda/hda_controller.h |    2 +-
 sound/pci/hda/hda_intel.c      |    7 ++++++-
 sound/pci/hda/hda_tegra.c      |    5 +++--
 4 files changed, 10 insertions(+), 9 deletions(-)

--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1055,11 +1055,6 @@ int azx_bus_init(struct azx *chip, const
 	if (chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)
 		bus->core.corbrp_self_clear = true;
 
-	if (chip->driver_caps & AZX_DCAPS_RIRB_DELAY) {
-		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
-		bus->needs_damn_long_delay = 1;
-	}
-
 	if (chip->driver_caps & AZX_DCAPS_4K_BDLE_BOUNDARY)
 		bus->core.align_bdle_4k = true;
 
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -32,7 +32,7 @@
 #define AZX_DCAPS_NO_MSI	(1 << 9)	/* No MSI support */
 #define AZX_DCAPS_SNOOP_MASK	(3 << 10)	/* snoop type mask */
 #define AZX_DCAPS_SNOOP_OFF	(1 << 12)	/* snoop default off */
-#define AZX_DCAPS_RIRB_DELAY	(1 << 13)	/* Long delay in read loop */
+/* 13 unused */
 /* 14 unused */
 #define AZX_DCAPS_CTX_WORKAROUND (1 << 15)	/* X-Fi workaround */
 #define AZX_DCAPS_POSFIX_LPIB	(1 << 16)	/* Use LPIB as default */
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -334,7 +334,7 @@ enum {
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
-	(AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
+	(AZX_DCAPS_NO_MSI | /*AZX_DCAPS_ALIGN_BUFSIZE |*/ \
 	 AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
 	 AZX_DCAPS_SNOOP_TYPE(NVIDIA))
 
@@ -1637,6 +1637,11 @@ static int azx_create(struct snd_card *c
 		return err;
 	}
 
+	if (chip->driver_type == AZX_DRIVER_NVIDIA) {
+		dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");
+		chip->bus.needs_damn_long_delay = 1;
+	}
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device [card]!\n");
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -464,6 +464,8 @@ static int hda_tegra_create(struct snd_c
 	if (err < 0)
 		return err;
 
+	chip->bus.needs_damn_long_delay = 1;
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device\n");
@@ -481,8 +483,7 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match)
 
 static int hda_tegra_probe(struct platform_device *pdev)
 {
-	const unsigned int driver_flags = AZX_DCAPS_RIRB_DELAY |
-					  AZX_DCAPS_CORBRP_SELF_CLEAR;
+	const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR;
 	struct snd_card *card;
 	struct azx *chip;
 	struct hda_tegra *hda;

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


#1517911 — [PATCH 4.4 06/69] mm/list_lru.c: avoid error-path NULL pointer deref

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 06/69] mm/list_lru.c: avoid error-path NULL pointer deref
Message-ID<sByC6-69v-51@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Alexander Polakov <apolyakov@beget.ru>

commit 1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 upstream.

As described in https://bugzilla.kernel.org/show_bug.cgi?id=177821:

After some analysis it seems to be that the problem is in alloc_super().
In case list_lru_init_memcg() fails it goes into destroy_super(), which
calls list_lru_destroy().

And in list_lru_init() we see that in case memcg_init_list_lru() fails,
lru->node is freed, but not set NULL, which then leads list_lru_destroy()
to believe it is initialized and call memcg_destroy_list_lru().
memcg_destroy_list_lru() in turn can access lru->node[i].memcg_lrus,
which is NULL.

[akpm@linux-foundation.org: add comment]
Signed-off-by: Alexander Polakov <apolyakov@beget.ru>
Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/list_lru.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -554,6 +554,8 @@ int __list_lru_init(struct list_lru *lru
 	err = memcg_init_list_lru(lru, memcg_aware);
 	if (err) {
 		kfree(lru->node);
+		/* Do this so a list_lru_destroy() doesn't crash: */
+		lru->node = NULL;
 		goto out;
 	}
 

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


#1517912 — [PATCH 4.4 20/69] mei: txe: dont clean an unprocessed interrupt cause.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 20/69] mei: txe: dont clean an unprocessed interrupt cause.
Message-ID<sByC6-69v-63@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Alexander Usyskin <alexander.usyskin@intel.com>

commit 43605e293eb13c07acb546c14f407a271837af17 upstream.

SEC registers are not accessible when the TXE device is in low power
state, hence the SEC interrupt cannot be processed if device is not
awake.

In some rare cases entrance to low power state (aliveness off) and input
ready bits can be signaled at the same time, resulting in communication
stall as input ready won't be signaled again after waking up. To resolve
this IPC_HHIER_SEC bit in HHISR_REG should not be cleaned if the
interrupt is not processed.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/mei/hw-txe.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/misc/mei/hw-txe.c
+++ b/drivers/misc/mei/hw-txe.c
@@ -972,11 +972,13 @@ static bool mei_txe_check_and_ack_intrs(
 	hisr = mei_txe_br_reg_read(hw, HISR_REG);
 
 	aliveness = mei_txe_aliveness_get(dev);
-	if (hhisr & IPC_HHIER_SEC && aliveness)
+	if (hhisr & IPC_HHIER_SEC && aliveness) {
 		ipc_isr = mei_txe_sec_reg_read_silent(hw,
 				SEC_IPC_HOST_INT_STATUS_REG);
-	else
+	} else {
 		ipc_isr = 0;
+		hhisr &= ~IPC_HHIER_SEC;
+	}
 
 	generated = generated ||
 		(hisr & HISR_INT_STS_MSK) ||

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


#1517913 — [PATCH 4.4 22/69] USB: serial: fix potential NULL-dereference at probe

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 22/69] USB: serial: fix potential NULL-dereference at probe
Message-ID<sByC6-69v-59@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit 126d26f66d9890a69158812a6caa248c05359daa upstream.

Make sure we have at least one port before attempting to register a
console.

Currently, at least one driver binds to a "dummy" interface and requests
zero ports for it. Should such an interface also lack endpoints, we get
a NULL-deref during probe.

Fixes: e5b1e2062e05 ("USB: serial: make minor allocation dynamic")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/usb-serial.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1077,7 +1077,8 @@ static int usb_serial_probe(struct usb_i
 
 	serial->disconnected = 0;
 
-	usb_serial_console_init(serial->port[0]->minor);
+	if (num_ports > 0)
+		usb_serial_console_init(serial->port[0]->minor);
 exit:
 	module_put(type->driver.owner);
 	return 0;

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


#1517914 — [PATCH 4.4 18/69] ubifs: Abort readdir upon error

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 18/69] ubifs: Abort readdir upon error
Message-ID<sByC6-69v-67@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Richard Weinberger <richard@nod.at>

commit c83ed4c9dbb358b9e7707486e167e940d48bfeed upstream.

If UBIFS is facing an error while walking a directory, it reports this
error and ubifs_readdir() returns the error code. But the VFS readdir
logic does not make the getdents system call fail in all cases. When the
readdir cursor indicates that more entries are present, the system call
will just return and the libc wrapper will try again since it also
knows that more entries are present.
This causes the libc wrapper to busy loop for ever when a directory is
corrupted on UBIFS.
A common approach do deal with corrupted directory entries is
skipping them by setting the cursor to the next entry. On UBIFS this
approach is not possible since we cannot compute the next directory
entry cursor position without reading the current entry. So all we can
do is setting the cursor to the "no more entries" position and make
getdents exit.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ubifs/dir.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -350,7 +350,7 @@ static unsigned int vfs_dent_type(uint8_
  */
 static int ubifs_readdir(struct file *file, struct dir_context *ctx)
 {
-	int err;
+	int err = 0;
 	struct qstr nm;
 	union ubifs_key key;
 	struct ubifs_dent_node *dent;
@@ -452,14 +452,12 @@ out:
 	kfree(file->private_data);
 	file->private_data = NULL;
 
-	if (err != -ENOENT) {
+	if (err != -ENOENT)
 		ubifs_err(c, "cannot find next direntry, error %d", err);
-		return err;
-	}
 
 	/* 2 is a special value indicating that there are no more direntries */
 	ctx->pos = 2;
-	return 0;
+	return err;
 }
 
 /* Free saved readdir() state when the directory is closed */

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


#1517915 — [PATCH 4.4 26/69] GenWQE: Fix bad page access during abort of resource allocation

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 11:50 +0100
Subject[PATCH 4.4 26/69] GenWQE: Fix bad page access during abort of resource allocation
Message-ID<sByC7-69v-71@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Gerald Schaefer <gerald.schaefer@de.ibm.com>

commit a7a7aeefbca2982586ba2c9fd7739b96416a6d1d upstream.

When interrupting an application which was allocating DMAable
memory, it was possible, that the DMA memory was deallocated
twice, leading to the error symptoms below.

Thanks to Gerald, who analyzed the problem and provided this
patch.

I agree with his analysis of the problem: ddcb_cmd_fixups() ->
genwqe_alloc_sync_sgl() (fails in f/lpage, but sgl->sgl != NULL
and f/lpage maybe also != NULL) -> ddcb_cmd_cleanup() ->
genwqe_free_sync_sgl() (double free, because sgl->sgl != NULL and
f/lpage maybe also != NULL)

In this scenario we would have exactly the kind of double free that
would explain the WARNING / Bad page state, and as expected it is
caused by broken error handling (cleanup).

Using the Ubuntu git source, tag Ubuntu-4.4.0-33.52, he was able to reproduce
the "Bad page state" issue, and with the patch on top he could not reproduce
it any more.

------------[ cut here ]------------
WARNING: at /build/linux-o03cxz/linux-4.4.0/arch/s390/include/asm/pci_dma.h:141
Modules linked in: qeth_l2 ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common genwqe_card qeth crc_itu_t qdio ccwgroup vmur dm_multipath dasd_eckd_mod dasd_mod
CPU: 2 PID: 3293 Comm: genwqe_gunzip Not tainted 4.4.0-33-generic #52-Ubuntu
task: 0000000032c7e270 ti: 00000000324e4000 task.ti: 00000000324e4000
Krnl PSW : 0404c00180000000 0000000000156346 (dma_update_cpu_trans+0x9e/0xa8)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
Krnl GPRS: 00000000324e7bcd 0000000000c3c34a 0000000027628298 000000003215b400
           0000000000000400 0000000000001fff 0000000000000400 0000000116853000
           07000000324e7b1e 0000000000000001 0000000000000001 0000000000000001
           0000000000001000 0000000116854000 0000000000156402 00000000324e7a38
Krnl Code: 000000000015633a: 95001000           cli     0(%r1),0
           000000000015633e: a774ffc3           brc     7,1562c4
          #0000000000156342: a7f40001           brc     15,156344
          >0000000000156346: 92011000           mvi     0(%r1),1
           000000000015634a: a7f4ffbd           brc     15,1562c4
           000000000015634e: 0707               bcr     0,%r7
           0000000000156350: c00400000000       brcl    0,156350
           0000000000156356: eb7ff0500024       stmg    %r7,%r15,80(%r15)
Call Trace:
([<00000000001563e0>] dma_update_trans+0x90/0x228)
 [<00000000001565dc>] s390_dma_unmap_pages+0x64/0x160
 [<00000000001567c2>] s390_dma_free+0x62/0x98
 [<000003ff801310ce>] __genwqe_free_consistent+0x56/0x70 [genwqe_card]
 [<000003ff801316d0>] genwqe_free_sync_sgl+0xf8/0x160 [genwqe_card]
 [<000003ff8012bd6e>] ddcb_cmd_cleanup+0x86/0xa8 [genwqe_card]
 [<000003ff8012c1c0>] do_execute_ddcb+0x110/0x348 [genwqe_card]
 [<000003ff8012c914>] genwqe_ioctl+0x51c/0xc20 [genwqe_card]
 [<000000000032513a>] do_vfs_ioctl+0x3b2/0x518
 [<0000000000325344>] SyS_ioctl+0xa4/0xb8
 [<00000000007b86c6>] system_call+0xd6/0x264
 [<000003ff9e8e520a>] 0x3ff9e8e520a
Last Breaking-Event-Address:
 [<0000000000156342>] dma_update_cpu_trans+0x9a/0xa8
---[ end trace 35996336235145c8 ]---
BUG: Bad page state in process jbd2/dasdb1-8  pfn:3215b
page:000003d100c856c0 count:-1 mapcount:0 mapping:          (null) index:0x0
flags: 0x3fffc0000000000()
page dumped because: nonzero _count

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/genwqe/card_utils.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- a/drivers/misc/genwqe/card_utils.c
+++ b/drivers/misc/genwqe/card_utils.c
@@ -352,17 +352,27 @@ int genwqe_alloc_sync_sgl(struct genwqe_
 		if (copy_from_user(sgl->lpage, user_addr + user_size -
 				   sgl->lpage_size, sgl->lpage_size)) {
 			rc = -EFAULT;
-			goto err_out1;
+			goto err_out2;
 		}
 	}
 	return 0;
 
+ err_out2:
+	__genwqe_free_consistent(cd, PAGE_SIZE, sgl->lpage,
+				 sgl->lpage_dma_addr);
+	sgl->lpage = NULL;
+	sgl->lpage_dma_addr = 0;
  err_out1:
 	__genwqe_free_consistent(cd, PAGE_SIZE, sgl->fpage,
 				 sgl->fpage_dma_addr);
+	sgl->fpage = NULL;
+	sgl->fpage_dma_addr = 0;
  err_out:
 	__genwqe_free_consistent(cd, sgl->sgl_size, sgl->sgl,
 				 sgl->sgl_dma_addr);
+	sgl->sgl = NULL;
+	sgl->sgl_dma_addr = 0;
+	sgl->sgl_size = 0;
 	return -ENOMEM;
 }
 

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


#1517916 — [PATCH 4.4 08/69] KEYS: Fix short sprintf buffer in /proc/keys show function

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 12:00 +0100
Subject[PATCH 4.4 08/69] KEYS: Fix short sprintf buffer in /proc/keys show function
Message-ID<sByLL-6cP-5@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: David Howells <dhowells@redhat.com>

commit 03dab869b7b239c4e013ec82aea22e181e441cfc upstream.

This fixes CVE-2016-7042.

Fix a short sprintf buffer in proc_keys_show().  If the gcc stack protector
is turned on, this can cause a panic due to stack corruption.

The problem is that xbuf[] is not big enough to hold a 64-bit timeout
rendered as weeks:

	(gdb) p 0xffffffffffffffffULL/(60*60*24*7)
	$2 = 30500568904943

That's 14 chars plus NUL, not 11 chars plus NUL.

Expand the buffer to 16 chars.

I think the unpatched code apparently works if the stack-protector is not
enabled because on a 32-bit machine the buffer won't be overflowed and on a
64-bit machine there's a 64-bit aligned pointer at one side and an int that
isn't checked again on the other side.

The panic incurred looks something like:

Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe
CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
 0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f
 ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6
 ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679
Call Trace:
 [<ffffffff813d941f>] dump_stack+0x63/0x84
 [<ffffffff811b2cb6>] panic+0xde/0x22a
 [<ffffffff81352ebe>] ? proc_keys_show+0x3ce/0x3d0
 [<ffffffff8109f7f9>] __stack_chk_fail+0x19/0x30
 [<ffffffff81352ebe>] proc_keys_show+0x3ce/0x3d0
 [<ffffffff81350410>] ? key_validate+0x50/0x50
 [<ffffffff8134db30>] ? key_default_cmp+0x20/0x20
 [<ffffffff8126b31c>] seq_read+0x2cc/0x390
 [<ffffffff812b6b12>] proc_reg_read+0x42/0x70
 [<ffffffff81244fc7>] __vfs_read+0x37/0x150
 [<ffffffff81357020>] ? security_file_permission+0xa0/0xc0
 [<ffffffff81246156>] vfs_read+0x96/0x130
 [<ffffffff81247635>] SyS_read+0x55/0xc0
 [<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4

Reported-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/keys/proc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/keys/proc.c
+++ b/security/keys/proc.c
@@ -181,7 +181,7 @@ static int proc_keys_show(struct seq_fil
 	struct timespec now;
 	unsigned long timo;
 	key_ref_t key_ref, skey_ref;
-	char xbuf[12];
+	char xbuf[16];
 	int rc;
 
 	struct keyring_search_context ctx = {

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


#1517918 — [PATCH 4.4 02/69] i2c: core: fix NULL pointer dereference under race condition

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 12:00 +0100
Subject[PATCH 4.4 02/69] i2c: core: fix NULL pointer dereference under race condition
Message-ID<sByLL-6cP-9@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>

commit 147b36d5b70c083cc76770c47d60b347e8eaf231 upstream.

Race condition between registering an I2C device driver and
deregistering an I2C adapter device which is assumed to manage that
I2C device may lead to a NULL pointer dereference due to the
uninitialized list head of driver clients.

The root cause of the issue is that the I2C bus may know about the
registered device driver and thus it is matched by bus_for_each_drv(),
but the list of clients is not initialized and commonly it is NULL,
because I2C device drivers define struct i2c_driver as static and
clients field is expected to be initialized by I2C core:

  i2c_register_driver()             i2c_del_adapter()
    driver_register()                 ...
      bus_add_driver()                ...
        ...                           bus_for_each_drv(..., __process_removed_adapter)
      ...                               i2c_do_del_adapter()
    ...                                   list_for_each_entry_safe(..., &driver->clients, ...)
    INIT_LIST_HEAD(&driver->clients);

To solve the problem it is sufficient to do clients list head
initialization before calling driver_register().

The problem was found while using an I2C device driver with a sluggish
registration routine on a bus provided by a physically detachable I2C
master controller, but practically the oops may be reproduced under
the race between arbitraty I2C device driver registration and managing
I2C bus device removal e.g. by unbinding the latter over sysfs:

% echo 21a4000.i2c > /sys/bus/platform/drivers/imx-i2c/unbind
  Unable to handle kernel NULL pointer dereference at virtual address 00000000
  Internal error: Oops: 17 [#1] SMP ARM
  CPU: 2 PID: 533 Comm: sh Not tainted 4.9.0-rc3+ #61
  Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
  task: e5ada400 task.stack: e4936000
  PC is at i2c_do_del_adapter+0x20/0xcc
  LR is at __process_removed_adapter+0x14/0x1c
  Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
  Control: 10c5387d  Table: 35bd004a  DAC: 00000051
  Process sh (pid: 533, stack limit = 0xe4936210)
  Stack: (0xe4937d28 to 0xe4938000)
  Backtrace:
  [<c0667be0>] (i2c_do_del_adapter) from [<c0667cc0>] (__process_removed_adapter+0x14/0x1c)
  [<c0667cac>] (__process_removed_adapter) from [<c0516998>] (bus_for_each_drv+0x6c/0xa0)
  [<c051692c>] (bus_for_each_drv) from [<c06685ec>] (i2c_del_adapter+0xbc/0x284)
  [<c0668530>] (i2c_del_adapter) from [<bf0110ec>] (i2c_imx_remove+0x44/0x164 [i2c_imx])
  [<bf0110a8>] (i2c_imx_remove [i2c_imx]) from [<c051a838>] (platform_drv_remove+0x2c/0x44)
  [<c051a80c>] (platform_drv_remove) from [<c05183d8>] (__device_release_driver+0x90/0x12c)
  [<c0518348>] (__device_release_driver) from [<c051849c>] (device_release_driver+0x28/0x34)
  [<c0518474>] (device_release_driver) from [<c0517150>] (unbind_store+0x80/0x104)
  [<c05170d0>] (unbind_store) from [<c0516520>] (drv_attr_store+0x28/0x34)
  [<c05164f8>] (drv_attr_store) from [<c0298acc>] (sysfs_kf_write+0x50/0x54)
  [<c0298a7c>] (sysfs_kf_write) from [<c029801c>] (kernfs_fop_write+0x100/0x214)
  [<c0297f1c>] (kernfs_fop_write) from [<c0220130>] (__vfs_write+0x34/0x120)
  [<c02200fc>] (__vfs_write) from [<c0221088>] (vfs_write+0xa8/0x170)
  [<c0220fe0>] (vfs_write) from [<c0221e74>] (SyS_write+0x4c/0xa8)
  [<c0221e28>] (SyS_write) from [<c0108a20>] (ret_fast_syscall+0x0/0x1c)

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/i2c-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1876,6 +1876,7 @@ int i2c_register_driver(struct module *o
 	/* add the driver to the list of i2c drivers in the driver core */
 	driver->driver.owner = owner;
 	driver->driver.bus = &i2c_bus_type;
+	INIT_LIST_HEAD(&driver->clients);
 
 	/* When registration returns, the driver core
 	 * will have called probe() for all matching-but-unbound devices.
@@ -1886,7 +1887,6 @@ int i2c_register_driver(struct module *o
 
 	pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name);
 
-	INIT_LIST_HEAD(&driver->clients);
 	/* Walk the adapters that are already present */
 	i2c_for_each_dev(driver, __process_new_driver);
 

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


#1517921 — [PATCH 4.4 07/69] mm: memcontrol: do not recurse in direct reclaim

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 12:00 +0100
Subject[PATCH 4.4 07/69] mm: memcontrol: do not recurse in direct reclaim
Message-ID<sByLM-6cP-25@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Johannes Weiner <hannes@cmpxchg.org>

commit 89a2848381b5fcd9c4d9c0cd97680e3b28730e31 upstream.

On 4.0, we saw a stack corruption from a page fault entering direct
memory cgroup reclaim, calling into btrfs_releasepage(), which then
tried to allocate an extent and recursed back into a kmem charge ad
nauseam:

  [...]
  btrfs_releasepage+0x2c/0x30
  try_to_release_page+0x32/0x50
  shrink_page_list+0x6da/0x7a0
  shrink_inactive_list+0x1e5/0x510
  shrink_lruvec+0x605/0x7f0
  shrink_zone+0xee/0x320
  do_try_to_free_pages+0x174/0x440
  try_to_free_mem_cgroup_pages+0xa7/0x130
  try_charge+0x17b/0x830
  memcg_charge_kmem+0x40/0x80
  new_slab+0x2d9/0x5a0
  __slab_alloc+0x2fd/0x44f
  kmem_cache_alloc+0x193/0x1e0
  alloc_extent_state+0x21/0xc0
  __clear_extent_bit+0x2b5/0x400
  try_release_extent_mapping+0x1a3/0x220
  __btrfs_releasepage+0x31/0x70
  btrfs_releasepage+0x2c/0x30
  try_to_release_page+0x32/0x50
  shrink_page_list+0x6da/0x7a0
  shrink_inactive_list+0x1e5/0x510
  shrink_lruvec+0x605/0x7f0
  shrink_zone+0xee/0x320
  do_try_to_free_pages+0x174/0x440
  try_to_free_mem_cgroup_pages+0xa7/0x130
  try_charge+0x17b/0x830
  mem_cgroup_try_charge+0x65/0x1c0
  handle_mm_fault+0x117f/0x1510
  __do_page_fault+0x177/0x420
  do_page_fault+0xc/0x10
  page_fault+0x22/0x30

On later kernels, kmem charging is opt-in rather than opt-out, and that
particular kmem allocation in btrfs_releasepage() is no longer being
charged and won't recurse and overrun the stack anymore.

But it's not impossible for an accounted allocation to happen from the
memcg direct reclaim context, and we needed to reproduce this crash many
times before we even got a useful stack trace out of it.

Like other direct reclaimers, mark tasks in memcg reclaim PF_MEMALLOC to
avoid recursing into any other form of direct reclaim.  Then let
recursive charges from PF_MEMALLOC contexts bypass the cgroup limit.

Link: http://lkml.kernel.org/r/20161025141050.GA13019@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memcontrol.c |    9 +++++++++
 mm/vmscan.c     |    2 ++
 2 files changed, 11 insertions(+)

--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2055,6 +2055,15 @@ retry:
 		     current->flags & PF_EXITING))
 		goto force;
 
+	/*
+	 * Prevent unbounded recursion when reclaim operations need to
+	 * allocate memory. This might exceed the limits temporarily,
+	 * but we prefer facilitating memory reclaim and getting back
+	 * under the limit over triggering OOM kills in these cases.
+	 */
+	if (unlikely(current->flags & PF_MEMALLOC))
+		goto force;
+
 	if (unlikely(task_in_memcg_oom(current)))
 		goto nomem;
 
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2910,7 +2910,9 @@ unsigned long try_to_free_mem_cgroup_pag
 					    sc.may_writepage,
 					    sc.gfp_mask);
 
+	current->flags |= PF_MEMALLOC;
 	nr_reclaimed = do_try_to_free_pages(zonelist, &sc);
+	current->flags &= ~PF_MEMALLOC;
 
 	trace_mm_vmscan_memcg_reclaim_end(nr_reclaimed);
 

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


#1517931 — [PATCH 4.4 67/69] kvm: x86: Check memopp before dereference (CVE-2016-8630)

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 12:10 +0100
Subject[PATCH 4.4 67/69] kvm: x86: Check memopp before dereference (CVE-2016-8630)
Message-ID<sByVs-6vX-23@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Owen Hofmann <osh@google.com>

commit d9092f52d7e61dd1557f2db2400ddb430e85937e upstream.

Commit 41061cdb98 ("KVM: emulate: do not initialize memopp") removes a
check for non-NULL under incorrect assumptions. An undefined instruction
with a ModR/M byte with Mod=0 and R/M-5 (e.g. 0xc7 0x15) will attempt
to dereference a null pointer here.

Fixes: 41061cdb98a0bec464278b4db8e894a3121671f5
Message-Id: <1477592752-126650-2-git-send-email-osh@google.com>
Signed-off-by: Owen Hofmann <osh@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/emulate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -5033,7 +5033,7 @@ done_prefixes:
 	/* Decode and fetch the destination operand: register or memory. */
 	rc = decode_operand(ctxt, &ctxt->dst, (ctxt->d >> DstShift) & OpMask);
 
-	if (ctxt->rip_relative)
+	if (ctxt->rip_relative && likely(ctxt->memopp))
 		ctxt->memopp->addr.mem.ea = address_mask(ctxt,
 					ctxt->memopp->addr.mem.ea + ctxt->_eip);
 

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


#1517934 — [PATCH 4.4 60/69] cgroup: avoid false positive gcc-6 warning

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-11-09 12:10 +0100
Subject[PATCH 4.4 60/69] cgroup: avoid false positive gcc-6 warning
Message-ID<sByVs-6vX-27@gated-at.bofh.it>
In reply to#1517901
4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Arnd Bergmann <arnd@arndb.de>

commit cfe02a8a973e7e5f66926b8ae38dfce404b19e29 upstream.

When all subsystems are disabled, gcc notices that cgroup_subsys_enabled_key
is a zero-length array and that any access to it must be out of bounds:

In file included from ../include/linux/cgroup.h:19:0,
                 from ../kernel/cgroup.c:31:
../kernel/cgroup.c: In function 'cgroup_add_cftypes':
../kernel/cgroup.c:261:53: error: array subscript is above array bounds [-Werror=array-bounds]
  return static_key_enabled(cgroup_subsys_enabled_key[ssid]);
                            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../include/linux/jump_label.h:271:40: note: in definition of macro 'static_key_enabled'
  static_key_count((struct static_key *)x) > 0;    \
                                        ^

We should never call the function in this particular case, so this is
not a bug. In order to silence the warning, this adds an explicit check
for the CGROUP_SUBSYS_COUNT==0 case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/cgroup.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -236,6 +236,9 @@ static int cgroup_addrm_files(struct cgr
  */
 static bool cgroup_ssid_enabled(int ssid)
 {
+	if (CGROUP_SUBSYS_COUNT == 0)
+		return false;
+
 	return static_key_enabled(cgroup_subsys_enabled_key[ssid]);
 }
 

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


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | linux.kernel


csiph-web