All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.9 000/109] 4.9.68-stable review
@ 2017-12-07 12:55 Greg Kroah-Hartman
  2017-12-07 12:55 ` [PATCH 4.9 001/109] bcache: only permit to recovery read error when cache device is clean Greg Kroah-Hartman
                   ` (103 more replies)
  0 siblings, 104 replies; 123+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-07 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, lkft-triage, stable

This is the start of the stable review cycle for the 4.9.68 release.
There are 109 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 Sat Dec  9 12:56:03 UTC 2017.
Anything received after that time might be too late.

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

thanks,

greg k-h

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

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

Colin Ian King <colin.king@canonical.com>
    usb: host: fix incorrect updating of offset

Oliver Neukum <oneukum@suse.com>
    USB: usbfs: Filter flags passed in from user space

Dan Carpenter <dan.carpenter@oracle.com>
    USB: devio: Prevent integer overflow in proc_do_submiturb()

Mateusz Berezecki <mateuszb@fastmail.fm>
    USB: Increase usbfs transfer limit

Masakazu Mokuno <masakazu.mokuno@gmail.com>
    USB: core: Add type-specific length check of BOS descriptors

Yu Chen <chenyu56@huawei.com>
    usb: xhci: fix panic in xhci_free_virt_devices_depth_first

Mike Looijmans <mike.looijmans@topic.nl>
    usb: hub: Cycle HUB power when initialization fails

Daniel Vetter <daniel.vetter@ffwll.ch>
    dma-buf: Update kerneldoc for sync_file_create

Gustavo Padovan <gustavo.padovan@collabora.co.uk>
    dma-buf/sync_file: hold reference to fence when creating sync_file

Dominik Behr <dbehr@chromium.org>
    dma-buf/sw_sync: force signal all unsignaled fences on dying timeline

Chris Wilson <chris@chris-wilson.co.uk>
    dma-fence: Introduce drm_fence_set_error() helper

Chris Wilson <chris@chris-wilson.co.uk>
    dma-fence: Wrap querying the fence->status

Chris Wilson <chris@chris-wilson.co.uk>
    dma-fence: Clear fence->status during dma_fence_init()

Gustavo Padovan <gustavo.padovan@collabora.com>
    dma-buf/sw_sync: clean up list before signaling the fence

Gustavo Padovan <gustavo.padovan@collabora.com>
    dma-buf/sw_sync: move timeline_fence_ops around

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: Use an rbtree to sort fences in the timeline

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: Fix locking around sync_timeline lists

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: sync_pt is private and of fixed size

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: Reduce irqsave/irqrestore from known context

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: Prevent user overflow on timeline advance

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound

Chris Wilson <chris@chris-wilson.co.uk>
    dma-buf/dma-fence: Extract __dma_fence_is_later()

Rui Sousa <rui.sousa@nxp.com>
    net: fec: fix multicast filtering hardware setup

Mart van Santen <mart@greenhost.nl>
    xen-netback: vif counters from int/long to u64

Hans Verkuil <hverkuil@xs4all.nl>
    cec: initiator should be the same as the destination for, poll

Ross Lagerwall <ross.lagerwall@citrix.com>
    xen-netfront: Improve error handling during initialization

Jan Kara <jack@suse.cz>
    mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers

Alexey Kardashevskiy <aik@ozlabs.ru>
    vfio/spapr: Fix missing mutex unlock when creating a window

Ivan Vecera <cera@cera.cz>
    be2net: fix initial MAC setting

Vincent <vincent.stehle@laposte.net>
    net: thunderx: avoid dereferencing xcv when NULL

Sean Nyekjaer <sean.nyekjaer@prevas.dk>
    net: phy: micrel: KSZ8795 do not set SUPPORTED_[Asym_]Pause

Andreas Schultz <aschultz@tpip.net>
    gtp: fix cross netns recv on gtp socket

Andreas Schultz <aschultz@tpip.net>
    gtp: clear DF bit on GTP packet tx

Sagi Grimberg <sagi@grimberg.me>
    nvmet: cancel fatal error and flush async work before free controller

