linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.4 00/59] 4.4.100-stable review
@ 2017-11-19 14:32 Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 01/59] media: imon: Fix null-ptr-deref in imon_probe Greg Kroah-Hartman
                   ` (59 more replies)
  0 siblings, 60 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

This is the start of the stable review cycle for the 4.4.100 release.
There are 59 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 Tue Nov 21 14:31:34 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.4.100-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.100-rc1

Johan Hovold <johan@kernel.org>
    USB: serial: garmin_gps: fix memory leak on probe errors

Johan Hovold <johan@kernel.org>
    USB: serial: garmin_gps: fix I/O after failed probe and remove

Douglas Fischer <douglas.fischer@outlook.com>
    USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update

Bernhard Rosenkraenzer <bernhard.rosenkranzer@linaro.org>
    USB: Add delay-init quirk for Corsair K70 LUX keyboards

Alan Stern <stern@rowland.harvard.edu>
    USB: usbfs: compute urb->actual_length for isochronous

Dmitry V. Levin <ldv@altlinux.org>
    uapi: fix linux/rds.h userspace compilation errors

Dmitry V. Levin <ldv@altlinux.org>
    uapi: fix linux/rds.h userspace compilation error

Sasha Levin <alexander.levin@verizon.com>
    Revert "uapi: fix linux/rds.h userspace compilation errors"

Sasha Levin <alexander.levin@verizon.com>
    Revert "crypto: xts - Add ECB dependency"

Paul Burton <paul.burton@imgtec.com>
    MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds

Marcin Nowakowski <marcin.nowakowski@imgtec.com>
    MIPS: init: Ensure reserved memory regions are not added to bootmem

Marcin Nowakowski <marcin.nowakowski@imgtec.com>
    MIPS: init: Ensure bootmem does not corrupt reserved memory

Paul Burton <paul.burton@imgtec.com>
    MIPS: End asm function prologue macros with .insn

Jannik Becher <becher.jannik@gmail.com>
    staging: rtl8712: fixed little endian problem

Emil Tantilov <emil.s.tantilov@intel.com>
    ixgbe: do not disable FEC from the driver

Emil Tantilov <emil.s.tantilov@intel.com>
    ixgbe: add mask for 64 RSS queues

Tony Nguyen <anthony.l.nguyen@intel.com>
    ixgbe: Reduce I2C retry count on X550 devices

Emil Tantilov <emil.s.tantilov@intel.com>
    ixgbe: handle close/suspend race with netif_device_detach/present

Emil Tantilov <emil.s.tantilov@intel.com>
    ixgbe: fix AER error handling

Jon Mason <jon.mason@broadcom.com>
    arm64: dts: NS2: reserve memory for Nitro firmware

Kailang Yang <kailang@realtek.com>
    ALSA: hda/realtek - Add new codec ID ALC299

Arvind Yadav <arvind.yadav.cs@gmail.com>
    gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap

Alexey Khoroshilov <khoroshilov@ispras.ru>
    backlight: adp5520: Fix error handling in adp5520_bl_probe()

Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    backlight: lcd: Fix race condition during register

Takashi Iwai <tiwai@suse.de>
    ALSA: vx: Fix possible transfer overflow

Takashi Iwai <tiwai@suse.de>
    ALSA: vx: Don't try to update capture stream before running

James Smart <james.smart@broadcom.com>
    scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload

James Smart <james.smart@broadcom.com>
    scsi: lpfc: Correct issue leading to oops during link reset

James Smart <james.smart@broadcom.com>
    scsi: lpfc: Correct host name in symbolic_name field

James Smart <james.smart@broadcom.com>
    scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort

James Smart <james.smart@broadcom.com>
    scsi: lpfc: Add missing memory barrier

Galo Navarro <anglorvaroa@gmail.com>
    staging: rtl8188eu: fix incorrect ERROR tags from logs

subhashj@codeaurora.org <subhashj@codeaurora.org>
    scsi: ufs: add capability to keep auto bkops always enabled

Javier Martinez Canillas <javier@osg.samsung.com>
    scsi: ufs-qcom: Fix module autoload

Hannu Lounento <hannu.lounento@ge.com>
    igb: Fix hw_dbg logging in igb_update_flash_i210

Todd Fujinaka <todd.fujinaka@intel.com>
    igb: close/suspend race in netif_device_detach

Aaron Sierra <asierra@xes-inc.com>
    igb: reset the PHY before reading the PHY ID

Arvind Yadav <arvind.yadav.cs@gmail.com>
    drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache

Geert Uytterhoeven <geert@linux-m68k.org>
    ata: SATA_MV should depend on HAS_DMA

Geert Uytterhoeven <geert@linux-m68k.org>
    ata: SATA_HIGHBANK should depend on HAS_DMA

Geert Uytterhoeven <geert@linux-m68k.org>
    ata: ATA_BMDMA should depend on HAS_DMA

Tony Lindgren <tony@atomide.com>
    ARM: dts: Fix omap3 off mode pull defines

Tony Lindgren <tony@atomide.com>
    ARM: OMAP2+: Fix init for multiple quirks for the same SoC

Tony Lindgren <tony@atomide.com>
    ARM: dts: Fix am335x and dm814x scm syscon to probe children

Tony Lindgren <tony@atomide.com>
    ARM: dts: Fix compatible for ti81xx uarts for 8250

Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
    fm10k: request reset when mbx->state changes

Roger Quadros <rogerq@ti.com>
    extcon: palmas: Check the parent instance to prevent the NULL

Adam Wallis <awallis@codeaurora.org>
    dmaengine: dmatest: warn user when dma test times out

Leif Liddy <leif.linux@gmail.com>
    Bluetooth: btusb: fix QCA Rome suspend/resume

Eric Biggers <ebiggers@google.com>
    arm: crypto: reduce priority of bit-sliced AES cipher

Bjørn Mork <bjorn@mork.no>
    net: qmi_wwan: fix divide by 0 on bad descriptors

Bjørn Mork <bjorn@mork.no>
    net: cdc_ether: fix divide by 0 on bad descriptors

Xin Long <lucien.xin@gmail.com>
    sctp: do not peel off an assoc from one netns to another one

Jan Beulich <jbeulich@suse.com>
    xen-blkback: don't leak stack data via response ring

Daniel Borkmann <daniel@iogearbox.net>
    bpf: don't let ldimm64 leak map addresses on unprivileged

Paolo Bonzini <pbonzini@redhat.com>
    KVM: x86: fix singlestepping over syscall

Jan Kara <jack@suse.cz>
    ext4: fix data exposure after a crash

Andrey Konovalov <andreyknvl@google.com>
    media: dib0700: fix invalid dvb_detach argument

Arvind Yadav <arvind.yadav.cs@gmail.com>
    media: imon: Fix null-ptr-deref in imon_probe


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

Diffstat:

 Makefile                                      |   4 +-
 arch/arm/boot/dts/am33xx.dtsi                 |   3 +-
 arch/arm/boot/dts/dm814x.dtsi                 |   9 ++-
 arch/arm/boot/dts/dm816x.dtsi                 |   6 +-
 arch/arm/crypto/aesbs-glue.c                  |   6 +-
 arch/arm/mach-omap2/pdata-quirks.c            |   1 -
 arch/arm64/boot/dts/broadcom/ns2.dtsi         |   2 +
 arch/mips/include/asm/asm.h                   |  10 ++-
 arch/mips/kernel/setup.c                      |  78 +++++++++++++++++++-
 arch/mips/netlogic/common/irq.c               |   4 +-
 arch/x86/include/asm/kvm_emulate.h            |   1 +
 arch/x86/kvm/emulate.c                        |   1 +
 arch/x86/kvm/x86.c                            |  52 ++++++-------
 crypto/Kconfig                                |   1 -
 drivers/ata/Kconfig                           |   3 +
 drivers/block/xen-blkback/blkback.c           |  23 +++---
 drivers/block/xen-blkback/common.h            |  25 ++-----
 drivers/bluetooth/btusb.c                     |   6 ++
 drivers/dma/dmatest.c                         |   1 +
 drivers/extcon/extcon-palmas.c                |   5 ++
 drivers/gpu/drm/mgag200/mgag200_main.c        |   2 +
 drivers/gpu/drm/sti/sti_vtg.c                 |   4 +
 drivers/media/rc/imon.c                       |   5 ++
 drivers/media/usb/dvb-usb/dib0700_devices.c   |  24 +++---
 drivers/net/ethernet/intel/fm10k/fm10k_mbx.c  |  10 ++-
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c  |   6 +-
 drivers/net/ethernet/intel/igb/e1000_82575.c  |  11 +++
 drivers/net/ethernet/intel/igb/e1000_i210.c   |   4 +-
 drivers/net/ethernet/intel/igb/igb_main.c     |  21 +++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c  |   8 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  23 +++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  |   4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |   2 -
 drivers/net/usb/cdc_ether.c                   |   2 +-
 drivers/net/usb/qmi_wwan.c                    |   2 +-
 drivers/scsi/lpfc/lpfc_attr.c                 |  17 +++++
 drivers/scsi/lpfc/lpfc_els.c                  |   6 ++
 drivers/scsi/lpfc/lpfc_hw.h                   |   6 ++
 drivers/scsi/lpfc/lpfc_sli.c                  |   3 +
 drivers/scsi/lpfc/lpfc_vport.c                |   8 ++
 drivers/scsi/ufs/ufs-qcom.c                   |   1 +
 drivers/scsi/ufs/ufshcd.c                     |  33 ++++++---
 drivers/scsi/ufs/ufshcd.h                     |  13 ++++
 drivers/staging/rtl8188eu/include/rtw_debug.h |   2 +-
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   2 +-
 drivers/usb/core/devio.c                      |  14 ++++
 drivers/usb/core/quirks.c                     |   3 +
 drivers/usb/serial/garmin_gps.c               |  22 +++++-
 drivers/usb/serial/qcserial.c                 |   1 +
 drivers/video/backlight/adp5520_bl.c          |  12 ++-
 drivers/video/backlight/lcd.c                 |   4 +-
 fs/ext4/inode.c                               |  23 +++---
 include/dt-bindings/pinctrl/omap.h            |   4 +-
 include/uapi/linux/rds.h                      | 102 +++++++++++++-------------
 kernel/bpf/verifier.c                         |  21 ++++--
 net/sctp/socket.c                             |   4 +
 sound/drivers/vx/vx_pcm.c                     |   8 +-
 sound/pci/hda/patch_realtek.c                 |  10 +++
 sound/pci/vx222/vx222_ops.c                   |  12 +--
 sound/pcmcia/vx/vxp_ops.c                     |  12 +--
 60 files changed, 481 insertions(+), 231 deletions(-)

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 01/59] media: imon: Fix null-ptr-deref in imon_probe
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 02/59] media: dib0700: fix invalid dvb_detach argument Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arvind Yadav, Andrey Konovalov,
	Sean Young, Mauro Carvalho Chehab, Ben Hutchings

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Arvind Yadav <arvind.yadav.cs@gmail.com>

commit 58fd55e838276a0c13d1dc7c387f90f25063cbf3 upstream.

It seems that the return value of usb_ifnum_to_if() can be NULL and
needs to be checked.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/rc/imon.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -2419,6 +2419,11 @@ static int imon_probe(struct usb_interfa
 	mutex_lock(&driver_lock);
 
 	first_if = usb_ifnum_to_if(usbdev, 0);
+	if (!first_if) {
+		ret = -ENODEV;
+		goto fail;
+	}
+
 	first_if_ctx = usb_get_intfdata(first_if);
 
 	if (ifnum == 0) {

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 02/59] media: dib0700: fix invalid dvb_detach argument
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 01/59] media: imon: Fix null-ptr-deref in imon_probe Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 03/59] ext4: fix data exposure after a crash Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andrey Konovalov, Ben Hutchings,
	Mauro Carvalho Chehab

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Andrey Konovalov <andreyknvl@google.com>

commit eb0c19942288569e0ae492476534d5a485fb8ab4 upstream.

dvb_detach(arg) calls symbol_put_addr(arg), where arg should be a pointer
to a function. Right now a pointer to state->dib7000p_ops is passed to
dvb_detach(), which causes a BUG() in symbol_put_addr() as discovered by
syzkaller. Pass state->dib7000p_ops.set_wbd_ref instead.

------------[ cut here ]------------
kernel BUG at kernel/module.c:1081!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 1151 Comm: kworker/1:1 Tainted: G        W
4.14.0-rc1-42251-gebb2c2437d80 #224
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Workqueue: usb_hub_wq hub_event
task: ffff88006a336300 task.stack: ffff88006a7c8000
RIP: 0010:symbol_put_addr+0x54/0x60 kernel/module.c:1083
RSP: 0018:ffff88006a7ce210 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff880062a8d190 RCX: 0000000000000000
RDX: dffffc0000000020 RSI: ffffffff85876d60 RDI: ffff880062a8d190
RBP: ffff88006a7ce218 R08: 1ffff1000d4f9c12 R09: 1ffff1000d4f9ae4
R10: 1ffff1000d4f9bed R11: 0000000000000000 R12: ffff880062a8d180
R13: 00000000ffffffed R14: ffff880062a8d190 R15: ffff88006947c000
FS:  0000000000000000(0000) GS:ffff88006c900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6416532000 CR3: 00000000632f5000 CR4: 00000000000006e0
Call Trace:
 stk7070p_frontend_attach+0x515/0x610
drivers/media/usb/dvb-usb/dib0700_devices.c:1013
 dvb_usb_adapter_frontend_init+0x32b/0x660
drivers/media/usb/dvb-usb/dvb-usb-dvb.c:286
 dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:86
 dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:162
 dvb_usb_device_init+0xf70/0x17f0 drivers/media/usb/dvb-usb/dvb-usb-init.c:277
 dib0700_probe+0x171/0x5a0 drivers/media/usb/dvb-usb/dib0700_core.c:886
 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361
 really_probe drivers/base/dd.c:413
 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557
 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653
 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463
 __device_attach+0x26e/0x3d0 drivers/base/dd.c:710
 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757
 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523
 device_add+0xd0b/0x1660 drivers/base/core.c:1835
 usb_set_configuration+0x104e/0x1870 drivers/usb/core/message.c:1932
 generic_probe+0x73/0xe0 drivers/usb/core/generic.c:174
 usb_probe_device+0xaf/0xe0 drivers/usb/core/driver.c:266
 really_probe drivers/base/dd.c:413
 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557
 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653
 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463
 __device_attach+0x26e/0x3d0 drivers/base/dd.c:710
 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757
 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523
 device_add+0xd0b/0x1660 drivers/base/core.c:1835
 usb_new_device+0x7b8/0x1020 drivers/usb/core/hub.c:2457
 hub_port_connect drivers/usb/core/hub.c:4903
 hub_port_connect_change drivers/usb/core/hub.c:5009
 port_event drivers/usb/core/hub.c:5115
 hub_event+0x194d/0x3740 drivers/usb/core/hub.c:5195
 process_one_work+0xc7f/0x1db0 kernel/workqueue.c:2119
 worker_thread+0x221/0x1850 kernel/workqueue.c:2253
 kthread+0x3a1/0x470 kernel/kthread.c:231
 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
Code: ff ff 48 85 c0 74 24 48 89 c7 e8 48 ea ff ff bf 01 00 00 00 e8
de 20 e3 ff 65 8b 05 b7 2f c2 7e 85 c0 75 c9 e8 f9 0b c1 ff eb c2 <0f>
0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 b8 00 00
RIP: symbol_put_addr+0x54/0x60 RSP: ffff88006a7ce210
---[ end trace b75b357739e7e116 ]---

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/usb/dvb-usb/dib0700_devices.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -292,7 +292,7 @@ static int stk7700P2_frontend_attach(str
 					     stk7700d_dib7000p_mt2266_config)
 		    != 0) {
 			err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n", __func__);
-			dvb_detach(&state->dib7000p_ops);
+			dvb_detach(state->dib7000p_ops.set_wbd_ref);
 			return -ENODEV;
 		}
 	}
@@ -326,7 +326,7 @@ static int stk7700d_frontend_attach(stru
 					     stk7700d_dib7000p_mt2266_config)
 		    != 0) {
 			err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n", __func__);
-			dvb_detach(&state->dib7000p_ops);
+			dvb_detach(state->dib7000p_ops.set_wbd_ref);
 			return -ENODEV;
 		}
 	}
@@ -479,7 +479,7 @@ static int stk7700ph_frontend_attach(str
 				     &stk7700ph_dib7700_xc3028_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 		    __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -1010,7 +1010,7 @@ static int stk7070p_frontend_attach(stru
 				     &dib7070p_dib7000p_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 		    __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -1068,7 +1068,7 @@ static int stk7770p_frontend_attach(stru
 				     &dib7770p_dib7000p_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 		    __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -3036,7 +3036,7 @@ static int nim7090_frontend_attach(struc
 
 	if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n", __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 	adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config);
@@ -3089,7 +3089,7 @@ static int tfe7090pvr_frontend0_attach(s
 	/* initialize IC 0 */
 	if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n", __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -3119,7 +3119,7 @@ static int tfe7090pvr_frontend1_attach(s
 	i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1);
 	if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n", __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -3194,7 +3194,7 @@ static int tfe7790p_frontend_attach(stru
 				1, 0x10, &tfe7790p_dib7000p_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 				__func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 	adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap,
@@ -3289,7 +3289,7 @@ static int stk7070pd_frontend_attach0(st
 				     stk7070pd_dib7000p_config) != 0) {
 		err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 		    __func__);
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 
@@ -3364,7 +3364,7 @@ static int novatd_frontend_attach(struct
 					     stk7070pd_dib7000p_config) != 0) {
 			err("%s: state->dib7000p_ops.i2c_enumeration failed.  Cannot continue\n",
 			    __func__);
-			dvb_detach(&state->dib7000p_ops);
+			dvb_detach(state->dib7000p_ops.set_wbd_ref);
 			return -ENODEV;
 		}
 	}
@@ -3600,7 +3600,7 @@ static int pctv340e_frontend_attach(stru
 
 	if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) {
 		/* Demodulator not found for some reason? */
-		dvb_detach(&state->dib7000p_ops);
+		dvb_detach(state->dib7000p_ops.set_wbd_ref);
 		return -ENODEV;
 	}
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 03/59] ext4: fix data exposure after a crash
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 01/59] media: imon: Fix null-ptr-deref in imon_probe Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 02/59] media: dib0700: fix invalid dvb_detach argument Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 05/59] bpf: dont let ldimm64 leak map addresses on unprivileged Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, HUANG Weller (CM/ESW12-CN),
	Jan Kara, Theodore Tso, Ben Hutchings

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Jan Kara <jack@suse.cz>


commit 06bd3c36a733ac27962fea7d6f47168841376824 upstream.

Huang has reported that in his powerfail testing he is seeing stale
block contents in some of recently allocated blocks although he mounts
ext4 in data=ordered mode. After some investigation I have found out
that indeed when delayed allocation is used, we don't add inode to
transaction's list of inodes needing flushing before commit. Originally
we were doing that but commit f3b59291a69d removed the logic with a
flawed argument that it is not needed.

The problem is that although for delayed allocated blocks we write their
contents immediately after allocating them, there is no guarantee that
the IO scheduler or device doesn't reorder things and thus transaction
allocating blocks and attaching them to inode can reach stable storage
before actual block contents. Actually whenever we attach freshly
allocated blocks to inode using a written extent, we should add inode to
transaction's ordered inode list to make sure we properly wait for block
contents to be written before committing the transaction. So that is
what we do in this patch. This also handles other cases where stale data
exposure was possible - like filling hole via mmap in
data=ordered,nodelalloc mode.

The only exception to the above rule are extending direct IO writes where
blkdev_direct_IO() waits for IO to complete before increasing i_size and
thus stale data exposure is not possible. For now we don't complicate
the code with optimizing this special case since the overhead is pretty
low. In case this is observed to be a performance problem we can always
handle it using a special flag to ext4_map_blocks().

Fixes: f3b59291a69d0b734be1fc8be489fef2dd846d3d
Reported-by: "HUANG Weller (CM/ESW12-CN)" <Weller.Huang@cn.bosch.com>
Tested-by: "HUANG Weller (CM/ESW12-CN)" <Weller.Huang@cn.bosch.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[bwh: Backported to 4.4:
 - Drop check for EXT4_GET_BLOCKS_ZERO flag
 - Adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/ext4/inode.c |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -658,6 +658,20 @@ has_zeroout:
 		ret = check_block_validity(inode, map);
 		if (ret != 0)
 			return ret;
+
+		/*
+		 * Inodes with freshly allocated blocks where contents will be
+		 * visible after transaction commit must be on transaction's
+		 * ordered data list.
+		 */
+		if (map->m_flags & EXT4_MAP_NEW &&
+		    !(map->m_flags & EXT4_MAP_UNWRITTEN) &&
+		    !IS_NOQUOTA(inode) &&
+		    ext4_should_order_data(inode)) {
+			ret = ext4_jbd2_file_inode(handle, inode);
+			if (ret)
+				return ret;
+		}
 	}
 	return retval;
 }
@@ -1152,15 +1166,6 @@ static int ext4_write_end(struct file *f
 	int i_size_changed = 0;
 
 	trace_ext4_write_end(inode, pos, len, copied);
-	if (ext4_test_inode_state(inode, EXT4_STATE_ORDERED_MODE)) {
-		ret = ext4_jbd2_file_inode(handle, inode);
-		if (ret) {
-			unlock_page(page);
-			page_cache_release(page);
-			goto errout;
-		}
-	}
-
 	if (ext4_has_inline_data(inode)) {
 		ret = ext4_write_inline_data_end(inode, pos, len,
 						 copied, page);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 05/59] bpf: dont let ldimm64 leak map addresses on unprivileged
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 03/59] ext4: fix data exposure after a crash Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 06/59] xen-blkback: dont leak stack data via response ring Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jann Horn, Daniel Borkmann,
	Alexei Starovoitov, David S. Miller, Ben Hutchings

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Daniel Borkmann <daniel@iogearbox.net>


commit 0d0e57697f162da4aa218b5feafe614fb666db07 upstream.

The patch fixes two things at once:

1) It checks the env->allow_ptr_leaks and only prints the map address to
   the log if we have the privileges to do so, otherwise it just dumps 0
   as we would when kptr_restrict is enabled on %pK. Given the latter is
   off by default and not every distro sets it, I don't want to rely on
   this, hence the 0 by default for unprivileged.

2) Printing of ldimm64 in the verifier log is currently broken in that
   we don't print the full immediate, but only the 32 bit part of the
   first insn part for ldimm64. Thus, fix this up as well; it's okay to
   access, since we verified all ldimm64 earlier already (including just
   constants) through replace_map_fd_with_map_ptr().

Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs")
Fixes: cbd357008604 ("bpf: verifier (add ability to receive verification log)")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 4.4: s/bpf_verifier_env/verifier_env/]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/bpf/verifier.c |   21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -313,7 +313,8 @@ static const char *const bpf_jmp_string[
 	[BPF_EXIT >> 4] = "exit",
 };
 
-static void print_bpf_insn(struct bpf_insn *insn)
+static void print_bpf_insn(const struct verifier_env *env,
+			   const struct bpf_insn *insn)
 {
 	u8 class = BPF_CLASS(insn->code);
 
@@ -377,9 +378,19 @@ static void print_bpf_insn(struct bpf_in
 				insn->code,
 				bpf_ldst_string[BPF_SIZE(insn->code) >> 3],
 				insn->src_reg, insn->imm);
-		} else if (BPF_MODE(insn->code) == BPF_IMM) {
-			verbose("(%02x) r%d = 0x%x\n",
-				insn->code, insn->dst_reg, insn->imm);
+		} else if (BPF_MODE(insn->code) == BPF_IMM &&
+			   BPF_SIZE(insn->code) == BPF_DW) {
+			/* At this point, we already made sure that the second
+			 * part of the ldimm64 insn is accessible.
+			 */
+			u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm;
+			bool map_ptr = insn->src_reg == BPF_PSEUDO_MAP_FD;
+
+			if (map_ptr && !env->allow_ptr_leaks)
+				imm = 0;
+
+			verbose("(%02x) r%d = 0x%llx\n", insn->code,
+				insn->dst_reg, (unsigned long long)imm);
 		} else {
 			verbose("BUG_ld_%02x\n", insn->code);
 			return;
@@ -1764,7 +1775,7 @@ static int do_check(struct verifier_env
 
 		if (log_level) {
 			verbose("%d: ", insn_idx);
-			print_bpf_insn(insn);
+			print_bpf_insn(env, insn);
 		}
 
 		if (class == BPF_ALU || class == BPF_ALU64) {

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 06/59] xen-blkback: dont leak stack data via response ring
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 05/59] bpf: dont let ldimm64 leak map addresses on unprivileged Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 07/59] sctp: do not peel off an assoc from one netns to another one Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jan Beulich, Konrad Rzeszutek Wilk,
	Ben Hutchings

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Jan Beulich <jbeulich@suse.com>


commit 089bc0143f489bd3a4578bdff5f4ca68fb26f341 upstream.

Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).

This is XSA-216.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[bwh: Backported to 4.4: adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/block/xen-blkback/blkback.c |   23 ++++++++++++-----------
 drivers/block/xen-blkback/common.h  |   25 +++++--------------------
 2 files changed, 17 insertions(+), 31 deletions(-)

--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -1407,33 +1407,34 @@ static int dispatch_rw_block_io(struct x
 static void make_response(struct xen_blkif *blkif, u64 id,
 			  unsigned short op, int st)
 {
-	struct blkif_response  resp;
+	struct blkif_response *resp;
 	unsigned long     flags;
 	union blkif_back_rings *blk_rings = &blkif->blk_rings;
 	int notify;
 
-	resp.id        = id;
-	resp.operation = op;
-	resp.status    = st;
-
 	spin_lock_irqsave(&blkif->blk_ring_lock, flags);
 	/* Place on the response ring for the relevant domain. */
 	switch (blkif->blk_protocol) {
 	case BLKIF_PROTOCOL_NATIVE:
-		memcpy(RING_GET_RESPONSE(&blk_rings->native, blk_rings->native.rsp_prod_pvt),
-		       &resp, sizeof(resp));
+		resp = RING_GET_RESPONSE(&blk_rings->native,
+					 blk_rings->native.rsp_prod_pvt);
 		break;
 	case BLKIF_PROTOCOL_X86_32:
-		memcpy(RING_GET_RESPONSE(&blk_rings->x86_32, blk_rings->x86_32.rsp_prod_pvt),
-		       &resp, sizeof(resp));
+		resp = RING_GET_RESPONSE(&blk_rings->x86_32,
+					 blk_rings->x86_32.rsp_prod_pvt);
 		break;
 	case BLKIF_PROTOCOL_X86_64:
-		memcpy(RING_GET_RESPONSE(&blk_rings->x86_64, blk_rings->x86_64.rsp_prod_pvt),
-		       &resp, sizeof(resp));
+		resp = RING_GET_RESPONSE(&blk_rings->x86_64,
+					 blk_rings->x86_64.rsp_prod_pvt);
 		break;
 	default:
 		BUG();
 	}
+
+	resp->id        = id;
+	resp->operation = op;
+	resp->status    = st;
+
 	blk_rings->common.rsp_prod_pvt++;
 	RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&blk_rings->common, notify);
 	spin_unlock_irqrestore(&blkif->blk_ring_lock, flags);
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -74,9 +74,8 @@ extern unsigned int xen_blkif_max_ring_o
 struct blkif_common_request {
 	char dummy;
 };
-struct blkif_common_response {
-	char dummy;
-};
+
+/* i386 protocol version */
 
 struct blkif_x86_32_request_rw {
 	uint8_t        nr_segments;  /* number of segments                   */
@@ -128,14 +127,6 @@ struct blkif_x86_32_request {
 	} u;
 } __attribute__((__packed__));
 
-/* i386 protocol version */
-#pragma pack(push, 4)
-struct blkif_x86_32_response {
-	uint64_t        id;              /* copied from request */
-	uint8_t         operation;       /* copied from request */
-	int16_t         status;          /* BLKIF_RSP_???       */
-};
-#pragma pack(pop)
 /* x86_64 protocol version */
 
 struct blkif_x86_64_request_rw {
@@ -192,18 +183,12 @@ struct blkif_x86_64_request {
 	} u;
 } __attribute__((__packed__));
 
-struct blkif_x86_64_response {
-	uint64_t       __attribute__((__aligned__(8))) id;
-	uint8_t         operation;       /* copied from request */
-	int16_t         status;          /* BLKIF_RSP_???       */
-};
-
 DEFINE_RING_TYPES(blkif_common, struct blkif_common_request,
-		  struct blkif_common_response);
+		  struct blkif_response);
 DEFINE_RING_TYPES(blkif_x86_32, struct blkif_x86_32_request,
-		  struct blkif_x86_32_response);
+		  struct blkif_response __packed);
 DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request,
-		  struct blkif_x86_64_response);
+		  struct blkif_response);
 
 union blkif_back_rings {
 	struct blkif_back_ring        native;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 07/59] sctp: do not peel off an assoc from one netns to another one
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 06/59] xen-blkback: dont leak stack data via response ring Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 10/59] [PATCH -stable] arm: crypto: reduce priority of bit-sliced AES cipher Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, ChunYu Wang, Xin Long,
	Marcelo Ricardo Leitner, Neil Horman, David S. Miller,
	Ben Hutchings

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Xin Long <lucien.xin@gmail.com>


commit df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 upstream.

Now when peeling off an association to the sock in another netns, all
transports in this assoc are not to be rehashed and keep use the old
key in hashtable.

As a transport uses sk->net as the hash key to insert into hashtable,
it would miss removing these transports from hashtable due to the new
netns when closing the sock and all transports are being freeed, then
later an use-after-free issue could be caused when looking up an asoc
and dereferencing those transports.

This is a very old issue since very beginning, ChunYu found it with
syzkaller fuzz testing with this series:

  socket$inet6_sctp()
  bind$inet6()
  sendto$inet6()
  unshare(0x40000000)
  getsockopt$inet_sctp6_SCTP_GET_ASSOC_ID_LIST()
  getsockopt$inet_sctp6_SCTP_SOCKOPT_PEELOFF()

This patch is to block this call when peeling one assoc off from one
netns to another one, so that the netns of all transport would not
go out-sync with the key in hashtable.

Note that this patch didn't fix it by rehashing transports, as it's
difficult to handle the situation when the tuple is already in use
in the new netns. Besides, no one would like to peel off one assoc
to another netns, considering ipaddrs, ifaces, etc. are usually
different.

Reported-by: ChunYu Wang <chunwang@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sctp/socket.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4453,6 +4453,10 @@ int sctp_do_peeloff(struct sock *sk, sct
 	struct socket *sock;
 	int err = 0;
 
+	/* Do not peel off from one netns to another one. */
+	if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
+		return -EINVAL;
+
 	if (!asoc)
 		return -EINVAL;
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 10/59] [PATCH -stable] arm: crypto: reduce priority of bit-sliced AES cipher
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 07/59] sctp: do not peel off an assoc from one netns to another one Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 11/59] Bluetooth: btusb: fix QCA Rome suspend/resume Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, Eric Biggers, Ard Biesheuvel

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Eric Biggers <ebiggers@google.com>

[ Not upstream because this is a minimal fix for a bug where arm32
  kernels can use a much slower implementation of AES than is actually
  available, potentially forcing vendors to disable encryption on their
  devices.]

All the aes-bs (bit-sliced) and aes-ce (cryptographic extensions)
algorithms had a priority of 300.  This is undesirable because it means
an aes-bs algorithm may be used when an aes-ce algorithm is available.
The aes-ce algorithms have much better performance (up to 10x faster).

Fix it by decreasing the priority of the aes-bs algorithms to 250.

This was fixed upstream by commit cc477bf64573 ("crypto: arm/aes -
replace bit-sliced OpenSSL NEON code"), but it was just a small part of
a complete rewrite.  This patch just fixes the priority bug for older
kernels.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm/crypto/aesbs-glue.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/arm/crypto/aesbs-glue.c
+++ b/arch/arm/crypto/aesbs-glue.c
@@ -357,7 +357,7 @@ static struct crypto_alg aesbs_algs[] =
 }, {
 	.cra_name		= "cbc(aes)",
 	.cra_driver_name	= "cbc-aes-neonbs",
-	.cra_priority		= 300,
+	.cra_priority		= 250,
 	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
 	.cra_blocksize		= AES_BLOCK_SIZE,
 	.cra_ctxsize		= sizeof(struct async_helper_ctx),
@@ -377,7 +377,7 @@ static struct crypto_alg aesbs_algs[] =
 }, {
 	.cra_name		= "ctr(aes)",
 	.cra_driver_name	= "ctr-aes-neonbs",
-	.cra_priority		= 300,
+	.cra_priority		= 250,
 	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
 	.cra_blocksize		= 1,
 	.cra_ctxsize		= sizeof(struct async_helper_ctx),
@@ -397,7 +397,7 @@ static struct crypto_alg aesbs_algs[] =
 }, {
 	.cra_name		= "xts(aes)",
 	.cra_driver_name	= "xts-aes-neonbs",
-	.cra_priority		= 300,
+	.cra_priority		= 250,
 	.cra_flags		= CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
 	.cra_blocksize		= AES_BLOCK_SIZE,
 	.cra_ctxsize		= sizeof(struct async_helper_ctx),

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 11/59] Bluetooth: btusb: fix QCA Rome suspend/resume
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 10/59] [PATCH -stable] arm: crypto: reduce priority of bit-sliced AES cipher Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 12/59] dmaengine: dmatest: warn user when dma test times out Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Leif Liddy, Marcel Holtmann, Kai Heng Feng

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Leif Liddy <leif.linux@gmail.com>

commit fd865802c66bc451dc515ed89360f84376ce1a56 upstream.

There's been numerous reported instances where BTUSB_QCA_ROME
bluetooth controllers stop functioning upon resume from suspend. These
devices seem to be losing power during suspend. Patch will detect a status
change on resume and perform a reset.

Signed-off-by: Leif Liddy <leif.linux@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bluetooth/btusb.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2969,6 +2969,12 @@ static int btusb_probe(struct usb_interf
 	if (id->driver_info & BTUSB_QCA_ROME) {
 		data->setup_on_usb = btusb_setup_qca;
 		hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
+
+		/* QCA Rome devices lose their updated firmware over suspend,
+		 * but the USB hub doesn't notice any status change.
+		 * Explicitly request a device reset on resume.
+		 */
+		set_bit(BTUSB_RESET_RESUME, &data->flags);
 	}
 
 #ifdef CONFIG_BT_HCIBTUSB_RTL

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 12/59] dmaengine: dmatest: warn user when dma test times out
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 11/59] Bluetooth: btusb: fix QCA Rome suspend/resume Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 13/59] extcon: palmas: Check the parent instance to prevent the NULL Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Adam Wallis, Vinod Koul

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Adam Wallis <awallis@codeaurora.org>

commit a9df21e34b422f79d9a9fa5c3eff8c2a53491be6 upstream.

Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()")
introduced a bug (that is in fact documented by the patch commit text)
that leaves behind a dangling pointer. Since the done_wait structure is
allocated on the stack, future invocations to the DMATEST can produce
undesirable results (e.g., corrupted spinlocks). Ideally, this would be
cleaned up in the thread handler, but at the very least, the kernel
is left in a very precarious scenario that can lead to some long debug
sessions when the crash comes later.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197605
Signed-off-by: Adam Wallis <awallis@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/dma/dmatest.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -634,6 +634,7 @@ static int dmatest_func(void *data)
 			 * free it this time?" dancing.  For now, just
 			 * leave it dangling.
 			 */
+			WARN(1, "dmatest: Kernel stack may be corrupted!!\n");
 			dmaengine_unmap_put(um);
 			result("test timed out", total_tests, src_off, dst_off,
 			       len, 0);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 13/59] extcon: palmas: Check the parent instance to prevent the NULL
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 12/59] dmaengine: dmatest: warn user when dma test times out Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 14/59] fm10k: request reset when mbx->state changes Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Roger Quadros, Chanwoo Choi, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Roger Quadros <rogerq@ti.com>


[ Upstream commit 9fe172b9be532acc23e35ba693700383ab775e66 ]

extcon-palmas must be child of palmas and expects parent's
drvdata to be valid. Check for non NULL parent drvdata and
fail if it is NULL. Not doing so will result in a NULL
pointer dereference later in the probe() parent drvdata
is NULL (e.g. misplaced extcon-palmas node in device tree).

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/extcon/extcon-palmas.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -190,6 +190,11 @@ static int palmas_usb_probe(struct platf
 	struct palmas_usb *palmas_usb;
 	int status;
 
+	if (!palmas) {
+		dev_err(&pdev->dev, "failed to get valid parent\n");
+		return -EINVAL;
+	}
+
 	palmas_usb = devm_kzalloc(&pdev->dev, sizeof(*palmas_usb), GFP_KERNEL);
 	if (!palmas_usb)
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 14/59] fm10k: request reset when mbx->state changes
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 13/59] extcon: palmas: Check the parent instance to prevent the NULL Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 15/59] ARM: dts: Fix compatible for ti81xx uarts for 8250 Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ngai-Mint Kwan, Jacob Keller,
	Krishneil Singh, Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>


[ Upstream commit 2f3fc1e6200309ccf87f61dea56e57e563c4f800 ]

Multiple IES API resets can cause a race condition where the mailbox
interrupt request bits can be cleared before being handled. This can
leave certain mailbox messages from the PF to be untreated and the PF
will enter in some inactive state. If this situation occurs, the IES API
will initiate a mailbox version reset which, then, trigger a mailbox
state change. Once this mailbox transition occurs (from OPEN to CONNECT
state), a request for reset will be returned.

This ensures that PF will undergo a reset whenever IES API encounters an
unknown global mailbox interrupt event or whenever the IES API
terminates.

Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/fm10k/fm10k_mbx.c |   10 +++++++---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c |    6 +++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -2002,9 +2002,10 @@ static void fm10k_sm_mbx_create_reply(st
  *  function can also be used to respond to an error as the connection
  *  resetting would also be a means of dealing with errors.
  **/
-static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
-				       struct fm10k_mbx_info *mbx)
+static s32 fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,
+				      struct fm10k_mbx_info *mbx)
 {
+	s32 err = 0;
 	const enum fm10k_mbx_state state = mbx->state;
 
 	switch (state) {
@@ -2017,6 +2018,7 @@ static void fm10k_sm_mbx_process_reset(s
 	case FM10K_STATE_OPEN:
 		/* flush any incomplete work */
 		fm10k_sm_mbx_connect_reset(mbx);
+		err = FM10K_ERR_RESET_REQUESTED;
 		break;
 	case FM10K_STATE_CONNECT:
 		/* Update remote value to match local value */
@@ -2026,6 +2028,8 @@ static void fm10k_sm_mbx_process_reset(s
 	}
 
 	fm10k_sm_mbx_create_reply(hw, mbx, mbx->tail);
+
+	return err;
 }
 
 /**
@@ -2106,7 +2110,7 @@ static s32 fm10k_sm_mbx_process(struct f
 
 	switch (FM10K_MSG_HDR_FIELD_GET(mbx->mbx_hdr, SM_VER)) {
 	case 0:
-		fm10k_sm_mbx_process_reset(hw, mbx);
+		err = fm10k_sm_mbx_process_reset(hw, mbx);
 		break;
 	case FM10K_SM_MBX_VERSION:
 		err = fm10k_sm_mbx_process_version_1(hw, mbx);
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1072,6 +1072,7 @@ static irqreturn_t fm10k_msix_mbx_pf(int
 	struct fm10k_hw *hw = &interface->hw;
 	struct fm10k_mbx_info *mbx = &hw->mbx;
 	u32 eicr;
+	s32 err = 0;
 
 	/* unmask any set bits related to this interrupt */
 	eicr = fm10k_read_reg(hw, FM10K_EICR);
@@ -1087,12 +1088,15 @@ static irqreturn_t fm10k_msix_mbx_pf(int
 
 	/* service mailboxes */
 	if (fm10k_mbx_trylock(interface)) {
-		mbx->ops.process(hw, mbx);
+		err = mbx->ops.process(hw, mbx);
 		/* handle VFLRE events */
 		fm10k_iov_event(interface);
 		fm10k_mbx_unlock(interface);
 	}
 
+	if (err == FM10K_ERR_RESET_REQUESTED)
+		interface->flags |= FM10K_FLAG_RESET_REQUESTED;
+
 	/* if switch toggled state we should reset GLORTs */
 	if (eicr & FM10K_EICR_SWITCHNOTREADY) {
 		/* force link down for at least 4 seconds */

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 15/59] ARM: dts: Fix compatible for ti81xx uarts for 8250
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 14/59] fm10k: request reset when mbx->state changes Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 16/59] ARM: dts: Fix am335x and dm814x scm syscon to probe children Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Lindgren <tony@atomide.com>


[ Upstream commit f62280efe8934a1275fd148ef302d1afec8cd3df ]

When using 8250_omap driver, we need to specify the right
compatible value for the UART to work on dm814x and dm816x.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/dts/dm814x.dtsi |    6 +++---
 arch/arm/boot/dts/dm816x.dtsi |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

--- a/arch/arm/boot/dts/dm814x.dtsi
+++ b/arch/arm/boot/dts/dm814x.dtsi
@@ -138,7 +138,7 @@
 			};
 
 			uart1: uart@20000 {
-				compatible = "ti,omap3-uart";
+				compatible = "ti,am3352-uart", "ti,omap3-uart";
 				ti,hwmods = "uart1";
 				reg = <0x20000 0x2000>;
 				clock-frequency = <48000000>;
@@ -148,7 +148,7 @@
 			};
 
 			uart2: uart@22000 {
-				compatible = "ti,omap3-uart";
+				compatible = "ti,am3352-uart", "ti,omap3-uart";
 				ti,hwmods = "uart2";
 				reg = <0x22000 0x2000>;
 				clock-frequency = <48000000>;
@@ -158,7 +158,7 @@
 			};
 
 			uart3: uart@24000 {
-				compatible = "ti,omap3-uart";
+				compatible = "ti,am3352-uart", "ti,omap3-uart";
 				ti,hwmods = "uart3";
 				reg = <0x24000 0x2000>;
 				clock-frequency = <48000000>;
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -347,7 +347,7 @@
 		};
 
 		uart1: uart@48020000 {
-			compatible = "ti,omap3-uart";
+			compatible = "ti,am3352-uart", "ti,omap3-uart";
 			ti,hwmods = "uart1";
 			reg = <0x48020000 0x2000>;
 			clock-frequency = <48000000>;
@@ -357,7 +357,7 @@
 		};
 
 		uart2: uart@48022000 {
-			compatible = "ti,omap3-uart";
+			compatible = "ti,am3352-uart", "ti,omap3-uart";
 			ti,hwmods = "uart2";
 			reg = <0x48022000 0x2000>;
 			clock-frequency = <48000000>;
@@ -367,7 +367,7 @@
 		};
 
 		uart3: uart@48024000 {
-			compatible = "ti,omap3-uart";
+			compatible = "ti,am3352-uart", "ti,omap3-uart";
 			ti,hwmods = "uart3";
 			reg = <0x48024000 0x2000>;
 			clock-frequency = <48000000>;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 16/59] ARM: dts: Fix am335x and dm814x scm syscon to probe children
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 15/59] ARM: dts: Fix compatible for ti81xx uarts for 8250 Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 17/59] ARM: OMAP2+: Fix init for multiple quirks for the same SoC Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Lindgren <tony@atomide.com>


[ Upstream commit 1aa09df0854efe16b7a80358a18f0a0bebafd246 ]

Without these changes children of the scn syscon
won't probe.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/dts/am33xx.dtsi |    3 ++-
 arch/arm/boot/dts/dm814x.dtsi |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -142,10 +142,11 @@
 				};
 
 				scm_conf: scm_conf@0 {
-					compatible = "syscon";
+					compatible = "syscon", "simple-bus";
 					reg = <0x0 0x800>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0 0x800>;
 
 					scm_clocks: clocks {
 						#address-cells = <1>;
--- a/arch/arm/boot/dts/dm814x.dtsi
+++ b/arch/arm/boot/dts/dm814x.dtsi
@@ -189,10 +189,11 @@
 				ranges = <0 0x160000 0x16d000>;
 
 				scm_conf: scm_conf@0 {
-					compatible = "syscon";
+					compatible = "syscon", "simple-bus";
 					reg = <0x0 0x800>;
 					#address-cells = <1>;
 					#size-cells = <1>;
+					ranges = <0 0 0x800>;
 
 					scm_clocks: clocks {
 						#address-cells = <1>;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 17/59] ARM: OMAP2+: Fix init for multiple quirks for the same SoC
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 16/59] ARM: dts: Fix am335x and dm814x scm syscon to probe children Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 18/59] ARM: dts: Fix omap3 off mode pull defines Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Lindgren <tony@atomide.com>


[ Upstream commit 6e613ebf4405fc09e2a8c16ed193b47f80a3cbed ]

It's possible that there are multiple quirks that need to be initialized
for the same SoC. Fix the issue by not returning on the first match.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/mach-omap2/pdata-quirks.c |    1 -
 1 file changed, 1 deletion(-)

--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -522,7 +522,6 @@ static void pdata_quirks_check(struct pd
 		if (of_machine_is_compatible(quirks->compatible)) {
 			if (quirks->fn)
 				quirks->fn();
-			break;
 		}
 		quirks++;
 	}

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 18/59] ARM: dts: Fix omap3 off mode pull defines
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 17/59] ARM: OMAP2+: Fix init for multiple quirks for the same SoC Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 19/59] ata: ATA_BMDMA should depend on HAS_DMA Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Lindgren <tony@atomide.com>


[ Upstream commit d97556c8012015901a3ce77f46960078139cd79d ]

We need to also have OFFPULLUDENABLE bit set to use the off mode pull values.
Otherwise the line is pulled down internally if no external pull exists.

This is has some documentation at:

http://processors.wiki.ti.com/index.php/Optimizing_OMAP35x_and_AM/DM37x_OFF_mode_PAD_configuration

Note that the value is still glitchy during off mode transitions as documented
in spz319f.pdf "Advisory 1.45". It's best to use external pulls instead of
relying on the internal ones for off mode and even then anything pulled up
will get driven down momentarily on off mode restore for GPIO banks other
than bank1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/dt-bindings/pinctrl/omap.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/dt-bindings/pinctrl/omap.h
+++ b/include/dt-bindings/pinctrl/omap.h
@@ -45,8 +45,8 @@
 #define PIN_OFF_NONE		0
 #define PIN_OFF_OUTPUT_HIGH	(OFF_EN | OFFOUT_EN | OFFOUT_VAL)
 #define PIN_OFF_OUTPUT_LOW	(OFF_EN | OFFOUT_EN)
-#define PIN_OFF_INPUT_PULLUP	(OFF_EN | OFF_PULL_EN | OFF_PULL_UP)
-#define PIN_OFF_INPUT_PULLDOWN	(OFF_EN | OFF_PULL_EN)
+#define PIN_OFF_INPUT_PULLUP	(OFF_EN | OFFOUT_EN | OFF_PULL_EN | OFF_PULL_UP)
+#define PIN_OFF_INPUT_PULLDOWN	(OFF_EN | OFFOUT_EN | OFF_PULL_EN)
 #define PIN_OFF_WAKEUPENABLE	WAKEUP_EN
 
 /*

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 19/59] ata: ATA_BMDMA should depend on HAS_DMA
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 18/59] ARM: dts: Fix omap3 off mode pull defines Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 20/59] ata: SATA_HIGHBANK " Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Tejun Heo, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert@linux-m68k.org>


[ Upstream commit 7bc7ab1e63dfe004931502f90ce7020e375623da ]

If NO_DMA=y:

    ERROR: "dmam_alloc_coherent" [drivers/ata/libata.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/ata/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -272,6 +272,7 @@ config SATA_SX4
 
 config ATA_BMDMA
 	bool "ATA BMDMA support"
+	depends on HAS_DMA
 	default y
 	help
 	  This option adds support for SFF ATA controllers with BMDMA

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 20/59] ata: SATA_HIGHBANK should depend on HAS_DMA
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 19/59] ata: ATA_BMDMA should depend on HAS_DMA Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 21/59] ata: SATA_MV " Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Tejun Heo, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert@linux-m68k.org>


[ Upstream commit 2a736e0585e585c2566b5119af8381910a170e44 ]

If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/ata/sata_highbank.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/ata/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -319,6 +319,7 @@ config SATA_DWC_VDEBUG
 
 config SATA_HIGHBANK
 	tristate "Calxeda Highbank SATA support"
+	depends on HAS_DMA
 	depends on ARCH_HIGHBANK || COMPILE_TEST
 	help
 	  This option enables support for the Calxeda Highbank SoC's

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 21/59] ata: SATA_MV should depend on HAS_DMA
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 20/59] ata: SATA_HIGHBANK " Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 22/59] drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Tejun Heo, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert@linux-m68k.org>


[ Upstream commit 62989cebd367a1aae1e009e1a5b1ec046a4c8fdc ]

If NO_DMA=y:

    ERROR: "dma_pool_alloc" [drivers/ata/sata_mv.ko] undefined!
    ERROR: "dmam_pool_create" [drivers/ata/sata_mv.ko] undefined!
    ERROR: "dma_pool_free" [drivers/ata/sata_mv.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/ata/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -329,6 +329,7 @@ config SATA_HIGHBANK
 
 config SATA_MV
 	tristate "Marvell SATA support"
+	depends on HAS_DMA
 	depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
 		   ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
 	select GENERIC_PHY

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 22/59] drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 21/59] ata: SATA_MV " Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 23/59] igb: reset the PHY before reading the PHY ID Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arvind Yadav, Vincent Abriou, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Arvind Yadav <arvind.yadav.cs@gmail.com>


[ Upstream commit 1ae0d5af347df224a6e76334683f13a96d915a44 ]

Here, If devm_ioremap_nocache will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference. This error check
will avoid NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/sti/sti_vtg.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -346,6 +346,10 @@ static int vtg_probe(struct platform_dev
 		return -ENOMEM;
 	}
 	vtg->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
+	if (!vtg->regs) {
+		DRM_ERROR("failed to remap I/O memory\n");
+		return -ENOMEM;
+	}
 
 	np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
 	if (np) {

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 23/59] igb: reset the PHY before reading the PHY ID
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 22/59] drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 24/59] igb: close/suspend race in netif_device_detach Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matwey V. Kornilov, Chris Arges,
	Jochen Henneberg, Aaron Sierra, Chris J Arges, Aaron Brown,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Aaron Sierra <asierra@xes-inc.com>


[ Upstream commit 182785335447957409282ca745aa5bc3968facee ]

Several people have reported firmware leaving the I210/I211 PHY's page
select register set to something other than the default of zero. This
causes the first accesses, PHY_IDx register reads, to access something
else, resulting in device probe failure:

    igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
    igb: Copyright (c) 2007-2014 Intel Corporation.
    igb: probe of 0000:01:00.0 failed with error -2

This problem began for them after a previous patch I submitted was
applied:

    commit 2a3cdead8b408351fa1e3079b220fa331480ffbc
    Author: Aaron Sierra <asierra@xes-inc.com>
    Date:   Tue Nov 3 12:37:09 2015 -0600

        igb: Remove GS40G specific defines/functions

I personally experienced this problem after attempting to PXE boot from
I210 devices using this firmware:

    Intel(R) Boot Agent GE v1.5.78
    Copyright (C) 1997-2014, Intel Corporation

Resetting the PHY before reading from it, ensures the page select
register is in its default state and doesn't make assumptions about
the PHY's register set before the PHY has been probed.

Cc: Matwey V. Kornilov <matwey@sai.msu.ru>
Cc: Chris Arges <carges@vectranetworks.com>
Cc: Jochen Henneberg <jh@henneberg-systemdesign.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Tested-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Tested-by: Chris J Arges <christopherarges@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/igb/e1000_82575.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -223,6 +223,17 @@ static s32 igb_init_phy_params_82575(str
 	hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
 			E1000_STATUS_FUNC_SHIFT;
 
+	/* Make sure the PHY is in a good state. Several people have reported
+	 * firmware leaving the PHY's page select register set to something
+	 * other than the default of zero, which causes the PHY ID read to
+	 * access something other than the intended register.
+	 */
+	ret_val = hw->phy.ops.reset(hw);
+	if (ret_val) {
+		hw_dbg("Error resetting the PHY.\n");
+		goto out;
+	}
+
 	/* Set phy->phy_addr and phy->id. */
 	ret_val = igb_get_phy_id_82575(hw);
 	if (ret_val)

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 24/59] igb: close/suspend race in netif_device_detach
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 23/59] igb: reset the PHY before reading the PHY ID Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 25/59] igb: Fix hw_dbg logging in igb_update_flash_i210 Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Todd Fujinaka, Alexander Duyck,
	Aaron Brown, Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Todd Fujinaka <todd.fujinaka@intel.com>


[ Upstream commit 9474933caf21a4cb5147223dca1551f527aaac36 ]

Similar to ixgbe, when an interface is part of a namespace it is
possible that igb_close() may be called while __igb_shutdown() is
running which ends up in a double free WARN and/or a BUG in
free_msi_irqs().

Extend the rtnl_lock() to protect the call to netif_device_detach() and
igb_clear_interrupt_scheme() in __igb_shutdown() and check for
netif_device_present() to avoid calling igb_clear_interrupt_scheme() a
second time in igb_close().

Also extend the rtnl lock in igb_resume() to netif_device_attach().

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/igb/igb_main.c |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3172,7 +3172,9 @@ static int __igb_close(struct net_device
 
 static int igb_close(struct net_device *netdev)
 {
-	return __igb_close(netdev, false);
+	if (netif_device_present(netdev))
+		return __igb_close(netdev, false);
+	return 0;
 }
 
 /**
@@ -7325,12 +7327,14 @@ static int __igb_shutdown(struct pci_dev
 	int retval = 0;
 #endif
 
+	rtnl_lock();
 	netif_device_detach(netdev);
 
 	if (netif_running(netdev))
 		__igb_close(netdev, true);
 
 	igb_clear_interrupt_scheme(adapter);
+	rtnl_unlock();
 
 #ifdef CONFIG_PM
 	retval = pci_save_state(pdev);
@@ -7450,16 +7454,15 @@ static int igb_resume(struct device *dev
 
 	wr32(E1000_WUS, ~0);
 
-	if (netdev->flags & IFF_UP) {
-		rtnl_lock();
+	rtnl_lock();
+	if (!err && netif_running(netdev))
 		err = __igb_open(netdev, true);
-		rtnl_unlock();
-		if (err)
-			return err;
-	}
 
-	netif_device_attach(netdev);
-	return 0;
+	if (!err)
+		netif_device_attach(netdev);
+	rtnl_unlock();
+
+	return err;
 }
 
 static int igb_runtime_idle(struct device *dev)

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 25/59] igb: Fix hw_dbg logging in igb_update_flash_i210
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 24/59] igb: close/suspend race in netif_device_detach Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 26/59] scsi: ufs-qcom: Fix module autoload Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hannu Lounento, Peter Senna Tschudin,
	Aaron Brown, Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Hannu Lounento <hannu.lounento@ge.com>


[ Upstream commit 76ed5a8f47476e4984cc8c0c1bc4cee62650f7fd ]

Fix an if statement with hw_dbg lines where the logic was inverted with
regards to the corresponding return value used in the if statement.

Signed-off-by: Hannu Lounento <hannu.lounento@ge.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/igb/e1000_i210.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
@@ -699,9 +699,9 @@ static s32 igb_update_flash_i210(struct
 
 	ret_val = igb_pool_flash_update_done_i210(hw);
 	if (ret_val)
-		hw_dbg("Flash update complete\n");
-	else
 		hw_dbg("Flash update time out\n");
+	else
+		hw_dbg("Flash update complete\n");
 
 out:
 	return ret_val;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 26/59] scsi: ufs-qcom: Fix module autoload
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 25/59] igb: Fix hw_dbg logging in igb_update_flash_i210 Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 27/59] scsi: ufs: add capability to keep auto bkops always enabled Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Javier Martinez Canillas,
	Subhash Jadavani, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Javier Martinez Canillas <javier@osg.samsung.com>


[ Upstream commit ab3dabb3e8cf077850f20610f73a0def1fed10cb ]

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/scsi/ufs/ufs-qcom.ko | grep alias
$

After this patch:

$ modinfo drivers/scsi/ufs/ufs-qcom.ko | grep alias
alias:          of:N*T*Cqcom,ufshcC*
alias:          of:N*T*Cqcom,ufshc

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/ufs/ufs-qcom.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -1552,6 +1552,7 @@ static const struct of_device_id ufs_qco
 	{ .compatible = "qcom,ufshc"},
 	{},
 };
+MODULE_DEVICE_TABLE(of, ufs_qcom_of_match);
 
 static const struct dev_pm_ops ufs_qcom_pm_ops = {
 	.suspend	= ufshcd_pltfrm_suspend,

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 27/59] scsi: ufs: add capability to keep auto bkops always enabled
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 26/59] scsi: ufs-qcom: Fix module autoload Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 28/59] staging: rtl8188eu: fix incorrect ERROR tags from logs Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sahitya Tummala, Subhash Jadavani,
	Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: "subhashj@codeaurora.org" <subhashj@codeaurora.org>


[ Upstream commit 4e768e7645ec4ffa92ee163643777b261ae97142 ]

UFS device requires to perform bkops (back ground operations) periodically
but host can control (via auto-bkops parameter of device) when device can
perform bkops based on its performance requirements. In general, host
would like to enable the device's auto-bkops only when it's not doing any
regular data transfer but sometimes device may not behave properly if host
keeps the auto-bkops disabled. This change adds the capability to let the
device auto-bkops always enabled except suspend.

Reviewed-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/ufs/ufshcd.c |   33 ++++++++++++++++++++++-----------
 drivers/scsi/ufs/ufshcd.h |   13 +++++++++++++
 2 files changed, 35 insertions(+), 11 deletions(-)

--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -3340,18 +3340,25 @@ out:
 }
 
 /**
- * ufshcd_force_reset_auto_bkops - force enable of auto bkops
+ * ufshcd_force_reset_auto_bkops - force reset auto bkops state
  * @hba: per adapter instance
  *
  * After a device reset the device may toggle the BKOPS_EN flag
  * to default value. The s/w tracking variables should be updated
- * as well. Do this by forcing enable of auto bkops.
+ * as well. This function would change the auto-bkops state based on
+ * UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND.
  */
-static void  ufshcd_force_reset_auto_bkops(struct ufs_hba *hba)
+static void ufshcd_force_reset_auto_bkops(struct ufs_hba *hba)
 {
-	hba->auto_bkops_enabled = false;
-	hba->ee_ctrl_mask |= MASK_EE_URGENT_BKOPS;
-	ufshcd_enable_auto_bkops(hba);
+	if (ufshcd_keep_autobkops_enabled_except_suspend(hba)) {
+		hba->auto_bkops_enabled = false;
+		hba->ee_ctrl_mask |= MASK_EE_URGENT_BKOPS;
+		ufshcd_enable_auto_bkops(hba);
+	} else {
+		hba->auto_bkops_enabled = true;
+		hba->ee_ctrl_mask &= ~MASK_EE_URGENT_BKOPS;
+		ufshcd_disable_auto_bkops(hba);
+	}
 }
 
 static inline int ufshcd_get_bkops_status(struct ufs_hba *hba, u32 *status)
@@ -5149,11 +5156,15 @@ static int ufshcd_resume(struct ufs_hba
 			goto set_old_link_state;
 	}
 
-	/*
-	 * If BKOPs operations are urgently needed at this moment then
-	 * keep auto-bkops enabled or else disable it.
-	 */
-	ufshcd_urgent_bkops(hba);
+	if (ufshcd_keep_autobkops_enabled_except_suspend(hba))
+		ufshcd_enable_auto_bkops(hba);
+	else
+		/*
+		 * If BKOPs operations are urgently needed at this moment then
+		 * keep auto-bkops enabled or else disable it.
+		 */
+		ufshcd_urgent_bkops(hba);
+
 	hba->clk_gating.is_suspended = false;
 
 	if (ufshcd_is_clkscaling_enabled(hba))
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -528,6 +528,14 @@ struct ufs_hba {
 	 * CAUTION: Enabling this might reduce overall UFS throughput.
 	 */
 #define UFSHCD_CAP_INTR_AGGR (1 << 4)
+	/*
+	 * This capability allows the device auto-bkops to be always enabled
+	 * except during suspend (both runtime and suspend).
+	 * Enabling this capability means that device will always be allowed
+	 * to do background operation when it's active but it might degrade
+	 * the performance of ongoing read/write operations.
+	 */
+#define UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND (1 << 5)
 
 	struct devfreq *devfreq;
 	struct ufs_clk_scaling clk_scaling;
@@ -623,6 +631,11 @@ static inline void *ufshcd_get_variant(s
 	BUG_ON(!hba);
 	return hba->priv;
 }
+static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
+							struct ufs_hba *hba)
+{
+	return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
+}
 
 extern int ufshcd_runtime_suspend(struct ufs_hba *hba);
 extern int ufshcd_runtime_resume(struct ufs_hba *hba);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 28/59] staging: rtl8188eu: fix incorrect ERROR tags from logs
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 27/59] scsi: ufs: add capability to keep auto bkops always enabled Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 29/59] scsi: lpfc: Add missing memory barrier Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Galo Navarro, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Galo Navarro <anglorvaroa@gmail.com>


[ Upstream commit 401579c22ccbcb54244494069973e64b1fe980d2 ]

Several lifecycle events in the rtl8188eu driver are logged using the
DBG_88E_LEVEL macro from rtw_debug.h, which is tagged as ERROR
regardless of the actual level.  Below are dmesg excerpts after loading
and unloading the module, the messages are misleading as there was no
error.

    [517434.916239] usbcore: registered new interface driver r8188eu
    [517435.680653] R8188EU: ERROR indicate disassoc
    [517437.122606] R8188EU: ERROR assoc success
    [517797.735611] usbcore: deregistering interface driver r8188eu
    [517797.736069] R8188EU: ERROR indicate disassoc

Remove the ERROR prefix from the logs.  After the patch, logs are:

    [517949.873976] usbcore: registered new interface driver r8188eu
    [517950.592845] R8188EU: indicate disassoc
    [517951.993973] R8188EU: assoc success
    [521778.784448] usbcore: deregistering interface driver r8188eu
    [521778.784838] R8188EU: indicate disassoc

Signed-off-by: Galo Navarro <anglorvaroa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rtl8188eu/include/rtw_debug.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/rtl8188eu/include/rtw_debug.h
+++ b/drivers/staging/rtl8188eu/include/rtw_debug.h
@@ -75,7 +75,7 @@ extern u32 GlobalDebugLevel;
 #define DBG_88E_LEVEL(_level, fmt, arg...)				\
 	do {								\
 		if (_level <= GlobalDebugLevel)				\
-			pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg);	\
+			pr_info(DRIVER_PREFIX fmt, ##arg);	\
 	} while (0)
 
 #define DBG_88E(...)							\

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 29/59] scsi: lpfc: Add missing memory barrier
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 28/59] staging: rtl8188eu: fix incorrect ERROR tags from logs Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 30/59] scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dick Kennedy, James Smart,
	Hannes Reinecke, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@broadcom.com>


[ Upstream commit 6b3b3bdb83b4ad51252d21bb13596db879e51850 ]

On loosely ordered memory systems (PPC for example), the WQE elements
were being updated in memory, but not necessarily flushed before the
separate doorbell was written to hw which would cause hw to dma the
WQE element. Thus, the hardware occasionally received partially
updated WQE data.

Add the memory barrier after updating the WQE memory.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_sli.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -118,6 +118,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, u
 	if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED)
 		bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id);
 	lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size);
+	/* ensure WQE bcopy flushed before doorbell write */
+	wmb();
 
 	/* Update the host index before invoking device */
 	host_index = q->host_index;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 30/59] scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 29/59] scsi: lpfc: Add missing memory barrier Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 31/59] scsi: lpfc: Correct host name in symbolic_name field Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dick Kennedy, James Smart,
	Hannes Reinecke, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@broadcom.com>


[ Upstream commit 104450eb08ca662e6b1d02da11aca9598e978f3e ]

FCoE VPort enable-disable does not bring up the VPort.
VPI structure needed to be initialized before being re-registered.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_vport.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -528,6 +528,12 @@ enable_vport(struct fc_vport *fc_vport)
 
 	spin_lock_irq(shost->host_lock);
 	vport->load_flag |= FC_LOADING;
+	if (vport->fc_flag & FC_VPORT_NEEDS_INIT_VPI) {
+		spin_unlock_irq(shost->host_lock);
+		lpfc_issue_init_vpi(vport);
+		goto out;
+	}
+
 	vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
 	spin_unlock_irq(shost->host_lock);
 
@@ -548,6 +554,8 @@ enable_vport(struct fc_vport *fc_vport)
 	} else {
 		lpfc_vport_set_state(vport, FC_VPORT_FAILED);
 	}
+
+out:
 	lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
 			 "1827 Vport Enabled.\n");
 	return VPORT_OK;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 31/59] scsi: lpfc: Correct host name in symbolic_name field
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 30/59] scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 32/59] scsi: lpfc: Correct issue leading to oops during link reset Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dick Kennedy, James Smart,
	Hannes Reinecke, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@broadcom.com>


[ Upstream commit 6c9231f604c2575be24c96d38deb70f145172f92 ]

Correct host name in symbolic_name field of nameserver registrations

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_attr.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -5148,6 +5148,19 @@ lpfc_free_sysfs_attr(struct lpfc_vport *
  */
 
 /**
+ * lpfc_get_host_symbolic_name - Copy symbolic name into the scsi host
+ * @shost: kernel scsi host pointer.
+ **/
+static void
+lpfc_get_host_symbolic_name(struct Scsi_Host *shost)
+{
+	struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
+
+	lpfc_vport_symbolic_node_name(vport, fc_host_symbolic_name(shost),
+				      sizeof fc_host_symbolic_name(shost));
+}
+
+/**
  * lpfc_get_host_port_id - Copy the vport DID into the scsi host port id
  * @shost: kernel scsi host pointer.
  **/
@@ -5684,6 +5697,8 @@ struct fc_function_template lpfc_transpo
 	.show_host_supported_fc4s = 1,
 	.show_host_supported_speeds = 1,
 	.show_host_maxframe_size = 1,
+
+	.get_host_symbolic_name = lpfc_get_host_symbolic_name,
 	.show_host_symbolic_name = 1,
 
 	/* dynamic attributes the driver supports */
@@ -5751,6 +5766,8 @@ struct fc_function_template lpfc_vport_t
 	.show_host_supported_fc4s = 1,
 	.show_host_supported_speeds = 1,
 	.show_host_maxframe_size = 1,
+
+	.get_host_symbolic_name = lpfc_get_host_symbolic_name,
 	.show_host_symbolic_name = 1,
 
 	/* dynamic attributes the driver supports */

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 32/59] scsi: lpfc: Correct issue leading to oops during link reset
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 31/59] scsi: lpfc: Correct host name in symbolic_name field Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 33/59] scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dick Kennedy, James Smart,
	Hannes Reinecke, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@broadcom.com>


[ Upstream commit e6c6acc0e0223ddaf867628d420ee196349c6fae ]

Correct issue leading to oops during link reset. Missing vport pointer.

[mkp: fixed typo]

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_sli.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -9807,6 +9807,7 @@ lpfc_sli_abort_iotag_issue(struct lpfc_h
 		iabt->ulpCommand = CMD_CLOSE_XRI_CN;
 
 	abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl;
+	abtsiocbp->vport = vport;
 
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_SLI,
 			 "0339 Abort xri x%x, original iotag x%x, "

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 33/59] scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 32/59] scsi: lpfc: Correct issue leading to oops during link reset Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 34/59] ALSA: vx: Dont try to update capture stream before running Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dick Kennedy, James Smart,
	Hannes Reinecke, Martin K. Petersen, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@broadcom.com>


[ Upstream commit e0165f20447c8ca1d367725ee94d8ec9f38ca275 ]

Clear the VendorVersion in the PLOGI/PLOGI ACC payload

Vendor version info may have been set on fabric login. Before sending
PLOGI payloads, ensure that it's cleared.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_els.c |    6 ++++++
 drivers/scsi/lpfc/lpfc_hw.h  |    6 ++++++
 2 files changed, 12 insertions(+)

--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -1982,6 +1982,9 @@ lpfc_issue_els_plogi(struct lpfc_vport *
 	if (sp->cmn.fcphHigh < FC_PH3)
 		sp->cmn.fcphHigh = FC_PH3;
 
+	sp->cmn.valid_vendor_ver_level = 0;
+	memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
+
 	lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
 		"Issue PLOGI:     did:x%x",
 		did, 0, 0);
@@ -3966,6 +3969,9 @@ lpfc_els_rsp_acc(struct lpfc_vport *vpor
 		} else {
 			memcpy(pcmd, &vport->fc_sparam,
 			       sizeof(struct serv_parm));
+
+			sp->cmn.valid_vendor_ver_level = 0;
+			memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
 		}
 
 		lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP,
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -360,6 +360,12 @@ struct csp {
  * Word 1 Bit 30 in PLOGI request is random offset
  */
 #define virtual_fabric_support randomOffset /* Word 1, bit 30 */
+/*
+ * Word 1 Bit 29 in common service parameter is overloaded.
+ * Word 1 Bit 29 in FLOGI response is multiple NPort assignment
+ * Word 1 Bit 29 in FLOGI/PLOGI request is Valid Vendor Version Level
+ */
+#define valid_vendor_ver_level response_multiple_NPort /* Word 1, bit 29 */
 #ifdef __BIG_ENDIAN_BITFIELD
 	uint16_t request_multiple_Nport:1;	/* FC Word 1, bit 31 */
 	uint16_t randomOffset:1;	/* FC Word 1, bit 30 */

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 34/59] ALSA: vx: Dont try to update capture stream before running
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 33/59] scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 35/59] ALSA: vx: Fix possible transfer overflow Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>


[ Upstream commit ed3c177d960bb5881b945ca6f784868126bb90db ]

The update of stream costs significantly, and we should avoid it
unless the stream really has started.  Check pipe->running flag
instead of pipe->prepared.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/drivers/vx/vx_pcm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -1015,7 +1015,7 @@ static void vx_pcm_capture_update(struct
 	int size, space, count;
 	struct snd_pcm_runtime *runtime = subs->runtime;
 
-	if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
+	if (!pipe->running || (chip->chip_status & VX_STAT_IS_STALE))
 		return;
 
 	size = runtime->buffer_size - snd_pcm_capture_avail(runtime);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 35/59] ALSA: vx: Fix possible transfer overflow
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 34/59] ALSA: vx: Dont try to update capture stream before running Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 37/59] backlight: adp5520: Fix error handling in adp5520_bl_probe() Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>


[ Upstream commit 874e1f6fad9a5184b67f4cee37c1335cd2cc5677 ]

The pseudo DMA transfer codes in VX222 and VX-pocket driver have a
slight bug where they check the buffer boundary wrongly, and may
overflow.  Also, the zero sample count might be handled badly for the
playback (although it shouldn't happen in theory).  This patch
addresses these issues.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=141541
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/drivers/vx/vx_pcm.c   |    6 ++++--
 sound/pci/vx222/vx222_ops.c |   12 ++++++------
 sound/pcmcia/vx/vxp_ops.c   |   12 ++++++------
 3 files changed, 16 insertions(+), 14 deletions(-)

--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -1048,8 +1048,10 @@ static void vx_pcm_capture_update(struct
 		/* ok, let's accelerate! */
 		int align = pipe->align * 3;
 		space = (count / align) * align;
-		vx_pseudo_dma_read(chip, runtime, pipe, space);
-		count -= space;
+		if (space > 0) {
+			vx_pseudo_dma_read(chip, runtime, pipe, space);
+			count -= space;
+		}
 	}
 	/* read the rest of bytes */
 	while (count > 0) {
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -269,12 +269,12 @@ static void vx2_dma_write(struct vx_core
 
 	/* Transfer using pseudo-dma.
 	 */
-	if (offset + count > pipe->buffer_bytes) {
+	if (offset + count >= pipe->buffer_bytes) {
 		int length = pipe->buffer_bytes - offset;
 		count -= length;
 		length >>= 2; /* in 32bit words */
 		/* Transfer using pseudo-dma. */
-		while (length-- > 0) {
+		for (; length > 0; length--) {
 			outl(cpu_to_le32(*addr), port);
 			addr++;
 		}
@@ -284,7 +284,7 @@ static void vx2_dma_write(struct vx_core
 	pipe->hw_ptr += count;
 	count >>= 2; /* in 32bit words */
 	/* Transfer using pseudo-dma. */
-	while (count-- > 0) {
+	for (; count > 0; count--) {
 		outl(cpu_to_le32(*addr), port);
 		addr++;
 	}
@@ -307,12 +307,12 @@ static void vx2_dma_read(struct vx_core
 	vx2_setup_pseudo_dma(chip, 0);
 	/* Transfer using pseudo-dma.
 	 */
-	if (offset + count > pipe->buffer_bytes) {
+	if (offset + count >= pipe->buffer_bytes) {
 		int length = pipe->buffer_bytes - offset;
 		count -= length;
 		length >>= 2; /* in 32bit words */
 		/* Transfer using pseudo-dma. */
-		while (length-- > 0)
+		for (; length > 0; length--)
 			*addr++ = le32_to_cpu(inl(port));
 		addr = (u32 *)runtime->dma_area;
 		pipe->hw_ptr = 0;
@@ -320,7 +320,7 @@ static void vx2_dma_read(struct vx_core
 	pipe->hw_ptr += count;
 	count >>= 2; /* in 32bit words */
 	/* Transfer using pseudo-dma. */
-	while (count-- > 0)
+	for (; count > 0; count--)
 		*addr++ = le32_to_cpu(inl(port));
 
 	vx2_release_pseudo_dma(chip);
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -369,12 +369,12 @@ static void vxp_dma_write(struct vx_core
 	unsigned short *addr = (unsigned short *)(runtime->dma_area + offset);
 
 	vx_setup_pseudo_dma(chip, 1);
-	if (offset + count > pipe->buffer_bytes) {
+	if (offset + count >= pipe->buffer_bytes) {
 		int length = pipe->buffer_bytes - offset;
 		count -= length;
 		length >>= 1; /* in 16bit words */
 		/* Transfer using pseudo-dma. */
-		while (length-- > 0) {
+		for (; length > 0; length--) {
 			outw(cpu_to_le16(*addr), port);
 			addr++;
 		}
@@ -384,7 +384,7 @@ static void vxp_dma_write(struct vx_core
 	pipe->hw_ptr += count;
 	count >>= 1; /* in 16bit words */
 	/* Transfer using pseudo-dma. */
-	while (count-- > 0) {
+	for (; count > 0; count--) {
 		outw(cpu_to_le16(*addr), port);
 		addr++;
 	}
@@ -411,12 +411,12 @@ static void vxp_dma_read(struct vx_core
 	if (snd_BUG_ON(count % 2))
 		return;
 	vx_setup_pseudo_dma(chip, 0);
-	if (offset + count > pipe->buffer_bytes) {
+	if (offset + count >= pipe->buffer_bytes) {
 		int length = pipe->buffer_bytes - offset;
 		count -= length;
 		length >>= 1; /* in 16bit words */
 		/* Transfer using pseudo-dma. */
-		while (length-- > 0)
+		for (; length > 0; length--)
 			*addr++ = le16_to_cpu(inw(port));
 		addr = (unsigned short *)runtime->dma_area;
 		pipe->hw_ptr = 0;
@@ -424,7 +424,7 @@ static void vxp_dma_read(struct vx_core
 	pipe->hw_ptr += count;
 	count >>= 1; /* in 16bit words */
 	/* Transfer using pseudo-dma. */
-	while (count-- > 1)
+	for (; count > 1; count--)
 		*addr++ = le16_to_cpu(inw(port));
 	/* Disable DMA */
 	pchip->regDIALOG &= ~VXP_DLG_DMAREAD_SEL_MASK;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 37/59] backlight: adp5520: Fix error handling in adp5520_bl_probe()
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 35/59] ALSA: vx: Fix possible transfer overflow Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 38/59] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexey Khoroshilov,
	Michael Hennerich, Lee Jones, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Alexey Khoroshilov <khoroshilov@ispras.ru>


[ Upstream commit 0eb3fba8c68275f0122f65f7316efaaf86448016 ]

If adp5520_bl_setup() fails, sysfs group left unremoved.

By the way, fix overcomplicated assignement of error code.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/video/backlight/adp5520_bl.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/video/backlight/adp5520_bl.c
+++ b/drivers/video/backlight/adp5520_bl.c
@@ -332,10 +332,18 @@ static int adp5520_bl_probe(struct platf
 	}
 
 	platform_set_drvdata(pdev, bl);
-	ret |= adp5520_bl_setup(bl);
+	ret = adp5520_bl_setup(bl);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to setup\n");
+		if (data->pdata->en_ambl_sens)
+			sysfs_remove_group(&bl->dev.kobj,
+					&adp5520_bl_attr_group);
+		return ret;
+	}
+
 	backlight_update_status(bl);
 
-	return ret;
+	return 0;
 }
 
 static int adp5520_bl_remove(struct platform_device *pdev)

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 38/59] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 37/59] backlight: adp5520: Fix error handling in adp5520_bl_probe() Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 39/59] ALSA: hda/realtek - Add new codec ID ALC299 Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arvind Yadav, Daniel Vetter, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Arvind Yadav <arvind.yadav.cs@gmail.com>


[ Upstream commit 4b0ea93f250afc6c1128e201b0a8a115ae613e47 ]

Here, pci_iomap can fail, handle this case and return -ENOMEM.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-email-arvind.yadav.cs@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/mgag200/mgag200_main.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -145,6 +145,8 @@ static int mga_vram_init(struct mga_devi
 	}
 
 	mem = pci_iomap(mdev->dev->pdev, 0, 0);
+	if (!mem)
+		return -ENOMEM;
 
 	mdev->mc.vram_size = mga_probe_vram(mdev, mem);
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 39/59] ALSA: hda/realtek - Add new codec ID ALC299
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 38/59] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 40/59] arm64: dts: NS2: reserve memory for Nitro firmware Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kailang Yang, Takashi Iwai, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Kailang Yang <kailang@realtek.com>


[ Upstream commit 28f1f9b26cee161ddd3985b3eb78e3ffada08dda ]

ALC299 was similar as ALC225.
Add headset support for ALC299.
ALC3271 was for Dell rename.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 sound/pci/hda/patch_realtek.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -338,6 +338,7 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0288:
 	case 0x10ec0295:
 	case 0x10ec0298:
+	case 0x10ec0299:
 		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
 		break;
 	case 0x10ec0285:
@@ -914,6 +915,7 @@ static struct alc_codec_rename_pci_table
 	{ 0x10ec0256, 0x1028, 0, "ALC3246" },
 	{ 0x10ec0225, 0x1028, 0, "ALC3253" },
 	{ 0x10ec0295, 0x1028, 0, "ALC3254" },
+	{ 0x10ec0299, 0x1028, 0, "ALC3271" },
 	{ 0x10ec0670, 0x1025, 0, "ALC669X" },
 	{ 0x10ec0676, 0x1025, 0, "ALC679X" },
 	{ 0x10ec0282, 0x1043, 0, "ALC3229" },
@@ -3721,6 +3723,7 @@ static void alc_headset_mode_unplugged(s
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_process_coef_fw(codec, coef0225);
 		break;
 	}
@@ -3823,6 +3826,7 @@ static void alc_headset_mode_mic_in(stru
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10);
 		snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
 		alc_process_coef_fw(codec, coef0225);
@@ -3881,6 +3885,7 @@ static void alc_headset_mode_default(str
 	switch (codec->core.vendor_id) {
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_process_coef_fw(codec, coef0225);
 		break;
 	case 0x10ec0236:
@@ -3995,6 +4000,7 @@ static void alc_headset_mode_ctia(struct
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_process_coef_fw(codec, coef0225);
 		break;
 	}
@@ -4086,6 +4092,7 @@ static void alc_headset_mode_omtp(struct
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_process_coef_fw(codec, coef0225);
 		break;
 	}
@@ -4171,6 +4178,7 @@ static void alc_determine_headset_type(s
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		alc_process_coef_fw(codec, coef0225);
 		msleep(800);
 		val = alc_read_coef_idx(codec, 0x46);
@@ -6233,6 +6241,7 @@ static int patch_alc269(struct hda_codec
 		break;
 	case 0x10ec0225:
 	case 0x10ec0295:
+	case 0x10ec0299:
 		spec->codec_variant = ALC269_TYPE_ALC225;
 		break;
 	case 0x10ec0234:
@@ -7191,6 +7200,7 @@ static const struct hda_device_id snd_hd
 	HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269),
 	HDA_CODEC_ENTRY(0x10ec0295, "ALC295", patch_alc269),
 	HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269),
+	HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269),
 	HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861),
 	HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd),
 	HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861),

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 40/59] arm64: dts: NS2: reserve memory for Nitro firmware
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 39/59] ALSA: hda/realtek - Add new codec ID ALC299 Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 41/59] ixgbe: fix AER error handling Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jon Mason, Florian Fainelli, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Jon Mason <jon.mason@broadcom.com>


[ Upstream commit 0cc878d678444392ca2a31350f89f489593ef5bb ]

Nitro firmware is loaded into memory by the bootloader at a specific
location.  Set this memory range aside to prevent the kernel from using
it.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/boot/dts/broadcom/ns2.dtsi |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/arm64/boot/dts/broadcom/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/ns2.dtsi
@@ -30,6 +30,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/memreserve/ 0x81000000 0x00200000;
+
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 /memreserve/ 0x84b00000 0x00000008;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 41/59] ixgbe: fix AER error handling
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 40/59] arm64: dts: NS2: reserve memory for Nitro firmware Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 42/59] ixgbe: handle close/suspend race with netif_device_detach/present Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Emil Tantilov, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Emil Tantilov <emil.s.tantilov@intel.com>


[ Upstream commit 126db13fa0e6d05c9f94e0125f61e773bd5ab079 ]

Make sure that we free the IRQs in ixgbe_io_error_detected() when
responding to an PCIe AER error and also restore them when the
interface recovers from it.

Previously it was possible to trigger BUG_ON() check in free_msix_irqs()
in the case where we call ixgbe_remove() after a failed recovery from
AER error because the interrupts were not freed.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9221,7 +9221,7 @@ skip_bad_vf_detection:
 	}
 
 	if (netif_running(netdev))
-		ixgbe_down(adapter);
+		ixgbe_close_suspend(adapter);
 
 	if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
 		pci_disable_device(pdev);
@@ -9291,10 +9291,12 @@ static void ixgbe_io_resume(struct pci_d
 	}
 
 #endif
+	rtnl_lock();
 	if (netif_running(netdev))
-		ixgbe_up(adapter);
+		ixgbe_open(netdev);
 
 	netif_device_attach(netdev);
+	rtnl_unlock();
 }
 
 static const struct pci_error_handlers ixgbe_err_handler = {

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 42/59] ixgbe: handle close/suspend race with netif_device_detach/present
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 41/59] ixgbe: fix AER error handling Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 43/59] ixgbe: Reduce I2C retry count on X550 devices Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Emil Tantilov, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Emil Tantilov <emil.s.tantilov@intel.com>


[ Upstream commit f7f37e7ff2b9b7eff7fbd035569cab35896869a3 ]

When an interface is part of a namespace it is possible that
ixgbe_close() may be called while __ixgbe_shutdown() is running
which ends up in a double free WARN and/or a BUG in free_msi_irqs().

To handle this situation we extend the rtnl_lock() to protect the
call to netif_device_detach() and ixgbe_clear_interrupt_scheme()
in __ixgbe_shutdown() and check for netif_device_present()
to avoid clearing the interrupts second time in ixgbe_close();

Also extend the rtnl lock in ixgbe_resume() to netif_device_attach().

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5878,7 +5878,8 @@ static int ixgbe_close(struct net_device
 
 	ixgbe_ptp_stop(adapter);
 
-	ixgbe_close_suspend(adapter);
+	if (netif_device_present(netdev))
+		ixgbe_close_suspend(adapter);
 
 	ixgbe_fdir_filter_exit(adapter);
 
@@ -5923,14 +5924,12 @@ static int ixgbe_resume(struct pci_dev *
 	if (!err && netif_running(netdev))
 		err = ixgbe_open(netdev);
 
-	rtnl_unlock();
 
-	if (err)
-		return err;
-
-	netif_device_attach(netdev);
+	if (!err)
+		netif_device_attach(netdev);
+	rtnl_unlock();
 
-	return 0;
+	return err;
 }
 #endif /* CONFIG_PM */
 
@@ -5945,14 +5944,14 @@ static int __ixgbe_shutdown(struct pci_d
 	int retval = 0;
 #endif
 
+	rtnl_lock();
 	netif_device_detach(netdev);
 
-	rtnl_lock();
 	if (netif_running(netdev))
 		ixgbe_close_suspend(adapter);
-	rtnl_unlock();
 
 	ixgbe_clear_interrupt_scheme(adapter);
+	rtnl_unlock();
 
 #ifdef CONFIG_PM
 	retval = pci_save_state(pdev);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 43/59] ixgbe: Reduce I2C retry count on X550 devices
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 42/59] ixgbe: handle close/suspend race with netif_device_detach/present Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 44/59] ixgbe: add mask for 64 RSS queues Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tony Nguyen, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Tony Nguyen <anthony.l.nguyen@intel.com>


[ Upstream commit 3f0d646b720d541309b11e190db58086f446f41e ]

A retry count of 10 is likely to run into problems on X550 devices that
have to detect and reset unresponsive CS4227 devices. So, reduce the I2C
retry count to 3 for X550 and above. This should avoid any possible
regressions in existing devices.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -113,7 +113,7 @@ static s32 ixgbe_read_i2c_combined_gener
 					       u16 reg, u16 *val, bool lock)
 {
 	u32 swfw_mask = hw->phy.phy_semaphore_mask;
-	int max_retry = 10;
+	int max_retry = 3;
 	int retry = 0;
 	u8 csum_byte;
 	u8 high_bits;
@@ -1764,6 +1764,8 @@ static s32 ixgbe_read_i2c_byte_generic_i
 	u32 swfw_mask = hw->phy.phy_semaphore_mask;
 	bool nack = true;
 
+	if (hw->mac.type >= ixgbe_mac_X550)
+		max_retry = 3;
 	if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
 		max_retry = IXGBE_SFP_DETECT_RETRIES;
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 44/59] ixgbe: add mask for 64 RSS queues
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 43/59] ixgbe: Reduce I2C retry count on X550 devices Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 45/59] ixgbe: do not disable FEC from the driver Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Emil Tantilov, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Emil Tantilov <emil.s.tantilov@intel.com>


[ Upstream commit 2bf1a87b903bd81b1448a1cef73de59fb6c4d340 ]

The indirection table was reported incorrectly for X550 and newer
where we can support up to 64 RSS queues.

Reported-by Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -307,6 +307,7 @@ static void ixgbe_cache_ring_register(st
 	ixgbe_cache_ring_rss(adapter);
 }
 
+#define IXGBE_RSS_64Q_MASK	0x3F
 #define IXGBE_RSS_16Q_MASK	0xF
 #define IXGBE_RSS_8Q_MASK	0x7
 #define IXGBE_RSS_4Q_MASK	0x3
@@ -602,6 +603,7 @@ static bool ixgbe_set_sriov_queues(struc
  **/
 static bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
 {
+	struct ixgbe_hw *hw = &adapter->hw;
 	struct ixgbe_ring_feature *f;
 	u16 rss_i;
 
@@ -610,7 +612,11 @@ static bool ixgbe_set_rss_queues(struct
 	rss_i = f->limit;
 
 	f->indices = rss_i;
-	f->mask = IXGBE_RSS_16Q_MASK;
+
+	if (hw->mac.type < ixgbe_mac_X550)
+		f->mask = IXGBE_RSS_16Q_MASK;
+	else
+		f->mask = IXGBE_RSS_64Q_MASK;
 
 	/* disable ATR by default, it will be configured below */
 	adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 45/59] ixgbe: do not disable FEC from the driver
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 44/59] ixgbe: add mask for 64 RSS queues Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 46/59] staging: rtl8712: fixed little endian problem Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Emil Tantilov, Krishneil Singh,
	Jeff Kirsher, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Emil Tantilov <emil.s.tantilov@intel.com>


[ Upstream commit 1fe954b2097bb907b4578e6a74e4c1d23785a601 ]

FEC is configured by the NVM and the driver should not be
overriding it.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1643,8 +1643,6 @@ static s32 ixgbe_setup_kr_speed_x550em(s
 		return status;
 
 	reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
-	reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ |
-		     IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC);
 	reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KR |
 		     IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KX);
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 46/59] staging: rtl8712: fixed little endian problem
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 45/59] ixgbe: do not disable FEC from the driver Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 47/59] MIPS: End asm function prologue macros with .insn Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jannik Becher, Larry Finger, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Jannik Becher <becher.jannik@gmail.com>


[ Upstream commit 502c80744fcac6b16f28699469c70db499fe2f69 ]

Fixed a sparse warning.
Using function le16_to_cpus() to avoid double assignment.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -199,7 +199,7 @@ static inline char *translate_scan(struc
 	iwe.cmd = SIOCGIWMODE;
 	memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs),
 		2);
-	cap = le16_to_cpu(cap);
+	le16_to_cpus(&cap);
 	if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
 		if (cap & WLAN_CAPABILITY_BSS)
 			iwe.u.mode = (u32)IW_MODE_MASTER;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 47/59] MIPS: End asm function prologue macros with .insn
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 46/59] staging: rtl8712: fixed little endian problem Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 48/59] MIPS: init: Ensure bootmem does not corrupt reserved memory Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, Maciej W. Rozycki,
	linux-mips, Ralf Baechle, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Paul Burton <paul.burton@imgtec.com>


[ Upstream commit 08889582b8aa0bbc01a1e5a0033b9f98d2e11caa ]

When building a kernel targeting a microMIPS ISA, recent GNU linkers
will fail the link if they cannot determine that the target of a branch
or jump is microMIPS code, with errors such as the following:

    mips-img-linux-gnu-ld: arch/mips/built-in.o: .text+0x542c:
    Unsupported jump between ISA modes; consider recompiling with
    interlinking enabled.
    mips-img-linux-gnu-ld: final link failed: Bad value

or:

    ./arch/mips/include/asm/uaccess.h:1017: warning: JALX to a
    non-word-aligned address

Placing anything other than an instruction at the start of a function
written in assembly appears to trigger such errors. In order to prepare
for allowing us to follow function prologue macros with an EXPORT_SYMBOL
invocation, end the prologue macros (LEAD, NESTED & FEXPORT) with a
.insn directive. This ensures that the start of the function is marked
as code, which always makes sense for functions & safely prevents us
from hitting the link errors described above.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14508/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/mips/include/asm/asm.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -54,7 +54,8 @@
 		.align	2;				\
 		.type	symbol, @function;		\
 		.ent	symbol, 0;			\
-symbol:		.frame	sp, 0, ra
+symbol:		.frame	sp, 0, ra;			\
+		.insn
 
 /*
  * NESTED - declare nested routine entry point
@@ -63,8 +64,9 @@ symbol:		.frame	sp, 0, ra
 		.globl	symbol;				\
 		.align	2;				\
 		.type	symbol, @function;		\
-		.ent	symbol, 0;			 \
-symbol:		.frame	sp, framesize, rpc
+		.ent	symbol, 0;			\
+symbol:		.frame	sp, framesize, rpc;		\
+		.insn
 
 /*
  * END - mark end of function
@@ -86,7 +88,7 @@ symbol:
 #define FEXPORT(symbol)					\
 		.globl	symbol;				\
 		.type	symbol, @function;		\
-symbol:
+symbol:		.insn
 
 /*
  * ABS - export absolute symbol

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 48/59] MIPS: init: Ensure bootmem does not corrupt reserved memory
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 47/59] MIPS: End asm function prologue macros with .insn Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 49/59] MIPS: init: Ensure reserved memory regions are not added to bootmem Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcin Nowakowski, linux-mips,
	Ralf Baechle, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>


[ Upstream commit d9b5b658210f28ed9f70c757d553e679d76e2986 ]

Current init code initialises bootmem allocator with all of the low
memory that it assumes is available, but does not check for reserved
memory block, which can lead to corruption of data that may be stored
there.
Move bootmem's allocation map to a location that does not cross any
reserved regions

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14609/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/mips/kernel/setup.c |   74 +++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 71 insertions(+), 3 deletions(-)

--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -152,6 +152,35 @@ void __init detect_memory_region(phys_ad
 	add_memory_region(start, size, BOOT_MEM_RAM);
 }
 
+bool __init memory_region_available(phys_addr_t start, phys_addr_t size)
+{
+	int i;
+	bool in_ram = false, free = true;
+
+	for (i = 0; i < boot_mem_map.nr_map; i++) {
+		phys_addr_t start_, end_;
+
+		start_ = boot_mem_map.map[i].addr;
+		end_ = boot_mem_map.map[i].addr + boot_mem_map.map[i].size;
+
+		switch (boot_mem_map.map[i].type) {
+		case BOOT_MEM_RAM:
+			if (start >= start_ && start + size <= end_)
+				in_ram = true;
+			break;
+		case BOOT_MEM_RESERVED:
+			if ((start >= start_ && start < end_) ||
+			    (start < start_ && start + size >= start_))
+				free = false;
+			break;
+		default:
+			continue;
+		}
+	}
+
+	return in_ram && free;
+}
+
 static void __init print_memory_map(void)
 {
 	int i;
@@ -300,11 +329,19 @@ static void __init bootmem_init(void)
 
 #else  /* !CONFIG_SGI_IP27 */
 
+static unsigned long __init bootmap_bytes(unsigned long pages)
+{
+	unsigned long bytes = DIV_ROUND_UP(pages, 8);
+
+	return ALIGN(bytes, sizeof(long));
+}
+
 static void __init bootmem_init(void)
 {
 	unsigned long reserved_end;
 	unsigned long mapstart = ~0UL;
 	unsigned long bootmap_size;
+	bool bootmap_valid = false;
 	int i;
 
 	/*
@@ -385,11 +422,42 @@ static void __init bootmem_init(void)
 #endif
 
 	/*
-	 * Initialize the boot-time allocator with low memory only.
+	 * check that mapstart doesn't overlap with any of
+	 * memory regions that have been reserved through eg. DTB
 	 */
-	bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
-					 min_low_pfn, max_low_pfn);
+	bootmap_size = bootmap_bytes(max_low_pfn - min_low_pfn);
+
+	bootmap_valid = memory_region_available(PFN_PHYS(mapstart),
+						bootmap_size);
+	for (i = 0; i < boot_mem_map.nr_map && !bootmap_valid; i++) {
+		unsigned long mapstart_addr;
+
+		switch (boot_mem_map.map[i].type) {
+		case BOOT_MEM_RESERVED:
+			mapstart_addr = PFN_ALIGN(boot_mem_map.map[i].addr +
+						boot_mem_map.map[i].size);
+			if (PHYS_PFN(mapstart_addr) < mapstart)
+				break;
+
+			bootmap_valid = memory_region_available(mapstart_addr,
+								bootmap_size);
+			if (bootmap_valid)
+				mapstart = PHYS_PFN(mapstart_addr);
+			break;
+		default:
+			break;
+		}
+	}
 
+	if (!bootmap_valid)
+		panic("No memory area to place a bootmap bitmap");
+
+	/*
+	 * Initialize the boot-time allocator with low memory only.
+	 */
+	if (bootmap_size != init_bootmem_node(NODE_DATA(0), mapstart,
+					 min_low_pfn, max_low_pfn))
+		panic("Unexpected memory size required for bootmap");
 
 	for (i = 0; i < boot_mem_map.nr_map; i++) {
 		unsigned long start, end;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 49/59] MIPS: init: Ensure reserved memory regions are not added to bootmem
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 48/59] MIPS: init: Ensure bootmem does not corrupt reserved memory Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:32 ` [PATCH 4.4 51/59] Revert "crypto: xts - Add ECB dependency" Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcin Nowakowski, linux-mips,
	Ralf Baechle, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>