Mike Looijmans <mike.looijmans@topic.nl>
    i2c: i2c-cadence: Initialize configuration before probing devices

Jason Baron <jbaron@akamai.com>
    tcp: correct memory barrier usage in tcp_check_space()

Iago Abal <mail@iagoabal.eu>
    dmaengine: pl330: fix double lock

Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
    tipc: fix cleanup at module unload

Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
    tipc: fix nametbl_lock soft lockup at module exit

Ram Amrani <Ram.Amrani@Cavium.com>
    RDMA/qedr: Fix RDMA CM loopback

Ram Amrani <Ram.Amrani@Cavium.com>
    RDMA/qedr: Return success when not changing QP state

Johannes Berg <johannes.berg@intel.com>
    mac80211: don't try to sleep in rate_control_rate_init()

Xiangliang Yu <Xiangliang.Yu@amd.com>
    drm/amdgpu: fix unload driver issue for virtual display

Kevin Hao <haokexin@gmail.com>
    x86/fpu: Set the xcomp_bv when we fake up a XSAVES area

Colin Ian King <colin.king@canonical.com>
    net: sctp: fix array overrun read on sctp_timer_tbl

Andrzej Hajda <a.hajda@samsung.com>
    drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement

Rex Zhu <Rex.Zhu@amd.com>
    drm/amdgpu: fix bug set incorrect value to vce register

Quinn Tran <quinn.tran@cavium.com>
    qla2xxx: Fix wrong IOCB type assumption

Reza Arbab <arbab@linux.vnet.ibm.com>
    powerpc/mm: Fix memory hotplug BUG() on radix

Jiri Olsa <jolsa@kernel.org>
    perf/x86/intel: Account interrupts for PEBS errors

Trond Myklebust <trond.myklebust@primarydata.com>
    NFSv4: Fix client recovery when server reboots multiple times

Michal Kazior <michal.kazior@tieto.com>
    mac80211: prevent skb/txq mismatch

Christoffer Dall <christoffer.dall@linaro.org>
    KVM: arm/arm64: Fix occasional warning from the timer work function

Andrzej Hajda <a.hajda@samsung.com>
    drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled

Andrzej Hajda <a.hajda@samsung.com>
    drm/exynos/decon5433: update shadow registers iff there are active windows

Benjamin Coddington <bcodding@redhat.com>
    nfs: Don't take a reference on fl->fl_file for LOCK operation

Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
    ravb: Remove Rx overflow log messages

Johannes Berg <johannes.berg@intel.com>
    mac80211: calculate min channel width correctly

Michal Hocko <mhocko@suse.com>
    mm: fix remote numa hits statistics

Stephen Boyd <sboyd@codeaurora.org>
    net: qrtr: Mark 'buf' as little endian

Eric W. Biederman <ebiederm@xmission.com>
    libfs: Modify mount_pseudo_xattr to be clear it is not a userspace mount

Vlad Tsyrklevich <vlad@tsyrklevich.net>
    net/appletalk: Fix kernel memory disclosure

Ivan Vecera <cera@cera.cz>
    be2net: fix unicast list filling

Ivan Vecera <cera@cera.cz>
    be2net: fix accesses to unicast list

David Forster <dforster@brocade.com>
    vti6: fix device register to report IFLA_INFO_KIND

Peter Ujfalusi <peter.ujfalusi@ti.com>
    ARM: OMAP1: DMA: Correct the number of logical channels

Adam Ford <aford173@gmail.com>
    ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate

Florian Fainelli <f.fainelli@gmail.com>
    net: systemport: Pad packet before inserting TSB

Florian Fainelli <f.fainelli@gmail.com>
    net: systemport: Utilize skb_put_padto()

Varun Prakash <varun@chelsio.com>
    libcxgb: fix error check for ip6_route_output()

Vincent Pelletier <plr.vincent@gmail.com>
    usb: gadget: f_fs: Fix ExtCompat descriptor validation

M'boumba Cedric Madianga <cedric.madianga@gmail.com>
    dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status

M'boumba Cedric Madianga <cedric.madianga@gmail.com>
    dmaengine: stm32-dma: Set correct args number for DMA request from DT

Guillaume Nault <g.nault@alphalink.fr>
    l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups

Slava Shwartsman <slavash@mellanox.com>
    net/mlx4_en: Fix type mismatch for 32-bit systems

Jan Kara <jack@suse.cz>
    dax: Avoid page invalidation races and unnecessary radix tree traversals

Ladislav Michl <ladis@linux-mips.org>
    iio: adc: ti-ads1015: add 10% to conversion wait time

Arnaldo Carvalho de Melo <acme@redhat.com>
    tools include: Do not use poison with C++

Masami Hiramatsu <mhiramat@kernel.org>
    kprobes/x86: Disable preemption in ftrace-based jprobes

Thomas Richter <tmricht@linux.vnet.ibm.com>
    perf test attr: Fix ignored test case result

Ben Hutchings <ben@decadent.org.uk>
    usbip: tools: Install all headers needed for libusbip development

Jibin Xu <jibin.xu@windriver.com>
    sysrq : fix Show Regs call trace on ARM

Gustavo A. R. Silva <garsilva@embeddedor.com>
    EDAC, sb_edac: Fix missing break in switch

Dave Hansen <dave.hansen@linux.intel.com>
    x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()

Aaron Sierra <asierra@xes-inc.com>
    serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X

Alexey Khoroshilov <khoroshilov@ispras.ru>
    usb: phy: tahvo: fix error handling in tahvo_usb_probe()

John Stultz <john.stultz@linaro.org>
    usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode

John Stultz <john.stultz@linaro.org>
    usb: dwc2: Fix UDC state tracking

Subhash Jadavani <subhashj@codeaurora.org>
    mmc: sdhci-msm: fix issue with power irq

Johan Hovold <johan@kernel.org>
    spi: spi-axi: fix potential use-after-free after deregistration

Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
    spi: sh-msiof: Fix DMA transfer size check

Colin Ian King <colin.king@canonical.com>
    staging: rtl8188eu: avoid a null dereference on pmlmepriv

Lukas Wunner <lukas@wunner.de>
    serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()

Greg Ungerer <gerg@linux-m68k.org>
    m68k: fix ColdFire node shift size calculation

Bryan O'Donoghue <pure.logic@nexus-software.ie>
    staging: greybus: loopback: Fix iteration count on async path

Andy Lutomirski <luto@kernel.org>
    selftests/x86/ldt_get: Add a few additional tests for limits

Christian Borntraeger <borntraeger@de.ibm.com>
    s390/pci: do not require AIS facility

Boshi Wang <wangboshi@huawei.com>
    ima: fix hash algorithm initialization

Sebastian Sjoholm <ssjoholm@mac.com>
    USB: serial: option: add Quectel BG96 id

Heiko Carstens <heiko.carstens@de.ibm.com>
    s390/runtime instrumentation: simplify task exit handling

Matt Wilson <msw@amazon.com>
    serial: 8250_pci: Add Amazon PCI serial device ID

Kai-Heng Feng <kai.heng.feng@canonical.com>
    usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub

Hans de Goede <hdegoede@redhat.com>
    uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices

Wang Nan <wangnan0@huawei.com>
    mm, oom_reaper: gather each vma to prevent leaking TLB entry

Horia Geantă <horia.geanta@nxp.com>
    Revert "crypto: caam - get rid of tasklet"

Stefan Agner <stefan@agner.ch>
    drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume()

Stefan Agner <stefan@agner.ch>
    drm/fsl-dcu: avoid disabling pixel clock twice on suspend

Rui Hua <huarui.dev@gmail.com>
    bcache: recover data from backing when data is clean

Coly Li <colyli@suse.de>
    bcache: only permit to recovery read error when cache device is clean


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