[ Upstream commit e89ef66d7682f031f026eee6bba03c8c2248d2a9 ]

Memories managed through boot_mem_map are generally expected to define
non-crossing areas. However, if part of a larger memory block is marked
as reserved, it would still be added to bootmem allocator as an
available block and could end up being overwritten by the allocator.

Prevent this by explicitly marking the memory as reserved it if exists
in the range used by bootmem allocator.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14608/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/mips/kernel/setup.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -506,6 +506,10 @@ static void __init bootmem_init(void)
 			continue;
 		default:
 			/* Not usable memory */
+			if (start > min_low_pfn && end < max_low_pfn)
+				reserve_bootmem(boot_mem_map.map[i].addr,
+						boot_mem_map.map[i].size,
+						BOOTMEM_DEFAULT);
 			continue;
 		}
 

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 51/59] Revert "crypto: xts - Add ECB dependency"
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 49/59] MIPS: init: Ensure reserved memory regions are not added to bootmem Greg Kroah-Hartman
@ 2017-11-19 14:32 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 52/59] Revert "uapi: fix linux/rds.h userspace compilation errors" Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Sasha Levin <alexander.levin@verizon.com>


This reverts commit 6145171a6bc0abdc3eca7a4b795ede467d2ba569.

The commit fixes a bug that was only introduced in 4.10, thus is
irrelevant for <=4.9.

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 crypto/Kconfig |    1 -
 1 file changed, 1 deletion(-)

--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -343,7 +343,6 @@ config CRYPTO_XTS
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_MANAGER
 	select CRYPTO_GF128MUL
-	select CRYPTO_ECB
 	help
 	  XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain,
 	  key size 256, 384 or 512 bits. This implementation currently

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 52/59] Revert "uapi: fix linux/rds.h userspace compilation errors"
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2017-11-19 14:32 ` [PATCH 4.4 51/59] Revert "crypto: xts - Add ECB dependency" Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 53/59] uapi: fix linux/rds.h userspace compilation error Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Sasha Levin <alexander.levin@verizon.com>


This reverts commit ad50561ba7a664bc581826c9d57d137fcf17bfa5.

There was a mixup with the commit message for two upstream commit
that have the same subject line.

This revert will be followed by the two commits with proper commit
messages.

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/uapi/linux/rds.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -35,7 +35,6 @@
 #define _LINUX_RDS_H
 
 #include <linux/types.h>
-#include <linux/socket.h>		/* For __kernel_sockaddr_storage. */
 
 #define RDS_IB_ABI_VERSION		0x301
 
@@ -224,7 +223,7 @@ struct rds_get_mr_args {
 };
 
 struct rds_get_mr_for_dest_args {
-	struct __kernel_sockaddr_storage dest_addr;
+	struct sockaddr_storage	dest_addr;
 	struct rds_iovec 	vec;
 	uint64_t		cookie_addr;
 	uint64_t		flags;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 53/59] uapi: fix linux/rds.h userspace compilation error
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 52/59] Revert "uapi: fix linux/rds.h userspace compilation errors" Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 54/59] uapi: fix linux/rds.h userspace compilation errors Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dmitry V. Levin, David S. Miller,
	Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: "Dmitry V. Levin" <ldv@altlinux.org>


[ Upstream commit 1786dbf3702e33ce3afd2d3dbe630bd04b1d2e58 ]

On the kernel side, sockaddr_storage is #define'd to
__kernel_sockaddr_storage.  Replacing struct sockaddr_storage with
struct __kernel_sockaddr_storage defined by <linux/socket.h> fixes
the following linux/rds.h userspace compilation error:

/usr/include/linux/rds.h:226:26: error: field 'dest_addr' has incomplete type
  struct sockaddr_storage dest_addr;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/uapi/linux/rds.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -35,6 +35,7 @@
 #define _LINUX_RDS_H
 
 #include <linux/types.h>
+#include <linux/socket.h>		/* For __kernel_sockaddr_storage. */
 
 #define RDS_IB_ABI_VERSION		0x301
 
@@ -223,7 +224,7 @@ struct rds_get_mr_args {
 };
 
 struct rds_get_mr_for_dest_args {
-	struct sockaddr_storage	dest_addr;
+	struct __kernel_sockaddr_storage dest_addr;
 	struct rds_iovec 	vec;
 	uint64_t		cookie_addr;
 	uint64_t		flags;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 54/59] uapi: fix linux/rds.h userspace compilation errors
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 53/59] uapi: fix linux/rds.h userspace compilation error Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 55/59] USB: usbfs: compute urb->actual_length for isochronous Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dmitry V. Levin, David S. Miller,
	Sasha Levin

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: "Dmitry V. Levin" <ldv@altlinux.org>


[ Upstream commit feb0869d90e51ce8b6fd8a46588465b1b5a26d09 ]

Consistently use types from linux/types.h to fix the following
linux/rds.h userspace compilation errors:

/usr/include/linux/rds.h:106:2: error: unknown type name 'uint8_t'
  uint8_t name[32];
/usr/include/linux/rds.h:107:2: error: unknown type name 'uint64_t'
  uint64_t value;
/usr/include/linux/rds.h:117:2: error: unknown type name 'uint64_t'
  uint64_t next_tx_seq;
/usr/include/linux/rds.h:118:2: error: unknown type name 'uint64_t'
  uint64_t next_rx_seq;
/usr/include/linux/rds.h:121:2: error: unknown type name 'uint8_t'
  uint8_t transport[TRANSNAMSIZ];  /* null term ascii */
/usr/include/linux/rds.h:122:2: error: unknown type name 'uint8_t'
  uint8_t flags;
/usr/include/linux/rds.h:129:2: error: unknown type name 'uint64_t'
  uint64_t seq;
/usr/include/linux/rds.h:130:2: error: unknown type name 'uint32_t'
  uint32_t len;
/usr/include/linux/rds.h:135:2: error: unknown type name 'uint8_t'
  uint8_t flags;
/usr/include/linux/rds.h:139:2: error: unknown type name 'uint32_t'
  uint32_t sndbuf;
/usr/include/linux/rds.h:144:2: error: unknown type name 'uint32_t'
  uint32_t rcvbuf;
/usr/include/linux/rds.h:145:2: error: unknown type name 'uint64_t'
  uint64_t inum;
/usr/include/linux/rds.h:153:2: error: unknown type name 'uint64_t'
  uint64_t       hdr_rem;
/usr/include/linux/rds.h:154:2: error: unknown type name 'uint64_t'
  uint64_t       data_rem;
/usr/include/linux/rds.h:155:2: error: unknown type name 'uint32_t'
  uint32_t       last_sent_nxt;
/usr/include/linux/rds.h:156:2: error: unknown type name 'uint32_t'
  uint32_t       last_expected_una;
/usr/include/linux/rds.h:157:2: error: unknown type name 'uint32_t'
  uint32_t       last_seen_una;
/usr/include/linux/rds.h:164:2: error: unknown type name 'uint8_t'
  uint8_t  src_gid[RDS_IB_GID_LEN];
/usr/include/linux/rds.h:165:2: error: unknown type name 'uint8_t'
  uint8_t  dst_gid[RDS_IB_GID_LEN];
/usr/include/linux/rds.h:167:2: error: unknown type name 'uint32_t'
  uint32_t max_send_wr;
/usr/include/linux/rds.h:168:2: error: unknown type name 'uint32_t'
  uint32_t max_recv_wr;
/usr/include/linux/rds.h:169:2: error: unknown type name 'uint32_t'
  uint32_t max_send_sge;
/usr/include/linux/rds.h:170:2: error: unknown type name 'uint32_t'
  uint32_t rdma_mr_max;
/usr/include/linux/rds.h:171:2: error: unknown type name 'uint32_t'
  uint32_t rdma_mr_size;
/usr/include/linux/rds.h:212:9: error: unknown type name 'uint64_t'
 typedef uint64_t rds_rdma_cookie_t;
/usr/include/linux/rds.h:215:2: error: unknown type name 'uint64_t'
  uint64_t addr;
/usr/include/linux/rds.h:216:2: error: unknown type name 'uint64_t'
  uint64_t bytes;
/usr/include/linux/rds.h:221:2: error: unknown type name 'uint64_t'
  uint64_t cookie_addr;
/usr/include/linux/rds.h:222:2: error: unknown type name 'uint64_t'
  uint64_t flags;
/usr/include/linux/rds.h:228:2: error: unknown type name 'uint64_t'
  uint64_t  cookie_addr;
/usr/include/linux/rds.h:229:2: error: unknown type name 'uint64_t'
  uint64_t  flags;
/usr/include/linux/rds.h:234:2: error: unknown type name 'uint64_t'
  uint64_t flags;
/usr/include/linux/rds.h:240:2: error: unknown type name 'uint64_t'
  uint64_t local_vec_addr;
/usr/include/linux/rds.h:241:2: error: unknown type name 'uint64_t'
  uint64_t nr_local;
/usr/include/linux/rds.h:242:2: error: unknown type name 'uint64_t'
  uint64_t flags;
/usr/include/linux/rds.h:243:2: error: unknown type name 'uint64_t'
  uint64_t user_token;
/usr/include/linux/rds.h:248:2: error: unknown type name 'uint64_t'
  uint64_t  local_addr;
/usr/include/linux/rds.h:249:2: error: unknown type name 'uint64_t'
  uint64_t  remote_addr;
/usr/include/linux/rds.h:252:4: error: unknown type name 'uint64_t'
    uint64_t compare;
/usr/include/linux/rds.h:253:4: error: unknown type name 'uint64_t'
    uint64_t swap;
/usr/include/linux/rds.h:256:4: error: unknown type name 'uint64_t'
    uint64_t add;
/usr/include/linux/rds.h:259:4: error: unknown type name 'uint64_t'
    uint64_t compare;
/usr/include/linux/rds.h:260:4: error: unknown type name 'uint64_t'
    uint64_t swap;
/usr/include/linux/rds.h:261:4: error: unknown type name 'uint64_t'
    uint64_t compare_mask;
/usr/include/linux/rds.h:262:4: error: unknown type name 'uint64_t'
    uint64_t swap_mask;
/usr/include/linux/rds.h:265:4: error: unknown type name 'uint64_t'
    uint64_t add;
/usr/include/linux/rds.h:266:4: error: unknown type name 'uint64_t'
    uint64_t nocarry_mask;
/usr/include/linux/rds.h:269:2: error: unknown type name 'uint64_t'
  uint64_t flags;
/usr/include/linux/rds.h:270:2: error: unknown type name 'uint64_t'
  uint64_t user_token;
/usr/include/linux/rds.h:274:2: error: unknown type name 'uint64_t'
  uint64_t user_token;
/usr/include/linux/rds.h:275:2: error: unknown type name 'int32_t'
  int32_t  status;

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/uapi/linux/rds.h |  102 +++++++++++++++++++++++------------------------
 1 file changed, 51 insertions(+), 51 deletions(-)

--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -104,8 +104,8 @@
 #define RDS_INFO_LAST			10010
 
 struct rds_info_counter {
-	uint8_t	name[32];
-	uint64_t	value;
+	__u8	name[32];
+	__u64	value;
 } __attribute__((packed));
 
 #define RDS_INFO_CONNECTION_FLAG_SENDING	0x01
@@ -115,35 +115,35 @@ struct rds_info_counter {
 #define TRANSNAMSIZ	16
 
 struct rds_info_connection {
-	uint64_t	next_tx_seq;
-	uint64_t	next_rx_seq;
+	__u64		next_tx_seq;
+	__u64		next_rx_seq;
 	__be32		laddr;
 	__be32		faddr;
-	uint8_t	transport[TRANSNAMSIZ];		/* null term ascii */
-	uint8_t	flags;
+	__u8		transport[TRANSNAMSIZ];		/* null term ascii */
+	__u8		flags;
 } __attribute__((packed));
 
 #define RDS_INFO_MESSAGE_FLAG_ACK               0x01
 #define RDS_INFO_MESSAGE_FLAG_FAST_ACK          0x02
 
 struct rds_info_message {
-	uint64_t	seq;
-	uint32_t	len;
+	__u64		seq;
+	__u32		len;
 	__be32		laddr;
 	__be32		faddr;
 	__be16		lport;
 	__be16		fport;
-	uint8_t	flags;
+	__u8		flags;
 } __attribute__((packed));
 
 struct rds_info_socket {
-	uint32_t	sndbuf;
+	__u32		sndbuf;
 	__be32		bound_addr;
 	__be32		connected_addr;
 	__be16		bound_port;
 	__be16		connected_port;
-	uint32_t	rcvbuf;
-	uint64_t	inum;
+	__u32		rcvbuf;
+	__u64		inum;
 } __attribute__((packed));
 
 struct rds_info_tcp_socket {
@@ -151,25 +151,25 @@ struct rds_info_tcp_socket {
 	__be16          local_port;
 	__be32          peer_addr;
 	__be16          peer_port;
-	uint64_t       hdr_rem;
-	uint64_t       data_rem;
-	uint32_t       last_sent_nxt;
-	uint32_t       last_expected_una;
-	uint32_t       last_seen_una;
+	__u64           hdr_rem;
+	__u64           data_rem;
+	__u32           last_sent_nxt;
+	__u32           last_expected_una;
+	__u32           last_seen_una;
 } __attribute__((packed));
 
 #define RDS_IB_GID_LEN	16
 struct rds_info_rdma_connection {
 	__be32		src_addr;
 	__be32		dst_addr;
-	uint8_t		src_gid[RDS_IB_GID_LEN];
-	uint8_t		dst_gid[RDS_IB_GID_LEN];
+	__u8		src_gid[RDS_IB_GID_LEN];
+	__u8		dst_gid[RDS_IB_GID_LEN];
 
-	uint32_t	max_send_wr;
-	uint32_t	max_recv_wr;
-	uint32_t	max_send_sge;
-	uint32_t	rdma_mr_max;
-	uint32_t	rdma_mr_size;
+	__u32		max_send_wr;
+	__u32		max_recv_wr;
+	__u32		max_send_sge;
+	__u32		rdma_mr_max;
+	__u32		rdma_mr_size;
 };
 
 /*
@@ -210,70 +210,70 @@ struct rds_info_rdma_connection {
  * (so that the application does not have to worry about
  * alignment).
  */
-typedef uint64_t	rds_rdma_cookie_t;
+typedef __u64		rds_rdma_cookie_t;
 
 struct rds_iovec {
-	uint64_t	addr;
-	uint64_t	bytes;
+	__u64		addr;
+	__u64		bytes;
 };
 
 struct rds_get_mr_args {
 	struct rds_iovec vec;
-	uint64_t	cookie_addr;
-	uint64_t	flags;
+	__u64		cookie_addr;
+	__u64		flags;
 };
 
 struct rds_get_mr_for_dest_args {
 	struct __kernel_sockaddr_storage dest_addr;
 	struct rds_iovec 	vec;
-	uint64_t		cookie_addr;
-	uint64_t		flags;
+	__u64			cookie_addr;
+	__u64			flags;
 };
 
 struct rds_free_mr_args {
 	rds_rdma_cookie_t cookie;
-	uint64_t	flags;
+	__u64		flags;
 };
 
 struct rds_rdma_args {
 	rds_rdma_cookie_t cookie;
 	struct rds_iovec remote_vec;
-	uint64_t	local_vec_addr;
-	uint64_t	nr_local;
-	uint64_t	flags;
-	uint64_t	user_token;
+	__u64		local_vec_addr;
+	__u64		nr_local;
+	__u64		flags;
+	__u64		user_token;
 };
 
 struct rds_atomic_args {
 	rds_rdma_cookie_t cookie;
-	uint64_t 	local_addr;
-	uint64_t 	remote_addr;
+	__u64		local_addr;
+	__u64		remote_addr;
 	union {
 		struct {
-			uint64_t	compare;
-			uint64_t	swap;
+			__u64		compare;
+			__u64		swap;
 		} cswp;
 		struct {
-			uint64_t	add;
+			__u64		add;
 		} fadd;
 		struct {
-			uint64_t	compare;
-			uint64_t	swap;
-			uint64_t	compare_mask;
-			uint64_t	swap_mask;
+			__u64		compare;
+			__u64		swap;
+			__u64		compare_mask;
+			__u64		swap_mask;
 		} m_cswp;
 		struct {
-			uint64_t	add;
-			uint64_t	nocarry_mask;
+			__u64		add;
+			__u64		nocarry_mask;
 		} m_fadd;
 	};
-	uint64_t	flags;
-	uint64_t	user_token;
+	__u64		flags;
+	__u64		user_token;
 };
 
 struct rds_rdma_notify {
-	uint64_t	user_token;
-	int32_t		status;
+	__u64		user_token;
+	__s32		status;
 };
 
 #define RDS_RDMA_SUCCESS	0

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 55/59] USB: usbfs: compute urb->actual_length for isochronous
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 54/59] uapi: fix linux/rds.h userspace compilation errors Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 56/59] USB: Add delay-init quirk for Corsair K70 LUX keyboards Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Stern, Minas Harutyunyan

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Alan Stern <stern@rowland.harvard.edu>

commit 2ef47001b3ee3ded579b7532ebdcf8680e4d8c54 upstream.

The USB kerneldoc says that the actual_length field "is read in
non-iso completion functions", but the usbfs driver uses it for all
URB types in processcompl().  Since not all of the host controller
drivers set actual_length for isochronous URBs, programs using usbfs
with some host controllers don't work properly.  For example, Minas
reports that a USB camera controlled by libusb doesn't work properly
with a dwc2 controller.

It doesn't seem worthwhile to change the HCDs and the documentation,
since the in-kernel USB class drivers evidently don't rely on
actual_length for isochronous transfers.  The easiest solution is for
usbfs to calculate the actual_length value for itself, by adding up
the lengths of the individual packets in an isochronous transfer.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Reported-and-tested-by: wlf <wulf@rock-chips.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/devio.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1653,6 +1653,18 @@ static int proc_unlinkurb(struct usb_dev
 	return 0;
 }
 
+static void compute_isochronous_actual_length(struct urb *urb)
+{
+	unsigned int i;
+
+	if (urb->number_of_packets > 0) {
+		urb->actual_length = 0;
+		for (i = 0; i < urb->number_of_packets; i++)
+			urb->actual_length +=
+					urb->iso_frame_desc[i].actual_length;
+	}
+}
+
 static int processcompl(struct async *as, void __user * __user *arg)
 {
 	struct urb *urb = as->urb;
@@ -1660,6 +1672,7 @@ static int processcompl(struct async *as
 	void __user *addr = as->userurb;
 	unsigned int i;
 
+	compute_isochronous_actual_length(urb);
 	if (as->userbuffer && urb->actual_length) {
 		if (copy_urb_data_to_user(as->userbuffer, urb))
 			goto err_out;
@@ -1829,6 +1842,7 @@ static int processcompl_compat(struct as
 	void __user *addr = as->userurb;
 	unsigned int i;
 
+	compute_isochronous_actual_length(urb);
 	if (as->userbuffer && urb->actual_length) {
 		if (copy_urb_data_to_user(as->userbuffer, urb))
 			return -EFAULT;

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 56/59] USB: Add delay-init quirk for Corsair K70 LUX keyboards
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 55/59] USB: usbfs: compute urb->actual_length for isochronous Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 57/59] USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bernhard Rosenkraenzer

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Bernhard Rosenkraenzer <bernhard.rosenkranzer@linaro.org>

commit a0fea6027f19c62727315aba1a7fae75a9caa842 upstream.

Without this patch, K70 LUX keyboards don't work, saying
usb 3-3: unable to read config index 0 descriptor/all
usb 3-3: can't read configurations, error -110
usb usb3-port3: unable to enumerate USB device

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/quirks.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -221,6 +221,9 @@ static const struct usb_device_id usb_qu
 	/* Corsair Strafe RGB */
 	{ USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
 
+	/* Corsair K70 LUX */
+	{ USB_DEVICE(0x1b1c, 0x1b36), .driver_info = USB_QUIRK_DELAY_INIT },
+
 	/* MIDI keyboard WORLDE MINI */
 	{ USB_DEVICE(0x1c75, 0x0204), .driver_info =
 			USB_QUIRK_CONFIG_INTF_STRINGS },

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 57/59] USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 56/59] USB: Add delay-init quirk for Corsair K70 LUX keyboards Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 58/59] USB: serial: garmin_gps: fix I/O after failed probe and remove Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Douglas Fischer, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Douglas Fischer <douglas.fischer@outlook.com>

commit 771394a54148f18926ca86414e51c69eda27d0cd upstream.

Add USB PID/VID for Sierra Wireless EM7355 LTE modem QDL firmware update
mode.

Signed-off-by: Douglas Fischer <douglas.fischer@outlook.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/qcserial.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -148,6 +148,7 @@ static const struct usb_device_id id_tab
 	{DEVICE_SWI(0x1199, 0x68a2)},	/* Sierra Wireless MC7710 */
 	{DEVICE_SWI(0x1199, 0x68c0)},	/* Sierra Wireless MC7304/MC7354 */
 	{DEVICE_SWI(0x1199, 0x901c)},	/* Sierra Wireless EM7700 */
+	{DEVICE_SWI(0x1199, 0x901e)},	/* Sierra Wireless EM7355 QDL */
 	{DEVICE_SWI(0x1199, 0x901f)},	/* Sierra Wireless EM7355 */
 	{DEVICE_SWI(0x1199, 0x9040)},	/* Sierra Wireless Modem */
 	{DEVICE_SWI(0x1199, 0x9041)},	/* Sierra Wireless MC7305/MC7355 */

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 58/59] USB: serial: garmin_gps: fix I/O after failed probe and remove
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 57/59] USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 14:33 ` [PATCH 4.4 59/59] USB: serial: garmin_gps: fix memory leak on probe errors Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit 19a565d9af6e0d828bd0d521d3bafd5017f4ce52 upstream.