Diffstat:

 Makefile                                          |   4 +-
 arch/arm/mach-omap1/dma.c                         |  16 +-
 arch/arm/mach-omap2/pdata-quirks.c                |   2 +-
 arch/m68k/mm/mcfmmu.c                             |   2 +-
 arch/powerpc/include/asm/book3s/64/hash.h         |   4 +
 arch/powerpc/mm/hash_utils_64.c                   |   4 +-
 arch/powerpc/mm/pgtable-book3s64.c                |  18 ++
 arch/s390/include/asm/pci_insn.h                  |   2 +-
 arch/s390/include/asm/runtime_instr.h             |   4 +-
 arch/s390/kernel/process.c                        |   3 +-
 arch/s390/kernel/runtime_instr.c                  |  30 +--
 arch/s390/pci/pci.c                               |   5 +-
 arch/s390/pci/pci_insn.c                          |   6 +-
 arch/x86/events/intel/ds.c                        |   6 +-
 arch/x86/include/asm/syscalls.h                   |   2 +-
 arch/x86/kernel/fpu/xstate.c                      |   1 +
 arch/x86/kernel/kprobes/ftrace.c                  |  23 ++-
 arch/x86/kernel/ldt.c                             |  16 +-
 arch/x86/um/ldt.c                                 |   7 +-
 drivers/crypto/caam/intern.h                      |   1 +
 drivers/crypto/caam/jr.c                          |  25 ++-
 drivers/dma-buf/fence.c                           |  26 +++
 drivers/dma-buf/sw_sync.c                         | 211 +++++++++++++---------
 drivers/dma-buf/sync_debug.c                      |  39 ++--
 drivers/dma-buf/sync_debug.h                      |  27 ++-
 drivers/dma-buf/sync_file.c                       |  22 +--
 drivers/dma/pl330.c                               |  19 +-
 drivers/dma/stm32-dma.c                           |  17 +-
 drivers/edac/sb_edac.c                            |   1 +
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c          |   5 +-
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c             |   2 +-
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c     |   9 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c         |   3 +-
 drivers/i2c/busses/i2c-cadence.c                  |   8 +-
 drivers/iio/adc/ti-ads1015.c                      |   1 +
 drivers/infiniband/hw/qedr/qedr_cm.c              |   4 +-
 drivers/infiniband/hw/qedr/verbs.c                |   2 +-
 drivers/md/bcache/request.c                       |   9 +-
 drivers/mmc/host/sdhci-msm.c                      |  18 ++
 drivers/net/appletalk/ipddp.c                     |   2 +-
 drivers/net/ethernet/broadcom/bcmsysport.c        |  23 ++-
 drivers/net/ethernet/cavium/thunder/thunder_xcv.c |   3 +-
 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c |  12 +-
 drivers/net/ethernet/emulex/benet/be_main.c       |  45 +++--
 drivers/net/ethernet/freescale/fec_main.c         |  23 +--
 drivers/net/ethernet/mellanox/mlx4/en_clock.c     |   8 +-
 drivers/net/ethernet/renesas/ravb_main.c          |   8 +-
 drivers/net/gtp.c                                 |  12 +-
 drivers/net/phy/micrel.c                          |   2 +-
 drivers/net/xen-netback/common.h                  |   8 +-
 drivers/net/xen-netback/interface.c               |   8 +-
 drivers/net/xen-netfront.c                        |  29 ++-
 drivers/nvme/target/core.c                        |   3 +
 drivers/scsi/qla2xxx/qla_target.c                 |   8 +-
 drivers/spi/spi-axi-spi-engine.c                  |   4 +-
 drivers/spi/spi-sh-msiof.c                        |   2 +-
 drivers/staging/greybus/loopback.c                |   4 +-
 drivers/staging/lustre/lustre/llite/llite_mmap.c  |   4 +-
 drivers/staging/media/cec/cec-adap.c              |   7 +-
 drivers/staging/rtl8188eu/core/rtw_mlme.c         |   6 +-
 drivers/tty/serial/8250/8250_fintek.c             |   2 +-
 drivers/tty/serial/8250/8250_pci.c                |   3 +
 drivers/tty/serial/8250/8250_port.c               |   5 +-
 drivers/tty/sysrq.c                               |   9 +-
 drivers/usb/core/config.c                         |  28 ++-
 drivers/usb/core/devio.c                          |  56 +++---
 drivers/usb/core/hub.c                            |   9 +
 drivers/usb/core/quirks.c                         |   3 +
 drivers/usb/dwc2/gadget.c                         |   7 +
 drivers/usb/gadget/function/f_fs.c                |   2 +-
 drivers/usb/host/ehci-dbg.c                       |   2 +-
 drivers/usb/host/xhci-mem.c                       |   7 +
 drivers/usb/phy/phy-tahvo.c                       |   3 +-
 drivers/usb/serial/option.c                       |   3 +
 drivers/usb/storage/uas-detect.h                  |   4 +
 drivers/vfio/vfio_iommu_spapr_tce.c               |  11 +-
 fs/dax.c                                          |  28 ++-
 fs/libfs.c                                        |   3 +-
 fs/nfs/nfs4proc.c                                 |   3 -
 fs/nfs/nfs4state.c                                |   1 -
 include/linux/buffer_head.h                       |   4 +-
 include/linux/fence.h                             |  67 ++++++-
 include/linux/perf_event.h                        |   1 +
 include/uapi/linux/usb/ch9.h                      |   3 +
 kernel/events/core.c                              |  47 +++--
 mm/oom_kill.c                                     |   7 +-
 mm/page_alloc.c                                   |  15 +-
 net/ipv4/tcp_input.c                              |   2 +-
 net/ipv6/ip6_vti.c                                |   2 +-
 net/l2tp/l2tp_ip.c                                |  19 +-
 net/l2tp/l2tp_ip6.c                               |  20 +-
 net/mac80211/chan.c                               |   3 -
 net/mac80211/tx.c                                 |  17 +-
 net/qrtr/qrtr.c                                   |   4 +-
 net/sctp/debug.c                                  |   2 +-
 net/tipc/server.c                                 |  20 +-
 security/integrity/ima/ima_main.c                 |   4 +
 tools/include/linux/poison.h                      |   5 +
 tools/perf/tests/attr.c                           |   2 +-
 tools/testing/selftests/x86/ldt_gdt.c             |  17 +-
 tools/usb/usbip/Makefile.am                       |   3 +-
 virt/kvm/arm/arch_timer.c                         |   3 -
 102 files changed, 759 insertions(+), 522 deletions(-)