Make sure to stop any submitted interrupt and bulk-out URBs before
returning after failed probe and when the port is being unbound to avoid
later NULL-pointer dereferences in the completion callbacks.

Also fix up the related and broken I/O cancellation on failed open and
on close. (Note that port->write_urb was never submitted.)

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/garmin_gps.c |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -138,6 +138,7 @@ struct garmin_data {
 	__u8   privpkt[4*6];
 	spinlock_t lock;
 	struct list_head pktlist;
+	struct usb_anchor write_urbs;
 };
 
 
@@ -906,7 +907,7 @@ static int garmin_init_session(struct us
 					sizeof(GARMIN_START_SESSION_REQ), 0);
 
 			if (status < 0)
-				break;
+				goto err_kill_urbs;
 		}
 
 		if (status > 0)
@@ -914,6 +915,12 @@ static int garmin_init_session(struct us
 	}
 
 	return status;
+
+err_kill_urbs:
+	usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
+	usb_kill_urb(port->interrupt_in_urb);
+
+	return status;
 }
 
 
@@ -931,7 +938,6 @@ static int garmin_open(struct tty_struct
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 
 	/* shutdown any bulk reads that might be going on */
-	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->read_urb);
 
 	if (garmin_data_p->state == STATE_RESET)
@@ -954,7 +960,7 @@ static void garmin_close(struct usb_seri
 
 	/* shutdown our urbs */
 	usb_kill_urb(port->read_urb);
-	usb_kill_urb(port->write_urb);
+	usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
 
 	/* keep reset state so we know that we must start a new session */
 	if (garmin_data_p->state != STATE_RESET)
@@ -1038,12 +1044,14 @@ static int garmin_write_bulk(struct usb_
 	}
 
 	/* send it down the pipe */
+	usb_anchor_urb(urb, &garmin_data_p->write_urbs);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
 		dev_err(&port->dev,
 		   "%s - usb_submit_urb(write bulk) failed with status = %d\n",
 				__func__, status);
 		count = status;
+		usb_unanchor_urb(urb);
 		kfree(buffer);
 	}
 
@@ -1402,6 +1410,7 @@ static int garmin_port_probe(struct usb_
 	garmin_data_p->state = 0;
 	garmin_data_p->flags = 0;
 	garmin_data_p->count = 0;
+	init_usb_anchor(&garmin_data_p->write_urbs);
 	usb_set_serial_port_data(port, garmin_data_p);
 
 	status = garmin_init_session(port);
@@ -1414,6 +1423,7 @@ static int garmin_port_remove(struct usb
 {
 	struct garmin_data *garmin_data_p = usb_get_serial_port_data(port);
 
+	usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
 	usb_kill_urb(port->interrupt_in_urb);
 	del_timer_sync(&garmin_data_p->timer);
 	kfree(garmin_data_p);

^ permalink raw reply	[flat|nested] 68+ messages in thread

* [PATCH 4.4 59/59] USB: serial: garmin_gps: fix memory leak on probe errors
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 58/59] USB: serial: garmin_gps: fix I/O after failed probe and remove Greg Kroah-Hartman
@ 2017-11-19 14:33 ` Greg Kroah-Hartman
  2017-11-19 19:48 ` [PATCH 4.4 00/59] 4.4.100-stable review Nathan Chancellor
                   ` (5 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-19 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit 74d471b598444b7f2d964930f7234779c80960a0 upstream.

Make sure to free the port private data before returning after a failed
probe attempt.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/garmin_gps.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -1414,6 +1414,12 @@ static int garmin_port_probe(struct usb_
 	usb_set_serial_port_data(port, garmin_data_p);
 
 	status = garmin_init_session(port);
+	if (status)
+		goto err_free;
+
+	return 0;
+err_free:
+	kfree(garmin_data_p);
 
 	return status;
 }

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2017-11-19 14:33 ` [PATCH 4.4 59/59] USB: serial: garmin_gps: fix memory leak on probe errors Greg Kroah-Hartman
@ 2017-11-19 19:48 ` Nathan Chancellor
  2017-11-20 19:27   ` Greg Kroah-Hartman
  2017-11-19 20:09 ` Guenter Roeck
                   ` (4 subsequent siblings)
  59 siblings, 1 reply; 68+ messages in thread
From: Nathan Chancellor @ 2017-11-19 19:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 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.4.100-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.100-rc1
> 
> Johan Hovold <johan@kernel.org>
>     USB: serial: garmin_gps: fix memory leak on probe errors
> 
> Johan Hovold <johan@kernel.org>
>     USB: serial: garmin_gps: fix I/O after failed probe and remove
> 
> Douglas Fischer <douglas.fischer@outlook.com>
>     USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update
> 
> Bernhard Rosenkraenzer <bernhard.rosenkranzer@linaro.org>
>     USB: Add delay-init quirk for Corsair K70 LUX keyboards
> 
> Alan Stern <stern@rowland.harvard.edu>
>     USB: usbfs: compute urb->actual_length for isochronous
> 
> Dmitry V. Levin <ldv@altlinux.org>
>     uapi: fix linux/rds.h userspace compilation errors
> 
> Dmitry V. Levin <ldv@altlinux.org>
>     uapi: fix linux/rds.h userspace compilation error
> 
> Sasha Levin <alexander.levin@verizon.com>
>     Revert "uapi: fix linux/rds.h userspace compilation errors"
> 
> Sasha Levin <alexander.levin@verizon.com>
>     Revert "crypto: xts - Add ECB dependency"
> 
> Paul Burton <paul.burton@imgtec.com>
>     MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds
> 
> Marcin Nowakowski <marcin.nowakowski@imgtec.com>
>     MIPS: init: Ensure reserved memory regions are not added to bootmem
> 
> Marcin Nowakowski <marcin.nowakowski@imgtec.com>
>     MIPS: init: Ensure bootmem does not corrupt reserved memory
> 
> Paul Burton <paul.burton@imgtec.com>
>     MIPS: End asm function prologue macros with .insn
> 
> Jannik Becher <becher.jannik@gmail.com>
>     staging: rtl8712: fixed little endian problem
> 
> Emil Tantilov <emil.s.tantilov@intel.com>
>     ixgbe: do not disable FEC from the driver
> 
> Emil Tantilov <emil.s.tantilov@intel.com>
>     ixgbe: add mask for 64 RSS queues
> 
> Tony Nguyen <anthony.l.nguyen@intel.com>
>     ixgbe: Reduce I2C retry count on X550 devices
> 
> Emil Tantilov <emil.s.tantilov@intel.com>
>     ixgbe: handle close/suspend race with netif_device_detach/present
> 
> Emil Tantilov <emil.s.tantilov@intel.com>
>     ixgbe: fix AER error handling
> 
> Jon Mason <jon.mason@broadcom.com>
>     arm64: dts: NS2: reserve memory for Nitro firmware
> 
> Kailang Yang <kailang@realtek.com>
>     ALSA: hda/realtek - Add new codec ID ALC299
> 
> Arvind Yadav <arvind.yadav.cs@gmail.com>
>     gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
> 
> Alexey Khoroshilov <khoroshilov@ispras.ru>
>     backlight: adp5520: Fix error handling in adp5520_bl_probe()
> 
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>     backlight: lcd: Fix race condition during register
> 
> Takashi Iwai <tiwai@suse.de>
>     ALSA: vx: Fix possible transfer overflow
> 
> Takashi Iwai <tiwai@suse.de>
>     ALSA: vx: Don't try to update capture stream before running
> 
> James Smart <james.smart@broadcom.com>
>     scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
> 
> James Smart <james.smart@broadcom.com>
>     scsi: lpfc: Correct issue leading to oops during link reset
> 
> James Smart <james.smart@broadcom.com>
>     scsi: lpfc: Correct host name in symbolic_name field
> 
> James Smart <james.smart@broadcom.com>
>     scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort
> 
> James Smart <james.smart@broadcom.com>
>     scsi: lpfc: Add missing memory barrier
> 
> Galo Navarro <anglorvaroa@gmail.com>
>     staging: rtl8188eu: fix incorrect ERROR tags from logs
> 
> subhashj@codeaurora.org <subhashj@codeaurora.org>
>     scsi: ufs: add capability to keep auto bkops always enabled
> 
> Javier Martinez Canillas <javier@osg.samsung.com>
>     scsi: ufs-qcom: Fix module autoload
> 
> Hannu Lounento <hannu.lounento@ge.com>
>     igb: Fix hw_dbg logging in igb_update_flash_i210
> 
> Todd Fujinaka <todd.fujinaka@intel.com>
>     igb: close/suspend race in netif_device_detach
> 
> Aaron Sierra <asierra@xes-inc.com>
>     igb: reset the PHY before reading the PHY ID
> 
> Arvind Yadav <arvind.yadav.cs@gmail.com>
>     drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
> 
> Geert Uytterhoeven <geert@linux-m68k.org>
>     ata: SATA_MV should depend on HAS_DMA
> 
> Geert Uytterhoeven <geert@linux-m68k.org>
>     ata: SATA_HIGHBANK should depend on HAS_DMA
> 
> Geert Uytterhoeven <geert@linux-m68k.org>
>     ata: ATA_BMDMA should depend on HAS_DMA
> 
> Tony Lindgren <tony@atomide.com>
>     ARM: dts: Fix omap3 off mode pull defines
> 
> Tony Lindgren <tony@atomide.com>
>     ARM: OMAP2+: Fix init for multiple quirks for the same SoC
> 
> Tony Lindgren <tony@atomide.com>
>     ARM: dts: Fix am335x and dm814x scm syscon to probe children
> 
> Tony Lindgren <tony@atomide.com>
>     ARM: dts: Fix compatible for ti81xx uarts for 8250
> 
> Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
>     fm10k: request reset when mbx->state changes
> 
> Roger Quadros <rogerq@ti.com>
>     extcon: palmas: Check the parent instance to prevent the NULL
> 
> Adam Wallis <awallis@codeaurora.org>
>     dmaengine: dmatest: warn user when dma test times out
> 
> Leif Liddy <leif.linux@gmail.com>
>     Bluetooth: btusb: fix QCA Rome suspend/resume
> 
> Eric Biggers <ebiggers@google.com>
>     arm: crypto: reduce priority of bit-sliced AES cipher
> 
> Bjørn Mork <bjorn@mork.no>
>     net: qmi_wwan: fix divide by 0 on bad descriptors
> 
> Bjørn Mork <bjorn@mork.no>
>     net: cdc_ether: fix divide by 0 on bad descriptors
> 
> Xin Long <lucien.xin@gmail.com>
>     sctp: do not peel off an assoc from one netns to another one
> 
> Jan Beulich <jbeulich@suse.com>
>     xen-blkback: don't leak stack data via response ring
> 
> Daniel Borkmann <daniel@iogearbox.net>
>     bpf: don't let ldimm64 leak map addresses on unprivileged
> 
> Paolo Bonzini <pbonzini@redhat.com>
>     KVM: x86: fix singlestepping over syscall
> 
> Jan Kara <jack@suse.cz>
>     ext4: fix data exposure after a crash
> 
> Andrey Konovalov <andreyknvl@google.com>
>     media: dib0700: fix invalid dvb_detach argument
> 
> Arvind Yadav <arvind.yadav.cs@gmail.com>
>     media: imon: Fix null-ptr-deref in imon_probe
> 
> 
> -------------
> 
> Diffstat:
> 
>  Makefile                                      |   4 +-
>  arch/arm/boot/dts/am33xx.dtsi                 |   3 +-
>  arch/arm/boot/dts/dm814x.dtsi                 |   9 ++-
>  arch/arm/boot/dts/dm816x.dtsi                 |   6 +-
>  arch/arm/crypto/aesbs-glue.c                  |   6 +-
>  arch/arm/mach-omap2/pdata-quirks.c            |   1 -
>  arch/arm64/boot/dts/broadcom/ns2.dtsi         |   2 +
>  arch/mips/include/asm/asm.h                   |  10 ++-
>  arch/mips/kernel/setup.c                      |  78 +++++++++++++++++++-
>  arch/mips/netlogic/common/irq.c               |   4 +-
>  arch/x86/include/asm/kvm_emulate.h            |   1 +
>  arch/x86/kvm/emulate.c                        |   1 +
>  arch/x86/kvm/x86.c                            |  52 ++++++-------
>  crypto/Kconfig                                |   1 -
>  drivers/ata/Kconfig                           |   3 +
>  drivers/block/xen-blkback/blkback.c           |  23 +++---
>  drivers/block/xen-blkback/common.h            |  25 ++-----
>  drivers/bluetooth/btusb.c                     |   6 ++
>  drivers/dma/dmatest.c                         |   1 +
>  drivers/extcon/extcon-palmas.c                |   5 ++
>  drivers/gpu/drm/mgag200/mgag200_main.c        |   2 +
>  drivers/gpu/drm/sti/sti_vtg.c                 |   4 +
>  drivers/media/rc/imon.c                       |   5 ++
>  drivers/media/usb/dvb-usb/dib0700_devices.c   |  24 +++---
>  drivers/net/ethernet/intel/fm10k/fm10k_mbx.c  |  10 ++-
>  drivers/net/ethernet/intel/fm10k/fm10k_pci.c  |   6 +-
>  drivers/net/ethernet/intel/igb/e1000_82575.c  |  11 +++
>  drivers/net/ethernet/intel/igb/e1000_i210.c   |   4 +-
>  drivers/net/ethernet/intel/igb/igb_main.c     |  21 +++---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c  |   8 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  23 +++---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  |   4 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |   2 -
>  drivers/net/usb/cdc_ether.c                   |   2 +-
>  drivers/net/usb/qmi_wwan.c                    |   2 +-
>  drivers/scsi/lpfc/lpfc_attr.c                 |  17 +++++
>  drivers/scsi/lpfc/lpfc_els.c                  |   6 ++
>  drivers/scsi/lpfc/lpfc_hw.h                   |   6 ++
>  drivers/scsi/lpfc/lpfc_sli.c                  |   3 +
>  drivers/scsi/lpfc/lpfc_vport.c                |   8 ++
>  drivers/scsi/ufs/ufs-qcom.c                   |   1 +
>  drivers/scsi/ufs/ufshcd.c                     |  33 ++++++---
>  drivers/scsi/ufs/ufshcd.h                     |  13 ++++
>  drivers/staging/rtl8188eu/include/rtw_debug.h |   2 +-
>  drivers/staging/rtl8712/rtl871x_ioctl_linux.c |   2 +-
>  drivers/usb/core/devio.c                      |  14 ++++
>  drivers/usb/core/quirks.c                     |   3 +
>  drivers/usb/serial/garmin_gps.c               |  22 +++++-
>  drivers/usb/serial/qcserial.c                 |   1 +
>  drivers/video/backlight/adp5520_bl.c          |  12 ++-
>  drivers/video/backlight/lcd.c                 |   4 +-
>  fs/ext4/inode.c                               |  23 +++---
>  include/dt-bindings/pinctrl/omap.h            |   4 +-
>  include/uapi/linux/rds.h                      | 102 +++++++++++++-------------
>  kernel/bpf/verifier.c                         |  21 ++++--
>  net/sctp/socket.c                             |   4 +
>  sound/drivers/vx/vx_pcm.c                     |   8 +-
>  sound/pci/hda/patch_realtek.c                 |  10 +++
>  sound/pci/vx222/vx222_ops.c                   |  12 +--
>  sound/pcmcia/vx/vxp_ops.c                     |  12 +--
>  60 files changed, 481 insertions(+), 231 deletions(-)
> 
>

Merged, compiled, and flashed onto my Pixel 2 XL. No initial issues
noticed in either dmesg or general usage.

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2017-11-19 19:48 ` [PATCH 4.4 00/59] 4.4.100-stable review Nathan Chancellor
@ 2017-11-19 20:09 ` Guenter Roeck
  2017-11-20  6:35 ` Naresh Kamboju
                   ` (3 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Guenter Roeck @ 2017-11-19 20:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On 11/19/2017 06:32 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 UTC 2017.
> Anything received after that time might be too late.
> 

All mips builds fail:

Building mips:defconfig ... failed
--------------
Error log:

/opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c: In function 'bootmem_init':
/opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c:439:4: error: implicit declaration of function 'PHYS_PFN'

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2017-11-19 20:09 ` Guenter Roeck
@ 2017-11-20  6:35 ` Naresh Kamboju
  2017-11-20 14:09 ` Guenter Roeck
                   ` (2 subsequent siblings)
  59 siblings, 0 replies; 68+ messages in thread
From: Naresh Kamboju @ 2017-11-20  6:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, Guenter Roeck, Shuah Khan, patches,
	Ben Hutchings, linux- stable, Tom Gall

On 19 November 2017 at 20:02, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 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.4.100-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

Results from Linaro’s test farm.
Also as per usual the HiKey results are reported separate because the
platform support isn’t in tree.

Summary
------------------------------------------------------------------------

kernel: 4.4.100-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: 803704b287d89efcd70fade9e650176282a1d766
git describe: v4.4.99-60-g803704b287d8
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.99-60-g803704b287d8


No regressions (compared to build v4.4.99)

Boards, architectures and test suites:
-------------------------------------

juno-r2 - arm64
* boot - pass: 20,
* kselftest - fail: 13, pass: 31, skip: 8
* libhugetlbfs - pass: 90, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 28, skip: 36
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 10,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 936, skip: 159
* ltp-timers-tests - pass: 12,

x15 - arm
* boot - pass: 20,
* kselftest - fail: 10, pass: 27, skip: 12
* libhugetlbfs - pass: 87, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 64,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 20, skip: 2
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 13, skip: 1
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 1035, skip: 67
* ltp-timers-tests - pass: 12,

dell-poweredge-r200 - x86_64
* boot - pass: 20,
* kselftest - fail: 15, pass: 42, skip: 10
* libhugetlbfs - pass: 76, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 64,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 61, skip: 1
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 18,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 9, skip: 1
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 956, skip: 164
* ltp-timers-tests - pass: 12,

And the hikey results.

Summary
------------------------------------------------------------------------

kernel: 4.4.100-rc1
git repo: https://git.linaro.org/lkft/arm64-stable-rc.git
git tag: 4.4.100-rc1-hikey-20171119
git commit: 13a8ba2ce732f7f1b59b72a6ccb2f5246008f4f1
git describe: 4.4.100-rc1-hikey-20171119
Test details: https://qa-reports.linaro.org/lkft/linaro-hikey-stable-rc-4.4-oe/build/4.4.100-rc1-hikey-20171119

No regressions (compared to build 4.4.99-rc1-hikey-20171116)

Boards, architectures and test suites:
-------------------------------------

hi6220-hikey - arm64
* boot - pass: 20,
* kselftest - fail: 13, pass: 31, skip: 10
* libhugetlbfs - pass: 90, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 28, skip: 36
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 21, skip: 1
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 14,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 979, skip: 124
* ltp-timers-tests - pass: 12,

Documentation - https://collaborate.linaro.org/display/LKFT/Email+Reports

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2017-11-20  6:35 ` Naresh Kamboju
@ 2017-11-20 14:09 ` Guenter Roeck
  2017-11-20 14:15   ` Greg Kroah-Hartman
  2017-11-20 16:31 ` Guenter Roeck
  2017-11-20 21:16 ` Shuah Khan
  59 siblings, 1 reply; 68+ messages in thread
From: Guenter Roeck @ 2017-11-20 14:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On 11/19/2017 06:32 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 UTC 2017.
> Anything received after that time might be too late.
> 
Build results:
	total: 145 pass: 130 fail: 15
Failed builds:
	mips:defconfig
	mips:allnoconfig
	mips:defconfig
	mips:allmodconfig
	mips:allnoconfig
	mips:bcm47xx_defconfig
	mips:bcm63xx_defconfig
	mips:nlm_xlp_defconfig
	mips:ath79_defconfig
	mips:ar7_defconfig
	mips:e55_defconfig
	mips:cavium_octeon_defconfig
	mips:malta_defconfig
	mips:rt305x_defconfig
	mips:defconfig
Qemu test results:
	total: 116 pass: 107 fail: 9
Failed tests:
	mips:malta_defconfig:nosmp
	mips:malta_defconfig:smp
	mips64:malta_defconfig:nosmp
	mips64:malta_defconfig:smp
	mipsel:24Kf:malta_defconfig:nosmp
	mipsel:24Kf:malta_defconfig:smp
	mipsel64:malta_defconfig:nosmp
	mipsel64:malta_defconfig:smp
	mipsel64:fuloong2e_defconfig:fulong2e

Error is always the same.

Building mips:defconfig ... failed
--------------
Error log:
/opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c: In function 'bootmem_init':
/opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c:439:8: error: implicit declaration of function 'PHYS_PFN' [-Werror=implicit-function-declaration]
     if (PHYS_PFN(mapstart_addr) < mapstart)
         ^

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-20 14:09 ` Guenter Roeck
@ 2017-11-20 14:15   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-20 14:15 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On Mon, Nov 20, 2017 at 06:09:44AM -0800, Guenter Roeck wrote:
> On 11/19/2017 06:32 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.100 release.
> > There are 59 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 Tue Nov 21 14:31:34 UTC 2017.
> > Anything received after that time might be too late.
> > 
> Build results:
> 	total: 145 pass: 130 fail: 15
> Failed builds:
> 	mips:defconfig
> 	mips:allnoconfig
> 	mips:defconfig
> 	mips:allmodconfig
> 	mips:allnoconfig
> 	mips:bcm47xx_defconfig
> 	mips:bcm63xx_defconfig
> 	mips:nlm_xlp_defconfig
> 	mips:ath79_defconfig
> 	mips:ar7_defconfig
> 	mips:e55_defconfig
> 	mips:cavium_octeon_defconfig
> 	mips:malta_defconfig
> 	mips:rt305x_defconfig
> 	mips:defconfig
> Qemu test results:
> 	total: 116 pass: 107 fail: 9
> Failed tests:
> 	mips:malta_defconfig:nosmp
> 	mips:malta_defconfig:smp
> 	mips64:malta_defconfig:nosmp
> 	mips64:malta_defconfig:smp
> 	mipsel:24Kf:malta_defconfig:nosmp
> 	mipsel:24Kf:malta_defconfig:smp
> 	mipsel64:malta_defconfig:nosmp
> 	mipsel64:malta_defconfig:smp
> 	mipsel64:fuloong2e_defconfig:fulong2e
> 
> Error is always the same.
> 
> Building mips:defconfig ... failed
> --------------
> Error log:
> /opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c: In function 'bootmem_init':
> /opt/buildbot/slave/stable-queue-4.4/build/arch/mips/kernel/setup.c:439:8: error: implicit declaration of function 'PHYS_PFN' [-Werror=implicit-function-declaration]
>     if (PHYS_PFN(mapstart_addr) < mapstart)
>         ^

I've just pushed out a patch for this right now, hopefully that should
fix the MIPS build issue with 4.4, sorry about that.

greg k-h

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2017-11-20 14:09 ` Guenter Roeck
@ 2017-11-20 16:31 ` Guenter Roeck
  2017-11-20 19:23   ` Greg Kroah-Hartman
  2017-11-20 21:16 ` Shuah Khan
  59 siblings, 1 reply; 68+ messages in thread
From: Guenter Roeck @ 2017-11-20 16:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 UTC 2017.
> Anything received after that time might be too late.
> 

Updated test results (for v4.4.99-61-ga1e00ef):

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

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

Guenter

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-20 16:31 ` Guenter Roeck
@ 2017-11-20 19:23   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-20 19:23 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: linux-kernel, torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On Mon, Nov 20, 2017 at 08:31:47AM -0800, Guenter Roeck wrote:
> On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.100 release.
> > There are 59 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 Tue Nov 21 14:31:34 UTC 2017.
> > Anything received after that time might be too late.
> > 
> 
> Updated test results (for v4.4.99-61-ga1e00ef):
> 
> Build results:
> 	total: 145 pass: 145 fail: 0
> Qemu test results:
> 	total: 116 pass: 116 fail: 0
> 
> Details are available at http://kerneltests.org/builders.

Great!  Glad it's all building properly now.

greg k-h

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 19:48 ` [PATCH 4.4 00/59] 4.4.100-stable review Nathan Chancellor
@ 2017-11-20 19:27   ` Greg Kroah-Hartman
  2017-11-20 19:43     ` Nathan Chancellor
  0 siblings, 1 reply; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-20 19:27 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Sun, Nov 19, 2017 at 12:48:51PM -0700, Nathan Chancellor wrote:
> On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> 
> Merged, compiled, and flashed onto my Pixel 2 XL. No initial issues
> noticed in either dmesg or general usage.

Wonderful, thanks for testing.

Just a side note, are you able to do 'fastboot kernelimage' with this
device, or do you have to flash a whole new boot image in order to test
out a new kernel?  If the later, any public scripts around to make this
easy to do, I'm thinking I should get one of these to do the same sort
of testing...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-20 19:27   ` Greg Kroah-Hartman
@ 2017-11-20 19:43     ` Nathan Chancellor
  2017-11-22 17:03       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 68+ messages in thread
From: Nathan Chancellor @ 2017-11-20 19:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Nathan Chancellor, linux-kernel, torvalds, akpm, linux, shuahkh,
	patches, ben.hutchings, stable

On Mon, Nov 20, 2017 at 08:27:07PM +0100, Greg Kroah-Hartman wrote:
> On Sun, Nov 19, 2017 at 12:48:51PM -0700, Nathan Chancellor wrote:
> > On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> > 
> > Merged, compiled, and flashed onto my Pixel 2 XL. No initial issues
> > noticed in either dmesg or general usage.
> 
> Wonderful, thanks for testing.
> 
> Just a side note, are you able to do 'fastboot kernelimage' with this
> device, or do you have to flash a whole new boot image in order to test
> out a new kernel?  If the later, any public scripts around to make this
> easy to do, I'm thinking I should get one of these to do the same sort
> of testing...
> 
> thanks,
> 
> greg k-h
>

No, I wish fastboot flash kernel Image.gz-dtb was a thing on the Pixel 2
XL but Google omitted it unfortunately (they didn't on the Pixel 2
apparently which I find odd but whatever).

All of my tools are publicly available, I'll link them below.

The build script handles compiling the kernel and boot image, the
manifest is to sync the bare essentials down so you don't have to pull
down a full AOSP tree, and the flashing function pulls the boot image
down off my server and flashes it to the device without manually doing
commands. I've also linked the kernel tree if you care to look through
anything.

Cheers!
Nathan

Script: https://github.com/nathanchance/scripts/blob/master/flash
Manifest: https://github.com/nathanchance/pixel2-manifest
Flashing: https://github.com/nathanchance/scripts/blob/master/os_darwin#L191
Kernel tree: https://github.com/nathanchance/wahoo

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2017-11-20 16:31 ` Guenter Roeck
@ 2017-11-20 21:16 ` Shuah Khan
  2017-11-21 10:56   ` Naresh Kamboju
  59 siblings, 1 reply; 68+ messages in thread
From: Shuah Khan @ 2017-11-20 21:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, stable, Shuah Khan

On 11/19/2017 07:32 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.100 release.
> There are 59 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 Tue Nov 21 14:31:34 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.4.100-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
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-20 21:16 ` Shuah Khan
@ 2017-11-21 10:56   ` Naresh Kamboju
  0 siblings, 0 replies; 68+ messages in thread
From: Naresh Kamboju @ 2017-11-21 10:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, Guenter Roeck, patches,
	Ben Hutchings, linux- stable, Shuah Khan, Tom Gall

On 21 November 2017 at 02:46, Shuah Khan <shuahkh@osg.samsung.com> wrote:
> On 11/19/2017 07:32 AM, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.4.100 release.
>> There are 59 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 Tue Nov 21 14:31:34 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.4.100-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

Results from Linaro’s test farm.
Also as per usual the HiKey results are reported separate because the
platform support isn’t in tree

Summary
------------------------------------------------------------------------

kernel: 4.4.100-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: a1e00ef97a1969fe0e8b7762d682e69b94c58d50
git describe: v4.4.99-61-ga1e00ef97a19
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.99-61-ga1e00ef97a19


No regressions (compared to build v4.4.99-60-g803704b287d8)

Boards, architectures and test suites:
-------------------------------------

juno-r2 - arm64
* boot - pass: 20,
* kselftest - fail: 13, pass: 31, skip: 7
* libhugetlbfs - pass: 90, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 28, skip: 36
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 10,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 936, skip: 159
* ltp-timers-tests - pass: 12,

dell-poweredge-r200 - x86_64
* boot - pass: 20,
* kselftest - fail: 15, pass: 43, skip: 10
* libhugetlbfs - pass: 76, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 64,
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 61, skip: 1
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 22,
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 9, skip: 1
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 956, skip: 164
* ltp-timers-tests - pass: 12,

Hikey test results,

Summary
------------------------------------------------------------------------

kernel: 4.4.100-rc1
git repo: https://git.linaro.org/lkft/arm64-stable-rc.git
git tag: 4.4.100-rc1-hikey-20171120
git commit: e1c76ac576e0e7627ea8e0b86fb7c461e3256f6a
git describe: 4.4.100-rc1-hikey-20171120
Test details: https://qa-reports.linaro.org/lkft/linaro-hikey-stable-rc-4.4-oe/build/4.4.100-rc1-hikey-20171120


No regressions (compared to build 4.4.100-rc1-hikey-20171119)

Boards, architectures and test suites:
-------------------------------------

hi6220-hikey - arm64
* boot - pass: 20,
* kselftest - fail: 13, pass: 31, skip: 10
* libhugetlbfs - pass: 90, skip: 1
* ltp-cap_bounds-tests - pass: 2,
* ltp-containers-tests - pass: 28, skip: 36
* ltp-fcntl-locktests-tests - pass: 2,
* ltp-filecaps-tests - pass: 2,
* ltp-fs-tests - pass: 60,
* ltp-fs_bind-tests - pass: 2,
* ltp-fs_perms_simple-tests - pass: 19,
* ltp-fsx-tests - pass: 2,
* ltp-hugetlb-tests - pass: 21, skip: 1
* ltp-io-tests - pass: 3,
* ltp-ipc-tests - pass: 9,
* ltp-math-tests - pass: 11,
* ltp-nptl-tests - pass: 2,
* ltp-pty-tests - pass: 4,
* ltp-sched-tests - pass: 14,
* ltp-securebits-tests - pass: 4,
* ltp-syscalls-tests - pass: 979, skip: 124
* ltp-timers-tests - pass: 12,

Documentation - https://collaborate.linaro.org/display/LKFT/Email+Reports

NOTE:
beagleboard-x15 testing still in progress.

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>

>>
>
> Compiled and booted on my test system. No dmesg regressions.
>
> thanks,
> -- Shuah

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-20 19:43     ` Nathan Chancellor
@ 2017-11-22 17:03       ` Greg Kroah-Hartman
  2017-11-22 17:45         ` Nathan Chancellor
  0 siblings, 1 reply; 68+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-22 17:03 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Mon, Nov 20, 2017 at 12:43:52PM -0700, Nathan Chancellor wrote:
> On Mon, Nov 20, 2017 at 08:27:07PM +0100, Greg Kroah-Hartman wrote:
> > On Sun, Nov 19, 2017 at 12:48:51PM -0700, Nathan Chancellor wrote:
> > > On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> > > 
> > > Merged, compiled, and flashed onto my Pixel 2 XL. No initial issues
> > > noticed in either dmesg or general usage.
> > 
> > Wonderful, thanks for testing.
> > 
> > Just a side note, are you able to do 'fastboot kernelimage' with this
> > device, or do you have to flash a whole new boot image in order to test
> > out a new kernel?  If the later, any public scripts around to make this
> > easy to do, I'm thinking I should get one of these to do the same sort
> > of testing...
> > 
> > thanks,
> > 
> > greg k-h
> >
> 
> No, I wish fastboot flash kernel Image.gz-dtb was a thing on the Pixel 2
> XL but Google omitted it unfortunately (they didn't on the Pixel 2
> apparently which I find odd but whatever).

That seems really odd, as last I checked, it was the same build image
for the kernel for both devices.  I know it's the same source tree, and
.config file.

Does one perhaps use a kernel module for some hardware and the Pixel 2
does not?  That would break the ability to use fastboot flash here.

> All of my tools are publicly available, I'll link them below.
> 
> The build script handles compiling the kernel and boot image, the
> manifest is to sync the bare essentials down so you don't have to pull
> down a full AOSP tree, and the flashing function pulls the boot image
> down off my server and flashes it to the device without manually doing
> commands. I've also linked the kernel tree if you care to look through
> anything.
> 
> Cheers!
> Nathan
> 
> Script: https://github.com/nathanchance/scripts/blob/master/flash
> Manifest: https://github.com/nathanchance/pixel2-manifest
> Flashing: https://github.com/nathanchance/scripts/blob/master/os_darwin#L191
> Kernel tree: https://github.com/nathanchance/wahoo

Wonderful, thanks for this, I'll try to play around with it.

greg k-h

^ permalink raw reply	[flat|nested] 68+ messages in thread

* Re: [PATCH 4.4 00/59] 4.4.100-stable review
  2017-11-22 17:03       ` Greg Kroah-Hartman
@ 2017-11-22 17:45         ` Nathan Chancellor
  0 siblings, 0 replies; 68+ messages in thread
From: Nathan Chancellor @ 2017-11-22 17:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Wed, Nov 22, 2017 at 06:03:31PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 20, 2017 at 12:43:52PM -0700, Nathan Chancellor wrote:
> > On Mon, Nov 20, 2017 at 08:27:07PM +0100, Greg Kroah-Hartman wrote:
> > > On Sun, Nov 19, 2017 at 12:48:51PM -0700, Nathan Chancellor wrote:
> > > > On Sun, Nov 19, 2017 at 03:32:08PM +0100, Greg Kroah-Hartman wrote:
> > > > 
> > > > Merged, compiled, and flashed onto my Pixel 2 XL. No initial issues
> > > > noticed in either dmesg or general usage.
> > > 
> > > Wonderful, thanks for testing.
> > > 
> > > Just a side note, are you able to do 'fastboot kernelimage' with this
> > > device, or do you have to flash a whole new boot image in order to test
> > > out a new kernel?  If the later, any public scripts around to make this
> > > easy to do, I'm thinking I should get one of these to do the same sort
> > > of testing...
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > >
> > 
> > No, I wish fastboot flash kernel Image.gz-dtb was a thing on the Pixel 2
> > XL but Google omitted it unfortunately (they didn't on the Pixel 2
> > apparently which I find odd but whatever).
> 
> That seems really odd, as last I checked, it was the same build image
> for the kernel for both devices.  I know it's the same source tree, and
> .config file.
> 
> Does one perhaps use a kernel module for some hardware and the Pixel 2
> does not?  That would break the ability to use fastboot flash here.
> 

Yeah, it's the same source and config but I guess the internal
partitions are different (must be a byproduct of having different
manufacturers). Luckily, there should be no downside to using a boot
image because Google publicizes the device trees along with the proper
tags (just adds a minute or two compilation...)

Both devices do use kernel modules though, for the battery and the
touchscreen drivers. Initially, the amateur developers just brute
force loaded the kernel modules in check_version but that gives us
less control so I built the drivers into the kernel image (which is
not exactly ideal either according to Google's specs but it's not
like I have a ton of other options...)

> > All of my tools are publicly available, I'll link them below.
> > 
> > The build script handles compiling the kernel and boot image, the
> > manifest is to sync the bare essentials down so you don't have to pull
> > down a full AOSP tree, and the flashing function pulls the boot image
> > down off my server and flashes it to the device without manually doing
> > commands. I've also linked the kernel tree if you care to look through
> > anything.
> > 
> > Cheers!
> > Nathan
> > 
> > Script: https://github.com/nathanchance/scripts/blob/master/flash
> > Manifest: https://github.com/nathanchance/pixel2-manifest
> > Flashing: https://github.com/nathanchance/scripts/blob/master/os_darwin#L191
> > Kernel tree: https://github.com/nathanchance/wahoo
> 
> Wonderful, thanks for this, I'll try to play around with it.
> 
> greg k-h

Any improvements or comments are certainly welcome, glad I could be of
help.

Nathan

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2017-11-22 17:45 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-19 14:32 [PATCH 4.4 00/59] 4.4.100-stable review Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 01/59] media: imon: Fix null-ptr-deref in imon_probe Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 02/59] media: dib0700: fix invalid dvb_detach argument Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 03/59] ext4: fix data exposure after a crash Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 05/59] bpf: dont let ldimm64 leak map addresses on unprivileged Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 06/59] xen-blkback: dont leak stack data via response ring Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 07/59] sctp: do not peel off an assoc from one netns to another one Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 10/59] [PATCH -stable] arm: crypto: reduce priority of bit-sliced AES cipher Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 11/59] Bluetooth: btusb: fix QCA Rome suspend/resume Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 12/59] dmaengine: dmatest: warn user when dma test times out Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 13/59] extcon: palmas: Check the parent instance to prevent the NULL Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 14/59] fm10k: request reset when mbx->state changes Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 15/59] ARM: dts: Fix compatible for ti81xx uarts for 8250 Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 16/59] ARM: dts: Fix am335x and dm814x scm syscon to probe children Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 17/59] ARM: OMAP2+: Fix init for multiple quirks for the same SoC Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 18/59] ARM: dts: Fix omap3 off mode pull defines Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 19/59] ata: ATA_BMDMA should depend on HAS_DMA Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 20/59] ata: SATA_HIGHBANK " Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 21/59] ata: SATA_MV " Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 22/59] drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 23/59] igb: reset the PHY before reading the PHY ID Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 24/59] igb: close/suspend race in netif_device_detach Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 25/59] igb: Fix hw_dbg logging in igb_update_flash_i210 Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 26/59] scsi: ufs-qcom: Fix module autoload Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 27/59] scsi: ufs: add capability to keep auto bkops always enabled Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 28/59] staging: rtl8188eu: fix incorrect ERROR tags from logs Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 29/59] scsi: lpfc: Add missing memory barrier Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 30/59] scsi: lpfc: FCoE VPort enable-disable does not bring up the VPort Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 31/59] scsi: lpfc: Correct host name in symbolic_name field Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 32/59] scsi: lpfc: Correct issue leading to oops during link reset Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 33/59] scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 34/59] ALSA: vx: Dont try to update capture stream before running Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 35/59] ALSA: vx: Fix possible transfer overflow Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 37/59] backlight: adp5520: Fix error handling in adp5520_bl_probe() Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 38/59] gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 39/59] ALSA: hda/realtek - Add new codec ID ALC299 Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 40/59] arm64: dts: NS2: reserve memory for Nitro firmware Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 41/59] ixgbe: fix AER error handling Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 42/59] ixgbe: handle close/suspend race with netif_device_detach/present Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 43/59] ixgbe: Reduce I2C retry count on X550 devices Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 44/59] ixgbe: add mask for 64 RSS queues Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 45/59] ixgbe: do not disable FEC from the driver Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 46/59] staging: rtl8712: fixed little endian problem Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 47/59] MIPS: End asm function prologue macros with .insn Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 48/59] MIPS: init: Ensure bootmem does not corrupt reserved memory Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 49/59] MIPS: init: Ensure reserved memory regions are not added to bootmem Greg Kroah-Hartman
2017-11-19 14:32 ` [PATCH 4.4 51/59] Revert "crypto: xts - Add ECB dependency" Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 52/59] Revert "uapi: fix linux/rds.h userspace compilation errors" Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 53/59] uapi: fix linux/rds.h userspace compilation error Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 54/59] uapi: fix linux/rds.h userspace compilation errors Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 55/59] USB: usbfs: compute urb->actual_length for isochronous Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 56/59] USB: Add delay-init quirk for Corsair K70 LUX keyboards Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 57/59] USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 58/59] USB: serial: garmin_gps: fix I/O after failed probe and remove Greg Kroah-Hartman
2017-11-19 14:33 ` [PATCH 4.4 59/59] USB: serial: garmin_gps: fix memory leak on probe errors Greg Kroah-Hartman
2017-11-19 19:48 ` [PATCH 4.4 00/59] 4.4.100-stable review Nathan Chancellor
2017-11-20 19:27   ` Greg Kroah-Hartman
2017-11-20 19:43     ` Nathan Chancellor
2017-11-22 17:03       ` Greg Kroah-Hartman
2017-11-22 17:45         ` Nathan Chancellor
2017-11-19 20:09 ` Guenter Roeck
2017-11-20  6:35 ` Naresh Kamboju
2017-11-20 14:09 ` Guenter Roeck
2017-11-20 14:15   ` Greg Kroah-Hartman
2017-11-20 16:31 ` Guenter Roeck
2017-11-20 19:23   ` Greg Kroah-Hartman
2017-11-20 21:16 ` Shuah Khan
2017-11-21 10:56   ` Naresh Kamboju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).