^ permalink raw reply	[flat|nested] 123+ messages in thread
* [4.9,022/109] usb: dwc2: Fix UDC state tracking
  2017-12-07 12:55 [PATCH 4.9 000/109] 4.9.68-stable review Greg Kroah-Hartman
@ 2017-12-07 12:56 ` Greg Kroah-Hartman
  2017-12-07 12:55 ` [PATCH 4.9 002/109] bcache: recover data from backing when data " Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  103 siblings, 0 replies; 123+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-07 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wei Xu, Guodong Xu, Amit Pundir,
	YongQin Liu, John Youn, Minas Harutyunyan, Douglas Anderson,
	Chen Yu, Felipe Balbi, linux-usb, Minas Harutyunyan, John Stultz,
	Sasha Levin

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

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

From: John Stultz <john.stultz@linaro.org>


[ Upstream commit ce2b21a4e5ce042c0a42c9db8fa9e0f849427d5e ]

It has been noticed that the dwc2 udc state reporting doesn't
seem to work (at least on HiKey boards). Where after the initial
setup, the sysfs /sys/class/udc/f72c0000.usb/state file would
report "configured" no matter the state of the OTG port.

This patch adds a call so that we report to the UDC layer when
the gadget device is disconnected.

This patch does depend on the previous patch ("usb: dwc2:
Improve gadget state disconnection handling") in this patch set
in order to properly work.

Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: YongQin Liu <yongqin.liu@linaro.org>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Chen Yu <chenyu56@huawei.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Tested-by: Minas Harutyunyan <hminas@synopsys.com>
Reported-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/dwc2/gadget.c |    2 ++
 1 file changed, 2 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2467,6 +2467,8 @@ void dwc2_hsotg_disconnect(struct dwc2_h
 
 	call_gadget(hsotg, disconnect);
 	hsotg->lx_state = DWC2_L3;
+
+	usb_gadget_set_state(&hsotg->gadget, USB_STATE_NOTATTACHED);
 }
 
 /**

^ permalink raw reply	[flat|nested] 123+ messages in thread
* [4.9,023/109] usb: dwc2: Error out of dwc2_hsotg_ep_disable() if were in host mode
  2017-12-07 12:55 [PATCH 4.9 000/109] 4.9.68-stable review Greg Kroah-Hartman
@ 2017-12-07 12:56 ` Greg Kroah-Hartman
  2017-12-07 12:55 ` [PATCH 4.9 002/109] bcache: recover data from backing when data " Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  103 siblings, 0 replies; 123+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-07 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wei Xu, Guodong Xu, Amit Pundir,
	YongQin Liu, John Youn, Minas Harutyunyan, Douglas Anderson,
	Chen Yu, Felipe Balbi, linux-usb, Minas Harutyunyan, John Stultz,
	Sasha Levin

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

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

From: John Stultz <john.stultz@linaro.org>


[ Upstream commit 9b481092c2a31a6b630aff9c28f0145bf6683787 ]

We've found that while in host mode, using Android, if one runs
the command:
  stop adbd

The existing usb devices being utilized in host mode are disconnected.
This is most visible with usb networking devices.

This seems to be due to adbd closing the file:
  /dev/usb-ffs/adb/ep0
Which calls ffs_ep0_release() and the following backtrace:

[<ffffff800875a430>] dwc2_hsotg_ep_disable+0x148/0x150
[<ffffff800875a498>] dwc2_hsotg_udc_stop+0x60/0x110
[<ffffff8008787950>] usb_gadget_remove_driver+0x58/0x78
[<ffffff80087879e4>] usb_gadget_unregister_driver+0x74/0xe8
[<ffffff80087850c0>] unregister_gadget+0x28/0x58
[<ffffff800878511c>] unregister_gadget_item+0x2c/0x40
[<ffffff8008790ea8>] ffs_data_clear+0xe8/0xf8
[<ffffff8008790ed8>] ffs_data_reset+0x20/0x58
[<ffffff8008793218>] ffs_data_closed+0x98/0xe8
[<ffffff80087932d8>] ffs_ep0_release+0x20/0x30

Then when dwc2_hsotg_ep_disable() is called, we call
kill_all_requests() which causes a bunch of the following
messages:

dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
init: Service 'adbd' (pid 1915) killed by signal 9
init: Sending signal 9 to service 'adbd' (pid 1915) process group...
init: Successfully killed process cgroup uid 0 pid 1915 in 0ms
init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:15)
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 12 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 15 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
dwc2 f72c0000.usb: dwc2_update_urb_state_abn(): trimming xfer length

And the usb devices connected are basically hung at this point.

It seems like if we're in host mode, we probably shouldn't run
the dwc2_hostg_ep_disable logic, so this patch returns an error
in that case.

With this patch (along with the previous patch in this set), we avoid
the mismatched interrupts and connected usb devices continue to function.

I'm not sure if some other solution would be better here, but this seems
to work, so I wanted to send it out for input on what the right approach
should be.

Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: YongQin Liu <yongqin.liu@linaro.org>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Chen Yu <chenyu56@huawei.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Tested-by: Minas Harutyunyan <hminas@synopsys.com>
Reported-by: YongQin Liu <yongqin.liu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/dwc2/gadget.c |    5 +++++
 1 file changed, 5 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3117,6 +3117,11 @@ static int dwc2_hsotg_ep_disable(struct
 		return -EINVAL;
 	}
 
+	if (hsotg->op_state != OTG_STATE_B_PERIPHERAL) {
+		dev_err(hsotg->dev, "%s: called in host mode?\n", __func__);
+		return -EINVAL;
+	}
+
 	epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index);
 
 	spin_lock_irqsave(&hsotg->lock, flags);

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

end of thread, other threads:[~2017-12-08 14:04 UTC | newest]

Thread overview: 123+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 12:55 [PATCH 4.9 000/109] 4.9.68-stable review Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 001/109] bcache: only permit to recovery read error when cache device is clean Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 002/109] bcache: recover data from backing when data " Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 003/109] drm/fsl-dcu: avoid disabling pixel clock twice on suspend Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 004/109] drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume() Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 006/109] mm, oom_reaper: gather each vma to prevent leaking TLB entry Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 007/109] uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 008/109] usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 009/109] serial: 8250_pci: Add Amazon PCI serial device ID Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 010/109] s390/runtime instrumentation: simplify task exit handling Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 011/109] USB: serial: option: add Quectel BG96 id Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 012/109] ima: fix hash algorithm initialization Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 013/109] s390/pci: do not require AIS facility Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 014/109] selftests/x86/ldt_get: Add a few additional tests for limits Greg Kroah-Hartman
2017-12-07 12:55 ` [PATCH 4.9 015/109] staging: greybus: loopback: Fix iteration count on async path Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 016/109] m68k: fix ColdFire node shift size calculation Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 017/109] serial: 8250_fintek: Fix rs485 disablement on invalid ioctl() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 018/109] staging: rtl8188eu: avoid a null dereference on pmlmepriv Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 019/109] spi: sh-msiof: Fix DMA transfer size check Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 020/109] spi: spi-axi: fix potential use-after-free after deregistration Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 021/109] mmc: sdhci-msm: fix issue with power irq Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 024/109] usb: phy: tahvo: fix error handling in tahvo_usb_probe() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 025/109] serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 026/109] x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 027/109] EDAC, sb_edac: Fix missing break in switch Greg Kroah-Hartman
2017-12-07 12:56   ` [4.9,027/109] " Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 028/109] sysrq : fix Show Regs call trace on ARM Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 029/109] usbip: tools: Install all headers needed for libusbip development Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 030/109] perf test attr: Fix ignored test case result Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 031/109] kprobes/x86: Disable preemption in ftrace-based jprobes Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 034/109] dax: Avoid page invalidation races and unnecessary radix tree traversals Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 035/109] net/mlx4_en: Fix type mismatch for 32-bit systems Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 036/109] l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 037/109] dmaengine: stm32-dma: Set correct args number for DMA request from DT Greg Kroah-Hartman
2017-12-07 13:03   ` Ludovic BARRE
2017-12-07 13:14     ` Pierre Yves MORDRET
2017-12-07 13:50       ` Greg Kroah-Hartman
2017-12-07 14:04         ` Pierre Yves MORDRET
2017-12-07 15:40           ` alexander.levin
2017-12-07 16:49             ` Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 038/109] dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status Greg Kroah-Hartman
2017-12-07 13:04   ` Ludovic BARRE
2017-12-07 13:18     ` Ludovic BARRE
2017-12-07 13:26       ` Pierre Yves MORDRET
2017-12-07 13:41       ` Pierre Yves MORDRET
2017-12-07 14:00         ` Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 039/109] usb: gadget: f_fs: Fix ExtCompat descriptor validation Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 040/109] libcxgb: fix error check for ip6_route_output() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 041/109] net: systemport: Utilize skb_put_padto() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 042/109] net: systemport: Pad packet before inserting TSB Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 043/109] ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 044/109] ARM: OMAP1: DMA: Correct the number of logical channels Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 045/109] vti6: fix device register to report IFLA_INFO_KIND Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 046/109] be2net: fix accesses to unicast list Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 047/109] be2net: fix unicast list filling Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 048/109] net/appletalk: Fix kernel memory disclosure Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 049/109] libfs: Modify mount_pseudo_xattr to be clear it is not a userspace mount Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 050/109] net: qrtr: Mark buf as little endian Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 051/109] mm: fix remote numa hits statistics Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 052/109] mac80211: calculate min channel width correctly Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 053/109] ravb: Remove Rx overflow log messages Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 054/109] nfs: Dont take a reference on fl->fl_file for LOCK operation Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 055/109] drm/exynos/decon5433: update shadow registers iff there are active windows Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 056/109] drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 057/109] KVM: arm/arm64: Fix occasional warning from the timer work function Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 058/109] mac80211: prevent skb/txq mismatch Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 059/109] NFSv4: Fix client recovery when server reboots multiple times Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 060/109] perf/x86/intel: Account interrupts for PEBS errors Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 061/109] powerpc/mm: Fix memory hotplug BUG() on radix Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 062/109] qla2xxx: Fix wrong IOCB type assumption Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 064/109] drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 065/109] net: sctp: fix array overrun read on sctp_timer_tbl Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 066/109] x86/fpu: Set the xcomp_bv when we fake up a XSAVES area Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 068/109] mac80211: dont try to sleep in rate_control_rate_init() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 069/109] RDMA/qedr: Return success when not changing QP state Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 070/109] RDMA/qedr: Fix RDMA CM loopback Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 071/109] tipc: fix nametbl_lock soft lockup at module exit Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 072/109] tipc: fix cleanup at module unload Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 073/109] dmaengine: pl330: fix double lock Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 074/109] tcp: correct memory barrier usage in tcp_check_space() Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 075/109] i2c: i2c-cadence: Initialize configuration before probing devices Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 076/109] nvmet: cancel fatal error and flush async work before free controller Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 077/109] gtp: clear DF bit on GTP packet tx Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 078/109] gtp: fix cross netns recv on gtp socket Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 079/109] net: phy: micrel: KSZ8795 do not set SUPPORTED_[Asym_]Pause Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 081/109] be2net: fix initial MAC setting Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 082/109] vfio/spapr: Fix missing mutex unlock when creating a window Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 083/109] mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 084/109] xen-netfront: Improve error handling during initialization Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 085/109] [media] cec: initiator should be the same as the destination for, poll Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 086/109] xen-netback: vif counters from int/long to u64 Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 087/109] net: fec: fix multicast filtering hardware setup Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 088/109] dma-buf/dma-fence: Extract __dma_fence_is_later() Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 089/109] dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 090/109] dma-buf/sw-sync: Prevent user overflow on timeline advance Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 091/109] dma-buf/sw-sync: Reduce irqsave/irqrestore from known context Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 092/109] dma-buf/sw-sync: sync_pt is private and of fixed size Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 093/109] dma-buf/sw-sync: Fix locking around sync_timeline lists Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 094/109] dma-buf/sw-sync: Use an rbtree to sort fences in the timeline Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 095/109] dma-buf/sw_sync: move timeline_fence_ops around Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 096/109] dma-buf/sw_sync: clean up list before signaling the fence Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 097/109] dma-fence: Clear fence->status during dma_fence_init() Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 098/109] dma-fence: Wrap querying the fence->status Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 099/109] dma-fence: Introduce drm_fence_set_error() helper Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 100/109] dma-buf/sw_sync: force signal all unsignaled fences on dying timeline Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 101/109] dma-buf/sync_file: hold reference to fence when creating sync_file Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 102/109] dma-buf: Update kerneldoc for sync_file_create Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 103/109] usb: hub: Cycle HUB power when initialization fails Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 104/109] usb: xhci: fix panic in xhci_free_virt_devices_depth_first Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 105/109] USB: core: Add type-specific length check of BOS descriptors Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 106/109] USB: Increase usbfs transfer limit Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 107/109] USB: devio: Prevent integer overflow in proc_do_submiturb() Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 108/109] USB: usbfs: Filter flags passed in from user space Greg Kroah-Hartman
2017-12-07 12:57 ` [PATCH 4.9 109/109] usb: host: fix incorrect updating of offset Greg Kroah-Hartman
2017-12-07 20:55 ` [PATCH 4.9 000/109] 4.9.68-stable review Guenter Roeck
2017-12-08  0:07 ` Shuah Khan
2017-12-08  5:35 ` Naresh Kamboju
2017-12-08 13:58   ` Greg Kroah-Hartman
2017-12-08 14:04     ` Milosz Wasilewski
2017-12-07 12:56 [4.9,022/109] usb: dwc2: Fix UDC state tracking Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 022/109] " Greg Kroah-Hartman
2017-12-07 12:56 [4.9,023/109] usb: dwc2: Error out of dwc2_hsotg_ep_disable() if were in host mode Greg Kroah-Hartman
2017-12-07 12:56 ` [PATCH 4.9 023/109] " Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.