All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-22 10:26 Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path Greg Kroah-Hartman
                   ` (162 more replies)
  0 siblings, 163 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

This is the start of the stable review cycle for the 4.4.203 release.
There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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.203-rc1

Pavel Tatashin <pasha.tatashin@soleen.com>
    arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault

Roger Quadros <rogerq@ti.com>
    ARM: dts: omap5: Fix dual-role mode on Super-Speed port

Huibin Hong <huibin.hong@rock-chips.com>
    spi: rockchip: initialize dma_slave_config properly

Felix Fietkau <nbd@nbd.name>
    mac80211: minstrel: fix CCK rate group streams value

Thierry Reding <treding@nvidia.com>
    hwmon: (pwm-fan) Silence error on probe deferral

Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
    ARM: 8802/1: Call syscall_trace_exit even when system call skipped

Trent Piepho <tpiepho@impinj.com>
    spi: spidev: Fix OF tree warning logic

Marek Vasut <marex@denx.de>
    gpio: syscon: Fix possible NULL ptr usage

Bjorn Helgaas <bhelgaas@google.com>
    x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error

Colin Ian King <colin.king@canonical.com>
    media: cx231xx: fix potential sign-extension overflow on large shift

Tim Smith <tim.smith@citrix.com>
    GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads

Wenwen Wang <wang6495@umn.edu>
    media: isif: fix a NULL pointer dereference bug

He Zhe <zhe.he@windriver.com>
    printk: Give error on attempt to set log buffer length to over 2G

Nathan Chancellor <natechancellor@gmail.com>
    backlight: lm3639: Unconditionally call led_classdev_unregister

Borislav Petkov <bp@suse.de>
    proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()

Shenghui Wang <shhuiw@foxmail.com>
    bcache: recal cached_dev_sectors on detach

Dan Carpenter <dan.carpenter@oracle.com>
    fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()

Dan Carpenter <dan.carpenter@oracle.com>
    fbdev: sbuslib: use checked version of put_user()

Ronald Tschalär <ronald@innovation.ch>
    ACPI / SBS: Fix rare oops when removing modules

Radu Solea <radu.solea@nxp.com>
    crypto: mxs-dcp - Fix AES issues

Radu Solea <radu.solea@nxp.com>
    crypto: mxs-dcp - Fix SHA null hashes and output length

Borislav Petkov <bp@suse.de>
    x86/olpc: Fix build error with CONFIG_MFD_CS5535=m

Martin Kepplinger <martink@posteo.de>
    Input: st1232 - set INPUT_PROP_DIRECT property

Rami Rosen <ramirose@gmail.com>
    dmaengine: ioat: fix prototype of ioat_enumerate_channels

Olga Kornievskaia <kolga@netapp.com>
    NFSv4.x: fix lock recovery during delegation recall

Chung-Hsien Hsu <stanley.hsu@cypress.com>
    brcmfmac: fix full timeout waiting for action frame on-channel tx

Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
    mtd: physmap_of: Release resources on error

Johan Hovold <johan@kernel.org>
    USB: serial: cypress_m8: fix interrupt-out transfer length

Cameron Kaiser <spectre@floodgap.com>
    KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR

Michael Pobega <mpobega@neverware.com>
    ALSA: hda/sigmatel - Disable automute for Elo VuPoint

Nathan Chancellor <natechancellor@gmail.com>
    ata: ep93xx: Use proper enums for directions

Wei Yongjun <weiyongjun1@huawei.com>
    IB/mthca: Fix error return code in __mthca_init_one()

Radoslaw Tyl <radoslawx.tyl@intel.com>
    ixgbe: Fix crash with VFs and flow director on interface flap

Nathan Chancellor <natechancellor@gmail.com>
    mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer

Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    powerpc/pseries: Fix how we iterate over the DTL entries

Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    powerpc/pseries: Fix DTL buffer registration

Nathan Chancellor <natechancellor@gmail.com>
    cxgb4: Use proper enum in IEEE_FAUX_SYNC

Nathan Chancellor <natechancellor@gmail.com>
    cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update

Dan Carpenter <dan.carpenter@oracle.com>
    mei: samples: fix a signedness bug in amt_host_if_call()

Nathan Chancellor <natechancellor@gmail.com>
    dmaengine: timb_dma: Use proper enum in td_prep_slave_sg

Nathan Chancellor <natechancellor@gmail.com>
    dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction

Andrew Zaborowski <andrew.zaborowski@intel.com>
    nl80211: Fix a GET_KEY reply attribute

Jia-Ju Bai <baijiaju1990@gmail.com>
    usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()

Simon Wunderlich <sw@simonwunderlich.de>
    ath9k: fix reporting calculated new FFT upper max

Ben Greear <greearb@candelatech.com>
    ath10k: fix vdev-start timeout on error

Trond Myklebust <trond.myklebust@hammerspace.com>
    SUNRPC: Fix priority queue fairness

Jaegeuk Kim <jaegeuk@kernel.org>
    f2fs: return correct errno in f2fs_gc

H. Nikolaus Schaller <hns@goldelico.com>
    ARM: dts: omap5: enable OTG role for DWC3 controller

YueHaibing <yuehaibing@huawei.com>
    net: ovs: fix return type of ndo_start_xmit function

Jens Axboe <axboe@kernel.dk>
    libata: have ata_scsi_rw_xlat() fail invalid passthrough requests

Christoph Hellwig <hch@lst.de>
    block: introduce blk_rq_is_passthrough

Daniel Vetter <daniel.vetter@ffwll.ch>
    fbdev: Ditch fb_edid_add_monspecs

Geert Uytterhoeven <geert+renesas@glider.be>
    fbdev: Remove unused SH-Mobile HDMI driver

Masami Hiramatsu <mhiramat@kernel.org>
    uprobes/x86: Prohibit probing on MOV SS instruction

Masami Hiramatsu <mhiramat@kernel.org>
    kprobes/x86: Prohibit probing on exception masking instructions

John Johansen <john.johansen@canonical.com>
    apparmor: fix module parameters can be changed after policy is locked

John Johansen <john.johansen@canonical.com>
    apparmor: fix update the mtime of the profile file on replacement

John Johansen <john.johansen@canonical.com>
    apparmor: fix uninitialized lsm_audit member

Peter Zijlstra <peterz@infradead.org>
    x86/atomic: Fix smp_mb__{before,after}_atomic()

Dan Carpenter <dan.carpenter@oracle.com>
    net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()

Jouni Hogander <jouni.hogander@unikie.com>
    slcan: Fix memory leak in error path

zhong jiang <zhongjiang@huawei.com>
    memfd: Use radix_tree_deref_slot_protected to avoid the warning.

Kefeng Wang <wangkefeng.wang@huawei.com>
    Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()

Loic Poulain <loic.poulain@intel.com>
    Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data

Kirill Tkhai <ktkhai@virtuozzo.com>
    fuse: use READ_ONCE on congestion_threshold and max_background

Rob Herring <robh@kernel.org>
    arm64: dts: amd: Fix SPI bus warnings

Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS

Justin Ernst <justin.ernst@hpe.com>
    EDAC: Raise the maximum number of memory controllers

YueHaibing <yuehaibing@huawei.com>
    net: smsc: fix return type of ndo_start_xmit function

Marcel Ziswiler <marcel.ziswiler@toradex.com>
    ARM: tegra: apalis_t30: fix mmc1 cmd pull-up

Marcel Ziswiler <marcel.ziswiler@toradex.com>
    ARM: dts: tegra30: fix xcvr-setup-use-fuses

Jason Yan <yanaijie@huawei.com>
    scsi: libsas: always unregister the old device if going to discover new

Li Qiang <liq3ea@gmail.com>
    vfio/pci: Fix potential memory leak in vfio_msi_cap_len

zhong jiang <zhongjiang@huawei.com>
    misc: genwqe: should return proper error value.

Laura Abbott <labbott@redhat.com>
    misc: kgdbts: Fix restrict error

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    usb: gadget: uvc: Factor out video USB request queueing

Joel Pepper <joel.pepper@rwth-aachen.de>
    usb: gadget: uvc: configfs: Prevent format changes after linking header

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    usb: gadget: uvc: configfs: Drop leaked references to config items

Nathan Chancellor <natechancellor@gmail.com>
    media: davinci: Fix implicit enum conversion warning

Jia-Ju Bai <baijiaju1990@gmail.com>
    media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()

Dengcheng Zhu <dzhu@wavecomp.com>
    MIPS: kexec: Relax memory restriction

Matthew Whitehead <tedheadster@gmail.com>
    x86/CPU: Use correct macros for Cyrix calls

YueHaibing <yuehaibing@huawei.com>
    net: micrel: fix return type of ndo_start_xmit function

Shahed Shaikh <Shahed.Shaikh@cavium.com>
    bnx2x: Ignore bandwidth attention in single function mode

Stefan Agner <stefan@agner.ch>
    cpufeature: avoid warning when compiling with clang

Rob Herring <robh@kernel.org>
    ARM: dts: ste: Fix SPI controller node names

Linus Walleij <linus.walleij@linaro.org>
    ARM: dts: ux500: Fix LCDA clock line muxing

Geert Uytterhoeven <geert+renesas@glider.be>
    ARM: dts: ux500: Correct SCU unit address

Grygorii Strashko <grygorii.strashko@ti.com>
    ARM: dts: am335x-evm: fix number of cpsw

Loic Poulain <loic.poulain@linaro.org>
    usb: chipidea: Fix otg event handler

YueHaibing <yuehaibing@huawei.com>
    net: amd: fix return type of ndo_start_xmit function

YueHaibing <yuehaibing@huawei.com>
    net: broadcom: fix return type of ndo_start_xmit function

YueHaibing <yuehaibing@huawei.com>
    net: xilinx: fix return type of ndo_start_xmit function

YueHaibing <yuehaibing@huawei.com>
    net: toshiba: fix return type of ndo_start_xmit function

Andreas Kemnade <andreas@kemnade.info>
    power: supply: twl4030_charger: disable eoc interrupt on linear charge

Andreas Kemnade <andreas@kemnade.info>
    power: supply: twl4030_charger: fix charging current out-of-bounds

Rob Herring <robh@kernel.org>
    libfdt: Ensure INT_MAX is defined in libfdt_env.h

Nathan Fontenot <nfont@linux.vnet.ibm.com>
    powerpc/pseries: Disable CPU hotplug across migrations

Nicholas Piggin <npiggin@gmail.com>
    powerpc/64s/hash: Fix stab_rr off by one initialization

Breno Leitao <leitao@debian.org>
    powerpc/iommu: Avoid derefence before pointer check

Anton Vasilyev <vasilyev@ispras.ru>
    serial: mxs-auart: Fix potential infinite loop

Sinan Kaya <okaya@kernel.org>
    PCI/ACPI: Correct error message for ASPM disabling

Julian Wiedmann <jwi@linux.ibm.com>
    s390/qeth: invoke softirqs after napi_schedule()

Bernd Edlinger <bernd.edlinger@hotmail.de>
    kernfs: Fix range checks in kernfs_get_target_path

Tomasz Figa <tomasz.figa@gmail.com>
    power: supply: max8998-charger: Fix platform data retrieval

Dan Carpenter <dan.carpenter@oracle.com>
    power: supply: ab8500_fg: silence uninitialized variable warnings

Ganesh Goudar <ganeshgr@chelsio.com>
    cxgb4: Fix endianness issue in t4_fwcache()

Ludovic Desroches <ludovic.desroches@microchip.com>
    pinctrl: at91: don't use the same irqchip with multiple gpiochips

Dinh Nguyen <dinguyen@kernel.org>
    ARM: dts: socfpga: Fix I2C bus unit-address error

Alan Modra <amodra@gmail.com>
    powerpc/vdso: Correct call frame information

Cong Wang <xiyou.wangcong@gmail.com>
    llc: avoid blocking in llc_sap_close()

Dan Carpenter <dan.carpenter@oracle.com>
    pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()

Takashi Iwai <tiwai@suse.de>
    ALSA: intel8x0m: Register irq handler after register initializations

Lao Wei <zrlw@qq.com>
    media: fix: media: pci: meye: validate offset to avoid arbitrary access

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    nvmem: core: return error code instead of NULL from nvmem_device_get

Masami Hiramatsu <mhiramat@kernel.org>
    kprobes: Don't call BUG_ON() if there is a kprobe in use on free list

Deepak Ukey <deepak.ukey@microchip.com>
    scsi: pm80xx: Fixed system hang issue during kexec boot

Deepak Ukey <deepak.ukey@microchip.com>
    scsi: pm80xx: Corrected dma_unmap_sg() parameter

Oleksij Rempel <o.rempel@pengutronix.de>
    ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

George Kennedy <george.kennedy@oracle.com>
    scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()

Eric W. Biederman <ebiederm@xmission.com>
    signal: Properly deliver SIGSEGV from x86 uprobes

Eric W. Biederman <ebiederm@xmission.com>
    signal: Properly deliver SIGILL from uprobes

Eric W. Biederman <ebiederm@xmission.com>
    signal: Always ignore SIGKILL and SIGSTOP sent to the global init

Daniel Silsby <dansilsby@gmail.com>
    dmaengine: dma-jz4780: Further residue status fix

H. Nikolaus Schaller <hns@goldelico.com>
    ARM: dts: omap3-gta04: keep vpll2 always on

H. Nikolaus Schaller <hns@goldelico.com>
    ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot

H. Nikolaus Schaller <hns@goldelico.com>
    ARM: dts: omap3-gta04: tvout: enable as display1 alias

H. Nikolaus Schaller <hns@goldelico.com>
    ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files

Rob Herring <robh@kernel.org>
    of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC

Ding Xiang <dingxiang@cmss.chinamobile.com>
    mips: txx9: fix iounmap related issue

Erik Stromdahl <erik.stromdahl@gmail.com>
    ath10k: wmi: disable softirq's while calling ieee80211_rx

Marek Szyprowski <m.szyprowski@samsung.com>
    ARM: dts: exynos: Disable pull control for S5M8767 PMIC

Colin Ian King <colin.king@canonical.com>
    ASoC: sgtl5000: avoid division by zero if lo_vag is zero

Stefan Wahren <stefan.wahren@i2se.com>
    net: lan78xx: Bail out if lan78xx_get_endpoints fails

Larry Finger <Larry.Finger@lwfinger.net>
    rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument

Marcel Ziswiler <marcel@ziswiler.com>
    ARM: dts: pxa: fix power i2c base address

Patryk Małek <patryk.malek@intel.com>
    i40e: Prevent deleting MAC address from VF when set by PF

Patryk Małek <patryk.malek@intel.com>
    i40e: hold the rtnl lock on clearing interrupt scheme

Mitch Williams <mitch.a.williams@intel.com>
    i40e: use correct length for strncpy

Marek Szyprowski <m.szyprowski@samsung.com>
    ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook

Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
    MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3

Charles Keepax <ckeepax@opensource.cirrus.com>
    ASoC: dpcm: Properly initialise hw->rate_max

Bob Peterson <rpeterso@redhat.com>
    gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated

Takashi Iwai <tiwai@suse.de>
    ALSA: seq: Do error checks at creating system ports

Jay Foster <jayfoster@ieee.org>
    ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45

Dan Carpenter <dan.carpenter@oracle.com>
    ALSA: pcm: signedness bug in snd_pcm_plug_alloc()

Marcus Folkesson <marcus.folkesson@gmail.com>
    iio: dac: mcp4922: fix error handling in mcp4922_write_raw

Eugen Hristev <eugen.hristev@microchip.com>
    mmc: sdhci-of-at91: fix quirk2 overwrite

Roman Gushchin <guro@fb.com>
    mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()

Roman Gushchin <guro@fb.com>
    mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()

Eric Auger <eric.auger@redhat.com>
    iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros

Al Viro <viro@zeniv.linux.org.uk>
    ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either

Al Viro <viro@zeniv.linux.org.uk>
    ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable

Oliver Neukum <oneukum@suse.com>
    Input: ff-memless - kill timer in destroy()

Henry Lin <henryl@nvidia.com>
    ALSA: usb-audio: not submit urb for stopped endpoint

Takashi Iwai <tiwai@suse.de>
    ALSA: usb-audio: Fix missing error check at mixer resolution test

Oliver Neukum <oneukum@suse.com>
    ax88172a: fix information leak on short answers

Jouni Hogander <jouni.hogander@unikie.com>
    slip: Fix memory leak in slip_open error path


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

Diffstat:

 Documentation/misc-devices/mei/mei-amt-version.c   |    2 +-
 Makefile                                           |    4 +-
 arch/arm/boot/compressed/libfdt_env.h              |    2 +
 arch/arm/boot/dts/am335x-evm.dts                   |   12 +-
 arch/arm/boot/dts/at91sam9g45.dtsi                 |    2 +-
 arch/arm/boot/dts/exynos5250-arndale.dts           |    9 +
 arch/arm/boot/dts/exynos5250-snow-rev5.dts         |   11 +
 arch/arm/boot/dts/omap3-gta04.dtsi                 |   21 +-
 arch/arm/boot/dts/omap5-board-common.dtsi          |    5 +
 arch/arm/boot/dts/pxa27x.dtsi                      |    2 +-
 arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts  |    2 +-
 arch/arm/boot/dts/ste-dbx5x0.dtsi                  |    6 +-
 arch/arm/boot/dts/ste-href-family-pinctrl.dtsi     |    8 +-
 arch/arm/boot/dts/ste-hrefprev60.dtsi              |    2 +-
 arch/arm/boot/dts/ste-snowball.dts                 |    2 +-
 arch/arm/boot/dts/ste-u300.dts                     |    2 +-
 arch/arm/boot/dts/tegra30-apalis.dtsi              |    6 +-
 arch/arm/boot/dts/tegra30.dtsi                     |    6 +-
 arch/arm/kernel/entry-common.S                     |    9 +-
 arch/arm/mach-imx/pm-imx6.c                        |   25 +
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi       |    4 +-
 arch/arm64/lib/clear_user.S                        |    2 +
 arch/arm64/lib/copy_from_user.S                    |    2 +
 arch/arm64/lib/copy_in_user.S                      |    2 +
 arch/arm64/lib/copy_to_user.S                      |    2 +
 arch/mips/bcm47xx/workarounds.c                    |    8 +-
 arch/mips/include/asm/kexec.h                      |    6 +-
 arch/mips/txx9/generic/setup.c                     |    5 +-
 arch/powerpc/boot/libfdt_env.h                     |    2 +
 arch/powerpc/kernel/iommu.c                        |    2 +-
 arch/powerpc/kernel/rtas.c                         |    2 +
 arch/powerpc/kernel/vdso32/datapage.S              |    1 +
 arch/powerpc/kernel/vdso32/gettimeofday.S          |    1 +
 arch/powerpc/kernel/vdso64/datapage.S              |    1 +
 arch/powerpc/kernel/vdso64/gettimeofday.S          |    1 +
 arch/powerpc/kvm/book3s.c                          |    3 +
 arch/powerpc/mm/slb.c                              |    2 +-
 arch/powerpc/platforms/pseries/dtl.c               |    4 +-
 arch/x86/Kconfig                                   |    3 +-
 arch/x86/include/asm/atomic.h                      |    8 +-
 arch/x86/include/asm/atomic64_64.h                 |    8 +-
 arch/x86/include/asm/barrier.h                     |    4 +-
 arch/x86/include/asm/insn.h                        |   18 +
 arch/x86/include/asm/kexec.h                       |    2 +-
 arch/x86/kernel/cpu/cyrix.c                        |    2 +-
 arch/x86/kernel/kprobes/core.c                     |    4 +
 arch/x86/kernel/uprobes.c                          |    6 +-
 drivers/acpi/osl.c                                 |    1 +
 drivers/acpi/pci_root.c                            |    5 +-
 drivers/acpi/sbshc.c                               |    2 +
 drivers/ata/libata-scsi.c                          |   21 +
 drivers/ata/pata_ep93xx.c                          |    8 +-
 drivers/bluetooth/hci_ldisc.c                      |   10 +-
 drivers/bluetooth/hci_uart.h                       |    1 +
 drivers/crypto/mxs-dcp.c                           |   80 +-
 drivers/dma/dma-jz4780.c                           |    2 +-
 drivers/dma/ioat/init.c                            |    7 +-
 drivers/dma/timb_dma.c                             |    2 +-
 drivers/gpio/gpio-syscon.c                         |    2 +-
 drivers/hwmon/pwm-fan.c                            |    8 +-
 drivers/iio/dac/mcp4922.c                          |   11 +-
 drivers/infiniband/hw/mthca/mthca_main.c           |    3 +-
 drivers/input/ff-memless.c                         |    9 +
 drivers/input/touchscreen/st1232.c                 |    1 +
 drivers/md/bcache/super.c                          |    1 +
 drivers/media/pci/ivtv/ivtv-yuv.c                  |    2 +-
 drivers/media/pci/meye/meye.c                      |    2 +-
 drivers/media/platform/davinci/isif.c              |    3 +-
 drivers/media/platform/davinci/vpbe_display.c      |    2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c          |    2 +-
 drivers/misc/genwqe/card_utils.c                   |   13 +-
 drivers/misc/kgdbts.c                              |   16 +-
 drivers/mmc/host/sdhci-of-at91.c                   |    2 +-
 drivers/mtd/maps/physmap_of.c                      |   27 +-
 drivers/mtd/nand/sh_flctl.c                        |    4 +-
 drivers/net/can/slcan.c                            |    1 +
 drivers/net/ethernet/amd/am79c961a.c               |    2 +-
 drivers/net/ethernet/amd/atarilance.c              |    6 +-
 drivers/net/ethernet/amd/declance.c                |    2 +-
 drivers/net/ethernet/amd/sun3lance.c               |    6 +-
 drivers/net/ethernet/amd/sunlance.c                |    2 +-
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c           |    4 +-
 drivers/net/ethernet/broadcom/bcm63xx_enet.c       |    5 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |   10 +
 drivers/net/ethernet/broadcom/sb1250-mac.c         |    4 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c     |    4 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h     |    2 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c         |    2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        |    8 +
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |    3 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |   10 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |   10 +-
 drivers/net/ethernet/micrel/ks8695net.c            |    2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c           |    4 +-
 drivers/net/ethernet/smsc/smc911x.c                |    3 +-
 drivers/net/ethernet/smsc/smc91x.c                 |    3 +-
 drivers/net/ethernet/smsc/smsc911x.c               |    3 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c       |    4 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.h       |    2 +-
 drivers/net/ethernet/toshiba/spider_net.c          |    4 +-
 drivers/net/ethernet/toshiba/tc35815.c             |    6 +-
 drivers/net/ethernet/xilinx/ll_temac_main.c        |    3 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  |    3 +-
 drivers/net/ethernet/xilinx/xilinx_emaclite.c      |    9 +-
 drivers/net/slip/slip.c                            |    1 +
 drivers/net/usb/ax88172a.c                         |    2 +-
 drivers/net/usb/cdc_ncm.c                          |    2 +-
 drivers/net/usb/lan78xx.c                          |    5 +
 drivers/net/wireless/ath/ath10k/core.h             |    1 +
 drivers/net/wireless/ath/ath10k/mac.c              |    2 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |   22 +-
 drivers/net/wireless/ath/ath10k/wmi.h              |    8 +-
 drivers/net/wireless/ath/ath9k/common-spectral.c   |    2 +-
 drivers/net/wireless/brcm80211/brcmfmac/p2p.c      |   17 +-
 drivers/net/wireless/brcm80211/brcmfmac/p2p.h      |    2 +
 .../net/wireless/realtek/rtl818x/rtl8187/leds.c    |    2 +-
 drivers/nvmem/core.c                               |    2 +-
 drivers/of/base.c                                  |    2 +-
 drivers/pinctrl/pinctrl-at91-pio4.c                |    8 +-
 drivers/pinctrl/pinctrl-at91.c                     |   28 +-
 drivers/power/ab8500_fg.c                          |   31 +-
 drivers/power/max8998_charger.c                    |    2 +-
 drivers/power/twl4030_charger.c                    |   30 +-
 drivers/s390/net/qeth_l2_main.c                    |    3 +
 drivers/s390/net/qeth_l3_main.c                    |    3 +
 drivers/scsi/libsas/sas_expander.c                 |   13 +-
 drivers/scsi/pm8001/pm8001_hwi.c                   |    6 +
 drivers/scsi/pm8001/pm8001_sas.c                   |    9 +-
 drivers/scsi/pm8001/pm8001_sas.h                   |    1 +
 drivers/scsi/pm8001/pm80xx_hwi.c                   |   80 +-
 drivers/scsi/pm8001/pm80xx_hwi.h                   |    3 +
 drivers/scsi/sym53c8xx_2/sym_hipd.c                |   15 +-
 drivers/spi/spi-rockchip.c                         |    3 +
 drivers/spi/spidev.c                               |    8 +-
 drivers/tty/serial/mxs-auart.c                     |    3 +-
 drivers/usb/chipidea/otg.c                         |    9 +-
 drivers/usb/gadget/function/uvc_configfs.c         |    7 +
 drivers/usb/gadget/function/uvc_video.c            |   32 +-
 drivers/usb/gadget/udc/fotg210-udc.c               |    2 +-
 drivers/usb/serial/cypress_m8.c                    |    2 +-
 drivers/vfio/pci/vfio_pci_config.c                 |    4 +-
 drivers/video/backlight/lm3639_bl.c                |    6 +-
 drivers/video/fbdev/Kconfig                        |   10 -
 drivers/video/fbdev/Makefile                       |    1 -
 drivers/video/fbdev/core/fbmon.c                   |   95 --
 drivers/video/fbdev/core/modedb.c                  |   57 -
 drivers/video/fbdev/sbuslib.c                      |   28 +-
 drivers/video/fbdev/sh_mobile_hdmi.c               | 1489 --------------------
 fs/ecryptfs/inode.c                                |   19 +-
 fs/f2fs/gc.c                                       |    2 +-
 fs/fuse/control.c                                  |    4 +-
 fs/gfs2/rgrp.c                                     |    2 +-
 fs/gfs2/super.c                                    |    2 +-
 fs/kernfs/symlink.c                                |    5 +-
 fs/nfs/delegation.c                                |    6 +-
 fs/proc/vmcore.c                                   |   10 +
 include/linux/blkdev.h                             |   16 +-
 include/linux/cpufeature.h                         |    2 +-
 include/linux/edac.h                               |    3 +-
 include/linux/fb.h                                 |    3 -
 include/linux/intel-iommu.h                        |    6 +-
 include/linux/libfdt_env.h                         |    1 +
 include/linux/platform_data/dma-ep93xx.h           |    2 +-
 include/linux/sunrpc/sched.h                       |    2 -
 include/net/llc.h                                  |    1 +
 include/video/sh_mobile_hdmi.h                     |   49 -
 kernel/events/uprobes.c                            |    4 +-
 kernel/kprobes.c                                   |    8 +-
 kernel/printk/printk.c                             |   18 +-
 kernel/signal.c                                    |    4 +
 mm/hugetlb_cgroup.c                                |    2 +-
 mm/memcontrol.c                                    |    2 +-
 mm/shmem.c                                         |    2 +-
 net/bluetooth/l2cap_core.c                         |   10 +
 net/llc/llc_core.c                                 |    4 +-
 net/mac80211/rc80211_minstrel_ht.c                 |    2 +-
 net/openvswitch/vport-internal_dev.c               |    5 +-
 net/sunrpc/sched.c                                 |  109 +-
 net/wireless/nl80211.c                             |    2 +-
 security/apparmor/apparmorfs.c                     |    2 +
 security/apparmor/audit.c                          |    3 +-
 security/apparmor/file.c                           |    3 +-
 security/apparmor/include/policy.h                 |    2 +
 security/apparmor/lsm.c                            |   22 +-
 security/apparmor/policy.c                         |   18 +-
 sound/core/oss/pcm_plugin.c                        |    4 +-
 sound/core/seq/seq_system.c                        |   18 +-
 sound/pci/hda/patch_sigmatel.c                     |   20 +
 sound/pci/intel8x0m.c                              |   20 +-
 sound/soc/codecs/sgtl5000.c                        |    2 +-
 sound/soc/soc-pcm.c                                |    2 +-
 sound/usb/endpoint.c                               |    3 +
 sound/usb/mixer.c                                  |    4 +-
 193 files changed, 964 insertions(+), 2141 deletions(-)



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

* [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 002/159] ax88172a: fix information leak on short answers Greg Kroah-Hartman
                   ` (161 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David S. Miller, Oliver Hartkopp,
	Lukas Bulwahn, Jouni Hogander

From: Jouni Hogander <jouni.hogander@unikie.com>

[ Upstream commit 3b5a39979dafea9d0cd69c7ae06088f7a84cdafa ]

Driver/net/can/slcan.c is derived from slip.c. Memory leak was detected
by Syzkaller in slcan. Same issue exists in slip.c and this patch is
addressing the leak in slip.c.

Here is the slcan memory leak trace reported by Syzkaller:

BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
  comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
  hex dump (first 32 bytes):
    73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  backtrace:
    [<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
    [<0000000083306e66>] kvmalloc_node+0x3a/0xc0
    [<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
    [<0000000061a996c9>] slcan_open+0x3ae/0x9a0
    [<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
    [<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
    [<000000004de5a617>] tty_ioctl+0x48d/0x1590
    [<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
    [<0000000059068dbc>] ksys_ioctl+0x99/0xb0
    [<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
    [<0000000053d0332e>] do_syscall_64+0x16f/0x580
    [<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [<000000008ea75434>] 0xfffffffffffffff

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Jouni Hogander <jouni.hogander@unikie.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/slip/slip.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -860,6 +860,7 @@ err_free_chan:
 	sl->tty = NULL;
 	tty->disc_data = NULL;
 	clear_bit(SLF_INUSE, &sl->flags);
+	free_netdev(sl->dev);
 
 err_exit:
 	rtnl_unlock();



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

* [PATCH 4.4 002/159] ax88172a: fix information leak on short answers
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 003/159] ALSA: usb-audio: Fix missing error check at mixer resolution test Greg Kroah-Hartman
                   ` (160 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+a8d4acdad35e6bbca308,
	Oliver Neukum, David S. Miller

From: Oliver Neukum <oneukum@suse.com>

[ Upstream commit a9a51bd727d141a67b589f375fe69d0e54c4fe22 ]

If a malicious device gives a short MAC it can elicit up to
5 bytes of leaked memory out of the driver. We need to check for
ETH_ALEN instead.

Reported-by: syzbot+a8d4acdad35e6bbca308@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/usb/ax88172a.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/usb/ax88172a.c
+++ b/drivers/net/usb/ax88172a.c
@@ -243,7 +243,7 @@ static int ax88172a_bind(struct usbnet *
 
 	/* Get the MAC address */
 	ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf);
-	if (ret < 0) {
+	if (ret < ETH_ALEN) {
 		netdev_err(dev->net, "Failed to read MAC address: %d\n", ret);
 		goto free;
 	}



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

* [PATCH 4.4 003/159] ALSA: usb-audio: Fix missing error check at mixer resolution test
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 002/159] ax88172a: fix information leak on short answers Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 004/159] ALSA: usb-audio: not submit urb for stopped endpoint Greg Kroah-Hartman
                   ` (159 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Takashi Iwai, syzbot+abe1ab7afc62c6bb6377

From: Takashi Iwai <tiwai@suse.de>

commit 167beb1756791e0806365a3f86a0da10d7a327ee upstream.

A check of the return value from get_cur_mix_raw() is missing at the
resolution test code in get_min_max_with_quirks(), which may leave the
variable untouched, leading to a random uninitialized value, as
detected by syzkaller fuzzer.

Add the missing return error check for fixing that.

Reported-and-tested-by: syzbot+abe1ab7afc62c6bb6377@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191109181658.30368-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/mixer.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1045,7 +1045,8 @@ static int get_min_max_with_quirks(struc
 		if (cval->min + cval->res < cval->max) {
 			int last_valid_res = cval->res;
 			int saved, test, check;
-			get_cur_mix_raw(cval, minchn, &saved);
+			if (get_cur_mix_raw(cval, minchn, &saved) < 0)
+				goto no_res_check;
 			for (;;) {
 				test = saved;
 				if (test < cval->max)
@@ -1065,6 +1066,7 @@ static int get_min_max_with_quirks(struc
 			snd_usb_set_cur_mix_value(cval, minchn, 0, saved);
 		}
 
+no_res_check:
 		cval->initialized = 1;
 	}
 



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

* [PATCH 4.4 004/159] ALSA: usb-audio: not submit urb for stopped endpoint
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 003/159] ALSA: usb-audio: Fix missing error check at mixer resolution test Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 005/159] Input: ff-memless - kill timer in destroy() Greg Kroah-Hartman
                   ` (158 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Henry Lin, Takashi Iwai

From: Henry Lin <henryl@nvidia.com>

commit 528699317dd6dc722dccc11b68800cf945109390 upstream.

While output urb's snd_complete_urb() is executing, calling
prepare_outbound_urb() may cause endpoint stopped before
prepare_outbound_urb() returns and result in next urb submitted
to stopped endpoint. usb-audio driver cannot re-use it afterwards as
the urb is still hold by usb stack.

This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again
to let snd_complete_urb() know the endpoint already stopped and does not
submit next urb. Below kind of error will be fixed:

[  213.153103] usb 1-2: timeout: still 1 active urbs on EP #1
[  213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error

Signed-off-by: Henry Lin <henryl@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191113021420.13377-1-henryl@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/endpoint.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -403,6 +403,9 @@ static void snd_complete_urb(struct urb
 		}
 
 		prepare_outbound_urb(ep, ctx);
+		/* can be stopped during prepare callback */
+		if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags)))
+			goto exit_clear;
 	} else {
 		retire_inbound_urb(ep, ctx);
 		/* can be stopped during retire callback */



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

* [PATCH 4.4 005/159] Input: ff-memless - kill timer in destroy()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 004/159] ALSA: usb-audio: not submit urb for stopped endpoint Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 006/159] ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable Greg Kroah-Hartman
                   ` (157 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oliver Neukum, Dmitry Torokhov,
	syzbot+b6c55daa701fc389e286

From: Oliver Neukum <oneukum@suse.com>

commit fa3a5a1880c91bb92594ad42dfe9eedad7996b86 upstream.

No timer must be left running when the device goes away.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-and-tested-by: syzbot+b6c55daa701fc389e286@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1573726121.17351.3.camel@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/ff-memless.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/input/ff-memless.c
+++ b/drivers/input/ff-memless.c
@@ -501,6 +501,15 @@ static void ml_ff_destroy(struct ff_devi
 {
 	struct ml_device *ml = ff->private;
 
+	/*
+	 * Even though we stop all playing effects when tearing down
+	 * an input device (via input_device_flush() that calls into
+	 * input_ff_flush() that stops and erases all effects), we
+	 * do not actually stop the timer, and therefore we should
+	 * do it here.
+	 */
+	del_timer_sync(&ml->timer);
+
 	kfree(ml->private);
 }
 



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

* [PATCH 4.4 006/159] ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 005/159] Input: ff-memless - kill timer in destroy() Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 007/159] ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either Greg Kroah-Hartman
                   ` (156 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro

From: Al Viro <viro@zeniv.linux.org.uk>

commit e72b9dd6a5f17d0fb51f16f8685f3004361e83d0 upstream.

lower_dentry can't go from positive to negative (we have it pinned),
but it *can* go from negative to positive.  So fetching ->d_inode
into a local variable, doing a blocking allocation, checking that
now ->d_inode is non-NULL and feeding the value we'd fetched
earlier to a function that won't accept NULL is not a good idea.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ecryptfs/inode.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -330,7 +330,7 @@ static int ecryptfs_lookup_interpose(str
 				     struct dentry *lower_dentry,
 				     struct inode *dir_inode)
 {
-	struct inode *inode, *lower_inode = d_inode(lower_dentry);
+	struct inode *inode, *lower_inode;
 	struct ecryptfs_dentry_info *dentry_info;
 	struct vfsmount *lower_mnt;
 	int rc = 0;
@@ -352,7 +352,15 @@ static int ecryptfs_lookup_interpose(str
 	dentry_info->lower_path.mnt = lower_mnt;
 	dentry_info->lower_path.dentry = lower_dentry;
 
-	if (d_really_is_negative(lower_dentry)) {
+	/*
+	 * negative dentry can go positive under us here - its parent is not
+	 * locked.  That's OK and that could happen just as we return from
+	 * ecryptfs_lookup() anyway.  Just need to be careful and fetch
+	 * ->d_inode only once - it's not stable here.
+	 */
+	lower_inode = READ_ONCE(lower_dentry->d_inode);
+
+	if (!lower_inode) {
 		/* We want to add because we couldn't find in lower */
 		d_add(dentry, NULL);
 		return 0;



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

* [PATCH 4.4 007/159] ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 006/159] ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 008/159] iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros Greg Kroah-Hartman
                   ` (155 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro

From: Al Viro <viro@zeniv.linux.org.uk>

commit 762c69685ff7ad5ad7fee0656671e20a0c9c864d upstream.

We need to get the underlying dentry of parent; sure, absent the races
it is the parent of underlying dentry, but there's nothing to prevent
losing a timeslice to preemtion in the middle of evaluation of
lower_dentry->d_parent->d_inode, having another process move lower_dentry
around and have its (ex)parent not pinned anymore and freed on memory
pressure.  Then we regain CPU and try to fetch ->d_inode from memory
that is freed by that point.

dentry->d_parent *is* stable here - it's an argument of ->lookup() and
we are guaranteed that it won't be moved anywhere until we feed it
to d_add/d_splice_alias.  So we safely go that way to get to its
underlying dentry.

Cc: stable@vger.kernel.org # since 2009 or so
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ecryptfs/inode.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -330,9 +330,9 @@ static int ecryptfs_lookup_interpose(str
 				     struct dentry *lower_dentry,
 				     struct inode *dir_inode)
 {
+	struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);
 	struct inode *inode, *lower_inode;
 	struct ecryptfs_dentry_info *dentry_info;
-	struct vfsmount *lower_mnt;
 	int rc = 0;
 
 	dentry_info = kmem_cache_alloc(ecryptfs_dentry_info_cache, GFP_KERNEL);
@@ -344,12 +344,11 @@ static int ecryptfs_lookup_interpose(str
 		return -ENOMEM;
 	}
 
-	lower_mnt = mntget(ecryptfs_dentry_to_lower_mnt(dentry->d_parent));
-	fsstack_copy_attr_atime(dir_inode, d_inode(lower_dentry->d_parent));
+	fsstack_copy_attr_atime(dir_inode, d_inode(path->dentry));
 	BUG_ON(!d_count(lower_dentry));
 
 	ecryptfs_set_dentry_private(dentry, dentry_info);
-	dentry_info->lower_path.mnt = lower_mnt;
+	dentry_info->lower_path.mnt = mntget(path->mnt);
 	dentry_info->lower_path.dentry = lower_dentry;
 
 	/*



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

* [PATCH 4.4 008/159] iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 007/159] ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 009/159] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm() Greg Kroah-Hartman
                   ` (154 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eric Auger, Jacob Pan, Lu Baolu,
	Joerg Roedel

From: Eric Auger <eric.auger@redhat.com>

commit 4e7120d79edb31e4ee68e6f8421448e4603be1e9 upstream.

For both PASID-based-Device-TLB Invalidate Descriptor and
Device-TLB Invalidate Descriptor, the Physical Function Source-ID
value is split according to this layout:

PFSID[3:0] is set at offset 12 and PFSID[15:4] is put at offset 52.
Fix the part laid out at offset 52.

Fixes: 0f725561e1684 ("iommu/vt-d: Add definitions for PFSID")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: stable@vger.kernel.org # v4.19+
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/intel-iommu.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -295,7 +295,8 @@ enum {
 #define QI_DEV_IOTLB_SID(sid)	((u64)((sid) & 0xffff) << 32)
 #define QI_DEV_IOTLB_QDEP(qdep)	(((qdep) & 0x1f) << 16)
 #define QI_DEV_IOTLB_ADDR(addr)	((u64)(addr) & VTD_PAGE_MASK)
-#define QI_DEV_IOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52))
+#define QI_DEV_IOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | \
+				   ((u64)((pfsid >> 4) & 0xfff) << 52))
 #define QI_DEV_IOTLB_SIZE	1
 #define QI_DEV_IOTLB_MAX_INVS	32
 
@@ -320,7 +321,8 @@ enum {
 #define QI_DEV_EIOTLB_PASID(p)	(((u64)p) << 32)
 #define QI_DEV_EIOTLB_SID(sid)	((u64)((sid) & 0xffff) << 16)
 #define QI_DEV_EIOTLB_QDEP(qd)	((u64)((qd) & 0x1f) << 4)
-#define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | ((u64)(pfsid & 0xfff) << 52))
+#define QI_DEV_EIOTLB_PFSID(pfsid) (((u64)(pfsid & 0xf) << 12) | \
+				    ((u64)((pfsid >> 4) & 0xfff) << 52))
 #define QI_DEV_EIOTLB_MAX_INVS	32
 
 #define QI_PGRP_IDX(idx)	(((u64)(idx)) << 55)



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

* [PATCH 4.4 009/159] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 008/159] iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 010/159] mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() Greg Kroah-Hartman
                   ` (153 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Roman Gushchin, Johannes Weiner,
	Tejun Heo, Shakeel Butt, Michal Hocko, Michal Koutn,
	Andrew Morton, Linus Torvalds

From: Roman Gushchin <guro@fb.com>

commit 00d484f354d85845991b40141d40ba9e5eb60faf upstream.

We've encountered a rcu stall in get_mem_cgroup_from_mm():

  rcu: INFO: rcu_sched self-detected stall on CPU
  rcu: 33-....: (21000 ticks this GP) idle=6c6/1/0x4000000000000002 softirq=35441/35441 fqs=5017
  (t=21031 jiffies g=324821 q=95837) NMI backtrace for cpu 33
  <...>
  RIP: 0010:get_mem_cgroup_from_mm+0x2f/0x90
  <...>
   __memcg_kmem_charge+0x55/0x140
   __alloc_pages_nodemask+0x267/0x320
   pipe_write+0x1ad/0x400
   new_sync_write+0x127/0x1c0
   __kernel_write+0x4f/0xf0
   dump_emit+0x91/0xc0
   writenote+0xa0/0xc0
   elf_core_dump+0x11af/0x1430
   do_coredump+0xc65/0xee0
   get_signal+0x132/0x7c0
   do_signal+0x36/0x640
   exit_to_usermode_loop+0x61/0xd0
   do_syscall_64+0xd4/0x100
   entry_SYSCALL_64_after_hwframe+0x44/0xa9

The problem is caused by an exiting task which is associated with an
offline memcg.  We're iterating over and over in the do {} while
(!css_tryget_online()) loop, but obviously the memcg won't become online
and the exiting task won't be migrated to a live memcg.

Let's fix it by switching from css_tryget_online() to css_tryget().

As css_tryget_online() cannot guarantee that the memcg won't go offline,
the check is usually useless, except some rare cases when for example it
determines if something should be presented to a user.

A similar problem is described by commit 18fa84a2db0e ("cgroup: Use
css_tryget() instead of css_tryget_online() in task_get_css()").

Johannes:

: The bug aside, it doesn't matter whether the cgroup is online for the
: callers.  It used to matter when offlining needed to evacuate all charges
: from the memcg, and so needed to prevent new ones from showing up, but we
: don't care now.

Link: http://lkml.kernel.org/r/20191106225131.3543616-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Shakeel Butt <shakeeb@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutn <mkoutny@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memcontrol.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -833,7 +833,7 @@ static struct mem_cgroup *get_mem_cgroup
 			if (unlikely(!memcg))
 				memcg = root_mem_cgroup;
 		}
-	} while (!css_tryget_online(&memcg->css));
+	} while (!css_tryget(&memcg->css));
 	rcu_read_unlock();
 	return memcg;
 }



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

* [PATCH 4.4 010/159] mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 009/159] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm() Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 011/159] mmc: sdhci-of-at91: fix quirk2 overwrite Greg Kroah-Hartman
                   ` (152 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Roman Gushchin, Johannes Weiner,
	Tejun Heo, Shakeel Butt, Michal Hocko, Andrew Morton,
	Linus Torvalds

From: Roman Gushchin <guro@fb.com>

commit 0362f326d86c645b5e96b7dbc3ee515986ed019d upstream.

An exiting task might belong to an offline cgroup.  In this case an
attempt to grab a cgroup reference from the task can end up with an
infinite loop in hugetlb_cgroup_charge_cgroup(), because neither the
cgroup will become online, neither the task will be migrated to a live
cgroup.

Fix this by switching over to css_tryget().  As css_tryget_online()
can't guarantee that the cgroup won't go offline, in most cases the
check doesn't make sense.  In this particular case users of
hugetlb_cgroup_charge_cgroup() are not affected by this change.

A similar problem is described by commit 18fa84a2db0e ("cgroup: Use
css_tryget() instead of css_tryget_online() in task_get_css()").

Link: http://lkml.kernel.org/r/20191106225131.3543616-2-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/hugetlb_cgroup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -180,7 +180,7 @@ int hugetlb_cgroup_charge_cgroup(int idx
 again:
 	rcu_read_lock();
 	h_cg = hugetlb_cgroup_from_task(current);
-	if (!css_tryget_online(&h_cg->css)) {
+	if (!css_tryget(&h_cg->css)) {
 		rcu_read_unlock();
 		goto again;
 	}



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

* [PATCH 4.4 011/159] mmc: sdhci-of-at91: fix quirk2 overwrite
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 010/159] mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 012/159] iio: dac: mcp4922: fix error handling in mcp4922_write_raw Greg Kroah-Hartman
                   ` (151 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eugen Hristev, Adrian Hunter, Ulf Hansson

From: Eugen Hristev <eugen.hristev@microchip.com>

commit fed23c5829ecab4ddc712d7b0046e59610ca3ba4 upstream.

The quirks2 are parsed and set (e.g. from DT) before the quirk for broken
HS200 is set in the driver.
The driver needs to enable just this flag, not rewrite the whole quirk set.

Fixes: 7871aa60ae00 ("mmc: sdhci-of-at91: add quirk for broken HS200")
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mmc/host/sdhci-of-at91.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -145,7 +145,7 @@ static int sdhci_at91_probe(struct platf
 	sdhci_get_of_property(pdev);
 
 	/* HS200 is broken at this moment */
-	host->quirks2 = SDHCI_QUIRK2_BROKEN_HS200;
+	host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
 
 	ret = sdhci_add_host(host);
 	if (ret)



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

* [PATCH 4.4 012/159] iio: dac: mcp4922: fix error handling in mcp4922_write_raw
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 011/159] mmc: sdhci-of-at91: fix quirk2 overwrite Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 013/159] ALSA: pcm: signedness bug in snd_pcm_plug_alloc() Greg Kroah-Hartman
                   ` (150 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcus Folkesson, Jonathan Cameron,
	Sasha Levin

From: Marcus Folkesson <marcus.folkesson@gmail.com>

[ Upstream commit 0833627fc3f757a0dca11e2a9c46c96335a900ee ]

Do not try to write negative values and make sure that the write goes well.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iio/dac/mcp4922.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/dac/mcp4922.c b/drivers/iio/dac/mcp4922.c
index 3854d201a5d6c..68dd0be1ac076 100644
--- a/drivers/iio/dac/mcp4922.c
+++ b/drivers/iio/dac/mcp4922.c
@@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev,
 		long mask)
 {
 	struct mcp4922_state *state = iio_priv(indio_dev);
+	int ret;
 
 	if (val2 != 0)
 		return -EINVAL;
 
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
-		if (val > GENMASK(chan->scan_type.realbits-1, 0))
+		if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0))
 			return -EINVAL;
 		val <<= chan->scan_type.shift;
-		state->value[chan->channel] = val;
-		return mcp4922_spi_write(state, chan->channel, val);
+
+		ret = mcp4922_spi_write(state, chan->channel, val);
+		if (!ret)
+			state->value[chan->channel] = val;
+		return ret;
+
 	default:
 		return -EINVAL;
 	}
-- 
2.20.1




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

* [PATCH 4.4 013/159] ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 012/159] iio: dac: mcp4922: fix error handling in mcp4922_write_raw Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 014/159] ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45 Greg Kroah-Hartman
                   ` (149 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Takashi Iwai, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit 6f128fa41f310e1f39ebcea9621d2905549ecf52 ]

The "frames" variable is unsigned so the error handling doesn't work
properly.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/core/oss/pcm_plugin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index a84a1d3d23e56..c6888d76ca5e9 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
 		while (plugin->next) {
 			if (plugin->dst_frames)
 				frames = plugin->dst_frames(plugin, frames);
-			if (snd_BUG_ON(frames <= 0))
+			if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0))
 				return -ENXIO;
 			plugin = plugin->next;
 			err = snd_pcm_plugin_alloc(plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
 		while (plugin->prev) {
 			if (plugin->src_frames)
 				frames = plugin->src_frames(plugin, frames);
-			if (snd_BUG_ON(frames <= 0))
+			if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0))
 				return -ENXIO;
 			plugin = plugin->prev;
 			err = snd_pcm_plugin_alloc(plugin, frames);
-- 
2.20.1




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

* [PATCH 4.4 014/159] ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 013/159] ALSA: pcm: signedness bug in snd_pcm_plug_alloc() Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 015/159] ALSA: seq: Do error checks at creating system ports Greg Kroah-Hartman
                   ` (148 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jay Foster, Nicolas Ferre,
	Alexandre Belloni, Sasha Levin

From: Jay Foster <jayfoster@ieee.org>

[ Upstream commit 10af10db8c76fa5b9bf1f52a895c1cb2c0ac24da ]

Fix a typo. No functional change made by this patch.

Signed-off-by: Jay Foster <jayfoster@ieee.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/at91sam9g45.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index af8b708ac312a..53a5a0e311e9d 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -546,7 +546,7 @@
 					};
 				};
 
-				uart1 {
+				usart1 {
 					pinctrl_usart1: usart1-0 {
 						atmel,pins =
 							<AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP	/* PB4 periph A with pullup */
-- 
2.20.1




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

* [PATCH 4.4 015/159] ALSA: seq: Do error checks at creating system ports
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 014/159] ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45 Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 016/159] gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated Greg Kroah-Hartman
                   ` (147 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai, Sasha Levin

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit b8e131542b47b81236ecf6768c923128e1f5db6e ]

snd_seq_system_client_init() doesn't check the errors returned from
its port creations.  Let's do it properly and handle the error paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/core/seq/seq_system.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index 8ce1d0b40dce1..ce1f1e4727ab1 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -123,6 +123,7 @@ int __init snd_seq_system_client_init(void)
 {
 	struct snd_seq_port_callback pcallbacks;
 	struct snd_seq_port_info *port;
+	int err;
 
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
 	if (!port)
@@ -144,7 +145,10 @@ int __init snd_seq_system_client_init(void)
 	port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT;
 	port->addr.client = sysclient;
 	port->addr.port = SNDRV_SEQ_PORT_SYSTEM_TIMER;
-	snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, port);
+	err = snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT,
+					port);
+	if (err < 0)
+		goto error_port;
 
 	/* register announcement port */
 	strcpy(port->name, "Announce");
@@ -154,16 +158,24 @@ int __init snd_seq_system_client_init(void)
 	port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT;
 	port->addr.client = sysclient;
 	port->addr.port = SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE;
-	snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, port);
+	err = snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT,
+					port);
+	if (err < 0)
+		goto error_port;
 	announce_port = port->addr.port;
 
 	kfree(port);
 	return 0;
+
+ error_port:
+	snd_seq_system_client_done();
+	kfree(port);
+	return err;
 }
 
 
 /* unregister our internal client */
-void __exit snd_seq_system_client_done(void)
+void snd_seq_system_client_done(void)
 {
 	int oldsysclient = sysclient;
 
-- 
2.20.1




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

* [PATCH 4.4 016/159] gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 015/159] ALSA: seq: Do error checks at creating system ports Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 017/159] ASoC: dpcm: Properly initialise hw->rate_max Greg Kroah-Hartman
                   ` (146 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bob Peterson, Sasha Levin

From: Bob Peterson <rpeterso@redhat.com>

[ Upstream commit 4f36cb36c9d14340bb200d2ad9117b03ce992cfe ]

The GFS2_RDF_UPTODATE flag in the rgrp is used to determine when
a rgrp buffer is valid. It's cleared when the glock is invalidated,
signifying that the buffer data is now invalid. But before this
patch, function update_rgrp_lvb was setting the flag when it
determined it had a valid lvb. But that's an invalid assumption:
just because you have a valid lvb doesn't mean you have valid
buffers. After all, another node may have made the lvb valid,
and this node just fetched it from the glock via dlm.

Consider this scenario:
1. The file system is mounted with RGRPLVB option.
2. In gfs2_inplace_reserve it locks the rgrp glock EX, but thanks
   to GL_SKIP, it skips the gfs2_rgrp_bh_get.
3. Since loops == 0 and the allocation target (ap->target) is
   bigger than the largest known chunk of blocks in the rgrp
   (rs->rs_rbm.rgd->rd_extfail_pt) it skips that rgrp and bypasses
   the call to gfs2_rgrp_bh_get there as well.
4. update_rgrp_lvb sees the lvb MAGIC number is valid, so bypasses
   gfs2_rgrp_bh_get, but it still sets sets GFS2_RDF_UPTODATE due
   to this invalid assumption.
5. The next time update_rgrp_lvb is called, it sees the bit is set
   and just returns 0, assuming both the lvb and rgrp are both
   uptodate. But since this is a smaller allocation, or space has
   been freed by another node, thus adjusting the lvb values,
   it decides to use the rgrp for allocations, with invalid rd_free
   due to the fact it was never updated.

This patch changes update_rgrp_lvb so it doesn't set the UPTODATE
flag anymore. That way, it has no choice but to fetch the latest
values.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/gfs2/rgrp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 9c159e6ad1164..e632006a52df6 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1228,7 +1228,7 @@ static int update_rgrp_lvb(struct gfs2_rgrpd *rgd)
 	rl_flags = be32_to_cpu(rgd->rd_rgl->rl_flags);
 	rl_flags &= ~GFS2_RDF_MASK;
 	rgd->rd_flags &= GFS2_RDF_MASK;
-	rgd->rd_flags |= (rl_flags | GFS2_RDF_UPTODATE | GFS2_RDF_CHECK);
+	rgd->rd_flags |= (rl_flags | GFS2_RDF_CHECK);
 	if (rgd->rd_rgl->rl_unlinked == 0)
 		rgd->rd_flags &= ~GFS2_RDF_CHECK;
 	rgd->rd_free = be32_to_cpu(rgd->rd_rgl->rl_free);
-- 
2.20.1




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

* [PATCH 4.4 017/159] ASoC: dpcm: Properly initialise hw->rate_max
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 016/159] gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 018/159] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3 Greg Kroah-Hartman
                   ` (145 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Charles Keepax, Mark Brown, Sasha Levin

From: Charles Keepax <ckeepax@opensource.cirrus.com>

[ Upstream commit e33ffbd9cd39da09831ce62c11025d830bf78d9e ]

If the CPU DAI does not initialise rate_max, say if using
using KNOT or CONTINUOUS, then the rate_max field will be
initialised to 0. A value of zero in the rate_max field of
the hardware runtime will cause the sound card to support no
sample rates at all. Obviously this is not desired, just a
different mechanism is being used to apply the constraints. As
such update the setting of rate_max in dpcm_init_runtime_hw
to be consistent with the non-DPCM cases and set rate_max to
UINT_MAX if nothing is defined on the CPU DAI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 1c0d44c86c018..78813057167d7 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1541,7 +1541,7 @@ static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime,
 				 u64 formats)
 {
 	runtime->hw.rate_min = stream->rate_min;
-	runtime->hw.rate_max = stream->rate_max;
+	runtime->hw.rate_max = min_not_zero(stream->rate_max, UINT_MAX);
 	runtime->hw.channels_min = stream->channels_min;
 	runtime->hw.channels_max = stream->channels_max;
 	if (runtime->hw.formats)
-- 
2.20.1




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

* [PATCH 4.4 018/159] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 017/159] ASoC: dpcm: Properly initialise hw->rate_max Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 019/159] ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook Greg Kroah-Hartman
                   ` (144 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tuomas Tynkkynen, Hauke Mehrtens,
	Paul Burton, Rafał Miłecki, linux-mips, Sasha Levin

From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

[ Upstream commit feef7918667b84f9d5653c501542dd8d84ae32af ]

Setting GPIO 21 high seems to be required to enable power to USB ports
on the WNDR3400v3. As there is already similar code for WNR3500L,
make the existing USB power GPIO code generic and use that.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20259/
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/bcm47xx/workarounds.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workarounds.c
index e81ce4623070e..06fb94370c7c9 100644
--- a/arch/mips/bcm47xx/workarounds.c
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -4,9 +4,8 @@
 #include <bcm47xx_board.h>
 #include <bcm47xx.h>
 
-static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
 {
-	const int usb_power = 12;
 	int err;
 
 	err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
@@ -22,7 +21,10 @@ void __init bcm47xx_workarounds(void)
 
 	switch (board) {
 	case BCM47XX_BOARD_NETGEAR_WNR3500L:
-		bcm47xx_workarounds_netgear_wnr3500l();
+		bcm47xx_workarounds_enable_usb_power(12);
+		break;
+	case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
+		bcm47xx_workarounds_enable_usb_power(21);
 		break;
 	default:
 		/* No workaround(s) needed */
-- 
2.20.1




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

* [PATCH 4.4 019/159] ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 018/159] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3 Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 020/159] i40e: use correct length for strncpy Greg Kroah-Hartman
                   ` (143 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Szyprowski,
	Krzysztof Kozlowski, Sasha Levin

From: Marek Szyprowski <m.szyprowski@samsung.com>

[ Upstream commit 64858773d78e820003a94e5a7179d368213655d6 ]

This patch adds missing properties to the CODEC and sound nodes, so the
audio will work also on Snow rev5 Chromebook. This patch is an extension
to the commit e9eefc3f8ce0 ("ARM: dts: exynos: Add missing clock and
DAI properties to the max98095 node in Snow Chromebook")
and commit 6ab569936d60 ("ARM: dts: exynos: Enable HDMI audio on Snow
Chromebook").  It has been reported that such changes work fine on the
rev5 board too.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
[krzk: Fixed typo in phandle to &max98090]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-snow-rev5.dts b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
index f811dc8006605..0d46f754070e4 100644
--- a/arch/arm/boot/dts/exynos5250-snow-rev5.dts
+++ b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
@@ -23,6 +23,14 @@
 
 		samsung,model = "Snow-I2S-MAX98090";
 		samsung,audio-codec = <&max98090>;
+
+		cpu {
+			sound-dai = <&i2s0 0>;
+		};
+
+		codec {
+			sound-dai = <&max98090 0>, <&hdmi>;
+		};
 	};
 };
 
@@ -34,6 +42,9 @@
 		interrupt-parent = <&gpx0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&max98090_irq>;
+		clocks = <&pmu_system_controller 0>;
+		clock-names = "mclk";
+		#sound-dai-cells = <1>;
 	};
 };
 
-- 
2.20.1




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

* [PATCH 4.4 020/159] i40e: use correct length for strncpy
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 019/159] ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 021/159] i40e: hold the rtnl lock on clearing interrupt scheme Greg Kroah-Hartman
                   ` (142 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mitch Williams, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

From: Mitch Williams <mitch.a.williams@intel.com>

[ Upstream commit 7eb74ff891b4e94b8bac48f648a21e4b94ddee64 ]

Caught by GCC 8. When we provide a length for strncpy, we should not
include the terminating null. So we must tell it one less than the size
of the destination buffer.

Signed-off-by: Mitch Williams <mitch.a.williams@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 <sashal@kernel.org>
---
 drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 565ca7c835bc3..e22ebe460b131 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -605,7 +605,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)
 	if (!IS_ERR_OR_NULL(pf->ptp_clock))
 		return 0;
 
-	strncpy(pf->ptp_caps.name, i40e_driver_name, sizeof(pf->ptp_caps.name));
+	strncpy(pf->ptp_caps.name, i40e_driver_name,
+		sizeof(pf->ptp_caps.name) - 1);
 	pf->ptp_caps.owner = THIS_MODULE;
 	pf->ptp_caps.max_adj = 999999999;
 	pf->ptp_caps.n_ext_ts = 0;
-- 
2.20.1




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

* [PATCH 4.4 021/159] i40e: hold the rtnl lock on clearing interrupt scheme
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 020/159] i40e: use correct length for strncpy Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 022/159] i40e: Prevent deleting MAC address from VF when set by PF Greg Kroah-Hartman
                   ` (141 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Patryk Małek, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

From: Patryk Małek <patryk.malek@intel.com>

[ Upstream commit 5cba17b14182696d6bb0ec83a1d087933f252241 ]

Hold the rtnl lock when we're clearing interrupt scheme
in i40e_shutdown and in i40e_remove.

Signed-off-by: Patryk Małek <patryk.malek@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 <sashal@kernel.org>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 22c43a776c6cd..756c4ea176554 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -10828,6 +10828,7 @@ static void i40e_remove(struct pci_dev *pdev)
 	mutex_destroy(&hw->aq.asq_mutex);
 
 	/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */
+	rtnl_lock();
 	i40e_clear_interrupt_scheme(pf);
 	for (i = 0; i < pf->num_alloc_vsi; i++) {
 		if (pf->vsi[i]) {
@@ -10836,6 +10837,7 @@ static void i40e_remove(struct pci_dev *pdev)
 			pf->vsi[i] = NULL;
 		}
 	}
+	rtnl_unlock();
 
 	for (i = 0; i < I40E_MAX_VEB; i++) {
 		kfree(pf->veb[i]);
@@ -10982,7 +10984,13 @@ static void i40e_shutdown(struct pci_dev *pdev)
 	wr32(hw, I40E_PFPM_WUFC,
 	     (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
 
+	/* Since we're going to destroy queues during the
+	 * i40e_clear_interrupt_scheme() we should hold the RTNL lock for this
+	 * whole section
+	 */
+	rtnl_lock();
 	i40e_clear_interrupt_scheme(pf);
+	rtnl_unlock();
 
 	if (system_state == SYSTEM_POWER_OFF) {
 		pci_wake_from_d3(pdev, pf->wol_en);
-- 
2.20.1




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

* [PATCH 4.4 022/159] i40e: Prevent deleting MAC address from VF when set by PF
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 021/159] i40e: hold the rtnl lock on clearing interrupt scheme Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 023/159] ARM: dts: pxa: fix power i2c base address Greg Kroah-Hartman
                   ` (140 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Patryk Małek, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

From: Patryk Małek <patryk.malek@intel.com>

[ Upstream commit 5907cf6c5bbe78be2ed18b875b316c6028b20634 ]

To prevent VF from deleting MAC address that was assigned by the
PF we need to check for that scenario when we try to delete a MAC
address from a VF.

Signed-off-by: Patryk Małek <patryk.malek@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 <sashal@kernel.org>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index e116d9a99b8e9..cdb263875efb3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1677,6 +1677,16 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 			ret = I40E_ERR_INVALID_MAC_ADDR;
 			goto error_param;
 		}
+
+		if (vf->pf_set_mac &&
+		    ether_addr_equal(al->list[i].addr,
+				     vf->default_lan_addr.addr)) {
+			dev_err(&pf->pdev->dev,
+				"MAC addr %pM has been set by PF, cannot delete it for VF %d, reset VF to change MAC addr\n",
+				vf->default_lan_addr.addr, vf->vf_id);
+			ret = I40E_ERR_PARAM;
+			goto error_param;
+		}
 	}
 	vsi = pf->vsi[vf->lan_vsi_idx];
 
-- 
2.20.1




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

* [PATCH 4.4 023/159] ARM: dts: pxa: fix power i2c base address
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 022/159] i40e: Prevent deleting MAC address from VF when set by PF Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 024/159] rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument Greg Kroah-Hartman
                   ` (139 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcel Ziswiler, Robert Jarzmik, Sasha Levin

From: Marcel Ziswiler <marcel@ziswiler.com>

[ Upstream commit 8a1ecc01a473b75ab97be9b36f623e4551a6e9ae ]

There is one too many zeroes in the Power I2C base address. Fix this.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/pxa27x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 210192c38df3c..4448505e34d3b 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -63,7 +63,7 @@
 			clocks = <&clks CLK_PWM1>;
 		};
 
-		pwri2c: i2c@40f000180 {
+		pwri2c: i2c@40f00180 {
 			compatible = "mrvl,pxa-i2c";
 			reg = <0x40f00180 0x24>;
 			interrupts = <6>;
-- 
2.20.1




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

* [PATCH 4.4 024/159] rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 023/159] ARM: dts: pxa: fix power i2c base address Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 025/159] net: lan78xx: Bail out if lan78xx_get_endpoints fails Greg Kroah-Hartman
                   ` (138 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Larry Finger, Kalle Valo, Sasha Levin

From: Larry Finger <Larry.Finger@lwfinger.net>

[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]

In gcc8, when the 3rd argument (size) of a call to strncpy() matches the
length of the first argument, the compiler warns of the possibility of an
unterminated string. Using strlcpy() forces a null at the end.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
index c2d5b495c179a..c089540116fa7 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
@@ -146,7 +146,7 @@ static int rtl8187_register_led(struct ieee80211_hw *dev,
 	led->dev = dev;
 	led->ledpin = ledpin;
 	led->is_radio = is_radio;
-	strncpy(led->name, name, sizeof(led->name));
+	strlcpy(led->name, name, sizeof(led->name));
 
 	led->led_dev.name = led->name;
 	led->led_dev.default_trigger = default_trigger;
-- 
2.20.1




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

* [PATCH 4.4 025/159] net: lan78xx: Bail out if lan78xx_get_endpoints fails
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 024/159] rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 026/159] ASoC: sgtl5000: avoid division by zero if lo_vag is zero Greg Kroah-Hartman
                   ` (137 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Wahren,
	Raghuram Chary Jallipalli, David S. Miller, Sasha Levin

From: Stefan Wahren <stefan.wahren@i2se.com>

[ Upstream commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 ]

We need to bail out if lan78xx_get_endpoints() fails, otherwise the
result is overwritten.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/usb/lan78xx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 45a6a7cae4bfc..fc922f8122801 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2246,6 +2246,11 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
 	int i;
 
 	ret = lan78xx_get_endpoints(dev, intf);
+	if (ret) {
+		netdev_warn(dev->net, "lan78xx_get_endpoints failed: %d\n",
+			    ret);
+		return ret;
+	}
 
 	dev->data[0] = (unsigned long)kzalloc(sizeof(*pdata), GFP_KERNEL);
 
-- 
2.20.1




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

* [PATCH 4.4 026/159] ASoC: sgtl5000: avoid division by zero if lo_vag is zero
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 025/159] net: lan78xx: Bail out if lan78xx_get_endpoints fails Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 027/159] ARM: dts: exynos: Disable pull control for S5M8767 PMIC Greg Kroah-Hartman
                   ` (136 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Colin Ian King, Mark Brown, Sasha Levin

From: Colin Ian King <colin.king@canonical.com>

[ Upstream commit 9ab708aef61f5620113269a9d1bdb1543d1207d0 ]

In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag
is set to zero and later vol_quot is computed by dividing by
lo_vag causing a division by zero error.  Fix this by avoiding
a zero division and set vol_quot to zero in this specific case
so that the lowest setting for i is correctly set.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/sgtl5000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 4808b70ec12cb..a3dd7030f629c 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1415,7 +1415,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
 	 * Searching for a suitable index solving this formula:
 	 * idx = 40 * log10(vag_val / lo_cagcntrl) + 15
 	 */
-	vol_quot = (vag * 100) / lo_vag;
+	vol_quot = lo_vag ? (vag * 100) / lo_vag : 0;
 	lo_vol = 0;
 	for (i = 0; i < ARRAY_SIZE(vol_quot_table); i++) {
 		if (vol_quot >= vol_quot_table[i])
-- 
2.20.1




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

* [PATCH 4.4 027/159] ARM: dts: exynos: Disable pull control for S5M8767 PMIC
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 026/159] ASoC: sgtl5000: avoid division by zero if lo_vag is zero Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 028/159] ath10k: wmi: disable softirqs while calling ieee80211_rx Greg Kroah-Hartman
                   ` (135 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Szyprowski,
	Krzysztof Kozlowski, Sasha Levin

From: Marek Szyprowski <m.szyprowski@samsung.com>

[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]

S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has
external pull-up resistors, so disable any pull control for it in
in controller node. This fixes support for S5M8767 interrupts and
enables operation of wakeup from S5M8767 RTC alarm.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/exynos5250-arndale.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index c000532c14446..b425b77f8fb65 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -170,6 +170,8 @@
 		reg = <0x66>;
 		interrupt-parent = <&gpx3>;
 		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&s5m8767_irq>;
 
 		vinb1-supply = <&main_dc_reg>;
 		vinb2-supply = <&main_dc_reg>;
@@ -552,6 +554,13 @@
 	cap-sd-highspeed;
 };
 
+&pinctrl_0 {
+	s5m8767_irq: s5m8767-irq {
+		samsung,pins = "gpx3-2";
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+	};
+};
+
 &rtc {
 	status = "okay";
 };
-- 
2.20.1




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

* [PATCH 4.4 028/159] ath10k: wmi: disable softirqs while calling ieee80211_rx
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 027/159] ARM: dts: exynos: Disable pull control for S5M8767 PMIC Greg Kroah-Hartman
@ 2019-11-22 10:26 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 029/159] mips: txx9: fix iounmap related issue Greg Kroah-Hartman
                   ` (134 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Erik Stromdahl, Kalle Valo, Sasha Levin

From: Erik Stromdahl <erik.stromdahl@gmail.com>

[ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ]

This is done in order not to trig the below warning in
ieee80211_rx_napi:

WARN_ON_ONCE(softirq_count() == 0);

ieee80211_rx_napi requires that softirq's are disabled during
execution.

The High latency bus drivers (SDIO and USB) sometimes call the wmi
ep_rx_complete callback from non softirq context, resulting in a trigger
of the above warning.

Calling ieee80211_rx_ni with softirq's already disabled (e.g., from
softirq context) should be safe as the local_bh_disable and
local_bh_enable functions (called from ieee80211_rx_ni) are fully
reentrant.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b867875aa6e66..f7ce99f67b5c5 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2294,7 +2294,8 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
 		   status->freq, status->band, status->signal,
 		   status->rate_idx);
 
-	ieee80211_rx(ar->hw, skb);
+	ieee80211_rx_ni(ar->hw, skb);
+
 	return 0;
 }
 
-- 
2.20.1




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

* [PATCH 4.4 029/159] mips: txx9: fix iounmap related issue
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2019-11-22 10:26 ` [PATCH 4.4 028/159] ath10k: wmi: disable softirqs while calling ieee80211_rx Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 030/159] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Greg Kroah-Hartman
                   ` (133 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ding Xiang, Atsushi Nemoto,
	Paul Burton, ralf, jhogan, linux-mips, Sasha Levin

From: Ding Xiang <dingxiang@cmss.chinamobile.com>

[ Upstream commit c6e1241a82e6e74d1ae5cc34581dab2ffd6022d0 ]

if device_register return error, iounmap should be called, also iounmap
need to call before put_device.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20476/
Cc: ralf@linux-mips.org
Cc: jhogan@kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/txx9/generic/setup.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 9d9962ab7d25c..7dc97e944d5aa 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -961,12 +961,11 @@ void __init txx9_sramc_init(struct resource *r)
 		goto exit_put;
 	err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr);
 	if (err) {
-		device_unregister(&dev->dev);
 		iounmap(dev->base);
-		kfree(dev);
+		device_unregister(&dev->dev);
 	}
 	return;
 exit_put:
+	iounmap(dev->base);
 	put_device(&dev->dev);
-	return;
 }
-- 
2.20.1




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

* [PATCH 4.4 030/159] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 029/159] mips: txx9: fix iounmap related issue Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 031/159] ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files Greg Kroah-Hartman
                   ` (132 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Rob Herring, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit f6707fd6241e483f6fea2caae82d876e422bb11a ]

Cache nodes under the cpu node(s) is PowerMac specific according to the
comment above, so make the code enforce that.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/of/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index c6e019208d171..27783223ca5cd 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2125,7 +2125,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)
 	/* OF on pmac has nodes instead of properties named "l2-cache"
 	 * beneath CPU nodes.
 	 */
-	if (!strcmp(np->type, "cpu"))
+	if (IS_ENABLED(CONFIG_PPC_PMAC) && !strcmp(np->type, "cpu"))
 		for_each_child_of_node(np, child)
 			if (!strcmp(child->type, "cache"))
 				return child;
-- 
2.20.1




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

* [PATCH 4.4 031/159] ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 030/159] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 032/159] ARM: dts: omap3-gta04: tvout: enable as display1 alias Greg Kroah-Hartman
                   ` (131 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, H. Nikolaus Schaller, Tony Lindgren,
	Sasha Levin

From: H. Nikolaus Schaller <hns@goldelico.com>

[ Upstream commit fa0d7dc355c890725b6178dab0cc11b194203afa ]

needed for device variants based on GTA04 board but with
different display panel (driver).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index e14d15e5abc89..9b9510e057f3f 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -70,7 +70,7 @@
 		#sound-dai-cells = <0>;
 	};
 
-	spi_lcd {
+	spi_lcd: spi_lcd {
 		compatible = "spi-gpio";
 		#address-cells = <0x1>;
 		#size-cells = <0x0>;
-- 
2.20.1




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

* [PATCH 4.4 032/159] ARM: dts: omap3-gta04: tvout: enable as display1 alias
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 031/159] ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 033/159] ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot Greg Kroah-Hartman
                   ` (130 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, H. Nikolaus Schaller, Tony Lindgren,
	Sasha Levin

From: H. Nikolaus Schaller <hns@goldelico.com>

[ Upstream commit 8905592b6e50cec905e6c6035bbd36201a3bfac1 ]

The omap dss susbystem takes the display aliases to find
out which displays exist. To enable tv-out we must define
an alias.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 9b9510e057f3f..196b3f5158c90 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -28,6 +28,7 @@
 
 	aliases {
 		display0 = &lcd;
+		display1 = &tv0;
 	};
 
 	gpio-keys {
-- 
2.20.1




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

* [PATCH 4.4 033/159] ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 032/159] ARM: dts: omap3-gta04: tvout: enable as display1 alias Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 034/159] ARM: dts: omap3-gta04: keep vpll2 always on Greg Kroah-Hartman
                   ` (129 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, H. Nikolaus Schaller, Tony Lindgren,
	Sasha Levin

From: H. Nikolaus Schaller <hns@goldelico.com>

[ Upstream commit fa99c21ecb3cd4021a60d0e8bf880e78b5bd0729 ]

Vendor defined U-Boot has changed the partition scheme a while ago:

* kernel partition 6MB
* file system partition uses the remainder up to end of the NAND
* increased size of the environment partition (to get an OneNAND compatible base address)
* shrink the U-Boot partition

Let's be compatible (e.g. Debian kernel built from upstream).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 196b3f5158c90..0ea793e365e45 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -523,22 +523,22 @@
 
 		bootloaders@80000 {
 			label = "U-Boot";
-			reg = <0x80000 0x1e0000>;
+			reg = <0x80000 0x1c0000>;
 		};
 
-		bootloaders_env@260000 {
+		bootloaders_env@240000 {
 			label = "U-Boot Env";
-			reg = <0x260000 0x20000>;
+			reg = <0x240000 0x40000>;
 		};
 
 		kernel@280000 {
 			label = "Kernel";
-			reg = <0x280000 0x400000>;
+			reg = <0x280000 0x600000>;
 		};
 
-		filesystem@680000 {
+		filesystem@880000 {
 			label = "File System";
-			reg = <0x680000 0xf980000>;
+			reg = <0x880000 0>;	/* 0 = MTDPART_SIZ_FULL */
 		};
 	};
 };
-- 
2.20.1




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

* [PATCH 4.4 034/159] ARM: dts: omap3-gta04: keep vpll2 always on
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 033/159] ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 035/159] dmaengine: dma-jz4780: Further residue status fix Greg Kroah-Hartman
                   ` (128 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, H. Nikolaus Schaller, Tony Lindgren,
	Sasha Levin

From: H. Nikolaus Schaller <hns@goldelico.com>

[ Upstream commit 1ae00833e30c9b4af5cbfda65d75b1de12f74013 ]

This is needed to make the display and venc work properly.
Compare to omap3-beagle.dts.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 0ea793e365e45..acd0a9deb116b 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -460,6 +460,12 @@
 	regulator-max-microvolt = <3150000>;
 };
 
+/* Needed to power the DPI pins */
+
+&vpll2 {
+	regulator-always-on;
+};
+
 &dss {
 	pinctrl-names = "default";
 	pinctrl-0 = < &dss_dpi_pins >;
-- 
2.20.1




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

* [PATCH 4.4 035/159] dmaengine: dma-jz4780: Further residue status fix
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 034/159] ARM: dts: omap3-gta04: keep vpll2 always on Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 036/159] signal: Always ignore SIGKILL and SIGSTOP sent to the global init Greg Kroah-Hartman
                   ` (127 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Silsby, Paul Cercueil,
	Mathieu Malaterre, Vinod Koul, Sasha Levin

From: Daniel Silsby <dansilsby@gmail.com>

[ Upstream commit 83ef4fb7556b6a673f755da670cbacab7e2c7f1b ]

Func jz4780_dma_desc_residue() expects the index to the next hw
descriptor as its last parameter. Caller func jz4780_dma_tx_status(),
however, applied modulus before passing it. When the current hw
descriptor was last in the list, the index passed became zero.

The resulting excess of reported residue especially caused problems
with cyclic DMA transfer clients, i.e. ALSA AIC audio output, which
rely on this for determining current DMA location within buffer.

Combined with the recent and related residue-reporting fixes, spurious
ALSA audio underruns on jz4770 hardware are now fixed.

Signed-off-by: Daniel Silsby <dansilsby@gmail.com>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/dma-jz4780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index 8344b7c91fe35..1d01e3805f9c2 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -576,7 +576,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
 					to_jz4780_dma_desc(vdesc), 0);
 	} else if (cookie == jzchan->desc->vdesc.tx.cookie) {
 		txstate->residue = jz4780_dma_desc_residue(jzchan, jzchan->desc,
-			  (jzchan->curr_hwdesc + 1) % jzchan->desc->count);
+					jzchan->curr_hwdesc + 1);
 	} else
 		txstate->residue = 0;
 
-- 
2.20.1




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

* [PATCH 4.4 036/159] signal: Always ignore SIGKILL and SIGSTOP sent to the global init
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 035/159] dmaengine: dma-jz4780: Further residue status fix Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 037/159] signal: Properly deliver SIGILL from uprobes Greg Kroah-Hartman
                   ` (126 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Eric W. Biederman,
	Sasha Levin

From: Eric W. Biederman <ebiederm@xmission.com>

[ Upstream commit 86989c41b5ea08776c450cb759592532314a4ed6 ]

If the first process started (aka /sbin/init) receives a SIGKILL it
will panic the system if it is delivered.  Making the system unusable
and undebugable.  It isn't much better if the first process started
receives SIGSTOP.

So always ignore SIGSTOP and SIGKILL sent to init.

This is done in a separate clause in sig_task_ignored as force_sig_info
can clear SIG_UNKILLABLE and this protection should work even then.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/signal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/signal.c b/kernel/signal.c
index 072fd152ab01e..3095b2309876d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -71,6 +71,10 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force)
 
 	handler = sig_handler(t, sig);
 
+	/* SIGKILL and SIGSTOP may not be sent to the global init */
+	if (unlikely(is_global_init(t) && sig_kernel_only(sig)))
+		return true;
+
 	if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
 	    handler == SIG_DFL && !(force && sig_kernel_only(sig)))
 		return 1;
-- 
2.20.1




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

* [PATCH 4.4 037/159] signal: Properly deliver SIGILL from uprobes
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 036/159] signal: Always ignore SIGKILL and SIGSTOP sent to the global init Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 038/159] signal: Properly deliver SIGSEGV from x86 uprobes Greg Kroah-Hartman
                   ` (125 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Eric W. Biederman,
	Sasha Levin

From: Eric W. Biederman <ebiederm@xmission.com>

[ Upstream commit 55a3235fc71bf34303e34a95eeee235b2d2a35dd ]

For userspace to tell the difference between a random signal and an
exception, the exception must include siginfo information.

Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result
in userspace seeing si_code == SI_USER (like a random signal) instead
of si_code == SI_KERNEL or a more specific si_code as all exceptions
deliver.

Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current)
with force_sig(SIG_ILL, current) which gets this right and is
shorter and easier to type.

Fixes: 014940bad8e4 ("uprobes/x86: Send SIGILL if arch_uprobe_post_xol() fails")
Fixes: 0b5256c7f173 ("uprobes: Send SIGILL if handle_trampoline() fails")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/events/uprobes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index aad43c88a6685..8cad3cd92e23e 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1836,7 +1836,7 @@ static void handle_trampoline(struct pt_regs *regs)
 
  sigill:
 	uprobe_warn(current, "handle uretprobe, sending SIGILL.");
-	force_sig_info(SIGILL, SEND_SIG_FORCED, current);
+	force_sig(SIGILL, current);
 
 }
 
@@ -1952,7 +1952,7 @@ static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs)
 
 	if (unlikely(err)) {
 		uprobe_warn(current, "execute the probed insn, sending SIGILL.");
-		force_sig_info(SIGILL, SEND_SIG_FORCED, current);
+		force_sig(SIGILL, current);
 	}
 }
 
-- 
2.20.1




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

* [PATCH 4.4 038/159] signal: Properly deliver SIGSEGV from x86 uprobes
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 037/159] signal: Properly deliver SIGILL from uprobes Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 039/159] scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() Greg Kroah-Hartman
                   ` (124 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Eric W. Biederman,
	Sasha Levin

From: Eric W. Biederman <ebiederm@xmission.com>

[ Upstream commit 4a63c1ffd384ebdce40aac9c997dab68379137be ]

For userspace to tell the difference between an random signal
and an exception, the exception must include siginfo information.

Using SEND_SIG_FORCED for SIGSEGV is thus wrong, and it will result in
userspace seeing si_code == SI_USER (like a random signal) instead of
si_code == SI_KERNEL or a more specific si_code as all exceptions
deliver.

Therefore replace force_sig_info(SIGSEGV, SEND_SIG_FORCE, current)
with force_sig(SIG_SEGV, current) which gets this right and is shorter
and easier to type.

Fixes: 791eca10107f ("uretprobes/x86: Hijack return address")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kernel/uprobes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index 178d63cac321b..60b12c14cf6fb 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -983,7 +983,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs
 		pr_err("uprobe: return address clobbered: pid=%d, %%sp=%#lx, "
 			"%%ip=%#lx\n", current->pid, regs->sp, regs->ip);
 
-		force_sig_info(SIGSEGV, SEND_SIG_FORCED, current);
+		force_sig(SIGSEGV, current);
 	}
 
 	return -1;
-- 
2.20.1




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

* [PATCH 4.4 039/159] scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 038/159] signal: Properly deliver SIGSEGV from x86 uprobes Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 040/159] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set Greg Kroah-Hartman
                   ` (123 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matthew Wilcox, George Kennedy,
	Mark Kanda, Martin K. Petersen, Sasha Levin

From: George Kennedy <george.kennedy@oracle.com>

[ Upstream commit 288315e95264b6355e26609e9dec5dc4563d4ab0 ]

sym_int_sir() in sym_hipd.c does not check the command pointer for NULL before
using it in debug message prints.

Suggested-by: Matthew Wilcox <matthew.wilcox@oracle.com>
Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Acked-by: Matthew Wilcox <matthew.wilcox@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index c6425e3df5a04..f1c7714377524 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -4371,6 +4371,13 @@ static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct sym
 	OUTB(np, HS_PRT, HS_BUSY);
 }
 
+#define sym_printk(lvl, tp, cp, fmt, v...) do { \
+	if (cp)							\
+		scmd_printk(lvl, cp->cmd, fmt, ##v);		\
+	else							\
+		starget_printk(lvl, tp->starget, fmt, ##v);	\
+} while (0)
+
 /*
  *  chip exception handler for programmed interrupts.
  */
@@ -4416,7 +4423,7 @@ static void sym_int_sir(struct sym_hcb *np)
 	 *  been selected with ATN.  We do not want to handle that.
 	 */
 	case SIR_SEL_ATN_NO_MSG_OUT:
-		scmd_printk(KERN_WARNING, cp->cmd,
+		sym_printk(KERN_WARNING, tp, cp,
 				"No MSG OUT phase after selection with ATN\n");
 		goto out_stuck;
 	/*
@@ -4424,7 +4431,7 @@ static void sym_int_sir(struct sym_hcb *np)
 	 *  having reselected the initiator.
 	 */
 	case SIR_RESEL_NO_MSG_IN:
-		scmd_printk(KERN_WARNING, cp->cmd,
+		sym_printk(KERN_WARNING, tp, cp,
 				"No MSG IN phase after reselection\n");
 		goto out_stuck;
 	/*
@@ -4432,7 +4439,7 @@ static void sym_int_sir(struct sym_hcb *np)
 	 *  an IDENTIFY.
 	 */
 	case SIR_RESEL_NO_IDENTIFY:
-		scmd_printk(KERN_WARNING, cp->cmd,
+		sym_printk(KERN_WARNING, tp, cp,
 				"No IDENTIFY after reselection\n");
 		goto out_stuck;
 	/*
@@ -4461,7 +4468,7 @@ static void sym_int_sir(struct sym_hcb *np)
 	case SIR_RESEL_ABORTED:
 		np->lastmsg = np->msgout[0];
 		np->msgout[0] = M_NOOP;
-		scmd_printk(KERN_WARNING, cp->cmd,
+		sym_printk(KERN_WARNING, tp, cp,
 			"message %x sent on bad reselection\n", np->lastmsg);
 		goto out;
 	/*
-- 
2.20.1




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

* [PATCH 4.4 040/159] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 039/159] scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 041/159] scsi: pm80xx: Corrected dma_unmap_sg() parameter Greg Kroah-Hartman
                   ` (122 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oleksij Rempel, Shawn Guo, Sasha Levin

From: Oleksij Rempel <o.rempel@pengutronix.de>

[ Upstream commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 ]

One of the Freescale recommended sequences for power off with external
PMIC is the following:
...
3.  SoC is programming PMIC for power off when standby is asserted.
4.  In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies.

See:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
page 5083

This patch implements step 4. of this sequence.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-imx/pm-imx6.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index a19d20f23e716..fff529c5f9b36 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -602,6 +602,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata
 				   IMX6Q_GPR1_GINT);
 }
 
+static void imx6_pm_stby_poweroff(void)
+{
+	imx6_set_lpm(STOP_POWER_OFF);
+	imx6q_suspend_finish(0);
+
+	mdelay(1000);
+
+	pr_emerg("Unable to poweroff system\n");
+}
+
+static int imx6_pm_stby_poweroff_probe(void)
+{
+	if (pm_power_off) {
+		pr_warn("%s: pm_power_off already claimed  %p %pf!\n",
+			__func__, pm_power_off, pm_power_off);
+		return -EBUSY;
+	}
+
+	pm_power_off = imx6_pm_stby_poweroff;
+	return 0;
+}
+
 void __init imx6_pm_ccm_init(const char *ccm_compat)
 {
 	struct device_node *np;
@@ -618,6 +640,9 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
 	val = readl_relaxed(ccm_base + CLPCR);
 	val &= ~BM_CLPCR_LPM;
 	writel_relaxed(val, ccm_base + CLPCR);
+
+	if (of_property_read_bool(np, "fsl,pmic-stby-poweroff"))
+		imx6_pm_stby_poweroff_probe();
 }
 
 void __init imx6q_pm_init(void)
-- 
2.20.1




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

* [PATCH 4.4 041/159] scsi: pm80xx: Corrected dma_unmap_sg() parameter
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 040/159] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 042/159] scsi: pm80xx: Fixed system hang issue during kexec boot Greg Kroah-Hartman
                   ` (121 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Deepak Ukey, Viswas G, Jack Wang,
	Martin K. Petersen, Sasha Levin

From: Deepak Ukey <deepak.ukey@microchip.com>

[ Upstream commit 76cb25b058034d37244be6aca97a2ad52a5fbcad ]

For the function dma_unmap_sg(), the <nents> parameter should be number of
elements in the scatter list prior to the mapping, not after the mapping.

Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Acked-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/pm8001/pm8001_sas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 949198c01ced6..ef1687f798cc1 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -463,7 +463,7 @@ err_out:
 	dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc);
 	if (!sas_protocol_ata(t->task_proto))
 		if (n_elem)
-			dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem,
+			dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter,
 				t->data_dir);
 out_done:
 	spin_unlock_irqrestore(&pm8001_ha->lock, flags);
-- 
2.20.1




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

* [PATCH 4.4 042/159] scsi: pm80xx: Fixed system hang issue during kexec boot
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 041/159] scsi: pm80xx: Corrected dma_unmap_sg() parameter Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 043/159] kprobes: Dont call BUG_ON() if there is a kprobe in use on free list Greg Kroah-Hartman
                   ` (120 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Deepak Ukey, Viswas G, Jack Wang,
	Martin K. Petersen, Sasha Levin

From: Deepak Ukey <deepak.ukey@microchip.com>

[ Upstream commit 72349b62a571effd6faadd0600b8e657dd87afbf ]

When the firmware is not responding, execution of kexec boot causes a system
hang. When firmware assertion happened, driver get notified with interrupt
vector updated in MPI configuration table. Then, the driver will read
scratchpad register and set controller_fatal_error flag to true.

Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Acked-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/pm8001/pm8001_hwi.c |  6 +++
 drivers/scsi/pm8001/pm8001_sas.c |  7 +++
 drivers/scsi/pm8001/pm8001_sas.h |  1 +
 drivers/scsi/pm8001/pm80xx_hwi.c | 80 +++++++++++++++++++++++++++++---
 drivers/scsi/pm8001/pm80xx_hwi.h |  3 ++
 5 files changed, 91 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 04e67a190652e..b3490b4a046a2 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -1479,6 +1479,12 @@ u32 pm8001_mpi_msg_consume(struct pm8001_hba_info *pm8001_ha,
 		} else {
 			u32 producer_index;
 			void *pi_virt = circularQ->pi_virt;
+			/* spurious interrupt during setup if
+			 * kexec-ing and driver doing a doorbell access
+			 * with the pre-kexec oq interrupt setup
+			 */
+			if (!pi_virt)
+				break;
 			/* Update the producer index from SPC */
 			producer_index = pm8001_read_32(pi_virt);
 			circularQ->producer_index = cpu_to_le32(producer_index);
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index ef1687f798cc1..3862d8b1defe3 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -371,6 +371,13 @@ static int pm8001_task_exec(struct sas_task *task,
 		return 0;
 	}
 	pm8001_ha = pm8001_find_ha_by_dev(task->dev);
+	if (pm8001_ha->controller_fatal_error) {
+		struct task_status_struct *ts = &t->task_status;
+
+		ts->resp = SAS_TASK_UNDELIVERED;
+		t->task_done(t);
+		return 0;
+	}
 	PM8001_IO_DBG(pm8001_ha, pm8001_printk("pm8001_task_exec device \n "));
 	spin_lock_irqsave(&pm8001_ha->lock, flags);
 	do {
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h
index 6628cc38316c2..d8768ac41ebbf 100644
--- a/drivers/scsi/pm8001/pm8001_sas.h
+++ b/drivers/scsi/pm8001/pm8001_sas.h
@@ -531,6 +531,7 @@ struct pm8001_hba_info {
 	u32			logging_level;
 	u32			fw_status;
 	u32			smp_exp_mode;
+	bool			controller_fatal_error;
 	const struct firmware 	*fw_image;
 	struct isr_param irq_vector[PM8001_MAX_MSIX_VEC];
 };
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index eb4fee61df729..9edd61c063a1a 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -572,6 +572,9 @@ static void update_main_config_table(struct pm8001_hba_info *pm8001_ha)
 		pm8001_ha->main_cfg_tbl.pm80xx_tbl.pcs_event_log_size);
 	pm8001_mw32(address, MAIN_PCS_EVENT_LOG_OPTION,
 		pm8001_ha->main_cfg_tbl.pm80xx_tbl.pcs_event_log_severity);
+	/* Update Fatal error interrupt vector */
+	pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt |=
+					((pm8001_ha->number_of_intr - 1) << 8);
 	pm8001_mw32(address, MAIN_FATAL_ERROR_INTERRUPT,
 		pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt);
 	pm8001_mw32(address, MAIN_EVENT_CRC_CHECK,
@@ -1099,6 +1102,9 @@ static int pm80xx_chip_init(struct pm8001_hba_info *pm8001_ha)
 		return -EBUSY;
 	}
 
+	/* Initialize the controller fatal error flag */
+	pm8001_ha->controller_fatal_error = false;
+
 	/* Initialize pci space address eg: mpi offset */
 	init_pci_device_addresses(pm8001_ha);
 	init_default_table_values(pm8001_ha);
@@ -1207,13 +1213,17 @@ pm80xx_chip_soft_rst(struct pm8001_hba_info *pm8001_ha)
 	u32 bootloader_state;
 	u32 ibutton0, ibutton1;
 
-	/* Check if MPI is in ready state to reset */
-	if (mpi_uninit_check(pm8001_ha) != 0) {
-		PM8001_FAIL_DBG(pm8001_ha,
-			pm8001_printk("MPI state is not ready\n"));
-		return -1;
+	/* Process MPI table uninitialization only if FW is ready */
+	if (!pm8001_ha->controller_fatal_error) {
+		/* Check if MPI is in ready state to reset */
+		if (mpi_uninit_check(pm8001_ha) != 0) {
+			regval = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_1);
+			PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
+				"MPI state is not ready scratch1 :0x%x\n",
+				regval));
+			return -1;
+		}
 	}
-
 	/* checked for reset register normal state; 0x0 */
 	regval = pm8001_cr32(pm8001_ha, 0, SPC_REG_SOFT_RESET);
 	PM8001_INIT_DBG(pm8001_ha,
@@ -3717,6 +3727,46 @@ static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb)
 	}
 }
 
+static void print_scratchpad_registers(struct pm8001_hba_info *pm8001_ha)
+{
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_SCRATCH_PAD_0: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_0)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_SCRATCH_PAD_1:0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_1)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_SCRATCH_PAD_2: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_2)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_SCRATCH_PAD_3: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_3)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_0: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_0)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_1: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_1)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_2: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_2)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_3: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_3)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_4: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_4)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_HOST_SCRATCH_PAD_5: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_5)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_RSVD_SCRATCH_PAD_0: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_6)));
+	PM8001_FAIL_DBG(pm8001_ha,
+		pm8001_printk("MSGU_RSVD_SCRATCH_PAD_1: 0x%x\n",
+			pm8001_cr32(pm8001_ha, 0, MSGU_HOST_SCRATCH_PAD_7)));
+}
+
 static int process_oq(struct pm8001_hba_info *pm8001_ha, u8 vec)
 {
 	struct outbound_queue_table *circularQ;
@@ -3724,10 +3774,28 @@ static int process_oq(struct pm8001_hba_info *pm8001_ha, u8 vec)
 	u8 uninitialized_var(bc);
 	u32 ret = MPI_IO_STATUS_FAIL;
 	unsigned long flags;
+	u32 regval;
 
+	if (vec == (pm8001_ha->number_of_intr - 1)) {
+		regval = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_1);
+		if ((regval & SCRATCH_PAD_MIPSALL_READY) !=
+					SCRATCH_PAD_MIPSALL_READY) {
+			pm8001_ha->controller_fatal_error = true;
+			PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
+				"Firmware Fatal error! Regval:0x%x\n", regval));
+			print_scratchpad_registers(pm8001_ha);
+			return ret;
+		}
+	}
 	spin_lock_irqsave(&pm8001_ha->lock, flags);
 	circularQ = &pm8001_ha->outbnd_q_tbl[vec];
 	do {
+		/* spurious interrupt during setup if kexec-ing and
+		 * driver doing a doorbell access w/ the pre-kexec oq
+		 * interrupt setup.
+		 */
+		if (!circularQ->pi_virt)
+			break;
 		ret = pm8001_mpi_msg_consume(pm8001_ha, circularQ, &pMsg1, &bc);
 		if (MPI_IO_STATUS_SUCCESS == ret) {
 			/* process the outbound message */
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h
index 7a443bad61634..411b414a9a0ef 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.h
+++ b/drivers/scsi/pm8001/pm80xx_hwi.h
@@ -1288,6 +1288,9 @@ typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t;
 #define SCRATCH_PAD_BOOT_LOAD_SUCCESS	0x0
 #define SCRATCH_PAD_IOP0_READY		0xC00
 #define SCRATCH_PAD_IOP1_READY		0x3000
+#define SCRATCH_PAD_MIPSALL_READY	(SCRATCH_PAD_IOP1_READY | \
+					SCRATCH_PAD_IOP0_READY | \
+					SCRATCH_PAD_RAAE_READY)
 
 /* boot loader state */
 #define SCRATCH_PAD1_BOOTSTATE_MASK		0x70	/* Bit 4-6 */
-- 
2.20.1




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

* [PATCH 4.4 043/159] kprobes: Dont call BUG_ON() if there is a kprobe in use on free list
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 042/159] scsi: pm80xx: Fixed system hang issue during kexec boot Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 044/159] nvmem: core: return error code instead of NULL from nvmem_device_get Greg Kroah-Hartman
                   ` (119 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Masami Hiramatsu,
	Anil S Keshavamurthy, David S . Miller, Linus Torvalds,
	Naveen N . Rao, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
	Sasha Levin

From: Masami Hiramatsu <mhiramat@kernel.org>

[ Upstream commit cbdd96f5586151e48317d90a403941ec23f12660 ]

Instead of calling BUG_ON(), if we find a kprobe in use on free kprobe
list, just remove it from the list and keep it on kprobe hash list
as same as other in-use kprobes.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Naveen N . Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/153666126882.21306.10738207224288507996.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/kprobes.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index fdde50d39a46d..f59f49bc2a5d5 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -514,8 +514,14 @@ static void do_free_cleaned_kprobes(void)
 	struct optimized_kprobe *op, *tmp;
 
 	list_for_each_entry_safe(op, tmp, &freeing_list, list) {
-		BUG_ON(!kprobe_unused(&op->kp));
 		list_del_init(&op->list);
+		if (WARN_ON_ONCE(!kprobe_unused(&op->kp))) {
+			/*
+			 * This must not happen, but if there is a kprobe
+			 * still in use, keep it on kprobes hash list.
+			 */
+			continue;
+		}
 		free_aggr_kprobe(&op->kp);
 	}
 }
-- 
2.20.1




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

* [PATCH 4.4 044/159] nvmem: core: return error code instead of NULL from nvmem_device_get
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 043/159] kprobes: Dont call BUG_ON() if there is a kprobe in use on free list Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 045/159] media: fix: media: pci: meye: validate offset to avoid arbitrary access Greg Kroah-Hartman
                   ` (118 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Niklas Cassel, Srinivas Kandagatla,
	Sasha Levin

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

[ Upstream commit ca6ac25cecf0e740d7cc8e03e0ebbf8acbeca3df ]

nvmem_device_get() should return ERR_PTR() on error or valid pointer
on success, but one of the code path seems to return NULL, so fix it.

Reported-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvmem/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 931cc33e46f02..5d6d1bb4f1106 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -457,7 +457,7 @@ static struct nvmem_device *nvmem_find(const char *name)
 	d = bus_find_device(&nvmem_bus_type, NULL, (void *)name, nvmem_match);
 
 	if (!d)
-		return NULL;
+		return ERR_PTR(-ENOENT);
 
 	return to_nvmem_device(d);
 }
-- 
2.20.1




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

* [PATCH 4.4 045/159] media: fix: media: pci: meye: validate offset to avoid arbitrary access
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 044/159] nvmem: core: return error code instead of NULL from nvmem_device_get Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 046/159] ALSA: intel8x0m: Register irq handler after register initializations Greg Kroah-Hartman
                   ` (117 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lao Wei, Mauro Carvalho Chehab, Sasha Levin

From: Lao Wei <zrlw@qq.com>

[ Upstream commit eac7230fdb4672c2cb56f6a01a1744f562c01f80 ]

Motion eye video4linux driver for Sony Vaio PictureBook desn't validate user-controlled parameter
'vma->vm_pgoff', a malicious process might access all of kernel memory from user space by trying
pass different arbitrary address.
Discussion: http://www.openwall.com/lists/oss-security/2018/07/06/1

Signed-off-by: Lao Wei <zrlw@qq.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/pci/meye/meye.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index ba887e8e1b171..a85c5199ccd30 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1469,7 +1469,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)
 	unsigned long page, pos;
 
 	mutex_lock(&meye.lock);
-	if (size > gbuffers * gbufsize) {
+	if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {
 		mutex_unlock(&meye.lock);
 		return -EINVAL;
 	}
-- 
2.20.1




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

* [PATCH 4.4 046/159] ALSA: intel8x0m: Register irq handler after register initializations
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 045/159] media: fix: media: pci: meye: validate offset to avoid arbitrary access Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 047/159] pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map() Greg Kroah-Hartman
                   ` (116 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai, Sasha Levin

From: Takashi Iwai <tiwai@suse.de>

[ Upstream commit 7064f376d4a10686f51c879401a569bb4babf9c6 ]

The interrupt handler has to be acquired after the other resource
initialization when allocated with IRQF_SHARED.  Otherwise it's
triggered before the resource gets ready, and may lead to unpleasant
behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/intel8x0m.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index 1bc98c867133d..2286dfd72ff7e 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -1171,16 +1171,6 @@ static int snd_intel8x0m_create(struct snd_card *card,
 	}
 
  port_inited:
-	if (request_irq(pci->irq, snd_intel8x0m_interrupt, IRQF_SHARED,
-			KBUILD_MODNAME, chip)) {
-		dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
-		snd_intel8x0m_free(chip);
-		return -EBUSY;
-	}
-	chip->irq = pci->irq;
-	pci_set_master(pci);
-	synchronize_irq(chip->irq);
-
 	/* initialize offsets */
 	chip->bdbars_count = 2;
 	tbl = intel_regs;
@@ -1224,11 +1214,21 @@ static int snd_intel8x0m_create(struct snd_card *card,
 	chip->int_sta_reg = ICH_REG_GLOB_STA;
 	chip->int_sta_mask = int_sta_masks;
 
+	pci_set_master(pci);
+
 	if ((err = snd_intel8x0m_chip_init(chip, 1)) < 0) {
 		snd_intel8x0m_free(chip);
 		return err;
 	}
 
+	if (request_irq(pci->irq, snd_intel8x0m_interrupt, IRQF_SHARED,
+			KBUILD_MODNAME, chip)) {
+		dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
+		snd_intel8x0m_free(chip);
+		return -EBUSY;
+	}
+	chip->irq = pci->irq;
+
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
 		snd_intel8x0m_free(chip);
 		return err;
-- 
2.20.1




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

* [PATCH 4.4 047/159] pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 046/159] ALSA: intel8x0m: Register irq handler after register initializations Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 048/159] llc: avoid blocking in llc_sap_close() Greg Kroah-Hartman
                   ` (115 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Ludovic Desroches,
	Linus Walleij, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit b97760ae8e3dc8bb91881c13425a0bff55f2bd85 ]

Smatch complains about this condition:

	if (has_config && num_pins >= 1)

The "has_config" variable is either uninitialized or true.  The
"num_pins" variable is unsigned and we verified that it is non-zero on
the lines before so we know "num_pines >= 1" is true.  Really, we could
just check "num_configs" directly and remove the "has_config" variable.

Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 9aa82a4e9e254..b4420a0bf7d66 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -477,7 +477,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 	unsigned num_pins, num_configs, reserve;
 	unsigned long *configs;
 	struct property	*pins;
-	bool has_config;
 	u32 pinfunc;
 	int ret, i;
 
@@ -493,9 +492,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 		return ret;
 	}
 
-	if (num_configs)
-		has_config = true;
-
 	num_pins = pins->length / sizeof(u32);
 	if (!num_pins) {
 		dev_err(pctldev->dev, "no pins found in node %s\n",
@@ -508,7 +504,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 	 * map for each pin.
 	 */
 	reserve = 1;
-	if (has_config && num_pins >= 1)
+	if (num_configs)
 		reserve++;
 	reserve *= num_pins;
 	ret = pinctrl_utils_reserve_map(pctldev, map, reserved_maps, num_maps,
@@ -531,7 +527,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 		pinctrl_utils_add_map_mux(pctldev, map, reserved_maps, num_maps,
 					  group, func);
 
-		if (has_config) {
+		if (num_configs) {
 			ret = pinctrl_utils_add_map_configs(pctldev, map,
 					reserved_maps, num_maps, group,
 					configs, num_configs,
-- 
2.20.1




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

* [PATCH 4.4 048/159] llc: avoid blocking in llc_sap_close()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 047/159] pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 049/159] powerpc/vdso: Correct call frame information Greg Kroah-Hartman
                   ` (114 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Cong Wang, David S. Miller, Sasha Levin

From: Cong Wang <xiyou.wangcong@gmail.com>

[ Upstream commit 9708d2b5b7c648e8e0a40d11e8cea12f6277f33c ]

llc_sap_close() is called by llc_sap_put() which
could be called in BH context in llc_rcv(). We can't
block in BH.

There is no reason to block it here, kfree_rcu() should
be sufficient.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/net/llc.h  | 1 +
 net/llc/llc_core.c | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/net/llc.h b/include/net/llc.h
index 82d989995d18a..95e5ced4c1339 100644
--- a/include/net/llc.h
+++ b/include/net/llc.h
@@ -66,6 +66,7 @@ struct llc_sap {
 	int sk_count;
 	struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES];
 	struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES];
+	struct rcu_head rcu;
 };
 
 static inline
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c
index e896a2c53b120..f1e442a39db8d 100644
--- a/net/llc/llc_core.c
+++ b/net/llc/llc_core.c
@@ -127,9 +127,7 @@ void llc_sap_close(struct llc_sap *sap)
 	list_del_rcu(&sap->node);
 	spin_unlock_bh(&llc_sap_list_lock);
 
-	synchronize_rcu();
-
-	kfree(sap);
+	kfree_rcu(sap, rcu);
 }
 
 static struct packet_type llc_packet_type __read_mostly = {
-- 
2.20.1




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

* [PATCH 4.4 049/159] powerpc/vdso: Correct call frame information
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 048/159] llc: avoid blocking in llc_sap_close() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 050/159] ARM: dts: socfpga: Fix I2C bus unit-address error Greg Kroah-Hartman
                   ` (113 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alan Modra, Reza Arbab,
	Paul Mackerras, Sasha Levin

From: Alan Modra <amodra@gmail.com>

[ Upstream commit 56d20861c027498b5a1112b4f9f05b56d906fdda ]

Call Frame Information is used by gdb for back-traces and inserting
breakpoints on function return for the "finish" command.  This failed
when inside __kernel_clock_gettime.  More concerning than difficulty
debugging is that CFI is also used by stack frame unwinding code to
implement exceptions.  If you have an app that needs to handle
asynchronous exceptions for some reason, and you are unlucky enough to
get one inside the VDSO time functions, your app will crash.

What's wrong:  There is control flow in __kernel_clock_gettime that
reaches label 99 without saving lr in r12.  CFI info however is
interpreted by the unwinder without reference to control flow: It's a
simple matter of "Execute all the CFI opcodes up to the current
address".  That means the unwinder thinks r12 contains the return
address at label 99.  Disabuse it of that notion by resetting CFI for
the return address at label 99.

Note that the ".cfi_restore lr" could have gone anywhere from the
"mtlr r12" a few instructions earlier to the instruction at label 99.
I put the CFI as late as possible, because in general that's best
practice (and if possible grouped with other CFI in order to reduce
the number of CFI opcodes executed when unwinding).  Using r12 as the
return address is perfectly fine after the "mtlr r12" since r12 on
that code path still contains the return address.

__get_datapage also has a CFI error.  That function temporarily saves
lr in r0, and reflects that fact with ".cfi_register lr,r0".  A later
use of r0 means the CFI at that point isn't correct, as r0 no longer
contains the return address.  Fix that too.

Signed-off-by: Alan Modra <amodra@gmail.com>
Tested-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/kernel/vdso32/datapage.S     | 1 +
 arch/powerpc/kernel/vdso32/gettimeofday.S | 1 +
 arch/powerpc/kernel/vdso64/datapage.S     | 1 +
 arch/powerpc/kernel/vdso64/gettimeofday.S | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
index 59cf5f452879b..9d112e1b31b8b 100644
--- a/arch/powerpc/kernel/vdso32/datapage.S
+++ b/arch/powerpc/kernel/vdso32/datapage.S
@@ -37,6 +37,7 @@ data_page_branch:
 	mtlr	r0
 	addi	r3, r3, __kernel_datapage_offset-data_page_branch
 	lwz	r0,0(r3)
+  .cfi_restore lr
 	add	r3,r0,r3
 	blr
   .cfi_endproc
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index 6b2b69616e776..7b341b86216c2 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
 	 */
 99:
 	li	r0,__NR_clock_gettime
+  .cfi_restore lr
 	sc
 	blr
   .cfi_endproc
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index 7612eeb31da14..6832e41c372b0 100644
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -37,6 +37,7 @@ data_page_branch:
 	mtlr	r0
 	addi	r3, r3, __kernel_datapage_offset-data_page_branch
 	lwz	r0,0(r3)
+  .cfi_restore lr
 	add	r3,r0,r3
 	blr
   .cfi_endproc
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index 3820213248836..09b2a49f6dd53 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime)
 	 */
 99:
 	li	r0,__NR_clock_gettime
+  .cfi_restore lr
 	sc
 	blr
   .cfi_endproc
-- 
2.20.1




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

* [PATCH 4.4 050/159] ARM: dts: socfpga: Fix I2C bus unit-address error
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 049/159] powerpc/vdso: Correct call frame information Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 051/159] pinctrl: at91: dont use the same irqchip with multiple gpiochips Greg Kroah-Hartman
                   ` (112 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Herring, Dinh Nguyen, Sasha Levin

From: Dinh Nguyen <dinguyen@kernel.org>

[ Upstream commit cbbc488ed85061a765cf370c3e41f383c1e0add6 ]

dtc has new checks for I2C buses. Fix the warnings in unit-addresses.

arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dtb: Warning (i2c_bus_reg): /soc/i2c@ffc04000/adxl345@0: I2C bus unit address format error, expected "53"

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
index 555e9caf21e16..7b8e1c4215b51 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
@@ -88,7 +88,7 @@
 	status = "okay";
 	speed-mode = <0>;
 
-	adxl345: adxl345@0 {
+	adxl345: adxl345@53 {
 		compatible = "adi,adxl345";
 		reg = <0x53>;
 
-- 
2.20.1




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

* [PATCH 4.4 051/159] pinctrl: at91: dont use the same irqchip with multiple gpiochips
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 050/159] ARM: dts: socfpga: Fix I2C bus unit-address error Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 052/159] cxgb4: Fix endianness issue in t4_fwcache() Greg Kroah-Hartman
                   ` (111 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ludovic Desroches, Linus Walleij,
	Sasha Levin

From: Ludovic Desroches <ludovic.desroches@microchip.com>

[ Upstream commit 0c3dfa176912b5f87732545598200fb55e9c1978 ]

Sharing the same irqchip with multiple gpiochips is not a good
practice. For instance, when installing hooks, we change the state
of the irqchip. The initial state of the irqchip for the second
gpiochip to register is then disrupted.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/pinctrl-at91.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 0d2fc0cff35ee..52bbd34f7d0d9 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1556,16 +1556,6 @@ void at91_pinctrl_gpio_resume(void)
 #define gpio_irq_set_wake	NULL
 #endif /* CONFIG_PM */
 
-static struct irq_chip gpio_irqchip = {
-	.name		= "GPIO",
-	.irq_ack	= gpio_irq_ack,
-	.irq_disable	= gpio_irq_mask,
-	.irq_mask	= gpio_irq_mask,
-	.irq_unmask	= gpio_irq_unmask,
-	/* .irq_set_type is set dynamically */
-	.irq_set_wake	= gpio_irq_set_wake,
-};
-
 static void gpio_irq_handler(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -1608,12 +1598,22 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
 	struct gpio_chip	*gpiochip_prev = NULL;
 	struct at91_gpio_chip   *prev = NULL;
 	struct irq_data		*d = irq_get_irq_data(at91_gpio->pioc_virq);
+	struct irq_chip		*gpio_irqchip;
 	int ret, i;
 
+	gpio_irqchip = devm_kzalloc(&pdev->dev, sizeof(*gpio_irqchip), GFP_KERNEL);
+	if (!gpio_irqchip)
+		return -ENOMEM;
+
 	at91_gpio->pioc_hwirq = irqd_to_hwirq(d);
 
-	/* Setup proper .irq_set_type function */
-	gpio_irqchip.irq_set_type = at91_gpio->ops->irq_type;
+	gpio_irqchip->name = "GPIO";
+	gpio_irqchip->irq_ack = gpio_irq_ack;
+	gpio_irqchip->irq_disable = gpio_irq_mask;
+	gpio_irqchip->irq_mask = gpio_irq_mask;
+	gpio_irqchip->irq_unmask = gpio_irq_unmask;
+	gpio_irqchip->irq_set_wake = gpio_irq_set_wake,
+	gpio_irqchip->irq_set_type = at91_gpio->ops->irq_type;
 
 	/* Disable irqs of this PIO controller */
 	writel_relaxed(~0, at91_gpio->regbase + PIO_IDR);
@@ -1624,7 +1624,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
 	 * interrupt.
 	 */
 	ret = gpiochip_irqchip_add(&at91_gpio->chip,
-				   &gpio_irqchip,
+				   gpio_irqchip,
 				   0,
 				   handle_edge_irq,
 				   IRQ_TYPE_EDGE_BOTH);
@@ -1642,7 +1642,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
 	if (!gpiochip_prev) {
 		/* Then register the chain on the parent IRQ */
 		gpiochip_set_chained_irqchip(&at91_gpio->chip,
-					     &gpio_irqchip,
+					     gpio_irqchip,
 					     at91_gpio->pioc_virq,
 					     gpio_irq_handler);
 		return 0;
-- 
2.20.1




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

* [PATCH 4.4 052/159] cxgb4: Fix endianness issue in t4_fwcache()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 051/159] pinctrl: at91: dont use the same irqchip with multiple gpiochips Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 053/159] power: supply: ab8500_fg: silence uninitialized variable warnings Greg Kroah-Hartman
                   ` (110 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Al Viro, Ganesh Goudar,
	David S. Miller, Sasha Levin

From: Ganesh Goudar <ganeshgr@chelsio.com>

[ Upstream commit 0dc235afc59a226d951352b0adf4a89b532a9d13 ]

Do not put host-endian 0 or 1 into big endian feild.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index de23f23b41de6..832ad1bd1f29b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3482,7 +3482,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op)
 	c.param[0].mnem =
 		cpu_to_be32(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) |
 			    FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_FWCACHE));
-	c.param[0].val = (__force __be32)op;
+	c.param[0].val = cpu_to_be32(op);
 
 	return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL);
 }
-- 
2.20.1




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

* [PATCH 4.4 053/159] power: supply: ab8500_fg: silence uninitialized variable warnings
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 052/159] cxgb4: Fix endianness issue in t4_fwcache() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 054/159] power: supply: max8998-charger: Fix platform data retrieval Greg Kroah-Hartman
                   ` (109 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Sebastian Reichel,
	Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit 54baff8d4e5dce2cef61953b1dc22079cda1ddb1 ]

If kstrtoul() fails then we print "charge_full" when it's uninitialized.
The debug printk doesn't add anything so I deleted it and cleaned these
two functions up a bit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/power/ab8500_fg.c | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index 3830dade5d69d..d91111200dde2 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2447,17 +2447,14 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf,
 				 size_t count)
 {
 	unsigned long charge_full;
-	ssize_t ret;
+	int ret;
 
 	ret = kstrtoul(buf, 10, &charge_full);
+	if (ret)
+		return ret;
 
-	dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full);
-
-	if (!ret) {
-		di->bat_cap.max_mah = (int) charge_full;
-		ret = count;
-	}
-	return ret;
+	di->bat_cap.max_mah = (int) charge_full;
+	return count;
 }
 
 static ssize_t charge_now_show(struct ab8500_fg *di, char *buf)
@@ -2469,20 +2466,16 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf,
 				 size_t count)
 {
 	unsigned long charge_now;
-	ssize_t ret;
+	int ret;
 
 	ret = kstrtoul(buf, 10, &charge_now);
+	if (ret)
+		return ret;
 
-	dev_dbg(di->dev, "Ret %zd charge_now %lu was %d",
-		ret, charge_now, di->bat_cap.prev_mah);
-
-	if (!ret) {
-		di->bat_cap.user_mah = (int) charge_now;
-		di->flags.user_cap = true;
-		ret = count;
-		queue_delayed_work(di->fg_wq, &di->fg_periodic_work, 0);
-	}
-	return ret;
+	di->bat_cap.user_mah = (int) charge_now;
+	di->flags.user_cap = true;
+	queue_delayed_work(di->fg_wq, &di->fg_periodic_work, 0);
+	return count;
 }
 
 static struct ab8500_fg_sysfs_entry charge_full_attr =
-- 
2.20.1




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

* [PATCH 4.4 054/159] power: supply: max8998-charger: Fix platform data retrieval
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 053/159] power: supply: ab8500_fg: silence uninitialized variable warnings Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 055/159] kernfs: Fix range checks in kernfs_get_target_path Greg Kroah-Hartman
                   ` (108 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tomasz Figa, Paweł Chmiel,
	Sebastian Reichel, Sasha Levin

From: Tomasz Figa <tomasz.figa@gmail.com>

[ Upstream commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 ]

Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.

Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/power/max8998_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/max8998_charger.c b/drivers/power/max8998_charger.c
index b64cf0f141425..66438029bdd0c 100644
--- a/drivers/power/max8998_charger.c
+++ b/drivers/power/max8998_charger.c
@@ -85,7 +85,7 @@ static const struct power_supply_desc max8998_battery_desc = {
 static int max8998_battery_probe(struct platform_device *pdev)
 {
 	struct max8998_dev *iodev = dev_get_drvdata(pdev->dev.parent);
-	struct max8998_platform_data *pdata = dev_get_platdata(iodev->dev);
+	struct max8998_platform_data *pdata = iodev->pdata;
 	struct power_supply_config psy_cfg = {};
 	struct max8998_battery_data *max8998;
 	struct i2c_client *i2c;
-- 
2.20.1




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

* [PATCH 4.4 055/159] kernfs: Fix range checks in kernfs_get_target_path
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 054/159] power: supply: max8998-charger: Fix platform data retrieval Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 056/159] s390/qeth: invoke softirqs after napi_schedule() Greg Kroah-Hartman
                   ` (107 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bernd Edlinger, Tejun Heo, Sasha Levin

From: Bernd Edlinger <bernd.edlinger@hotmail.de>

[ Upstream commit a75e78f21f9ad4b810868c89dbbabcc3931591ca ]

The terminating NUL byte is only there because the buffer is
allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the
range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the
returned string may not be zero-terminated if it is exactly
PATH_MAX characters long.  Furthermore also the initial loop
may theoretically exceed PATH_MAX and cause a fault.

Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/kernfs/symlink.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index b3b293e2c0990..0a379a86ff768 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -63,6 +63,9 @@ static int kernfs_get_target_path(struct kernfs_node *parent,
 		if (base == kn)
 			break;
 
+		if ((s - path) + 3 >= PATH_MAX)
+			return -ENAMETOOLONG;
+
 		strcpy(s, "../");
 		s += 3;
 		base = base->parent;
@@ -79,7 +82,7 @@ static int kernfs_get_target_path(struct kernfs_node *parent,
 	if (len < 2)
 		return -EINVAL;
 	len--;
-	if ((s - path) + len > PATH_MAX)
+	if ((s - path) + len >= PATH_MAX)
 		return -ENAMETOOLONG;
 
 	/* reverse fillup of target string from target to base */
-- 
2.20.1




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

* [PATCH 4.4 056/159] s390/qeth: invoke softirqs after napi_schedule()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 055/159] kernfs: Fix range checks in kernfs_get_target_path Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 057/159] PCI/ACPI: Correct error message for ASPM disabling Greg Kroah-Hartman
                   ` (106 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julian Wiedmann, David S. Miller,
	Sasha Levin

From: Julian Wiedmann <jwi@linux.ibm.com>

[ Upstream commit 4d19db777a2f32c9b76f6fd517ed8960576cb43e ]

Calling napi_schedule() from process context does not ensure that the
NET_RX softirq is run in a timely fashion. So trigger it manually.

This is no big issue with current code. A call to ndo_open() is usually
followed by a ndo_set_rx_mode() call, and for qeth this contains a
spin_unlock_bh(). Except for OSN, where qeth_l2_set_rx_mode() bails out
early.
Nevertheless it's best to not depend on this behaviour, and just fix
the issue at its source like all other drivers do. For instance see
commit 83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule").

Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/s390/net/qeth_l2_main.c | 3 +++
 drivers/s390/net/qeth_l3_main.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 22045e7d78ac3..97211f7f0cf02 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -996,7 +996,10 @@ static int __qeth_l2_open(struct net_device *dev)
 
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 		napi_enable(&card->napi);
+		local_bh_disable();
 		napi_schedule(&card->napi);
+		/* kick-start the NAPI softirq: */
+		local_bh_enable();
 	} else
 		rc = -EIO;
 	return rc;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 2cc9bc1ef1e38..0d71d2e6419af 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3031,7 +3031,10 @@ static int __qeth_l3_open(struct net_device *dev)
 
 	if (qdio_stop_irq(card->data.ccwdev, 0) >= 0) {
 		napi_enable(&card->napi);
+		local_bh_disable();
 		napi_schedule(&card->napi);
+		/* kick-start the NAPI softirq: */
+		local_bh_enable();
 	} else
 		rc = -EIO;
 	return rc;
-- 
2.20.1




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

* [PATCH 4.4 057/159] PCI/ACPI: Correct error message for ASPM disabling
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 056/159] s390/qeth: invoke softirqs after napi_schedule() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 058/159] serial: mxs-auart: Fix potential infinite loop Greg Kroah-Hartman
                   ` (105 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michael Kelley, Sinan Kaya,
	Bjorn Helgaas, Sasha Levin

From: Sinan Kaya <okaya@kernel.org>

[ Upstream commit 1ad61b612b95980a4d970c52022aa01dfc0f6068 ]

If _OSC execution fails today for platforms without an _OSC entry, code is
printing a misleading message saying disabling ASPM as follows:

  acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM

We need to ensure that platform supports ASPM to begin with.

Reported-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/acpi/pci_root.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 3b0b4bd67b71b..4031ec8024cee 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -454,8 +454,9 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
 	decode_osc_support(root, "OS supports", support);
 	status = acpi_pci_osc_support(root, support);
 	if (ACPI_FAILURE(status)) {
-		dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
-			 acpi_format_exception(status));
+		dev_info(&device->dev, "_OSC failed (%s)%s\n",
+			 acpi_format_exception(status),
+			 pcie_aspm_support_enabled() ? "; disabling ASPM" : "");
 		*no_aspm = 1;
 		return;
 	}
-- 
2.20.1




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

* [PATCH 4.4 058/159] serial: mxs-auart: Fix potential infinite loop
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 057/159] PCI/ACPI: Correct error message for ASPM disabling Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 059/159] powerpc/iommu: Avoid derefence before pointer check Greg Kroah-Hartman
                   ` (104 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anton Vasilyev,
	Uwe Kleine-König, Sasha Levin

From: Anton Vasilyev <vasilyev@ispras.ru>

[ Upstream commit 5963e8a3122471cadfe0eba41c4ceaeaa5c8bb4d ]

On the error path of mxs_auart_request_gpio_irq() is performed
backward iterating with index i of enum type. Underline enum type
may be unsigned char. In this case check (--i >= 0) will be always
true and error handling goes into infinite loop.

The patch changes the check so that it is valid for signed and unsigned
types.

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

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/tty/serial/mxs-auart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index daa4a65ef6ffc..fe870170db74a 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1248,8 +1248,9 @@ static int mxs_auart_request_gpio_irq(struct mxs_auart_port *s)
 
 	/*
 	 * If something went wrong, rollback.
+	 * Be careful: i may be unsigned.
 	 */
-	while (err && (--i >= 0))
+	while (err && (i-- > 0))
 		if (irq[i] >= 0)
 			free_irq(irq[i], s);
 
-- 
2.20.1




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

* [PATCH 4.4 059/159] powerpc/iommu: Avoid derefence before pointer check
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 058/159] serial: mxs-auart: Fix potential infinite loop Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 060/159] powerpc/64s/hash: Fix stab_rr off by one initialization Greg Kroah-Hartman
                   ` (103 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Breno Leitao, Michael Ellerman, Sasha Levin

From: Breno Leitao <leitao@debian.org>

[ Upstream commit 984ecdd68de0fa1f63ce205d6c19ef5a7bc67b40 ]

The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check
if it is not NULL.

Just moving the dereference code to after the check, where there will
be guarantee that 'tbl' will not be NULL.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/kernel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index a8e3490b54e3b..4c9b5970af371 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -764,9 +764,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
 
 	vaddr = page_address(page) + offset;
 	uaddr = (unsigned long)vaddr;
-	npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
 
 	if (tbl) {
+		npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl));
 		align = 0;
 		if (tbl->it_page_shift < PAGE_SHIFT && size >= PAGE_SIZE &&
 		    ((unsigned long)vaddr & ~PAGE_MASK) == 0)
-- 
2.20.1




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

* [PATCH 4.4 060/159] powerpc/64s/hash: Fix stab_rr off by one initialization
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 059/159] powerpc/iommu: Avoid derefence before pointer check Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 061/159] powerpc/pseries: Disable CPU hotplug across migrations Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nicholas Piggin, Michael Ellerman,
	Sasha Levin

From: Nicholas Piggin <npiggin@gmail.com>

[ Upstream commit 09b4438db13fa83b6219aee5993711a2aa2a0c64 ]

This causes SLB alloation to start 1 beyond the start of the SLB.
There is no real problem because after it wraps it stats behaving
properly, it's just surprisig to see when looking at SLB traces.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/mm/slb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 309027208f7c0..27f00a7c1085f 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -322,7 +322,7 @@ void slb_initialize(void)
 #endif
 	}
 
-	get_paca()->stab_rr = SLB_NUM_BOLTED;
+	get_paca()->stab_rr = SLB_NUM_BOLTED - 1;
 
 	lflags = SLB_VSID_KERNEL | linear_llp;
 	vflags = SLB_VSID_KERNEL | vmalloc_llp;
-- 
2.20.1




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

* [PATCH 4.4 061/159] powerpc/pseries: Disable CPU hotplug across migrations
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 060/159] powerpc/64s/hash: Fix stab_rr off by one initialization Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27   ` Greg Kroah-Hartman
                   ` (101 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Fontenot, Tyrel Datwyler,
	Michael Ellerman, Sasha Levin

From: Nathan Fontenot <nfont@linux.vnet.ibm.com>

[ Upstream commit 85a88cabad57d26d826dd94ea34d3a785824d802 ]

When performing partition migrations all present CPUs must be online
as all present CPUs must make the H_JOIN call as part of the migration
process. Once all present CPUs make the H_JOIN call, one CPU is returned
to make the rtas call to perform the migration to the destination system.

During testing of migration and changing the SMT state we have found
instances where CPUs are offlined, as part of the SMT state change,
before they make the H_JOIN call. This results in a hung system where
every CPU is either in H_JOIN or offline.

To prevent this this patch disables CPU hotplug during the migration
process.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/kernel/rtas.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 0c42e872d548b..4fcaa7d3d544f 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -967,6 +967,7 @@ int rtas_ibm_suspend_me(u64 handle)
 		goto out;
 	}
 
+	cpu_hotplug_disable();
 	stop_topology_update();
 
 	/* Call function on all CPUs.  One of us will make the
@@ -981,6 +982,7 @@ int rtas_ibm_suspend_me(u64 handle)
 		printk(KERN_ERR "Error doing global join\n");
 
 	start_topology_update();
+	cpu_hotplug_enable();
 
 	/* Take down CPUs not online prior to suspend */
 	cpuret = rtas_offline_cpus_mask(offline_mask);
-- 
2.20.1




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

* [PATCH 4.4 062/159] libfdt: Ensure INT_MAX is defined in libfdt_env.h
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path Greg Kroah-Hartman
@ 2019-11-22 10:27   ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 003/159] ALSA: usb-audio: Fix missing error check at mixer resolution test Greg Kroah-Hartman
                     ` (160 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Russell King, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linux-arm-kernel, linuxppc-dev,
	Rob Herring, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 ]

The next update of libfdt has a new dependency on INT_MAX. Update the
instances of libfdt_env.h in the kernel to either include the necessary
header with the definition or define it locally.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/compressed/libfdt_env.h | 2 ++
 arch/powerpc/boot/libfdt_env.h        | 2 ++
 include/linux/libfdt_env.h            | 1 +
 3 files changed, 5 insertions(+)

diff --git a/arch/arm/boot/compressed/libfdt_env.h b/arch/arm/boot/compressed/libfdt_env.h
index 17ae0f3efac8e..005bf4ff1b4cb 100644
--- a/arch/arm/boot/compressed/libfdt_env.h
+++ b/arch/arm/boot/compressed/libfdt_env.h
@@ -5,6 +5,8 @@
 #include <linux/string.h>
 #include <asm/byteorder.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 typedef __be16 fdt16_t;
 typedef __be32 fdt32_t;
 typedef __be64 fdt64_t;
diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
index 7e3789ea396b8..0b3db6322c793 100644
--- a/arch/powerpc/boot/libfdt_env.h
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -4,6 +4,8 @@
 #include <types.h>
 #include <string.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 #include "of.h"
 
 typedef u32 uint32_t;
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index 2a663c6bb4285..8850e243c9406 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -1,6 +1,7 @@
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
+#include <linux/kernel.h>	/* For INT_MAX */
 #include <linux/string.h>
 
 #include <asm/byteorder.h>
-- 
2.20.1




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

* [PATCH 4.4 062/159] libfdt: Ensure INT_MAX is defined in libfdt_env.h
@ 2019-11-22 10:27   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sasha Levin, Rob Herring, Russell King, stable, Paul Mackerras,
	Greg Kroah-Hartman, linuxppc-dev, linux-arm-kernel

From: Rob Herring <robh@kernel.org>

[ Upstream commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 ]

The next update of libfdt has a new dependency on INT_MAX. Update the
instances of libfdt_env.h in the kernel to either include the necessary
header with the definition or define it locally.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/compressed/libfdt_env.h | 2 ++
 arch/powerpc/boot/libfdt_env.h        | 2 ++
 include/linux/libfdt_env.h            | 1 +
 3 files changed, 5 insertions(+)

diff --git a/arch/arm/boot/compressed/libfdt_env.h b/arch/arm/boot/compressed/libfdt_env.h
index 17ae0f3efac8e..005bf4ff1b4cb 100644
--- a/arch/arm/boot/compressed/libfdt_env.h
+++ b/arch/arm/boot/compressed/libfdt_env.h
@@ -5,6 +5,8 @@
 #include <linux/string.h>
 #include <asm/byteorder.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 typedef __be16 fdt16_t;
 typedef __be32 fdt32_t;
 typedef __be64 fdt64_t;
diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
index 7e3789ea396b8..0b3db6322c793 100644
--- a/arch/powerpc/boot/libfdt_env.h
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -4,6 +4,8 @@
 #include <types.h>
 #include <string.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 #include "of.h"
 
 typedef u32 uint32_t;
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index 2a663c6bb4285..8850e243c9406 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -1,6 +1,7 @@
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
+#include <linux/kernel.h>	/* For INT_MAX */
 #include <linux/string.h>
 
 #include <asm/byteorder.h>
-- 
2.20.1




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

* [PATCH 4.4 062/159] libfdt: Ensure INT_MAX is defined in libfdt_env.h
@ 2019-11-22 10:27   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sasha Levin, Rob Herring, Benjamin Herrenschmidt,
	Michael Ellerman, Russell King, stable, Paul Mackerras,
	Greg Kroah-Hartman, linuxppc-dev, linux-arm-kernel

From: Rob Herring <robh@kernel.org>

[ Upstream commit 53dd9dce6979bc54d64a3a09a2fb20187a025be7 ]

The next update of libfdt has a new dependency on INT_MAX. Update the
instances of libfdt_env.h in the kernel to either include the necessary
header with the definition or define it locally.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/compressed/libfdt_env.h | 2 ++
 arch/powerpc/boot/libfdt_env.h        | 2 ++
 include/linux/libfdt_env.h            | 1 +
 3 files changed, 5 insertions(+)

diff --git a/arch/arm/boot/compressed/libfdt_env.h b/arch/arm/boot/compressed/libfdt_env.h
index 17ae0f3efac8e..005bf4ff1b4cb 100644
--- a/arch/arm/boot/compressed/libfdt_env.h
+++ b/arch/arm/boot/compressed/libfdt_env.h
@@ -5,6 +5,8 @@
 #include <linux/string.h>
 #include <asm/byteorder.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 typedef __be16 fdt16_t;
 typedef __be32 fdt32_t;
 typedef __be64 fdt64_t;
diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
index 7e3789ea396b8..0b3db6322c793 100644
--- a/arch/powerpc/boot/libfdt_env.h
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -4,6 +4,8 @@
 #include <types.h>
 #include <string.h>
 
+#define INT_MAX			((int)(~0U>>1))
+
 #include "of.h"
 
 typedef u32 uint32_t;
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index 2a663c6bb4285..8850e243c9406 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -1,6 +1,7 @@
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
+#include <linux/kernel.h>	/* For INT_MAX */
 #include <linux/string.h>
 
 #include <asm/byteorder.h>
-- 
2.20.1




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4.4 063/159] power: supply: twl4030_charger: fix charging current out-of-bounds
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2019-11-22 10:27   ` Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 064/159] power: supply: twl4030_charger: disable eoc interrupt on linear charge Greg Kroah-Hartman
                   ` (99 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andreas Kemnade, Sebastian Reichel,
	Sasha Levin

From: Andreas Kemnade <andreas@kemnade.info>

[ Upstream commit 8314c212f995bc0d06b54ad02ef0ab4089781540 ]

the charging current uses unsigned int variables, if we step back
if the current is still low, we would run into negative which
means setting the target to a huge value.
Better add checks here.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/power/twl4030_charger.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index bcd4dc304f270..14fed11e8f6e3 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -449,7 +449,8 @@ static void twl4030_current_worker(struct work_struct *data)
 
 	if (v < USB_MIN_VOLT) {
 		/* Back up and stop adjusting. */
-		bci->usb_cur -= USB_CUR_STEP;
+		if (bci->usb_cur >= USB_CUR_STEP)
+			bci->usb_cur -= USB_CUR_STEP;
 		bci->usb_cur_target = bci->usb_cur;
 	} else if (bci->usb_cur >= bci->usb_cur_target ||
 		   bci->usb_cur + USB_CUR_STEP > USB_MAX_CURRENT) {
-- 
2.20.1




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

* [PATCH 4.4 064/159] power: supply: twl4030_charger: disable eoc interrupt on linear charge
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 063/159] power: supply: twl4030_charger: fix charging current out-of-bounds Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 065/159] net: toshiba: fix return type of ndo_start_xmit function Greg Kroah-Hartman
                   ` (98 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andreas Kemnade, Sebastian Reichel,
	Sasha Levin

From: Andreas Kemnade <andreas@kemnade.info>

[ Upstream commit 079cdff3d0a09c5da10ae1be35def7a116776328 ]

This avoids getting woken up from suspend after power interruptions
when the bci wrongly thinks the battery is full just because
of input current going low because of low input power

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/power/twl4030_charger.c | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 14fed11e8f6e3..5b1f147b11cb0 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -469,6 +469,7 @@ static void twl4030_current_worker(struct work_struct *data)
 static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
 {
 	int ret;
+	u32 reg;
 
 	if (bci->usb_mode == CHARGE_OFF)
 		enable = false;
@@ -482,14 +483,38 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
 			bci->usb_enabled = 1;
 		}
 
-		if (bci->usb_mode == CHARGE_AUTO)
+		if (bci->usb_mode == CHARGE_AUTO) {
+			/* Enable interrupts now. */
+			reg = ~(u32)(TWL4030_ICHGLOW | TWL4030_ICHGEOC |
+					TWL4030_TBATOR2 | TWL4030_TBATOR1 |
+					TWL4030_BATSTS);
+			ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
+				       TWL4030_INTERRUPTS_BCIIMR1A);
+			if (ret < 0) {
+				dev_err(bci->dev,
+					"failed to unmask interrupts: %d\n",
+					ret);
+				return ret;
+			}
 			/* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */
 			ret = twl4030_clear_set_boot_bci(0, TWL4030_BCIAUTOUSB);
+		}
 
 		/* forcing USBFASTMCHG(BCIMFSTS4[2]) to 1 */
 		ret = twl4030_clear_set(TWL_MODULE_MAIN_CHARGE, 0,
 			TWL4030_USBFASTMCHG, TWL4030_BCIMFSTS4);
 		if (bci->usb_mode == CHARGE_LINEAR) {
+			/* Enable interrupts now. */
+			reg = ~(u32)(TWL4030_ICHGLOW | TWL4030_TBATOR2 |
+					TWL4030_TBATOR1 | TWL4030_BATSTS);
+			ret = twl_i2c_write_u8(TWL4030_MODULE_INTERRUPTS, reg,
+				       TWL4030_INTERRUPTS_BCIIMR1A);
+			if (ret < 0) {
+				dev_err(bci->dev,
+					"failed to unmask interrupts: %d\n",
+					ret);
+				return ret;
+			}
 			twl4030_clear_set_boot_bci(TWL4030_BCIAUTOAC|TWL4030_CVENAC, 0);
 			/* Watch dog key: WOVF acknowledge */
 			ret = twl_i2c_write_u8(TWL_MODULE_MAIN_CHARGE, 0x33,
-- 
2.20.1




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

* [PATCH 4.4 065/159] net: toshiba: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 064/159] power: supply: twl4030_charger: disable eoc interrupt on linear charge Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 066/159] net: xilinx: " Greg Kroah-Hartman
                   ` (97 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit bacade822524e02f662d88f784d2ae821a5546fb ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/toshiba/ps3_gelic_net.c | 4 ++--
 drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +-
 drivers/net/ethernet/toshiba/spider_net.c    | 4 ++--
 drivers/net/ethernet/toshiba/tc35815.c       | 6 ++++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
index 79f0ec4e51ace..964df98b54ea1 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c
@@ -845,9 +845,9 @@ static int gelic_card_kick_txdma(struct gelic_card *card,
  * @skb: packet to send out
  * @netdev: interface device structure
  *
- * returns 0 on success, <0 on failure
+ * returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure
  */
-int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
+netdev_tx_t gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct gelic_card *card = netdev_card(netdev);
 	struct gelic_descr *descr;
diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.h b/drivers/net/ethernet/toshiba/ps3_gelic_net.h
index 8505196be9f52..d123644bd720b 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_net.h
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.h
@@ -370,7 +370,7 @@ void gelic_card_up(struct gelic_card *card);
 void gelic_card_down(struct gelic_card *card);
 int gelic_net_open(struct net_device *netdev);
 int gelic_net_stop(struct net_device *netdev);
-int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev);
+netdev_tx_t gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev);
 void gelic_net_set_multi(struct net_device *netdev);
 void gelic_net_tx_timeout(struct net_device *netdev);
 int gelic_net_change_mtu(struct net_device *netdev, int new_mtu);
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index 3c54a2cae5dfd..8e53211aedd82 100644
--- a/drivers/net/ethernet/toshiba/spider_net.c
+++ b/drivers/net/ethernet/toshiba/spider_net.c
@@ -881,9 +881,9 @@ out:
  * @skb: packet to send out
  * @netdev: interface device structure
  *
- * returns 0 on success, !0 on failure
+ * returns NETDEV_TX_OK on success, NETDEV_TX_BUSY on failure
  */
-static int
+static netdev_tx_t
 spider_net_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	int cnt;
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
index 868fb6306df02..3e33c165a4278 100644
--- a/drivers/net/ethernet/toshiba/tc35815.c
+++ b/drivers/net/ethernet/toshiba/tc35815.c
@@ -475,7 +475,8 @@ static void free_rxbuf_skb(struct pci_dev *hwdev, struct sk_buff *skb, dma_addr_
 /* Index to functions, as function prototypes. */
 
 static int	tc35815_open(struct net_device *dev);
-static int	tc35815_send_packet(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t	tc35815_send_packet(struct sk_buff *skb,
+					    struct net_device *dev);
 static irqreturn_t	tc35815_interrupt(int irq, void *dev_id);
 static int	tc35815_rx(struct net_device *dev, int limit);
 static int	tc35815_poll(struct napi_struct *napi, int budget);
@@ -1279,7 +1280,8 @@ tc35815_open(struct net_device *dev)
  * invariant will hold if you make sure that the netif_*_queue()
  * calls are done at the proper times.
  */
-static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+tc35815_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
 	struct tc35815_local *lp = netdev_priv(dev);
 	struct TxFD *txfd;
-- 
2.20.1




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

* [PATCH 4.4 066/159] net: xilinx: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 065/159] net: toshiba: fix return type of ndo_start_xmit function Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 067/159] net: broadcom: " Greg Kroah-Hartman
                   ` (96 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 81255af8d9d5565004792c295dde49344df450ca ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c       | 3 ++-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
 drivers/net/ethernet/xilinx/xilinx_emaclite.c     | 9 +++++----
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 5a1068df7038c..ed6a88cf3281c 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -673,7 +673,8 @@ static inline int temac_check_tx_bd_space(struct temac_local *lp, int num_frag)
 	return 0;
 }
 
-static int temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t
+temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct temac_local *lp = netdev_priv(ndev);
 	struct cdmac_bd *cur_p;
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index f1e969128a4ee..7f1a57bb2ab10 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -656,7 +656,8 @@ static inline int axienet_check_tx_bd_space(struct axienet_local *lp,
  * start the transmission. Additionally if checksum offloading is supported,
  * it populates AXI Stream Control fields with appropriate values.
  */
-static int axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t
+axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	u32 ii;
 	u32 num_frag;
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 4cb8b85cbf2c2..909a008f99276 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1008,9 +1008,10 @@ static int xemaclite_close(struct net_device *dev)
  * deferred and the Tx queue is stopped so that the deferred socket buffer can
  * be transmitted when the Emaclite device is free to transmit data.
  *
- * Return:	0, always.
+ * Return:	NETDEV_TX_OK, always.
  */
-static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
+static netdev_tx_t
+xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
 {
 	struct net_local *lp = netdev_priv(dev);
 	struct sk_buff *new_skb;
@@ -1031,7 +1032,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
 		/* Take the time stamp now, since we can't do this in an ISR. */
 		skb_tx_timestamp(new_skb);
 		spin_unlock_irqrestore(&lp->reset_lock, flags);
-		return 0;
+		return NETDEV_TX_OK;
 	}
 	spin_unlock_irqrestore(&lp->reset_lock, flags);
 
@@ -1040,7 +1041,7 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
 	dev->stats.tx_bytes += len;
 	dev_consume_skb_any(new_skb);
 
-	return 0;
+	return NETDEV_TX_OK;
 }
 
 /**
-- 
2.20.1




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

* [PATCH 4.4 067/159] net: broadcom: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 066/159] net: xilinx: " Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 068/159] net: amd: " Greg Kroah-Hartman
                   ` (95 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 0c13b8d1aee87c35a2fbc1d85a1f766227cf54b5 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 +++--
 drivers/net/ethernet/broadcom/sb1250-mac.c   | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index ec5834087e4b4..c01ab06863b3d 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -571,12 +571,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)
 /*
  * tx request callback
  */
-static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct bcm_enet_priv *priv;
 	struct bcm_enet_desc *desc;
 	u32 len_stat;
-	int ret;
+	netdev_tx_t ret;
 
 	priv = netdev_priv(dev);
 
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index f557a2aaec231..73a7c8a504702 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -300,7 +300,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *,
 static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
 static uint64_t sbmac_addr2reg(unsigned char *ptr);
 static irqreturn_t sbmac_intr(int irq, void *dev_instance);
-static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev);
+static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev);
 static void sbmac_setmulti(struct sbmac_softc *sc);
 static int sbmac_init(struct platform_device *pldev, long long base);
 static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed);
@@ -2033,7 +2033,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)
  *  Return value:
  *  	   nothing
  ********************************************************************* */
-static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct sbmac_softc *sc = netdev_priv(dev);
 	unsigned long flags;
-- 
2.20.1




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

* [PATCH 4.4 068/159] net: amd: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 067/159] net: broadcom: " Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 069/159] usb: chipidea: Fix otg event handler Greg Kroah-Hartman
                   ` (94 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit fe72352e37ae8478f4c97975a9831f0c50f22e73 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/amd/am79c961a.c     | 2 +-
 drivers/net/ethernet/amd/atarilance.c    | 6 ++++--
 drivers/net/ethernet/amd/declance.c      | 2 +-
 drivers/net/ethernet/amd/sun3lance.c     | 6 ++++--
 drivers/net/ethernet/amd/sunlance.c      | 2 +-
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 4 ++--
 6 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/amd/am79c961a.c b/drivers/net/ethernet/amd/am79c961a.c
index 87e727b921dc0..1ad401fed4698 100644
--- a/drivers/net/ethernet/amd/am79c961a.c
+++ b/drivers/net/ethernet/amd/am79c961a.c
@@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)
 /*
  * Transmit a packet
  */
-static int
+static netdev_tx_t
 am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
 {
 	struct dev_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index b10964e8cb546..a1dc65136d9fa 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
                                    *init_rec );
 static int lance_open( struct net_device *dev );
 static void lance_init_ring( struct net_device *dev );
-static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev );
+static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
+				    struct net_device *dev);
 static irqreturn_t lance_interrupt( int irq, void *dev_id );
 static int lance_rx( struct net_device *dev );
 static int lance_close( struct net_device *dev );
@@ -770,7 +771,8 @@ static void lance_tx_timeout (struct net_device *dev)
 
 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
 
-static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
+static netdev_tx_t
+lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	struct lance_ioreg	 *IO = lp->iobase;
diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c
index b584b78237dfd..5e994f981feae 100644
--- a/drivers/net/ethernet/amd/declance.c
+++ b/drivers/net/ethernet/amd/declance.c
@@ -893,7 +893,7 @@ static void lance_tx_timeout(struct net_device *dev)
 	netif_wake_queue(dev);
 }
 
-static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	volatile struct lance_regs *ll = lp->ll;
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 3d8c6b2cdea4c..09271665712da 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -235,7 +235,8 @@ struct lance_private {
 static int lance_probe( struct net_device *dev);
 static int lance_open( struct net_device *dev );
 static void lance_init_ring( struct net_device *dev );
-static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev );
+static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
+				    struct net_device *dev);
 static irqreturn_t lance_interrupt( int irq, void *dev_id);
 static int lance_rx( struct net_device *dev );
 static int lance_close( struct net_device *dev );
@@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev )
 }
 
 
-static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
+static netdev_tx_t
+lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	int entry, len;
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
index 8914170fccfff..babb0a5fb8de4 100644
--- a/drivers/net/ethernet/amd/sunlance.c
+++ b/drivers/net/ethernet/amd/sunlance.c
@@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)
 	netif_wake_queue(dev);
 }
 
-static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct lance_private *lp = netdev_priv(dev);
 	int entry, skblen, len;
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 64034ff081a0c..23fc244eb8a4d 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1390,7 +1390,7 @@ static int xgbe_close(struct net_device *netdev)
 	return 0;
 }
 
-static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	struct xgbe_prv_data *pdata = netdev_priv(netdev);
 	struct xgbe_hw_if *hw_if = &pdata->hw_if;
@@ -1399,7 +1399,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
 	struct xgbe_ring *ring;
 	struct xgbe_packet_data *packet;
 	struct netdev_queue *txq;
-	int ret;
+	netdev_tx_t ret;
 
 	DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len);
 
-- 
2.20.1




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

* [PATCH 4.4 069/159] usb: chipidea: Fix otg event handler
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 068/159] net: amd: " Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 070/159] ARM: dts: am335x-evm: fix number of cpsw Greg Kroah-Hartman
                   ` (93 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Loic Poulain, Peter Chen, Sasha Levin

From: Loic Poulain <loic.poulain@linaro.org>

[ Upstream commit 59739131e0ca06db7560f9073fff2fb83f6bc2a5 ]

At OTG work running time, it's possible that several events need to be
addressed (e.g. ID and VBUS events). The current implementation handles
only one event at a time which leads to ignoring the other one. Fix it.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/chipidea/otg.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
index f36a1ac3bfbdf..b8650210be0f7 100644
--- a/drivers/usb/chipidea/otg.c
+++ b/drivers/usb/chipidea/otg.c
@@ -206,14 +206,17 @@ static void ci_otg_work(struct work_struct *work)
 	}
 
 	pm_runtime_get_sync(ci->dev);
+
 	if (ci->id_event) {
 		ci->id_event = false;
 		ci_handle_id_switch(ci);
-	} else if (ci->b_sess_valid_event) {
+	}
+
+	if (ci->b_sess_valid_event) {
 		ci->b_sess_valid_event = false;
 		ci_handle_vbus_change(ci);
-	} else
-		dev_err(ci->dev, "unexpected event occurs at %s\n", __func__);
+	}
+
 	pm_runtime_put_sync(ci->dev);
 
 	enable_irq(ci->irq);
-- 
2.20.1




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

* [PATCH 4.4 070/159] ARM: dts: am335x-evm: fix number of cpsw
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 069/159] usb: chipidea: Fix otg event handler Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 071/159] ARM: dts: ux500: Correct SCU unit address Greg Kroah-Hartman
                   ` (92 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Tony Lindgren,
	Sasha Levin

From: Grygorii Strashko <grygorii.strashko@ti.com>

[ Upstream commit dcbf6b18d81bcdc51390ca1b258c17e2e13b7d0c ]

am335x-evm has only one CPSW external port physically wired, but DT defines
2 ext. ports. As result, PHY connection failure reported for the second
ext. port.

Update DT to reflect am335x-evm board HW configuration, and, while here,
switch to use phy-handle instead of phy_id.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/am335x-evm.dts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index d9d00ab863a21..2b8614e406f03 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -697,6 +697,7 @@
 	pinctrl-0 = <&cpsw_default>;
 	pinctrl-1 = <&cpsw_sleep>;
 	status = "okay";
+	slaves = <1>;
 };
 
 &davinci_mdio {
@@ -704,15 +705,14 @@
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 	status = "okay";
-};
 
-&cpsw_emac0 {
-	phy_id = <&davinci_mdio>, <0>;
-	phy-mode = "rgmii-txid";
+	ethphy0: ethernet-phy@0 {
+		reg = <0>;
+	};
 };
 
-&cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <1>;
+&cpsw_emac0 {
+	phy-handle = <&ethphy0>;
 	phy-mode = "rgmii-txid";
 };
 
-- 
2.20.1




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

* [PATCH 4.4 071/159] ARM: dts: ux500: Correct SCU unit address
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 070/159] ARM: dts: am335x-evm: fix number of cpsw Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 072/159] ARM: dts: ux500: Fix LCDA clock line muxing Greg Kroah-Hartman
                   ` (91 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Linus Walleij,
	Sasha Levin

From: Geert Uytterhoeven <geert+renesas@glider.be>

[ Upstream commit 2f217d24ecaec2012e628d21e244eef0608656a4 ]

The unit address of the Cortex-A9 SCU device node contains one zero too
many.  Remove it.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/ste-dbx5x0.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index 50f5e9d092038..86bd320057a38 100644
--- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
@@ -186,7 +186,7 @@
 			      <0xa0410100 0x100>;
 		};
 
-		scu@a04100000 {
+		scu@a0410000 {
 			compatible = "arm,cortex-a9-scu";
 			reg = <0xa0410000 0x100>;
 		};
-- 
2.20.1




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

* [PATCH 4.4 072/159] ARM: dts: ux500: Fix LCDA clock line muxing
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 071/159] ARM: dts: ux500: Correct SCU unit address Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 073/159] ARM: dts: ste: Fix SPI controller node names Greg Kroah-Hartman
                   ` (90 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Linus Walleij, Sasha Levin

From: Linus Walleij <linus.walleij@linaro.org>

[ Upstream commit ecde29569e3484e1d0a032bf4074449bce4d4a03 ]

The "lcdaclk_b_1" group is muxed with the function "lcd"
but needs a separate entry to be muxed in with "lcda"
rather than "lcd".

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
index 5c5cea232743d..1ec193b0c5065 100644
--- a/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
+++ b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
@@ -607,16 +607,20 @@
 
 			mcde {
 				lcd_default_mode: lcd_default {
-					default_mux {
+					default_mux1 {
 						/* Mux in VSI0 and all the data lines */
 						function = "lcd";
 						groups =
 						"lcdvsi0_a_1", /* VSI0 for LCD */
 						"lcd_d0_d7_a_1", /* Data lines */
 						"lcd_d8_d11_a_1", /* TV-out */
-						"lcdaclk_b_1", /* Clock line for TV-out */
 						"lcdvsi1_a_1"; /* VSI1 for HDMI */
 					};
+					default_mux2 {
+						function = "lcda";
+						groups =
+						"lcdaclk_b_1"; /* Clock line for TV-out */
+					};
 					default_cfg1 {
 						pins =
 						"GPIO68_E1", /* VSI0 */
-- 
2.20.1




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

* [PATCH 4.4 073/159] ARM: dts: ste: Fix SPI controller node names
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 072/159] ARM: dts: ux500: Fix LCDA clock line muxing Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 074/159] cpufeature: avoid warning when compiling with clang Greg Kroah-Hartman
                   ` (89 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Herring, Linus Walleij, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit 2f967f9e9fa076affb711da1a8389b5d33814fc6 ]

SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the
name enables dtc SPI bus checks.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/ste-dbx5x0.dtsi     | 4 ++--
 arch/arm/boot/dts/ste-hrefprev60.dtsi | 2 +-
 arch/arm/boot/dts/ste-snowball.dts    | 2 +-
 arch/arm/boot/dts/ste-u300.dts        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index 86bd320057a38..b2b23ceb6d557 100644
--- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
@@ -894,7 +894,7 @@
 			power-domains = <&pm_domains DOMAIN_VAPE>;
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x80002000 0x1000>;
 			interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -908,7 +908,7 @@
 			power-domains = <&pm_domains DOMAIN_VAPE>;
 		};
 
-		ssp@80003000 {
+		spi@80003000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0x80003000 0x1000>;
 			interrupts = <0 52 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/ste-hrefprev60.dtsi b/arch/arm/boot/dts/ste-hrefprev60.dtsi
index b0278f4c486ce..55a6a1ac03370 100644
--- a/arch/arm/boot/dts/ste-hrefprev60.dtsi
+++ b/arch/arm/boot/dts/ste-hrefprev60.dtsi
@@ -57,7 +57,7 @@
 			};
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			/*
 			 * On the first generation boards, this SSP/SPI port was connected
 			 * to the AB8500.
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index e80e421638836..bb1b64d6ab5e8 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -311,7 +311,7 @@
 			pinctrl-1 = <&i2c3_sleep_mode>;
 		};
 
-		ssp@80002000 {
+		spi@80002000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&ssp0_snowball_mode>;
 		};
diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts
index 82a661677e97e..fb6ca7f864176 100644
--- a/arch/arm/boot/dts/ste-u300.dts
+++ b/arch/arm/boot/dts/ste-u300.dts
@@ -451,7 +451,7 @@
 			dma-names = "rx";
 		};
 
-		spi: ssp@c0006000 {
+		spi: spi@c0006000 {
 			compatible = "arm,pl022", "arm,primecell";
 			reg = <0xc0006000 0x1000>;
 			interrupt-parent = <&vica>;
-- 
2.20.1




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

* [PATCH 4.4 074/159] cpufeature: avoid warning when compiling with clang
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 073/159] ARM: dts: ste: Fix SPI controller node names Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 075/159] bnx2x: Ignore bandwidth attention in single function mode Greg Kroah-Hartman
                   ` (88 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Agner, Ard Biesheuvel,
	Herbert Xu, Sasha Levin

From: Stefan Agner <stefan@agner.ch>

[ Upstream commit c785896b21dd8e156326ff660050b0074d3431df ]

The table id (second) argument to MODULE_DEVICE_TABLE is often
referenced otherwise. This is not the case for CPU features. This
leads to warnings when building the kernel with Clang:
  arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable
    'cpu_feature_match_AES' is not needed and will not be emitted
    [-Wunneeded-internal-declaration]
  module_cpu_feature_match(AES, aes_init);
  ^

Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf
("modules: mark __inittest/__exittest as __maybe_unused").

Fixes: 67bad2fdb754 ("cpu: add generic support for CPU feature based module autoloading")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/cpufeature.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h
index 986c06c88d814..84d3c81b59781 100644
--- a/include/linux/cpufeature.h
+++ b/include/linux/cpufeature.h
@@ -45,7 +45,7 @@
  * 'asm/cpufeature.h' of your favorite architecture.
  */
 #define module_cpu_feature_match(x, __initfunc)			\
-static struct cpu_feature const cpu_feature_match_ ## x[] =	\
+static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \
 	{ { .feature = cpu_feature(x) }, { } };			\
 MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x);		\
 								\
-- 
2.20.1




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

* [PATCH 4.4 075/159] bnx2x: Ignore bandwidth attention in single function mode
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 074/159] cpufeature: avoid warning when compiling with clang Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 076/159] net: micrel: fix return type of ndo_start_xmit function Greg Kroah-Hartman
                   ` (87 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shahed Shaikh, Ariel Elior,
	David S. Miller, Sasha Levin

From: Shahed Shaikh <Shahed.Shaikh@cavium.com>

[ Upstream commit 75a110a1783ef8324ffd763b24f4ac268253cbca ]

This is a workaround for FW bug -
MFW generates bandwidth attention in single function mode, which
is only expected to be generated in multi function mode.
This undesired attention in SF mode results in incorrect HW
configuration and resulting into Tx timeout.

Signed-off-by: Shahed Shaikh <Shahed.Shaikh@cavium.com>
Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index d450d8b3708cd..82960603da332 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -3532,6 +3532,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
  */
 static void bnx2x_config_mf_bw(struct bnx2x *bp)
 {
+	/* Workaround for MFW bug.
+	 * MFW is not supposed to generate BW attention in
+	 * single function mode.
+	 */
+	if (!IS_MF(bp)) {
+		DP(BNX2X_MSG_MCP,
+		   "Ignoring MF BW config in single function mode\n");
+		return;
+	}
+
 	if (bp->link_vars.link_up) {
 		bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX);
 		bnx2x_link_sync_notify(bp);
-- 
2.20.1




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

* [PATCH 4.4 076/159] net: micrel: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 075/159] bnx2x: Ignore bandwidth attention in single function mode Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 077/159] x86/CPU: Use correct macros for Cyrix calls Greg Kroah-Hartman
                   ` (86 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 2b49117a5abee8478b0470cba46ac74f93b4a479 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/micrel/ks8695net.c  | 2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/micrel/ks8695net.c b/drivers/net/ethernet/micrel/ks8695net.c
index a8522d8af95d3..2126286b72e9b 100644
--- a/drivers/net/ethernet/micrel/ks8695net.c
+++ b/drivers/net/ethernet/micrel/ks8695net.c
@@ -1156,7 +1156,7 @@ ks8695_timeout(struct net_device *ndev)
  *	sk_buff and adds it to the TX ring. It then kicks the TX DMA
  *	engine to ensure transmission begins.
  */
-static int
+static netdev_tx_t
 ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct ks8695_priv *ksp = netdev_priv(ndev);
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index 2fc5cd56c0a84..8dc1f0277117d 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -1020,9 +1020,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
  * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
  * So while tx is in-progress, prevent IRQ interrupt from happenning.
  */
-static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
-	int retv = NETDEV_TX_OK;
+	netdev_tx_t retv = NETDEV_TX_OK;
 	struct ks_net *ks = netdev_priv(netdev);
 
 	disable_irq(netdev->irq);
-- 
2.20.1




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

* [PATCH 4.4 077/159] x86/CPU: Use correct macros for Cyrix calls
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 076/159] net: micrel: fix return type of ndo_start_xmit function Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 078/159] MIPS: kexec: Relax memory restriction Greg Kroah-Hartman
                   ` (85 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matthew Whitehead, Borislav Petkov,
	Andy Lutomirski, H. Peter Anvin, Ingo Molnar, Jia Zhang,
	Peter Zijlstra, Philippe Ombredanne, Thomas Gleixner,
	Sasha Levin

From: Matthew Whitehead <tedheadster@gmail.com>

[ Upstream commit 03b099bdcdf7125d4a63dc9ddeefdd454e05123d ]

There are comments in processor-cyrix.h advising you to _not_ make calls
using the deprecated macros in this style:

  setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);

This is because it expands the macro into a non-functioning calling
sequence. The calling order must be:

  outb(CX86_CCR2, 0x22);
  inb(0x23);

>From the comments:

 * When using the old macros a line like
 *   setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
 * gets expanded to:
 *  do {
 *    outb((CX86_CCR2), 0x22);
 *    outb((({
 *        outb((CX86_CCR2), 0x22);
 *        inb(0x23);
 *    }) | 0x88), 0x23);
 *  } while (0);

The new macros fix this problem, so use them instead.

Signed-off-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jia Zhang <qianyue.zj@alibaba-inc.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180921212041.13096-2-tedheadster@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/kernel/cpu/cyrix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index 6e4e4191abb56..151625a83d9e2 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -433,7 +433,7 @@ static void cyrix_identify(struct cpuinfo_x86 *c)
 			/* enable MAPEN  */
 			setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);
 			/* enable cpuid  */
-			setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80);
+			setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80);
 			/* disable MAPEN */
 			setCx86(CX86_CCR3, ccr3);
 			local_irq_restore(flags);
-- 
2.20.1




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

* [PATCH 4.4 078/159] MIPS: kexec: Relax memory restriction
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 077/159] x86/CPU: Use correct macros for Cyrix calls Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 079/159] media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init() Greg Kroah-Hartman
                   ` (84 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rachel Mozes, Dengcheng Zhu,
	Paul Burton, pburton, ralf, linux-mips, Sasha Levin

From: Dengcheng Zhu <dzhu@wavecomp.com>

[ Upstream commit a6da4d6fdf8bd512c98d3ac7f1d16bc4bb282919 ]

We can rely on the system kernel and the dump capture kernel themselves in
memory usage.

Being restrictive with 512MB limit may cause kexec tool failure on some
platforms.

Tested-by: Rachel Mozes <rachel.mozes@intel.com>
Reported-by: Rachel Mozes <rachel.mozes@intel.com>
Signed-off-by: Dengcheng Zhu <dzhu@wavecomp.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20568/
Cc: pburton@wavecomp.com
Cc: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/include/asm/kexec.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/kexec.h b/arch/mips/include/asm/kexec.h
index ee25ebbf2a288..b6a4d4aa548f5 100644
--- a/arch/mips/include/asm/kexec.h
+++ b/arch/mips/include/asm/kexec.h
@@ -12,11 +12,11 @@
 #include <asm/stacktrace.h>
 
 /* Maximum physical address we can use pages from */
-#define KEXEC_SOURCE_MEMORY_LIMIT (0x20000000)
+#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
 /* Maximum address we can reach in physical address mode */
-#define KEXEC_DESTINATION_MEMORY_LIMIT (0x20000000)
+#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
  /* Maximum address we can use for the control code buffer */
-#define KEXEC_CONTROL_MEMORY_LIMIT (0x20000000)
+#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
 /* Reserve 3*4096 bytes for board-specific info */
 #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
 
-- 
2.20.1




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

* [PATCH 4.4 079/159] media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 078/159] MIPS: kexec: Relax memory restriction Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 080/159] media: davinci: Fix implicit enum conversion warning Greg Kroah-Hartman
                   ` (83 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jia-Ju Bai, Hans Verkuil,
	Mauro Carvalho Chehab, Sasha Levin

From: Jia-Ju Bai <baijiaju1990@gmail.com>

[ Upstream commit 8d11eb847de7d89c2754988c944d51a4f63e219b ]

The driver may sleep in a interrupt handler.

The function call paths (from bottom to top) in Linux-4.16 are:

[FUNC] kzalloc(GFP_KERNEL)
drivers/media/pci/ivtv/ivtv-yuv.c, 938:
	kzalloc in ivtv_yuv_init
drivers/media/pci/ivtv/ivtv-yuv.c, 960:
	ivtv_yuv_init in ivtv_yuv_next_free
drivers/media/pci/ivtv/ivtv-yuv.c, 1126:
	ivtv_yuv_next_free in ivtv_yuv_setup_stream_frame
drivers/media/pci/ivtv/ivtv-irq.c, 827:
	ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_req
drivers/media/pci/ivtv/ivtv-irq.c, 1013:
	ivtv_irq_dec_data_req in ivtv_irq_handler

To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/pci/ivtv/ivtv-yuv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/ivtv/ivtv-yuv.c b/drivers/media/pci/ivtv/ivtv-yuv.c
index 9cd995f418e0f..1d67407ffbf62 100644
--- a/drivers/media/pci/ivtv/ivtv-yuv.c
+++ b/drivers/media/pci/ivtv/ivtv-yuv.c
@@ -936,7 +936,7 @@ static void ivtv_yuv_init(struct ivtv *itv)
 	}
 
 	/* We need a buffer for blanking when Y plane is offset - non-fatal if we can't get one */
-	yi->blanking_ptr = kzalloc(720 * 16, GFP_KERNEL|__GFP_NOWARN);
+	yi->blanking_ptr = kzalloc(720 * 16, GFP_ATOMIC|__GFP_NOWARN);
 	if (yi->blanking_ptr) {
 		yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE);
 	} else {
-- 
2.20.1




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

* [PATCH 4.4 080/159] media: davinci: Fix implicit enum conversion warning
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 079/159] media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init() Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 081/159] usb: gadget: uvc: configfs: Drop leaked references to config items Greg Kroah-Hartman
                   ` (82 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nick Desaulniers, Nathan Chancellor,
	Hans Verkuil, Mauro Carvalho Chehab, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 4158757395b300b6eb308fc20b96d1d231484413 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit
conversion from enumeration type 'enum osd_v_exp_ratio' to different
enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion]
                        layer_info->h_exp = V_EXP_6_OVER_5;
                                          ~ ^~~~~~~~~~~~~~
1 warning generated.

This appears to be a copy and paste error judging from the couple of
lines directly above this statement and the way that height is handled
in the if block above this one.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/davinci/vpbe_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 6d91422c4e4c7..a9cd8c7a7b347 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -520,7 +520,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,
 		else if (v_scale == 4)
 			layer_info->v_zoom = ZOOM_X4;
 		if (v_exp)
-			layer_info->h_exp = V_EXP_6_OVER_5;
+			layer_info->v_exp = V_EXP_6_OVER_5;
 	} else {
 		/* no scaling, only cropping. Set display area to crop area */
 		cfg->ysize = expected_ysize;
-- 
2.20.1




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

* [PATCH 4.4 081/159] usb: gadget: uvc: configfs: Drop leaked references to config items
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 080/159] media: davinci: Fix implicit enum conversion warning Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 082/159] usb: gadget: uvc: configfs: Prevent format changes after linking header Greg Kroah-Hartman
                   ` (81 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Kieran Bingham,
	Sasha Levin

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[ Upstream commit 86f3daed59bceb4fa7981d85e89f63ebbae1d561 ]

Some of the .allow_link() and .drop_link() operations implementations
call config_group_find_item() and then leak the reference to the
returned item. Fix this by dropping those references where needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/function/uvc_configfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 01656f1c6d650..74df80a25b469 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -564,6 +564,7 @@ static int uvcg_control_class_allow_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
@@ -605,6 +606,7 @@ static int uvcg_control_class_drop_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
@@ -2087,6 +2089,7 @@ static int uvcg_streaming_class_allow_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
@@ -2131,6 +2134,7 @@ static int uvcg_streaming_class_drop_link(struct config_item *src,
 unlock:
 	mutex_unlock(&opts->lock);
 out:
+	config_item_put(header);
 	mutex_unlock(su_mutex);
 	return ret;
 }
-- 
2.20.1




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

* [PATCH 4.4 082/159] usb: gadget: uvc: configfs: Prevent format changes after linking header
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (80 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 081/159] usb: gadget: uvc: configfs: Drop leaked references to config items Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 083/159] usb: gadget: uvc: Factor out video USB request queueing Greg Kroah-Hartman
                   ` (80 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Joel Pepper, Kieran Bingham,
	Laurent Pinchart, Sasha Levin

From: Joel Pepper <joel.pepper@rwth-aachen.de>

[ Upstream commit cb2200f7af8341aaf0c6abd7ba37e4c667c41639 ]

While checks are in place to avoid attributes and children of a format
being manipulated after the format is linked into the streaming header,
the linked flag was never actually set, invalidating the protections.
Update the flag as appropriate in the header link calls.

Signed-off-by: Joel Pepper <joel.pepper@rwth-aachen.de>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/function/uvc_configfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 74df80a25b469..a49ff1f5c0f93 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -807,6 +807,7 @@ static int uvcg_streaming_header_allow_link(struct config_item *src,
 	format_ptr->fmt = target_fmt;
 	list_add_tail(&format_ptr->entry, &src_hdr->formats);
 	++src_hdr->num_fmt;
+	++target_fmt->linked;
 
 out:
 	mutex_unlock(&opts->lock);
@@ -845,6 +846,8 @@ static int uvcg_streaming_header_drop_link(struct config_item *src,
 			break;
 		}
 
+	--target_fmt->linked;
+
 out:
 	mutex_unlock(&opts->lock);
 	mutex_unlock(su_mutex);
-- 
2.20.1




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

* [PATCH 4.4 083/159] usb: gadget: uvc: Factor out video USB request queueing
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (81 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 082/159] usb: gadget: uvc: configfs: Prevent format changes after linking header Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 084/159] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Paul Elder,
	Kieran Bingham, Sasha Levin

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[ Upstream commit 9d1ff5dcb3cd3390b1e56f1c24ae42c72257c4a3 ]

USB requests for video data are queued from two different locations in
the driver, with the same code block occurring twice. Factor it out to a
function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/function/uvc_video.c | 30 ++++++++++++++++---------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index 0f01c04d7cbd8..540917f54506a 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -129,6 +129,19 @@ uvc_video_encode_isoc(struct usb_request *req, struct uvc_video *video,
  * Request handling
  */
 
+static int uvcg_video_ep_queue(struct uvc_video *video, struct usb_request *req)
+{
+	int ret;
+
+	ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
+	if (ret < 0) {
+		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
+		usb_ep_set_halt(video->ep);
+	}
+
+	return ret;
+}
+
 /*
  * I somehow feel that synchronisation won't be easy to achieve here. We have
  * three events that control USB requests submission:
@@ -193,14 +206,13 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req)
 
 	video->encode(req, video, buf);
 
-	if ((ret = usb_ep_queue(ep, req, GFP_ATOMIC)) < 0) {
-		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
-		usb_ep_set_halt(ep);
-		spin_unlock_irqrestore(&video->queue.irqlock, flags);
+	ret = uvcg_video_ep_queue(video, req);
+	spin_unlock_irqrestore(&video->queue.irqlock, flags);
+
+	if (ret < 0) {
 		uvcg_queue_cancel(queue, 0);
 		goto requeue;
 	}
-	spin_unlock_irqrestore(&video->queue.irqlock, flags);
 
 	return;
 
@@ -320,15 +332,13 @@ int uvcg_video_pump(struct uvc_video *video)
 		video->encode(req, video, buf);
 
 		/* Queue the USB request */
-		ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
+		ret = uvcg_video_ep_queue(video, req);
+		spin_unlock_irqrestore(&queue->irqlock, flags);
+
 		if (ret < 0) {
-			printk(KERN_INFO "Failed to queue request (%d)\n", ret);
-			usb_ep_set_halt(video->ep);
-			spin_unlock_irqrestore(&queue->irqlock, flags);
 			uvcg_queue_cancel(queue, 0);
 			break;
 		}
-		spin_unlock_irqrestore(&queue->irqlock, flags);
 	}
 
 	spin_lock_irqsave(&video->req_lock, flags);
-- 
2.20.1




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

* [PATCH 4.4 084/159] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (82 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 083/159] usb: gadget: uvc: Factor out video USB request queueing Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 085/159] misc: kgdbts: Fix restrict error Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Paul Elder,
	Kieran Bingham, Sasha Levin

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

[ Upstream commit 8dbf9c7abefd5c1434a956d5c6b25e11183061a3 ]

When USB requests for video data fail to be submitted, the driver
signals a problem to the host by halting the video streaming endpoint.
This is only valid in bulk mode, as isochronous transfers have no
handshake phase and can't thus report a stall. The usb_ep_set_halt()
call returns an error when using isochronous endpoints, which we happily
ignore, but some UDCs complain in the kernel log. Fix this by only
trying to halt the endpoint in bulk mode.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/function/uvc_video.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index 540917f54506a..d6bab12b0b47d 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -136,7 +136,9 @@ static int uvcg_video_ep_queue(struct uvc_video *video, struct usb_request *req)
 	ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
 	if (ret < 0) {
 		printk(KERN_INFO "Failed to queue request (%d).\n", ret);
-		usb_ep_set_halt(video->ep);
+		/* Isochronous endpoints can't be halted. */
+		if (usb_endpoint_xfer_bulk(video->ep->desc))
+			usb_ep_set_halt(video->ep);
 	}
 
 	return ret;
-- 
2.20.1




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

* [PATCH 4.4 085/159] misc: kgdbts: Fix restrict error
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (83 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 084/159] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 086/159] misc: genwqe: should return proper error value Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Laura Abbott, Daniel Thompson, Sasha Levin

From: Laura Abbott <labbott@redhat.com>

[ Upstream commit fa0218ef733e6f247a1a3986e3eb12460064ac77 ]

kgdbts current fails when compiled with restrict:

drivers/misc/kgdbts.c: In function ‘configure_kgdbts’:
drivers/misc/kgdbts.c:1070:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict]
  strcpy(config, opt);
  ^~~~~~~~~~~~~~~~~~~

As the error says, config is being used in both the source and destination.
Refactor the code to avoid the extra copy and put the parsing closer to
the actual location.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/misc/kgdbts.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index bb3a76ad80da2..fc8cb855c6e66 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -979,6 +979,12 @@ static void kgdbts_run_tests(void)
 	int nmi_sleep = 0;
 	int i;
 
+	verbose = 0;
+	if (strstr(config, "V1"))
+		verbose = 1;
+	if (strstr(config, "V2"))
+		verbose = 2;
+
 	ptr = strchr(config, 'F');
 	if (ptr)
 		fork_test = simple_strtol(ptr + 1, NULL, 10);
@@ -1062,13 +1068,6 @@ static int kgdbts_option_setup(char *opt)
 		return -ENOSPC;
 	}
 	strcpy(config, opt);
-
-	verbose = 0;
-	if (strstr(config, "V1"))
-		verbose = 1;
-	if (strstr(config, "V2"))
-		verbose = 2;
-
 	return 0;
 }
 
@@ -1080,9 +1079,6 @@ static int configure_kgdbts(void)
 
 	if (!strlen(config) || isspace(config[0]))
 		goto noconfig;
-	err = kgdbts_option_setup(config);
-	if (err)
-		goto noconfig;
 
 	final_ack = 0;
 	run_plant_and_detach_test(1);
-- 
2.20.1




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

* [PATCH 4.4 086/159] misc: genwqe: should return proper error value.
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (84 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 085/159] misc: kgdbts: Fix restrict error Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 087/159] vfio/pci: Fix potential memory leak in vfio_msi_cap_len Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, zhong jiang, Sasha Levin

From: zhong jiang <zhongjiang@huawei.com>

[ Upstream commit 02241995b004faa7d9ff628e97f24056190853f8 ]

The function should return -EFAULT when copy_from_user fails. Even
though the caller does not distinguish them. but we should keep backward
compatibility.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/misc/genwqe/card_utils.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/genwqe/card_utils.c b/drivers/misc/genwqe/card_utils.c
index d4c719683a8a8..d8961f35a9ec3 100644
--- a/drivers/misc/genwqe/card_utils.c
+++ b/drivers/misc/genwqe/card_utils.c
@@ -298,7 +298,7 @@ static int genwqe_sgl_size(int num_pages)
 int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 			  void __user *user_addr, size_t user_size)
 {
-	int rc;
+	int ret = -ENOMEM;
 	struct pci_dev *pci_dev = cd->pci_dev;
 
 	sgl->fpage_offs = offset_in_page((unsigned long)user_addr);
@@ -317,7 +317,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	if (get_order(sgl->sgl_size) > MAX_ORDER) {
 		dev_err(&pci_dev->dev,
 			"[%s] err: too much memory requested!\n", __func__);
-		return -ENOMEM;
+		return ret;
 	}
 
 	sgl->sgl = __genwqe_alloc_consistent(cd, sgl->sgl_size,
@@ -325,7 +325,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	if (sgl->sgl == NULL) {
 		dev_err(&pci_dev->dev,
 			"[%s] err: no memory available!\n", __func__);
-		return -ENOMEM;
+		return ret;
 	}
 
 	/* Only use buffering on incomplete pages */
@@ -338,7 +338,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 		/* Sync with user memory */
 		if (copy_from_user(sgl->fpage + sgl->fpage_offs,
 				   user_addr, sgl->fpage_size)) {
-			rc = -EFAULT;
+			ret = -EFAULT;
 			goto err_out;
 		}
 	}
@@ -351,7 +351,7 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 		/* Sync with user memory */
 		if (copy_from_user(sgl->lpage, user_addr + user_size -
 				   sgl->lpage_size, sgl->lpage_size)) {
-			rc = -EFAULT;
+			ret = -EFAULT;
 			goto err_out2;
 		}
 	}
@@ -373,7 +373,8 @@ int genwqe_alloc_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
 	sgl->sgl = NULL;
 	sgl->sgl_dma_addr = 0;
 	sgl->sgl_size = 0;
-	return -ENOMEM;
+
+	return ret;
 }
 
 int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
-- 
2.20.1




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

* [PATCH 4.4 087/159] vfio/pci: Fix potential memory leak in vfio_msi_cap_len
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (85 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 086/159] misc: genwqe: should return proper error value Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:27 ` [PATCH 4.4 088/159] scsi: libsas: always unregister the old device if going to discover new Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Li Qiang, Eric Auger,
	Alex Williamson, Sasha Levin

From: Li Qiang <liq3ea@gmail.com>

[ Upstream commit 30ea32ab1951c80c6113f300fce2c70cd12659e4 ]

Free allocated vdev->msi_perm in error path.

Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/vfio/pci/vfio_pci_config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index c55c632a3b249..ad5929fbceb16 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -1130,8 +1130,10 @@ static int vfio_msi_cap_len(struct vfio_pci_device *vdev, u8 pos)
 		return -ENOMEM;
 
 	ret = init_pci_cap_msi_perm(vdev->msi_perm, len, flags);
-	if (ret)
+	if (ret) {
+		kfree(vdev->msi_perm);
 		return ret;
+	}
 
 	return len;
 }
-- 
2.20.1




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

* [PATCH 4.4 088/159] scsi: libsas: always unregister the old device if going to discover new
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (86 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 087/159] vfio/pci: Fix potential memory leak in vfio_msi_cap_len Greg Kroah-Hartman
@ 2019-11-22 10:27 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 089/159] ARM: dts: tegra30: fix xcvr-setup-use-fuses Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jason Yan, chenxiang, John Garry,
	Johannes Thumshirn, Ewan Milne, Christoph Hellwig, Tomas Henzl,
	Dan Williams, Hannes Reinecke, Martin K. Petersen, Sasha Levin

From: Jason Yan <yanaijie@huawei.com>

[ Upstream commit 32c850bf587f993b2620b91e5af8a64a7813f504 ]

If we went into sas_rediscover_dev() the attached_sas_addr was already insured
not to be zero. So it's unnecessary to check if the attached_sas_addr is zero.

And although if the sas address is not changed, we always have to unregister
the old device when we are going to register a new one. We cannot just leave
the device there and bring up the new.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
CC: chenxiang <chenxiang66@hisilicon.com>
CC: John Garry <john.garry@huawei.com>
CC: Johannes Thumshirn <jthumshirn@suse.de>
CC: Ewan Milne <emilne@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Tomas Henzl <thenzl@redhat.com>
CC: Dan Williams <dan.j.williams@intel.com>
CC: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/libsas/sas_expander.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 400eee9d77832..d44f18f773c0f 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -2049,14 +2049,11 @@ static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
 		return res;
 	}
 
-	/* delete the old link */
-	if (SAS_ADDR(phy->attached_sas_addr) &&
-	    SAS_ADDR(sas_addr) != SAS_ADDR(phy->attached_sas_addr)) {
-		SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
-			    SAS_ADDR(dev->sas_addr), phy_id,
-			    SAS_ADDR(phy->attached_sas_addr));
-		sas_unregister_devs_sas_addr(dev, phy_id, last);
-	}
+	/* we always have to delete the old device when we went here */
+	SAS_DPRINTK("ex %016llx phy 0x%x replace %016llx\n",
+		    SAS_ADDR(dev->sas_addr), phy_id,
+		    SAS_ADDR(phy->attached_sas_addr));
+	sas_unregister_devs_sas_addr(dev, phy_id, last);
 
 	return sas_discover_new(dev, phy_id);
 }
-- 
2.20.1




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

* [PATCH 4.4 089/159] ARM: dts: tegra30: fix xcvr-setup-use-fuses
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (87 preceding siblings ...)
  2019-11-22 10:27 ` [PATCH 4.4 088/159] scsi: libsas: always unregister the old device if going to discover new Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 090/159] ARM: tegra: apalis_t30: fix mmc1 cmd pull-up Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcel Ziswiler, Thierry Reding, Sasha Levin

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

[ Upstream commit 564706f65cda3de52b09e51feb423a43940fe661 ]

There was a dot instead of a comma. Fix this.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/tegra30.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 313e260529a31..e8f5a55c4b954 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -823,7 +823,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <1>;
 		nvidia,xcvr-lsrslew = <1>;
 		nvidia,xcvr-hsslew = <32>;
@@ -860,7 +860,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <2>;
 		nvidia,xcvr-lsrslew = <2>;
 		nvidia,xcvr-hsslew = <32>;
@@ -896,7 +896,7 @@
 		nvidia,elastic-limit = <16>;
 		nvidia,term-range-adj = <6>;
 		nvidia,xcvr-setup = <51>;
-		nvidia.xcvr-setup-use-fuses;
+		nvidia,xcvr-setup-use-fuses;
 		nvidia,xcvr-lsfslew = <2>;
 		nvidia,xcvr-lsrslew = <2>;
 		nvidia,xcvr-hsslew = <32>;
-- 
2.20.1




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

* [PATCH 4.4 090/159] ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (88 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 089/159] ARM: dts: tegra30: fix xcvr-setup-use-fuses Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 091/159] net: smsc: fix return type of ndo_start_xmit function Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcel Ziswiler, Thierry Reding, Sasha Levin

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

[ Upstream commit 1c997fe4becdc6fcbc06e23982ceb65621e6572a ]

Fix MMC1 cmd pin pull-up causing issues on carrier boards without
external pull-up.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/tegra30-apalis.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index bf361277fe105..9a8c20cd06885 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -147,14 +147,14 @@
 
 			/* Apalis MMC1 */
 			sdmmc3_clk_pa6 {
-				nvidia,pins = "sdmmc3_clk_pa6",
-					      "sdmmc3_cmd_pa7";
+				nvidia,pins = "sdmmc3_clk_pa6";
 				nvidia,function = "sdmmc3";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 			};
 			sdmmc3_dat0_pb7 {
-				nvidia,pins = "sdmmc3_dat0_pb7",
+				nvidia,pins = "sdmmc3_cmd_pa7",
+					      "sdmmc3_dat0_pb7",
 					      "sdmmc3_dat1_pb6",
 					      "sdmmc3_dat2_pb5",
 					      "sdmmc3_dat3_pb4",
-- 
2.20.1




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

* [PATCH 4.4 091/159] net: smsc: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (89 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 090/159] ARM: tegra: apalis_t30: fix mmc1 cmd pull-up Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 092/159] EDAC: Raise the maximum number of memory controllers Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 6323d57f335ce1490d025cacc83fc10b07792130 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/smsc/smc911x.c  | 3 ++-
 drivers/net/ethernet/smsc/smc91x.c   | 3 ++-
 drivers/net/ethernet/smsc/smsc911x.c | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index bd64eb982e527..37fb6dfc10875 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -511,7 +511,8 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
  * now, or set the card to generates an interrupt when ready
  * for the packet.
  */
-static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smc911x_local *lp = netdev_priv(dev);
 	unsigned int free;
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 23a0388100834..7405f537beca7 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -637,7 +637,8 @@ done:	if (!THROTTLE_TX_PKTS)
  * now, or set the card to generates an interrupt when ready
  * for the packet.
  */
-static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smc_local *lp = netdev_priv(dev);
 	void __iomem *ioaddr = lp->base;
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 219a99b7a631d..b62bf77a64f43 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1677,7 +1677,8 @@ static int smsc911x_stop(struct net_device *dev)
 }
 
 /* Entry point for transmitting a packet */
-static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t
+smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct smsc911x_data *pdata = netdev_priv(dev);
 	unsigned int freespace;
-- 
2.20.1




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

* [PATCH 4.4 092/159] EDAC: Raise the maximum number of memory controllers
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (90 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 091/159] net: smsc: fix return type of ndo_start_xmit function Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 093/159] Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Justin Ernst, Borislav Petkov,
	Russ Anderson, Mauro Carvalho Chehab, linux-edac, Sasha Levin

From: Justin Ernst <justin.ernst@hpe.com>

[ Upstream commit 6b58859419554fb824e09cfdd73151a195473cbc ]

We observe an oops in the skx_edac module during boot:

  EDAC MC0: Giving out device to module skx_edac controller Skylake Socket#0 IMC#0
  EDAC MC1: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1
  EDAC MC2: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0
  ...
  EDAC MC13: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1
  EDAC MC14: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0
  EDAC MC15: Giving out device to module skx_edac controller Skylake Socket#1 IMC#1
  Too many memory controllers: 16
  EDAC MC: Removed device 0 for skx_edac Skylake Socket#0 IMC#0

We observe there are two memory controllers per socket, with a limit
of 16. Raise the maximum number of memory controllers from 16 to 2 *
MAX_NUMNODES (1024).

[ bp: This is just a band-aid fix until we've sorted out the whole issue
  with the bus_type association and handling in EDAC and can get rid of
  this arbitrary limit. ]

Signed-off-by: Justin Ernst <justin.ernst@hpe.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Russ Anderson <russ.anderson@hpe.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac@vger.kernel.org
Link: https://lkml.kernel.org/r/20180925143449.284634-1-justin.ernst@hpe.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/edac.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/edac.h b/include/linux/edac.h
index 4fe67b853de04..9bb4f3311e137 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -17,6 +17,7 @@
 #include <linux/completion.h>
 #include <linux/workqueue.h>
 #include <linux/debugfs.h>
+#include <linux/numa.h>
 
 struct device;
 
@@ -778,6 +779,6 @@ struct mem_ctl_info {
 /*
  * Maximum number of memory controllers in the coherent fabric.
  */
-#define EDAC_MAX_MCS	16
+#define EDAC_MAX_MCS	2 * MAX_NUMNODES
 
 #endif
-- 
2.20.1




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

* [PATCH 4.4 093/159] Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (91 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 092/159] EDAC: Raise the maximum number of memory controllers Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 094/159] arm64: dts: amd: Fix SPI bus warnings Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Luiz Augusto von Dentz,
	Marcel Holtmann, Sasha Levin

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

[ Upstream commit a5c3021bb62b970713550db3f7fd08aa70665d7e ]

If the remote is not able to fully utilize the MPS choosen recalculate
the credits based on the actual amount it is sending that way it can
still send packets of MTU size without credits dropping to 0.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/l2cap_core.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index c25f1e4846cde..302c3bacb0247 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6795,6 +6795,16 @@ static int l2cap_le_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
 		chan->sdu_len = sdu_len;
 		chan->sdu_last_frag = skb;
 
+		/* Detect if remote is not able to use the selected MPS */
+		if (skb->len + L2CAP_SDULEN_SIZE < chan->mps) {
+			u16 mps_len = skb->len + L2CAP_SDULEN_SIZE;
+
+			/* Adjust the number of credits */
+			BT_DBG("chan->mps %u -> %u", chan->mps, mps_len);
+			chan->mps = mps_len;
+			l2cap_chan_le_send_credits(chan);
+		}
+
 		return 0;
 	}
 
-- 
2.20.1




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

* [PATCH 4.4 094/159] arm64: dts: amd: Fix SPI bus warnings
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (92 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 093/159] Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 095/159] fuse: use READ_ONCE on congestion_threshold and max_background Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Brijesh Singh, Suravee Suthikulpanit,
	Tom Lendacky, Rob Herring, Arnd Bergmann, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit e9f0878c4b2004ac19581274c1ae4c61ae3ca70e ]

dtc has new checks for SPI buses. Fix the warnings in node names.

arch/arm64/boot/dts/amd/amd-overdrive.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'
arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'
arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'

Cc: Brijesh Singh <brijeshkumar.singh@amd.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
index 2874d92881fda..a3030c868be5f 100644
--- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
+++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
@@ -84,7 +84,7 @@
 			clock-names = "uartclk", "apb_pclk";
 		};
 
-		spi0: ssp@e1020000 {
+		spi0: spi@e1020000 {
 			status = "disabled";
 			compatible = "arm,pl022", "arm,primecell";
 			#gpio-cells = <2>;
@@ -95,7 +95,7 @@
 			clock-names = "apb_pclk";
 		};
 
-		spi1: ssp@e1030000 {
+		spi1: spi@e1030000 {
 			status = "disabled";
 			compatible = "arm,pl022", "arm,primecell";
 			#gpio-cells = <2>;
-- 
2.20.1




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

* [PATCH 4.4 095/159] fuse: use READ_ONCE on congestion_threshold and max_background
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (93 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 094/159] arm64: dts: amd: Fix SPI bus warnings Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 096/159] Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kirill Tkhai, Miklos Szeredi, Sasha Levin

From: Kirill Tkhai <ktkhai@virtuozzo.com>

[ Upstream commit 2a23f2b8adbe4bd584f936f7ac17a99750eed9d7 ]

Since they are of unsigned int type, it's allowed to read them
unlocked during reporting to userspace. Let's underline this fact
with READ_ONCE() macroses.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/fuse/control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/control.c b/fs/fuse/control.c
index 89a4b231e79cb..bb56c6a58fa76 100644
--- a/fs/fuse/control.c
+++ b/fs/fuse/control.c
@@ -107,7 +107,7 @@ static ssize_t fuse_conn_max_background_read(struct file *file,
 	if (!fc)
 		return 0;
 
-	val = fc->max_background;
+	val = READ_ONCE(fc->max_background);
 	fuse_conn_put(fc);
 
 	return fuse_conn_limit_read(file, buf, len, ppos, val);
@@ -144,7 +144,7 @@ static ssize_t fuse_conn_congestion_threshold_read(struct file *file,
 	if (!fc)
 		return 0;
 
-	val = fc->congestion_threshold;
+	val = READ_ONCE(fc->congestion_threshold);
 	fuse_conn_put(fc);
 
 	return fuse_conn_limit_read(file, buf, len, ppos, val);
-- 
2.20.1




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

* [PATCH 4.4 096/159] Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (94 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 095/159] fuse: use READ_ONCE on congestion_threshold and max_background Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 097/159] Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Loic Poulain, Marcel Holtmann, Ralph Siemsen

From: Loic Poulain <loic.poulain@intel.com>

commit 84cb3df02aea4b00405521e67c4c67c2d525c364 upstream.

HCI_UART_PROTO_SET flag is set before hci_uart_set_proto call. If we
receive data from tty layer during this procedure, proto pointer may
not be assigned yet, leading to null pointer dereference in rx method
hci_uart_tty_receive.

This patch fixes this issue by introducing HCI_UART_PROTO_READY flag in
order to avoid any proto operation before proto opening and assignment.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Ralph Siemsen <ralph.siemsen@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bluetooth/hci_ldisc.c |   11 +++++++----
 drivers/bluetooth/hci_uart.h  |    1 +
 2 files changed, 8 insertions(+), 4 deletions(-)

--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -227,7 +227,7 @@ static int hci_uart_flush(struct hci_dev
 	tty_ldisc_flush(tty);
 	tty_driver_flush_buffer(tty);
 
-	if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
+	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
 		hu->proto->flush(hu);
 
 	return 0;
@@ -506,7 +506,7 @@ static void hci_uart_tty_close(struct tt
 
 	cancel_work_sync(&hu->write_work);
 
-	if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
+	if (test_and_clear_bit(HCI_UART_PROTO_READY, &hu->flags)) {
 		if (hdev) {
 			if (test_bit(HCI_UART_REGISTERED, &hu->flags))
 				hci_unregister_dev(hdev);
@@ -514,6 +514,7 @@ static void hci_uart_tty_close(struct tt
 		}
 		hu->proto->close(hu);
 	}
+	clear_bit(HCI_UART_PROTO_SET, &hu->flags);
 
 	kfree(hu);
 }
@@ -540,7 +541,7 @@ static void hci_uart_tty_wakeup(struct t
 	if (tty != hu->tty)
 		return;
 
-	if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
+	if (test_bit(HCI_UART_PROTO_READY, &hu->flags))
 		hci_uart_tx_wakeup(hu);
 }
 
@@ -564,7 +565,7 @@ static void hci_uart_tty_receive(struct
 	if (!hu || tty != hu->tty)
 		return;
 
-	if (!test_bit(HCI_UART_PROTO_SET, &hu->flags))
+	if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
 		return;
 
 	/* It does not need a lock here as it is already protected by a mutex in
@@ -652,9 +653,11 @@ static int hci_uart_set_proto(struct hci
 		return err;
 
 	hu->proto = p;
+	set_bit(HCI_UART_PROTO_READY, &hu->flags);
 
 	err = hci_uart_register_dev(hu);
 	if (err) {
+		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
 		p->close(hu);
 		return err;
 	}
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -94,6 +94,7 @@ struct hci_uart {
 /* HCI_UART proto flag bits */
 #define HCI_UART_PROTO_SET	0
 #define HCI_UART_REGISTERED	1
+#define HCI_UART_PROTO_READY	2
 
 /* TX states  */
 #define HCI_UART_SENDING	1



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

* [PATCH 4.4 097/159] Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (95 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 096/159] Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 098/159] memfd: Use radix_tree_deref_slot_protected to avoid the warning Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+899a33dc0fa0dbaf06a6,
	Kefeng Wang, Jeremy Cline, Marcel Holtmann, Ralph Siemsen

From: Kefeng Wang <wangkefeng.wang@huawei.com>

commit 56897b217a1d0a91c9920cb418d6b3fe922f590a upstream.

task A:                                task B:
hci_uart_set_proto                     flush_to_ldisc
 - p->open(hu) -> h5_open  //alloc h5  - receive_buf
 - set_bit HCI_UART_PROTO_READY         - tty_port_default_receive_buf
 - hci_uart_register_dev                 - tty_ldisc_receive_buf
                                          - hci_uart_tty_receive
				           - test_bit HCI_UART_PROTO_READY
				            - h5_recv
 - clear_bit HCI_UART_PROTO_READY             while() {
 - p->open(hu) -> h5_close //free h5
				              - h5_rx_3wire_hdr
				               - h5_reset()  //use-after-free
                                              }

It could use ioctl to set hci uart proto, but there is
a use-after-free issue when hci_uart_register_dev() fail in
hci_uart_set_proto(), see stack above, fix this by setting
HCI_UART_PROTO_READY bit only when hci_uart_register_dev()
return success.

Reported-by: syzbot+899a33dc0fa0dbaf06a6@syzkaller.appspotmail.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Jeremy Cline <jcline@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Ralph Siemsen <ralph.siemsen@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bluetooth/hci_ldisc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -653,15 +653,14 @@ static int hci_uart_set_proto(struct hci
 		return err;
 
 	hu->proto = p;
-	set_bit(HCI_UART_PROTO_READY, &hu->flags);
 
 	err = hci_uart_register_dev(hu);
 	if (err) {
-		clear_bit(HCI_UART_PROTO_READY, &hu->flags);
 		p->close(hu);
 		return err;
 	}
 
+	set_bit(HCI_UART_PROTO_READY, &hu->flags);
 	return 0;
 }
 



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

* [PATCH 4.4 098/159] memfd: Use radix_tree_deref_slot_protected to avoid the warning.
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (96 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 097/159] Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 099/159] slcan: Fix memory leak in error path Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, zhong jiang, Matthew Wilcox (Oracle)

From: zhong jiang <zhongjiang@huawei.com>

The commit eb4058d8daf8 ("memfd: Fix locking when tagging pins")
introduces the following warning messages.

*WARNING: suspicious RCU usage in memfd_wait_for_pins*

It is because we still use radix_tree_deref_slot without read_rcu_lock.
We should use radix_tree_deref_slot_protected instead in the case.

Cc: stable@vger.kernel.org
Fixes: eb4058d8daf8 ("memfd: Fix locking when tagging pins")
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 mm/shmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1862,7 +1862,7 @@ static void shmem_tag_pins(struct addres
 	spin_lock_irq(&mapping->tree_lock);
 restart:
 	radix_tree_for_each_slot(slot, &mapping->page_tree, &iter, start) {
-		page = radix_tree_deref_slot(slot);
+		page = radix_tree_deref_slot_protected(slot, &mapping->tree_lock);
 		if (!page || radix_tree_exception(page)) {
 			if (radix_tree_deref_retry(page))
 				goto restart;



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

* [PATCH 4.4 099/159] slcan: Fix memory leak in error path
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (97 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 098/159] memfd: Use radix_tree_deref_slot_protected to avoid the warning Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 100/159] net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size() Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wolfgang Grandegger,
	Marc Kleine-Budde, Lukas Bulwahn, Jouni Hogander,
	Oliver Hartkopp

From: Jouni Hogander <jouni.hogander@unikie.com>

commit ed50e1600b4483c049ce76e6bd3b665a6a9300ed upstream.

This patch is fixing memory leak reported by Syzkaller:

BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
  comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
  hex dump (first 32 bytes):
    73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  backtrace:
    [<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
    [<0000000083306e66>] kvmalloc_node+0x3a/0xc0
    [<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
    [<0000000061a996c9>] slcan_open+0x3ae/0x9a0
    [<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
    [<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
    [<000000004de5a617>] tty_ioctl+0x48d/0x1590
    [<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
    [<0000000059068dbc>] ksys_ioctl+0x99/0xb0
    [<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
    [<0000000053d0332e>] do_syscall_64+0x16f/0x580
    [<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [<000000008ea75434>] 0xffffffffffffffff

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Jouni Hogander <jouni.hogander@unikie.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/slcan.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -613,6 +613,7 @@ err_free_chan:
 	sl->tty = NULL;
 	tty->disc_data = NULL;
 	clear_bit(SLF_INUSE, &sl->flags);
+	free_netdev(sl->dev);
 
 err_exit:
 	rtnl_unlock();



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

* [PATCH 4.4 100/159] net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (98 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 099/159] slcan: Fix memory leak in error path Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 101/159] x86/atomic: Fix smp_mb__{before,after}_atomic() Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, David S. Miller,
	Nobuhiro Iwamatsu

From: Dan Carpenter <dan.carpenter@oracle.com>

commit a56dcc6b455830776899ce3686735f1172e12243 upstream.

This code is supposed to test for negative error codes and partial
reads, but because sizeof() is size_t (unsigned) type then negative
error codes are type promoted to high positive values and the condition
doesn't work as expected.

Fixes: 332f989a3b00 ("CDC-NCM: handle incomplete transfer of MTU")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/usb/cdc_ncm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -534,7 +534,7 @@ static void cdc_ncm_set_dgram_size(struc
 	err = usbnet_read_cmd(dev, USB_CDC_GET_MAX_DATAGRAM_SIZE,
 			      USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
 			      0, iface_no, &max_datagram_size, sizeof(max_datagram_size));
-	if (err < sizeof(max_datagram_size)) {
+	if (err != sizeof(max_datagram_size)) {
 		dev_dbg(&dev->intf->dev, "GET_MAX_DATAGRAM_SIZE failed\n");
 		goto out;
 	}



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

* [PATCH 4.4 101/159] x86/atomic: Fix smp_mb__{before,after}_atomic()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (99 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 100/159] net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 102/159] apparmor: fix uninitialized lsm_audit member Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel),
	Linus Torvalds, Thomas Gleixner, Ingo Molnar, Jari Ruusu

From: Peter Zijlstra <peterz@infradead.org>

commit 69d927bba39517d0980462efc051875b7f4db185 upstream.

Recent probing at the Linux Kernel Memory Model uncovered a
'surprise'. Strongly ordered architectures where the atomic RmW
primitive implies full memory ordering and
smp_mb__{before,after}_atomic() are a simple barrier() (such as x86)
fail for:

	*x = 1;
	atomic_inc(u);
	smp_mb__after_atomic();
	r0 = *y;

Because, while the atomic_inc() implies memory order, it
(surprisingly) does not provide a compiler barrier. This then allows
the compiler to re-order like so:

	atomic_inc(u);
	*x = 1;
	smp_mb__after_atomic();
	r0 = *y;

Which the CPU is then allowed to re-order (under TSO rules) like:

	atomic_inc(u);
	r0 = *y;
	*x = 1;

And this very much was not intended. Therefore strengthen the atomic
RmW ops to include a compiler barrier.

NOTE: atomic_{or,and,xor} and the bitops already had the compiler
barrier.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jari Ruusu <jari.ruusu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/atomic.h      |    8 ++++----
 arch/x86/include/asm/atomic64_64.h |    8 ++++----
 arch/x86/include/asm/barrier.h     |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
@@ -49,7 +49,7 @@ static __always_inline void atomic_add(i
 {
 	asm volatile(LOCK_PREFIX "addl %1,%0"
 		     : "+m" (v->counter)
-		     : "ir" (i));
+		     : "ir" (i) : "memory");
 }
 
 /**
@@ -63,7 +63,7 @@ static __always_inline void atomic_sub(i
 {
 	asm volatile(LOCK_PREFIX "subl %1,%0"
 		     : "+m" (v->counter)
-		     : "ir" (i));
+		     : "ir" (i) : "memory");
 }
 
 /**
@@ -89,7 +89,7 @@ static __always_inline int atomic_sub_an
 static __always_inline void atomic_inc(atomic_t *v)
 {
 	asm volatile(LOCK_PREFIX "incl %0"
-		     : "+m" (v->counter));
+		     : "+m" (v->counter) :: "memory");
 }
 
 /**
@@ -101,7 +101,7 @@ static __always_inline void atomic_inc(a
 static __always_inline void atomic_dec(atomic_t *v)
 {
 	asm volatile(LOCK_PREFIX "decl %0"
-		     : "+m" (v->counter));
+		     : "+m" (v->counter) :: "memory");
 }
 
 /**
--- a/arch/x86/include/asm/atomic64_64.h
+++ b/arch/x86/include/asm/atomic64_64.h
@@ -44,7 +44,7 @@ static __always_inline void atomic64_add
 {
 	asm volatile(LOCK_PREFIX "addq %1,%0"
 		     : "=m" (v->counter)
-		     : "er" (i), "m" (v->counter));
+		     : "er" (i), "m" (v->counter) : "memory");
 }
 
 /**
@@ -58,7 +58,7 @@ static inline void atomic64_sub(long i,
 {
 	asm volatile(LOCK_PREFIX "subq %1,%0"
 		     : "=m" (v->counter)
-		     : "er" (i), "m" (v->counter));
+		     : "er" (i), "m" (v->counter) : "memory");
 }
 
 /**
@@ -85,7 +85,7 @@ static __always_inline void atomic64_inc
 {
 	asm volatile(LOCK_PREFIX "incq %0"
 		     : "=m" (v->counter)
-		     : "m" (v->counter));
+		     : "m" (v->counter) : "memory");
 }
 
 /**
@@ -98,7 +98,7 @@ static __always_inline void atomic64_dec
 {
 	asm volatile(LOCK_PREFIX "decq %0"
 		     : "=m" (v->counter)
-		     : "m" (v->counter));
+		     : "m" (v->counter) : "memory");
 }
 
 /**
--- a/arch/x86/include/asm/barrier.h
+++ b/arch/x86/include/asm/barrier.h
@@ -116,7 +116,7 @@ do {									\
 #endif
 
 /* Atomic operations are already serializing on x86 */
-#define smp_mb__before_atomic()	barrier()
-#define smp_mb__after_atomic()	barrier()
+#define smp_mb__before_atomic()	do { } while (0)
+#define smp_mb__after_atomic()	do { } while (0)
 
 #endif /* _ASM_X86_BARRIER_H */



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

* [PATCH 4.4 102/159] apparmor: fix uninitialized lsm_audit member
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (100 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 101/159] x86/atomic: Fix smp_mb__{before,after}_atomic() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 103/159] apparmor: fix update the mtime of the profile file on replacement Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John Johansen, Seth Arnold

From: John Johansen <john.johansen@canonical.com>

commit b6b1b81b3afba922505b57f4c812bba022f7c4a9 upstream.

BugLink: http://bugs.launchpad.net/bugs/1268727

The task field in the lsm_audit struct needs to be initialized if
a change_hat fails, otherwise the following oops will occur

BUG: unable to handle kernel paging request at 0000002fbead7d08
IP: [<ffffffff8171153e>] _raw_spin_lock+0xe/0x50
PGD 1e3f35067 PUD 0
Oops: 0002 [#1] SMP
Modules linked in: pppox crc_ccitt p8023 p8022 psnap llc ax25 btrfs raid6_pq xor xfs libcrc32c dm_multipath scsi_dh kvm_amd dcdbas kvm microcode amd64_edac_mod joydev edac_core psmouse edac_mce_amd serio_raw k10temp sp5100_tco i2c_piix4 ipmi_si ipmi_msghandler acpi_power_meter mac_hid lp parport hid_generic usbhid hid pata_acpi mpt2sas ahci raid_class pata_atiixp bnx2 libahci scsi_transport_sas [last unloaded: tipc]
CPU: 2 PID: 699 Comm: changehat_twice Tainted: GF          O 3.13.0-7-generic #25-Ubuntu
Hardware name: Dell Inc. PowerEdge R415/08WNM9, BIOS 1.8.6 12/06/2011
task: ffff8802135c6000 ti: ffff880212986000 task.ti: ffff880212986000
RIP: 0010:[<ffffffff8171153e>]  [<ffffffff8171153e>] _raw_spin_lock+0xe/0x50
RSP: 0018:ffff880212987b68  EFLAGS: 00010006
RAX: 0000000000020000 RBX: 0000002fbead7500 RCX: 0000000000000000
RDX: 0000000000000292 RSI: ffff880212987ba8 RDI: 0000002fbead7d08
RBP: ffff880212987b68 R08: 0000000000000246 R09: ffff880216e572a0
R10: ffffffff815fd677 R11: ffffea0008469580 R12: ffffffff8130966f
R13: ffff880212987ba8 R14: 0000002fbead7d08 R15: ffff8800d8c6b830
FS:  00002b5e6c84e7c0(0000) GS:ffff880216e40000(0000) knlGS:0000000055731700
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000002fbead7d08 CR3: 000000021270f000 CR4: 00000000000006e0
Stack:
 ffff880212987b98 ffffffff81075f17 ffffffff8130966f 0000000000000009
 0000000000000000 0000000000000000 ffff880212987bd0 ffffffff81075f7c
 0000000000000292 ffff880212987c08 ffff8800d8c6b800 0000000000000026
Call Trace:
 [<ffffffff81075f17>] __lock_task_sighand+0x47/0x80
 [<ffffffff8130966f>] ? apparmor_cred_prepare+0x2f/0x50
 [<ffffffff81075f7c>] do_send_sig_info+0x2c/0x80
 [<ffffffff81075fee>] send_sig_info+0x1e/0x30
 [<ffffffff8130242d>] aa_audit+0x13d/0x190
 [<ffffffff8130c1dc>] aa_audit_file+0xbc/0x130
 [<ffffffff8130966f>] ? apparmor_cred_prepare+0x2f/0x50
 [<ffffffff81304cc2>] aa_change_hat+0x202/0x530
 [<ffffffff81308fc6>] aa_setprocattr_changehat+0x116/0x1d0
 [<ffffffff8130a11d>] apparmor_setprocattr+0x25d/0x300
 [<ffffffff812cee56>] security_setprocattr+0x16/0x20
 [<ffffffff8121fc87>] proc_pid_attr_write+0x107/0x130
 [<ffffffff811b7604>] vfs_write+0xb4/0x1f0
 [<ffffffff811b8039>] SyS_write+0x49/0xa0
 [<ffffffff8171a1bf>] tracesys+0xe1/0xe6

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/apparmor/audit.c |    3 ++-
 security/apparmor/file.c  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -200,7 +200,8 @@ int aa_audit(int type, struct aa_profile
 
 	if (sa->aad->type == AUDIT_APPARMOR_KILL)
 		(void)send_sig_info(SIGKILL, NULL,
-				    sa->u.tsk ?  sa->u.tsk : current);
+			sa->type == LSM_AUDIT_DATA_TASK && sa->u.tsk ?
+				    sa->u.tsk : current);
 
 	if (sa->aad->type == AUDIT_APPARMOR_ALLOWED)
 		return complain_error(sa->aad->error);
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -110,7 +110,8 @@ int aa_audit_file(struct aa_profile *pro
 	int type = AUDIT_APPARMOR_AUTO;
 	struct common_audit_data sa;
 	struct apparmor_audit_data aad = {0,};
-	sa.type = LSM_AUDIT_DATA_NONE;
+	sa.type = LSM_AUDIT_DATA_TASK;
+	sa.u.tsk = NULL;
 	sa.aad = &aad;
 	aad.op = op,
 	aad.fs.request = request;



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

* [PATCH 4.4 103/159] apparmor: fix update the mtime of the profile file on replacement
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (101 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 102/159] apparmor: fix uninitialized lsm_audit member Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 104/159] apparmor: fix module parameters can be changed after policy is locked Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John Johansen, Seth Arnold

From: John Johansen <john.johansen@canonical.com>

commit d671e890205a663429da74e1972e652bea4d73ab upstream.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/apparmor/apparmorfs.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -380,6 +380,8 @@ void __aa_fs_profile_migrate_dents(struc
 
 	for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
 		new->dents[i] = old->dents[i];
+		if (new->dents[i])
+			new->dents[i]->d_inode->i_mtime = CURRENT_TIME;
 		old->dents[i] = NULL;
 	}
 }



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

* [PATCH 4.4 104/159] apparmor: fix module parameters can be changed after policy is locked
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (102 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 103/159] apparmor: fix update the mtime of the profile file on replacement Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 105/159] kprobes/x86: Prohibit probing on exception masking instructions Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John Johansen

From: John Johansen <john.johansen@canonical.com>

commit 58acf9d911c8831156634a44d0b022d683e1e50c upstream.

the policy_lock parameter is a one way switch that prevents policy
from being further modified. Unfortunately some of the module parameters
can effectively modify policy by turning off enforcement.

split policy_admin_capable into a view check and a full admin check,
and update the admin check to test the policy_lock parameter.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/apparmor/include/policy.h |    2 ++
 security/apparmor/lsm.c            |   22 ++++++++++------------
 security/apparmor/policy.c         |   18 +++++++++++++++++-
 3 files changed, 29 insertions(+), 13 deletions(-)

--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -403,6 +403,8 @@ static inline int AUDIT_MODE(struct aa_p
 	return profile->audit;
 }
 
+bool policy_view_capable(void);
+bool policy_admin_capable(void);
 bool aa_may_manage_policy(int op);
 
 #endif /* __AA_POLICY_H */
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -749,51 +749,49 @@ __setup("apparmor=", apparmor_enabled_se
 /* set global flag turning off the ability to load policy */
 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
-	if (aa_g_lock_policy)
-		return -EACCES;
 	return param_set_bool(val, kp);
 }
 
 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_view_capable())
 		return -EPERM;
 	return param_get_bool(buffer, kp);
 }
 
 static int param_set_aabool(const char *val, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
 	return param_set_bool(val, kp);
 }
 
 static int param_get_aabool(char *buffer, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_view_capable())
 		return -EPERM;
 	return param_get_bool(buffer, kp);
 }
 
 static int param_set_aauint(const char *val, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
 	return param_set_uint(val, kp);
 }
 
 static int param_get_aauint(char *buffer, const struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_view_capable())
 		return -EPERM;
 	return param_get_uint(buffer, kp);
 }
 
 static int param_get_audit(char *buffer, struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_view_capable())
 		return -EPERM;
 
 	if (!apparmor_enabled)
@@ -805,7 +803,7 @@ static int param_get_audit(char *buffer,
 static int param_set_audit(const char *val, struct kernel_param *kp)
 {
 	int i;
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
 
 	if (!apparmor_enabled)
@@ -826,7 +824,7 @@ static int param_set_audit(const char *v
 
 static int param_get_mode(char *buffer, struct kernel_param *kp)
 {
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
 
 	if (!apparmor_enabled)
@@ -838,7 +836,7 @@ static int param_get_mode(char *buffer,
 static int param_set_mode(const char *val, struct kernel_param *kp)
 {
 	int i;
-	if (!capable(CAP_MAC_ADMIN))
+	if (!policy_admin_capable())
 		return -EPERM;
 
 	if (!apparmor_enabled)
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -916,6 +916,22 @@ static int audit_policy(int op, gfp_t gf
 			&sa, NULL);
 }
 
+bool policy_view_capable(void)
+{
+	struct user_namespace *user_ns = current_user_ns();
+	bool response = false;
+
+	if (ns_capable(user_ns, CAP_MAC_ADMIN))
+		response = true;
+
+	return response;
+}
+
+bool policy_admin_capable(void)
+{
+	return policy_view_capable() && !aa_g_lock_policy;
+}
+
 /**
  * aa_may_manage_policy - can the current task manage policy
  * @op: the policy manipulation operation being done
@@ -930,7 +946,7 @@ bool aa_may_manage_policy(int op)
 		return 0;
 	}
 
-	if (!capable(CAP_MAC_ADMIN)) {
+	if (!policy_admin_capable()) {
 		audit_policy(op, GFP_KERNEL, NULL, "not policy admin", -EACCES);
 		return 0;
 	}



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

* [PATCH 4.4 105/159] kprobes/x86: Prohibit probing on exception masking instructions
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (103 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 104/159] apparmor: fix module parameters can be changed after policy is locked Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 106/159] uprobes/x86: Prohibit probing on MOV SS instruction Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Masami Hiramatsu, Thomas Gleixner,
	Ricardo Neri, Francis Deslauriers, Oleg Nesterov,
	Alexei Starovoitov, Steven Rostedt, Andy Lutomirski,
	H . Peter Anvin, Yonghong Song, Borislav Petkov, Linus Torvalds,
	David S . Miller

From: Masami Hiramatsu <mhiramat@kernel.org>

commit ee6a7354a3629f9b65bc18dbe393503e9440d6f5 upstream.

Since MOV SS and POP SS instructions will delay the exceptions until the
next instruction is executed, single-stepping on it by kprobes must be
prohibited.

However, kprobes usually executes those instructions directly on trampoline
buffer (a.k.a. kprobe-booster), except for the kprobes which has
post_handler. Thus if kprobe user probes MOV SS with post_handler, it will
do single-stepping on the MOV SS.

This means it is safe that if it is used via ftrace or perf/bpf since those
don't use the post_handler.

Anyway, since the stack switching is a rare case, it is safer just
rejecting kprobes on such instructions.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "David S . Miller" <davem@davemloft.net>
Link: https://lkml.kernel.org/r/152587069574.17316.3311695234863248641.stgit@devbox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/insn.h    |   18 ++++++++++++++++++
 arch/x86/kernel/kprobes/core.c |    4 ++++
 2 files changed, 22 insertions(+)

--- a/arch/x86/include/asm/insn.h
+++ b/arch/x86/include/asm/insn.h
@@ -198,4 +198,22 @@ static inline int insn_offset_immediate(
 	return insn_offset_displacement(insn) + insn->displacement.nbytes;
 }
 
+#define POP_SS_OPCODE 0x1f
+#define MOV_SREG_OPCODE 0x8e
+
+/*
+ * Intel SDM Vol.3A 6.8.3 states;
+ * "Any single-step trap that would be delivered following the MOV to SS
+ * instruction or POP to SS instruction (because EFLAGS.TF is 1) is
+ * suppressed."
+ * This function returns true if @insn is MOV SS or POP SS. On these
+ * instructions, single stepping is suppressed.
+ */
+static inline int insn_masking_exception(struct insn *insn)
+{
+	return insn->opcode.bytes[0] == POP_SS_OPCODE ||
+		(insn->opcode.bytes[0] == MOV_SREG_OPCODE &&
+		 X86_MODRM_REG(insn->modrm.bytes[0]) == 2);
+}
+
 #endif /* _ASM_X86_INSN_H */
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -372,6 +372,10 @@ int __copy_instruction(u8 *dest, u8 *src
 		return 0;
 	memcpy(dest, insn.kaddr, length);
 
+	/* We should not singlestep on the exception masking instructions */
+	if (insn_masking_exception(&insn))
+		return 0;
+
 #ifdef CONFIG_X86_64
 	if (insn_rip_relative(&insn)) {
 		s64 newdisp;



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

* [PATCH 4.4 106/159] uprobes/x86: Prohibit probing on MOV SS instruction
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (104 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 105/159] kprobes/x86: Prohibit probing on exception masking instructions Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 107/159] fbdev: Remove unused SH-Mobile HDMI driver Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Masami Hiramatsu, Thomas Gleixner,
	Oleg Nesterov, Ricardo Neri, Francis Deslauriers,
	Alexei Starovoitov, Steven Rostedt, Andy Lutomirski,
	H . Peter Anvin, Yonghong Song, Borislav Petkov, Linus Torvalds,
	David S . Miller

From: Masami Hiramatsu <mhiramat@kernel.org>

commit 13ebe18c94f5b0665c01ae7fad2717ae959f4212 upstream.

Since MOV SS and POP SS instructions will delay the exceptions until the
next instruction is executed, single-stepping on it by uprobes must be
prohibited.

uprobe already rejects probing on POP SS (0x1f), but allows probing on MOV
SS (0x8e and reg == 2).  This checks the target instruction and if it is
MOV SS or POP SS, returns -ENOTSUPP to reject probing.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "David S . Miller" <davem@davemloft.net>
Link: https://lkml.kernel.org/r/152587072544.17316.5950935243917346341.stgit@devbox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/uprobes.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -296,6 +296,10 @@ static int uprobe_init_insn(struct arch_
 	if (is_prefix_bad(insn))
 		return -ENOTSUPP;
 
+	/* We should not singlestep on the exception masking instructions */
+	if (insn_masking_exception(insn))
+		return -ENOTSUPP;
+
 	if (x86_64)
 		good_insns = good_insns_64;
 	else



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

* [PATCH 4.4 107/159] fbdev: Remove unused SH-Mobile HDMI driver
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (105 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 106/159] uprobes/x86: Prohibit probing on MOV SS instruction Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 108/159] fbdev: Ditch fb_edid_add_monspecs Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Simon Horman,
	Tomi Valkeinen

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit 34280340b1dc74c521e636f45cd728f9abf56ee2 upstream.

As of commit 44d88c754e57a6d9 ("ARM: shmobile: Remove legacy SoC code
for R-Mobile A1"), the SH-Mobile HDMI driver is no longer used.
In theory it could still be used on R-Mobile A1 SoCs, but that requires
adding DT support to the driver, which is not planned.

Remove the driver, it can be resurrected from git history when needed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/video/fbdev/Kconfig          |   10 
 drivers/video/fbdev/Makefile         |    1 
 drivers/video/fbdev/sh_mobile_hdmi.c | 1489 -----------------------------------
 include/video/sh_mobile_hdmi.h       |   49 -
 4 files changed, 1549 deletions(-)

--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1991,16 +1991,6 @@ config FB_SH_MOBILE_LCDC
 	---help---
 	  Frame buffer driver for the on-chip SH-Mobile LCD controller.
 
-config FB_SH_MOBILE_HDMI
-	tristate "SuperH Mobile HDMI controller support"
-	depends on FB_SH_MOBILE_LCDC
-	select FB_MODE_HELPERS
-	select SOUND
-	select SND
-	select SND_SOC
-	---help---
-	  Driver for the on-chip SH-Mobile HDMI controller.
-
 config FB_TMIO
 	tristate "Toshiba Mobile IO FrameBuffer support"
 	depends on FB && (MFD_TMIO || COMPILE_TEST)
--- a/drivers/video/fbdev/Makefile
+++ b/drivers/video/fbdev/Makefile
@@ -118,7 +118,6 @@ obj-$(CONFIG_FB_UDL)		  += udlfb.o
 obj-$(CONFIG_FB_SMSCUFX)	  += smscufx.o
 obj-$(CONFIG_FB_XILINX)           += xilinxfb.o
 obj-$(CONFIG_SH_MIPI_DSI)	  += sh_mipi_dsi.o
-obj-$(CONFIG_FB_SH_MOBILE_HDMI)	  += sh_mobile_hdmi.o
 obj-$(CONFIG_FB_SH_MOBILE_MERAM)  += sh_mobile_meram.o
 obj-$(CONFIG_FB_SH_MOBILE_LCDC)	  += sh_mobile_lcdcfb.o
 obj-$(CONFIG_FB_OMAP)             += omap/
--- a/drivers/video/fbdev/sh_mobile_hdmi.c
+++ /dev/null
@@ -1,1489 +0,0 @@
-/*
- * SH-Mobile High-Definition Multimedia Interface (HDMI) driver
- * for SLISHDMI13T and SLIPHDMIT IP cores
- *
- * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/clk.h>
-#include <linux/console.h>
-#include <linux/delay.h>
-#include <linux/err.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/workqueue.h>
-#include <sound/soc.h>
-#include <sound/soc-dapm.h>
-#include <sound/initval.h>
-
-#include <video/sh_mobile_hdmi.h>
-#include <video/sh_mobile_lcdc.h>
-
-#include "sh_mobile_lcdcfb.h"
-
-/* HDMI Core Control Register (HTOP0) */
-#define HDMI_SYSTEM_CTRL			0x00 /* System control */
-#define HDMI_L_R_DATA_SWAP_CTRL_RPKT		0x01 /* L/R data swap control,
-							bits 19..16 of 20-bit N for Audio Clock Regeneration packet */
-#define HDMI_20_BIT_N_FOR_AUDIO_RPKT_15_8	0x02 /* bits 15..8 of 20-bit N for Audio Clock Regeneration packet */
-#define HDMI_20_BIT_N_FOR_AUDIO_RPKT_7_0	0x03 /* bits 7..0 of 20-bit N for Audio Clock Regeneration packet */
-#define HDMI_SPDIF_AUDIO_SAMP_FREQ_CTS		0x04 /* SPDIF audio sampling frequency,
-							bits 19..16 of Internal CTS */
-#define HDMI_INTERNAL_CTS_15_8			0x05 /* bits 15..8 of Internal CTS */
-#define HDMI_INTERNAL_CTS_7_0			0x06 /* bits 7..0 of Internal CTS */
-#define HDMI_EXTERNAL_CTS_19_16			0x07 /* External CTS */
-#define HDMI_EXTERNAL_CTS_15_8			0x08 /* External CTS */
-#define HDMI_EXTERNAL_CTS_7_0			0x09 /* External CTS */
-#define HDMI_AUDIO_SETTING_1			0x0A /* Audio setting.1 */
-#define HDMI_AUDIO_SETTING_2			0x0B /* Audio setting.2 */
-#define HDMI_I2S_AUDIO_SET			0x0C /* I2S audio setting */
-#define HDMI_DSD_AUDIO_SET			0x0D /* DSD audio setting */
-#define HDMI_DEBUG_MONITOR_1			0x0E /* Debug monitor.1 */
-#define HDMI_DEBUG_MONITOR_2			0x0F /* Debug monitor.2 */
-#define HDMI_I2S_INPUT_PIN_SWAP			0x10 /* I2S input pin swap */
-#define HDMI_AUDIO_STATUS_BITS_SETTING_1	0x11 /* Audio status bits setting.1 */
-#define HDMI_AUDIO_STATUS_BITS_SETTING_2	0x12 /* Audio status bits setting.2 */
-#define HDMI_CATEGORY_CODE			0x13 /* Category code */
-#define HDMI_SOURCE_NUM_AUDIO_WORD_LEN		0x14 /* Source number/Audio word length */
-#define HDMI_AUDIO_VIDEO_SETTING_1		0x15 /* Audio/Video setting.1 */
-#define HDMI_VIDEO_SETTING_1			0x16 /* Video setting.1 */
-#define HDMI_DEEP_COLOR_MODES			0x17 /* Deep Color Modes */
-
-/* 12 16- and 10-bit Color space conversion parameters: 0x18..0x2f */
-#define HDMI_COLOR_SPACE_CONVERSION_PARAMETERS	0x18
-
-#define HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS	0x30 /* External video parameter settings */
-#define HDMI_EXTERNAL_H_TOTAL_7_0		0x31 /* External horizontal total (LSB) */
-#define HDMI_EXTERNAL_H_TOTAL_11_8		0x32 /* External horizontal total (MSB) */
-#define HDMI_EXTERNAL_H_BLANK_7_0		0x33 /* External horizontal blank (LSB) */
-#define HDMI_EXTERNAL_H_BLANK_9_8		0x34 /* External horizontal blank (MSB) */
-#define HDMI_EXTERNAL_H_DELAY_7_0		0x35 /* External horizontal delay (LSB) */
-#define HDMI_EXTERNAL_H_DELAY_9_8		0x36 /* External horizontal delay (MSB) */
-#define HDMI_EXTERNAL_H_DURATION_7_0		0x37 /* External horizontal duration (LSB) */
-#define HDMI_EXTERNAL_H_DURATION_9_8		0x38 /* External horizontal duration (MSB) */
-#define HDMI_EXTERNAL_V_TOTAL_7_0		0x39 /* External vertical total (LSB) */
-#define HDMI_EXTERNAL_V_TOTAL_9_8		0x3A /* External vertical total (MSB) */
-#define HDMI_AUDIO_VIDEO_SETTING_2		0x3B /* Audio/Video setting.2 */
-#define HDMI_EXTERNAL_V_BLANK			0x3D /* External vertical blank */
-#define HDMI_EXTERNAL_V_DELAY			0x3E /* External vertical delay */
-#define HDMI_EXTERNAL_V_DURATION		0x3F /* External vertical duration */
-#define HDMI_CTRL_PKT_MANUAL_SEND_CONTROL	0x40 /* Control packet manual send control */
-#define HDMI_CTRL_PKT_AUTO_SEND			0x41 /* Control packet auto send with VSYNC control */
-#define HDMI_AUTO_CHECKSUM_OPTION		0x42 /* Auto checksum option */
-#define HDMI_VIDEO_SETTING_2			0x45 /* Video setting.2 */
-#define HDMI_OUTPUT_OPTION			0x46 /* Output option */
-#define HDMI_SLIPHDMIT_PARAM_OPTION		0x51 /* SLIPHDMIT parameter option */
-#define HDMI_HSYNC_PMENT_AT_EMB_7_0		0x52 /* HSYNC placement at embedded sync (LSB) */
-#define HDMI_HSYNC_PMENT_AT_EMB_15_8		0x53 /* HSYNC placement at embedded sync (MSB) */
-#define HDMI_VSYNC_PMENT_AT_EMB_7_0		0x54 /* VSYNC placement at embedded sync (LSB) */
-#define HDMI_VSYNC_PMENT_AT_EMB_14_8		0x55 /* VSYNC placement at embedded sync (MSB) */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_1		0x56 /* SLIPHDMIT parameter settings.1 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_2		0x57 /* SLIPHDMIT parameter settings.2 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_3		0x58 /* SLIPHDMIT parameter settings.3 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_5		0x59 /* SLIPHDMIT parameter settings.5 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_6		0x5A /* SLIPHDMIT parameter settings.6 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_7		0x5B /* SLIPHDMIT parameter settings.7 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_8		0x5C /* SLIPHDMIT parameter settings.8 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_9		0x5D /* SLIPHDMIT parameter settings.9 */
-#define HDMI_SLIPHDMIT_PARAM_SETTINGS_10	0x5E /* SLIPHDMIT parameter settings.10 */
-#define HDMI_CTRL_PKT_BUF_INDEX			0x5F /* Control packet buffer index */
-#define HDMI_CTRL_PKT_BUF_ACCESS_HB0		0x60 /* Control packet data buffer access window - HB0 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_HB1		0x61 /* Control packet data buffer access window - HB1 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_HB2		0x62 /* Control packet data buffer access window - HB2 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB0		0x63 /* Control packet data buffer access window - PB0 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB1		0x64 /* Control packet data buffer access window - PB1 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB2		0x65 /* Control packet data buffer access window - PB2 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB3		0x66 /* Control packet data buffer access window - PB3 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB4		0x67 /* Control packet data buffer access window - PB4 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB5		0x68 /* Control packet data buffer access window - PB5 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB6		0x69 /* Control packet data buffer access window - PB6 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB7		0x6A /* Control packet data buffer access window - PB7 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB8		0x6B /* Control packet data buffer access window - PB8 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB9		0x6C /* Control packet data buffer access window - PB9 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB10		0x6D /* Control packet data buffer access window - PB10 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB11		0x6E /* Control packet data buffer access window - PB11 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB12		0x6F /* Control packet data buffer access window - PB12 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB13		0x70 /* Control packet data buffer access window - PB13 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB14		0x71 /* Control packet data buffer access window - PB14 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB15		0x72 /* Control packet data buffer access window - PB15 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB16		0x73 /* Control packet data buffer access window - PB16 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB17		0x74 /* Control packet data buffer access window - PB17 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB18		0x75 /* Control packet data buffer access window - PB18 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB19		0x76 /* Control packet data buffer access window - PB19 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB20		0x77 /* Control packet data buffer access window - PB20 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB21		0x78 /* Control packet data buffer access window - PB21 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB22		0x79 /* Control packet data buffer access window - PB22 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB23		0x7A /* Control packet data buffer access window - PB23 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB24		0x7B /* Control packet data buffer access window - PB24 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB25		0x7C /* Control packet data buffer access window - PB25 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB26		0x7D /* Control packet data buffer access window - PB26 */
-#define HDMI_CTRL_PKT_BUF_ACCESS_PB27		0x7E /* Control packet data buffer access window - PB27 */
-#define HDMI_EDID_KSV_FIFO_ACCESS_WINDOW	0x80 /* EDID/KSV FIFO access window */
-#define HDMI_DDC_BUS_ACCESS_FREQ_CTRL_7_0	0x81 /* DDC bus access frequency control (LSB) */
-#define HDMI_DDC_BUS_ACCESS_FREQ_CTRL_15_8	0x82 /* DDC bus access frequency control (MSB) */
-#define HDMI_INTERRUPT_MASK_1			0x92 /* Interrupt mask.1 */
-#define HDMI_INTERRUPT_MASK_2			0x93 /* Interrupt mask.2 */
-#define HDMI_INTERRUPT_STATUS_1			0x94 /* Interrupt status.1 */
-#define HDMI_INTERRUPT_STATUS_2			0x95 /* Interrupt status.2 */
-#define HDMI_INTERRUPT_MASK_3			0x96 /* Interrupt mask.3 */
-#define HDMI_INTERRUPT_MASK_4			0x97 /* Interrupt mask.4 */
-#define HDMI_INTERRUPT_STATUS_3			0x98 /* Interrupt status.3 */
-#define HDMI_INTERRUPT_STATUS_4			0x99 /* Interrupt status.4 */
-#define HDMI_SOFTWARE_HDCP_CONTROL_1		0x9A /* Software HDCP control.1 */
-#define HDMI_FRAME_COUNTER			0x9C /* Frame counter */
-#define HDMI_FRAME_COUNTER_FOR_RI_CHECK		0x9D /* Frame counter for Ri check */
-#define HDMI_HDCP_CONTROL			0xAF /* HDCP control */
-#define HDMI_RI_FRAME_COUNT_REGISTER		0xB2 /* Ri frame count register */
-#define HDMI_DDC_BUS_CONTROL			0xB7 /* DDC bus control */
-#define HDMI_HDCP_STATUS			0xB8 /* HDCP status */
-#define HDMI_SHA0				0xB9 /* sha0 */
-#define HDMI_SHA1				0xBA /* sha1 */
-#define HDMI_SHA2				0xBB /* sha2 */
-#define HDMI_SHA3				0xBC /* sha3 */
-#define HDMI_SHA4				0xBD /* sha4 */
-#define HDMI_BCAPS_READ				0xBE /* BCAPS read / debug */
-#define HDMI_AKSV_BKSV_7_0_MONITOR		0xBF /* AKSV/BKSV[7:0] monitor */
-#define HDMI_AKSV_BKSV_15_8_MONITOR		0xC0 /* AKSV/BKSV[15:8] monitor */
-#define HDMI_AKSV_BKSV_23_16_MONITOR		0xC1 /* AKSV/BKSV[23:16] monitor */
-#define HDMI_AKSV_BKSV_31_24_MONITOR		0xC2 /* AKSV/BKSV[31:24] monitor */
-#define HDMI_AKSV_BKSV_39_32_MONITOR		0xC3 /* AKSV/BKSV[39:32] monitor */
-#define HDMI_EDID_SEGMENT_POINTER		0xC4 /* EDID segment pointer */
-#define HDMI_EDID_WORD_ADDRESS			0xC5 /* EDID word address */
-#define HDMI_EDID_DATA_FIFO_ADDRESS		0xC6 /* EDID data FIFO address */
-#define HDMI_NUM_OF_HDMI_DEVICES		0xC7 /* Number of HDMI devices */
-#define HDMI_HDCP_ERROR_CODE			0xC8 /* HDCP error code */
-#define HDMI_100MS_TIMER_SET			0xC9 /* 100ms timer setting */
-#define HDMI_5SEC_TIMER_SET			0xCA /* 5sec timer setting */
-#define HDMI_RI_READ_COUNT			0xCB /* Ri read count */
-#define HDMI_AN_SEED				0xCC /* An seed */
-#define HDMI_MAX_NUM_OF_RCIVRS_ALLOWED		0xCD /* Maximum number of receivers allowed */
-#define HDMI_HDCP_MEMORY_ACCESS_CONTROL_1	0xCE /* HDCP memory access control.1 */
-#define HDMI_HDCP_MEMORY_ACCESS_CONTROL_2	0xCF /* HDCP memory access control.2 */
-#define HDMI_HDCP_CONTROL_2			0xD0 /* HDCP Control 2 */
-#define HDMI_HDCP_KEY_MEMORY_CONTROL		0xD2 /* HDCP Key Memory Control */
-#define HDMI_COLOR_SPACE_CONV_CONFIG_1		0xD3 /* Color space conversion configuration.1 */
-#define HDMI_VIDEO_SETTING_3			0xD4 /* Video setting.3 */
-#define HDMI_RI_7_0				0xD5 /* Ri[7:0] */
-#define HDMI_RI_15_8				0xD6 /* Ri[15:8] */
-#define HDMI_PJ					0xD7 /* Pj */
-#define HDMI_SHA_RD				0xD8 /* sha_rd */
-#define HDMI_RI_7_0_SAVED			0xD9 /* Ri[7:0] saved */
-#define HDMI_RI_15_8_SAVED			0xDA /* Ri[15:8] saved */
-#define HDMI_PJ_SAVED				0xDB /* Pj saved */
-#define HDMI_NUM_OF_DEVICES			0xDC /* Number of devices */
-#define HDMI_HOT_PLUG_MSENS_STATUS		0xDF /* Hot plug/MSENS status */
-#define HDMI_BCAPS_WRITE			0xE0 /* bcaps */
-#define HDMI_BSTAT_7_0				0xE1 /* bstat[7:0] */
-#define HDMI_BSTAT_15_8				0xE2 /* bstat[15:8] */
-#define HDMI_BKSV_7_0				0xE3 /* bksv[7:0] */
-#define HDMI_BKSV_15_8				0xE4 /* bksv[15:8] */
-#define HDMI_BKSV_23_16				0xE5 /* bksv[23:16] */
-#define HDMI_BKSV_31_24				0xE6 /* bksv[31:24] */
-#define HDMI_BKSV_39_32				0xE7 /* bksv[39:32] */
-#define HDMI_AN_7_0				0xE8 /* An[7:0] */
-#define HDMI_AN_15_8				0xE9 /* An [15:8] */
-#define HDMI_AN_23_16				0xEA /* An [23:16] */
-#define HDMI_AN_31_24				0xEB /* An [31:24] */
-#define HDMI_AN_39_32				0xEC /* An [39:32] */
-#define HDMI_AN_47_40				0xED /* An [47:40] */
-#define HDMI_AN_55_48				0xEE /* An [55:48] */
-#define HDMI_AN_63_56				0xEF /* An [63:56] */
-#define HDMI_PRODUCT_ID				0xF0 /* Product ID */
-#define HDMI_REVISION_ID			0xF1 /* Revision ID */
-#define HDMI_TEST_MODE				0xFE /* Test mode */
-
-/* HDMI Control Register (HTOP1) */
-#define HDMI_HTOP1_TEST_MODE			0x0000 /* Test mode */
-#define HDMI_HTOP1_VIDEO_INPUT			0x0008 /* VideoInput */
-#define HDMI_HTOP1_CORE_RSTN			0x000C /* CoreResetn */
-#define HDMI_HTOP1_PLLBW			0x0018 /* PLLBW */
-#define HDMI_HTOP1_CLK_TO_PHY			0x001C /* Clk to Phy */
-#define HDMI_HTOP1_VIDEO_INPUT2			0x0020 /* VideoInput2 */
-#define HDMI_HTOP1_TISEMP0_1			0x0024 /* tisemp0-1 */
-#define HDMI_HTOP1_TISEMP2_C			0x0028 /* tisemp2-c */
-#define HDMI_HTOP1_TISIDRV			0x002C /* tisidrv */
-#define HDMI_HTOP1_TISEN			0x0034 /* tisen */
-#define HDMI_HTOP1_TISDREN			0x0038 /* tisdren  */
-#define HDMI_HTOP1_CISRANGE			0x003C /* cisrange  */
-#define HDMI_HTOP1_ENABLE_SELECTOR		0x0040 /* Enable Selector */
-#define HDMI_HTOP1_MACRO_RESET			0x0044 /* Macro reset */
-#define HDMI_HTOP1_PLL_CALIBRATION		0x0048 /* PLL calibration */
-#define HDMI_HTOP1_RE_CALIBRATION		0x004C /* Re-calibration */
-#define HDMI_HTOP1_CURRENT			0x0050 /* Current */
-#define HDMI_HTOP1_PLL_LOCK_DETECT		0x0054 /* PLL lock detect */
-#define HDMI_HTOP1_PHY_TEST_MODE		0x0058 /* PHY Test Mode */
-#define HDMI_HTOP1_CLK_SET			0x0080 /* Clock Set */
-#define HDMI_HTOP1_DDC_FAIL_SAFE		0x0084 /* DDC fail safe */
-#define HDMI_HTOP1_PRBS				0x0088 /* PRBS */
-#define HDMI_HTOP1_EDID_AINC_CONTROL		0x008C /* EDID ainc Control */
-#define HDMI_HTOP1_HTOP_DCL_MODE		0x00FC /* Deep Coloer Mode */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF0		0x0100 /* Deep Color:FRC COEF0 */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF1		0x0104 /* Deep Color:FRC COEF1 */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF2		0x0108 /* Deep Color:FRC COEF2 */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF3		0x010C /* Deep Color:FRC COEF3 */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF0_C		0x0110 /* Deep Color:FRC COEF0C */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF1_C		0x0114 /* Deep Color:FRC COEF1C */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF2_C		0x0118 /* Deep Color:FRC COEF2C */
-#define HDMI_HTOP1_HTOP_DCL_FRC_COEF3_C		0x011C /* Deep Color:FRC COEF3C */
-#define HDMI_HTOP1_HTOP_DCL_FRC_MODE		0x0120 /* Deep Color:FRC Mode */
-#define HDMI_HTOP1_HTOP_DCL_RECT_START1		0x0124 /* Deep Color:Rect Start1 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_SIZE1		0x0128 /* Deep Color:Rect Size1 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_START2		0x012C /* Deep Color:Rect Start2 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_SIZE2		0x0130 /* Deep Color:Rect Size2 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_START3		0x0134 /* Deep Color:Rect Start3 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_SIZE3		0x0138 /* Deep Color:Rect Size3 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_START4		0x013C /* Deep Color:Rect Start4 */
-#define HDMI_HTOP1_HTOP_DCL_RECT_SIZE4		0x0140 /* Deep Color:Rect Size4 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y1_1	0x0144 /* Deep Color:Fil Para Y1_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y1_2	0x0148 /* Deep Color:Fil Para Y1_2 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB1_1	0x014C /* Deep Color:Fil Para CB1_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB1_2	0x0150 /* Deep Color:Fil Para CB1_2 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR1_1	0x0154 /* Deep Color:Fil Para CR1_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR1_2	0x0158 /* Deep Color:Fil Para CR1_2 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y2_1	0x015C /* Deep Color:Fil Para Y2_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y2_2	0x0160 /* Deep Color:Fil Para Y2_2 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB2_1	0x0164 /* Deep Color:Fil Para CB2_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB2_2	0x0168 /* Deep Color:Fil Para CB2_2 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR2_1	0x016C /* Deep Color:Fil Para CR2_1 */
-#define HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR2_2	0x0170 /* Deep Color:Fil Para CR2_2 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_Y1		0x0174 /* Deep Color:Cor Para Y1 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_CB1	0x0178 /* Deep Color:Cor Para CB1 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_CR1	0x017C /* Deep Color:Cor Para CR1 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_Y2		0x0180 /* Deep Color:Cor Para Y2 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_CB2	0x0184 /* Deep Color:Cor Para CB2 */
-#define HDMI_HTOP1_HTOP_DCL_COR_PARA_CR2	0x0188 /* Deep Color:Cor Para CR2 */
-#define HDMI_HTOP1_EDID_DATA_READ		0x0200 /* EDID Data Read 128Byte:0x03FC */
-
-enum hotplug_state {
-	HDMI_HOTPLUG_DISCONNECTED,
-	HDMI_HOTPLUG_CONNECTED,
-	HDMI_HOTPLUG_EDID_DONE,
-};
-
-struct sh_hdmi {
-	struct sh_mobile_lcdc_entity entity;
-
-	void __iomem *base;
-	void __iomem *htop1;
-	enum hotplug_state hp_state;	/* hot-plug status */
-	u8 preprogrammed_vic;		/* use a pre-programmed VIC or
-					   the external mode */
-	u8 edid_block_addr;
-	u8 edid_segment_nr;
-	u8 edid_blocks;
-	int irq;
-	struct clk *hdmi_clk;
-	struct device *dev;
-	struct delayed_work edid_work;
-	struct fb_videomode mode;
-	struct fb_monspecs monspec;
-
-	/* register access functions */
-	void (*write)(struct sh_hdmi *hdmi, u8 data, u8 reg);
-	u8 (*read)(struct sh_hdmi *hdmi, u8 reg);
-};
-
-#define entity_to_sh_hdmi(e)	container_of(e, struct sh_hdmi, entity)
-
-static void __hdmi_write8(struct sh_hdmi *hdmi, u8 data, u8 reg)
-{
-	iowrite8(data, hdmi->base + reg);
-}
-
-static u8 __hdmi_read8(struct sh_hdmi *hdmi, u8 reg)
-{
-	return ioread8(hdmi->base + reg);
-}
-
-static void __hdmi_write32(struct sh_hdmi *hdmi, u8 data, u8 reg)
-{
-	iowrite32((u32)data, hdmi->base + (reg * 4));
-	udelay(100);
-}
-
-static u8 __hdmi_read32(struct sh_hdmi *hdmi, u8 reg)
-{
-	return (u8)ioread32(hdmi->base + (reg * 4));
-}
-
-static void hdmi_write(struct sh_hdmi *hdmi, u8 data, u8 reg)
-{
-	hdmi->write(hdmi, data, reg);
-}
-
-static u8 hdmi_read(struct sh_hdmi *hdmi, u8 reg)
-{
-	return hdmi->read(hdmi, reg);
-}
-
-static void hdmi_bit_set(struct sh_hdmi *hdmi, u8 mask, u8 data, u8 reg)
-{
-	u8 val = hdmi_read(hdmi, reg);
-
-	val &= ~mask;
-	val |= (data & mask);
-
-	hdmi_write(hdmi, val, reg);
-}
-
-static void hdmi_htop1_write(struct sh_hdmi *hdmi, u32 data, u32 reg)
-{
-	iowrite32(data, hdmi->htop1 + reg);
-	udelay(100);
-}
-
-static u32 hdmi_htop1_read(struct sh_hdmi *hdmi, u32 reg)
-{
-	return ioread32(hdmi->htop1 + reg);
-}
-
-/*
- *	HDMI sound
- */
-static unsigned int sh_hdmi_snd_read(struct snd_soc_codec *codec,
-				     unsigned int reg)
-{
-	struct sh_hdmi *hdmi = snd_soc_codec_get_drvdata(codec);
-
-	return hdmi_read(hdmi, reg);
-}
-
-static int sh_hdmi_snd_write(struct snd_soc_codec *codec,
-			     unsigned int reg,
-			     unsigned int value)
-{
-	struct sh_hdmi *hdmi = snd_soc_codec_get_drvdata(codec);
-
-	hdmi_write(hdmi, value, reg);
-	return 0;
-}
-
-static struct snd_soc_dai_driver sh_hdmi_dai = {
-	.name = "sh_mobile_hdmi-hifi",
-	.playback = {
-		.stream_name = "Playback",
-		.channels_min = 2,
-		.channels_max = 8,
-		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100  |
-			 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200  |
-			 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |
-			 SNDRV_PCM_RATE_192000,
-		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
-	},
-};
-
-static int sh_hdmi_snd_probe(struct snd_soc_codec *codec)
-{
-	dev_info(codec->dev, "SH Mobile HDMI Audio Codec");
-
-	return 0;
-}
-
-static struct snd_soc_codec_driver soc_codec_dev_sh_hdmi = {
-	.probe		= sh_hdmi_snd_probe,
-	.read		= sh_hdmi_snd_read,
-	.write		= sh_hdmi_snd_write,
-};
-
-/*
- *	HDMI video
- */
-
-/* External video parameter settings */
-static void sh_hdmi_external_video_param(struct sh_hdmi *hdmi)
-{
-	struct fb_videomode *mode = &hdmi->mode;
-	u16 htotal, hblank, hdelay, vtotal, vblank, vdelay, voffset;
-	u8 sync = 0;
-
-	htotal = mode->xres + mode->right_margin + mode->left_margin
-	       + mode->hsync_len;
-	hdelay = mode->hsync_len + mode->left_margin;
-	hblank = mode->right_margin + hdelay;
-
-	/*
-	 * Vertical timing looks a bit different in Figure 18,
-	 * but let's try the same first by setting offset = 0
-	 */
-	vtotal = mode->yres + mode->upper_margin + mode->lower_margin
-	       + mode->vsync_len;
-	vdelay = mode->vsync_len + mode->upper_margin;
-	vblank = mode->lower_margin + vdelay;
-	voffset = min(mode->upper_margin / 2, 6U);
-
-	/*
-	 * [3]: VSYNC polarity: Positive
-	 * [2]: HSYNC polarity: Positive
-	 * [1]: Interlace/Progressive: Progressive
-	 * [0]: External video settings enable: used.
-	 */
-	if (mode->sync & FB_SYNC_HOR_HIGH_ACT)
-		sync |= 4;
-	if (mode->sync & FB_SYNC_VERT_HIGH_ACT)
-		sync |= 8;
-
-	dev_dbg(hdmi->dev, "H: %u, %u, %u, %u; V: %u, %u, %u, %u; sync 0x%x\n",
-		htotal, hblank, hdelay, mode->hsync_len,
-		vtotal, vblank, vdelay, mode->vsync_len, sync);
-
-	hdmi_write(hdmi, sync | (voffset << 4), HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS);
-
-	hdmi_write(hdmi, htotal, HDMI_EXTERNAL_H_TOTAL_7_0);
-	hdmi_write(hdmi, htotal >> 8, HDMI_EXTERNAL_H_TOTAL_11_8);
-
-	hdmi_write(hdmi, hblank, HDMI_EXTERNAL_H_BLANK_7_0);
-	hdmi_write(hdmi, hblank >> 8, HDMI_EXTERNAL_H_BLANK_9_8);
-
-	hdmi_write(hdmi, hdelay, HDMI_EXTERNAL_H_DELAY_7_0);
-	hdmi_write(hdmi, hdelay >> 8, HDMI_EXTERNAL_H_DELAY_9_8);
-
-	hdmi_write(hdmi, mode->hsync_len, HDMI_EXTERNAL_H_DURATION_7_0);
-	hdmi_write(hdmi, mode->hsync_len >> 8, HDMI_EXTERNAL_H_DURATION_9_8);
-
-	hdmi_write(hdmi, vtotal, HDMI_EXTERNAL_V_TOTAL_7_0);
-	hdmi_write(hdmi, vtotal >> 8, HDMI_EXTERNAL_V_TOTAL_9_8);
-
-	hdmi_write(hdmi, vblank, HDMI_EXTERNAL_V_BLANK);
-
-	hdmi_write(hdmi, vdelay, HDMI_EXTERNAL_V_DELAY);
-
-	hdmi_write(hdmi, mode->vsync_len, HDMI_EXTERNAL_V_DURATION);
-
-	/* Set bit 0 of HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS here for external mode */
-	if (!hdmi->preprogrammed_vic)
-		hdmi_write(hdmi, sync | 1 | (voffset << 4),
-			   HDMI_EXTERNAL_VIDEO_PARAM_SETTINGS);
-}
-
-/**
- * sh_hdmi_video_config()
- */
-static void sh_hdmi_video_config(struct sh_hdmi *hdmi)
-{
-	/*
-	 * [7:4]: Audio sampling frequency: 48kHz
-	 * [3:1]: Input video format: RGB and YCbCr 4:4:4 (Y on Green)
-	 * [0]: Internal/External DE select: internal
-	 */
-	hdmi_write(hdmi, 0x20, HDMI_AUDIO_VIDEO_SETTING_1);
-
-	/*
-	 * [7:6]: Video output format: RGB 4:4:4
-	 * [5:4]: Input video data width: 8 bit
-	 * [3:1]: EAV/SAV location: channel 1
-	 * [0]: Video input color space: RGB
-	 */
-	hdmi_write(hdmi, 0x34, HDMI_VIDEO_SETTING_1);
-
-	/*
-	 * [7:6]: Together with bit [6] of HDMI_AUDIO_VIDEO_SETTING_2, which is
-	 * left at 0 by default, this configures 24bpp and sets the Color Depth
-	 * (CD) field in the General Control Packet
-	 */
-	hdmi_write(hdmi, 0x20, HDMI_DEEP_COLOR_MODES);
-}
-
-/**
- * sh_hdmi_audio_config()
- */
-static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
-{
-	u8 data;
-	struct sh_mobile_hdmi_info *pdata = dev_get_platdata(hdmi->dev);
-
-	/*
-	 * [7:4] L/R data swap control
-	 * [3:0] appropriate N[19:16]
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_L_R_DATA_SWAP_CTRL_RPKT);
-	/* appropriate N[15:8] */
-	hdmi_write(hdmi, 0x18, HDMI_20_BIT_N_FOR_AUDIO_RPKT_15_8);
-	/* appropriate N[7:0] */
-	hdmi_write(hdmi, 0x00, HDMI_20_BIT_N_FOR_AUDIO_RPKT_7_0);
-
-	/* [7:4] 48 kHz	SPDIF not used */
-	hdmi_write(hdmi, 0x20, HDMI_SPDIF_AUDIO_SAMP_FREQ_CTS);
-
-	/*
-	 * [6:5] set required down sampling rate if required
-	 * [4:3] set required audio source
-	 */
-	switch (pdata->flags & HDMI_SND_SRC_MASK) {
-	default:
-		/* fall through */
-	case HDMI_SND_SRC_I2S:
-		data = 0x0 << 3;
-		break;
-	case HDMI_SND_SRC_SPDIF:
-		data = 0x1 << 3;
-		break;
-	case HDMI_SND_SRC_DSD:
-		data = 0x2 << 3;
-		break;
-	case HDMI_SND_SRC_HBR:
-		data = 0x3 << 3;
-		break;
-	}
-	hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1);
-
-	/* [3:0] set sending channel number for channel status */
-	hdmi_write(hdmi, 0x40, HDMI_AUDIO_SETTING_2);
-
-	/*
-	 * [5:2] set valid I2S source input pin
-	 * [1:0] set input I2S source mode
-	 */
-	hdmi_write(hdmi, 0x04, HDMI_I2S_AUDIO_SET);
-
-	/* [7:4] set valid DSD source input pin */
-	hdmi_write(hdmi, 0x00, HDMI_DSD_AUDIO_SET);
-
-	/* [7:0] set appropriate I2S input pin swap settings if required */
-	hdmi_write(hdmi, 0x00, HDMI_I2S_INPUT_PIN_SWAP);
-
-	/*
-	 * [7] set validity bit for channel status
-	 * [3:0] set original sample frequency for channel status
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_AUDIO_STATUS_BITS_SETTING_1);
-
-	/*
-	 * [7] set value for channel status
-	 * [6] set value for channel status
-	 * [5] set copyright bit for channel status
-	 * [4:2] set additional information for channel status
-	 * [1:0] set clock accuracy for channel status
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_AUDIO_STATUS_BITS_SETTING_2);
-
-	/* [7:0] set category code for channel status */
-	hdmi_write(hdmi, 0x00, HDMI_CATEGORY_CODE);
-
-	/*
-	 * [7:4] set source number for channel status
-	 * [3:0] set word length for channel status
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_SOURCE_NUM_AUDIO_WORD_LEN);
-
-	/* [7:4] set sample frequency for channel status */
-	hdmi_write(hdmi, 0x20, HDMI_AUDIO_VIDEO_SETTING_1);
-}
-
-/**
- * sh_hdmi_phy_config() - configure the HDMI PHY for the used video mode
- */
-static void sh_hdmi_phy_config(struct sh_hdmi *hdmi)
-{
-	if (hdmi->mode.pixclock < 10000) {
-		/* for 1080p8bit 148MHz */
-		hdmi_write(hdmi, 0x1d, HDMI_SLIPHDMIT_PARAM_SETTINGS_1);
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_2);
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_3);
-		hdmi_write(hdmi, 0x4c, HDMI_SLIPHDMIT_PARAM_SETTINGS_5);
-		hdmi_write(hdmi, 0x1e, HDMI_SLIPHDMIT_PARAM_SETTINGS_6);
-		hdmi_write(hdmi, 0x48, HDMI_SLIPHDMIT_PARAM_SETTINGS_7);
-		hdmi_write(hdmi, 0x0e, HDMI_SLIPHDMIT_PARAM_SETTINGS_8);
-		hdmi_write(hdmi, 0x25, HDMI_SLIPHDMIT_PARAM_SETTINGS_9);
-		hdmi_write(hdmi, 0x04, HDMI_SLIPHDMIT_PARAM_SETTINGS_10);
-	} else if (hdmi->mode.pixclock < 30000) {
-		/* 720p, 8bit, 74.25MHz. Might need to be adjusted for other formats */
-		/*
-		 * [1:0]	Speed_A
-		 * [3:2]	Speed_B
-		 * [4]		PLLA_Bypass
-		 * [6]		DRV_TEST_EN
-		 * [7]		DRV_TEST_IN
-		 */
-		hdmi_write(hdmi, 0x0f, HDMI_SLIPHDMIT_PARAM_SETTINGS_1);
-		/* PLLB_CONFIG[17], PLLA_CONFIG[17] - not in PHY datasheet */
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_2);
-		/*
-		 * [2:0]	BGR_I_OFFSET
-		 * [6:4]	BGR_V_OFFSET
-		 */
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_3);
-		/* PLLA_CONFIG[7:0]: VCO gain, VCO offset, LPF resistance[0] */
-		hdmi_write(hdmi, 0x44, HDMI_SLIPHDMIT_PARAM_SETTINGS_5);
-		/*
-		 * PLLA_CONFIG[15:8]: regulator voltage[0], CP current,
-		 * LPF capacitance, LPF resistance[1]
-		 */
-		hdmi_write(hdmi, 0x32, HDMI_SLIPHDMIT_PARAM_SETTINGS_6);
-		/* PLLB_CONFIG[7:0]: LPF resistance[0], VCO offset, VCO gain */
-		hdmi_write(hdmi, 0x4A, HDMI_SLIPHDMIT_PARAM_SETTINGS_7);
-		/*
-		 * PLLB_CONFIG[15:8]: regulator voltage[0], CP current,
-		 * LPF capacitance, LPF resistance[1]
-		 */
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_8);
-		/* DRV_CONFIG, PE_CONFIG */
-		hdmi_write(hdmi, 0x25, HDMI_SLIPHDMIT_PARAM_SETTINGS_9);
-		/*
-		 * [2:0]	AMON_SEL (4 == LPF voltage)
-		 * [4]		PLLA_CONFIG[16]
-		 * [5]		PLLB_CONFIG[16]
-		 */
-		hdmi_write(hdmi, 0x04, HDMI_SLIPHDMIT_PARAM_SETTINGS_10);
-	} else {
-		/* for 480p8bit 27MHz */
-		hdmi_write(hdmi, 0x19, HDMI_SLIPHDMIT_PARAM_SETTINGS_1);
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_2);
-		hdmi_write(hdmi, 0x00, HDMI_SLIPHDMIT_PARAM_SETTINGS_3);
-		hdmi_write(hdmi, 0x44, HDMI_SLIPHDMIT_PARAM_SETTINGS_5);
-		hdmi_write(hdmi, 0x32, HDMI_SLIPHDMIT_PARAM_SETTINGS_6);
-		hdmi_write(hdmi, 0x48, HDMI_SLIPHDMIT_PARAM_SETTINGS_7);
-		hdmi_write(hdmi, 0x0F, HDMI_SLIPHDMIT_PARAM_SETTINGS_8);
-		hdmi_write(hdmi, 0x20, HDMI_SLIPHDMIT_PARAM_SETTINGS_9);
-		hdmi_write(hdmi, 0x04, HDMI_SLIPHDMIT_PARAM_SETTINGS_10);
-	}
-}
-
-/**
- * sh_hdmi_avi_infoframe_setup() - Auxiliary Video Information InfoFrame CONTROL PACKET
- */
-static void sh_hdmi_avi_infoframe_setup(struct sh_hdmi *hdmi)
-{
-	u8 vic;
-
-	/* AVI InfoFrame */
-	hdmi_write(hdmi, 0x06, HDMI_CTRL_PKT_BUF_INDEX);
-
-	/* Packet Type = 0x82 */
-	hdmi_write(hdmi, 0x82, HDMI_CTRL_PKT_BUF_ACCESS_HB0);
-
-	/* Version = 0x02 */
-	hdmi_write(hdmi, 0x02, HDMI_CTRL_PKT_BUF_ACCESS_HB1);
-
-	/* Length = 13 (0x0D) */
-	hdmi_write(hdmi, 0x0D, HDMI_CTRL_PKT_BUF_ACCESS_HB2);
-
-	/* N. A. Checksum */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB0);
-
-	/*
-	 * Y = RGB
-	 * A0 = No Data
-	 * B = Bar Data not valid
-	 * S = No Data
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB1);
-
-	/*
-	 * [7:6] C = Colorimetry: no data
-	 * [5:4] M = 2: 16:9, 1: 4:3 Picture Aspect Ratio
-	 * [3:0] R = 8: Active Frame Aspect Ratio: same as picture aspect ratio
-	 */
-	hdmi_write(hdmi, 0x28, HDMI_CTRL_PKT_BUF_ACCESS_PB2);
-
-	/*
-	 * ITC = No Data
-	 * EC = xvYCC601
-	 * Q = Default (depends on video format)
-	 * SC = No Known non_uniform Scaling
-	 */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB3);
-
-	/*
-	 * VIC should be ignored if external config is used, so, we could just use 0,
-	 * but play safe and use a valid value in any case just in case
-	 */
-	if (hdmi->preprogrammed_vic)
-		vic = hdmi->preprogrammed_vic;
-	else
-		vic = 4;
-	hdmi_write(hdmi, vic, HDMI_CTRL_PKT_BUF_ACCESS_PB4);
-
-	/* PR = No Repetition */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB5);
-
-	/* Line Number of End of Top Bar (lower 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB6);
-
-	/* Line Number of End of Top Bar (upper 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB7);
-
-	/* Line Number of Start of Bottom Bar (lower 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB8);
-
-	/* Line Number of Start of Bottom Bar (upper 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB9);
-
-	/* Pixel Number of End of Left Bar (lower 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB10);
-
-	/* Pixel Number of End of Left Bar (upper 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB11);
-
-	/* Pixel Number of Start of Right Bar (lower 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB12);
-
-	/* Pixel Number of Start of Right Bar (upper 8 bits) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB13);
-}
-
-/**
- * sh_hdmi_audio_infoframe_setup() - Audio InfoFrame of CONTROL PACKET
- */
-static void sh_hdmi_audio_infoframe_setup(struct sh_hdmi *hdmi)
-{
-	/* Audio InfoFrame */
-	hdmi_write(hdmi, 0x08, HDMI_CTRL_PKT_BUF_INDEX);
-
-	/* Packet Type = 0x84 */
-	hdmi_write(hdmi, 0x84, HDMI_CTRL_PKT_BUF_ACCESS_HB0);
-
-	/* Version Number = 0x01 */
-	hdmi_write(hdmi, 0x01, HDMI_CTRL_PKT_BUF_ACCESS_HB1);
-
-	/* 0 Length = 10 (0x0A) */
-	hdmi_write(hdmi, 0x0A, HDMI_CTRL_PKT_BUF_ACCESS_HB2);
-
-	/* n. a. Checksum */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB0);
-
-	/* Audio Channel Count = Refer to Stream Header */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB1);
-
-	/* Refer to Stream Header */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB2);
-
-	/* Format depends on coding type (i.e. CT0...CT3) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB3);
-
-	/* Speaker Channel Allocation = Front Right + Front Left */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB4);
-
-	/* Level Shift Value = 0 dB, Down - mix is permitted or no information */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB5);
-
-	/* Reserved (0) */
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB6);
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB7);
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB8);
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB9);
-	hdmi_write(hdmi, 0x00, HDMI_CTRL_PKT_BUF_ACCESS_PB10);
-}
-
-/**
- * sh_hdmi_configure() - Initialise HDMI for output
- */
-static void sh_hdmi_configure(struct sh_hdmi *hdmi)
-{
-	/* Configure video format */
-	sh_hdmi_video_config(hdmi);
-
-	/* Configure audio format */
-	sh_hdmi_audio_config(hdmi);
-
-	/* Configure PHY */
-	sh_hdmi_phy_config(hdmi);
-
-	/* Auxiliary Video Information (AVI) InfoFrame */
-	sh_hdmi_avi_infoframe_setup(hdmi);
-
-	/* Audio InfoFrame */
-	sh_hdmi_audio_infoframe_setup(hdmi);
-
-	/*
-	 * Control packet auto send with VSYNC control: auto send
-	 * General control, Gamut metadata, ISRC, and ACP packets
-	 */
-	hdmi_write(hdmi, 0x8E, HDMI_CTRL_PKT_AUTO_SEND);
-
-	/* FIXME */
-	msleep(10);
-
-	/* PS mode b->d, reset PLLA and PLLB */
-	hdmi_bit_set(hdmi, 0xFC, 0x4C, HDMI_SYSTEM_CTRL);
-
-	udelay(10);
-
-	hdmi_bit_set(hdmi, 0xFC, 0x40, HDMI_SYSTEM_CTRL);
-}
-
-static unsigned long sh_hdmi_rate_error(struct sh_hdmi *hdmi,
-		const struct fb_videomode *mode,
-		unsigned long *hdmi_rate, unsigned long *parent_rate)
-{
-	unsigned long target = PICOS2KHZ(mode->pixclock) * 1000, rate_error;
-	struct sh_mobile_hdmi_info *pdata = dev_get_platdata(hdmi->dev);
-
-	*hdmi_rate = clk_round_rate(hdmi->hdmi_clk, target);
-	if ((long)*hdmi_rate < 0)
-		*hdmi_rate = clk_get_rate(hdmi->hdmi_clk);
-
-	rate_error = (long)*hdmi_rate > 0 ? abs(*hdmi_rate - target) : ULONG_MAX;
-	if (rate_error && pdata->clk_optimize_parent)
-		rate_error = pdata->clk_optimize_parent(target, hdmi_rate, parent_rate);
-	else if (clk_get_parent(hdmi->hdmi_clk))
-		*parent_rate = clk_get_rate(clk_get_parent(hdmi->hdmi_clk));
-
-	dev_dbg(hdmi->dev, "%u-%u-%u-%u x %u-%u-%u-%u\n",
-		mode->left_margin, mode->xres,
-		mode->right_margin, mode->hsync_len,
-		mode->upper_margin, mode->yres,
-		mode->lower_margin, mode->vsync_len);
-
-	dev_dbg(hdmi->dev, "\t@%lu(+/-%lu)Hz, e=%lu / 1000, r=%uHz, p=%luHz\n", target,
-		rate_error, rate_error ? 10000 / (10 * target / rate_error) : 0,
-		mode->refresh, *parent_rate);
-
-	return rate_error;
-}
-
-static int sh_hdmi_read_edid(struct sh_hdmi *hdmi, unsigned long *hdmi_rate,
-			     unsigned long *parent_rate)
-{
-	struct sh_mobile_lcdc_chan *ch = hdmi->entity.lcdc;
-	const struct fb_videomode *mode, *found = NULL;
-	unsigned int f_width = 0, f_height = 0, f_refresh = 0;
-	unsigned long found_rate_error = ULONG_MAX; /* silly compiler... */
-	bool scanning = false, preferred_bad = false;
-	bool use_edid_mode = false;
-	u8 edid[128];
-	char *forced;
-	int i;
-
-	/* Read EDID */
-	dev_dbg(hdmi->dev, "Read back EDID code:");
-	for (i = 0; i < 128; i++) {
-		edid[i] = (hdmi->htop1) ?
-			(u8)hdmi_htop1_read(hdmi, HDMI_HTOP1_EDID_DATA_READ + (i * 4)) :
-			hdmi_read(hdmi, HDMI_EDID_KSV_FIFO_ACCESS_WINDOW);
-#ifdef DEBUG
-		if ((i % 16) == 0) {
-			printk(KERN_CONT "\n");
-			printk(KERN_DEBUG "%02X | %02X", i, edid[i]);
-		} else {
-			printk(KERN_CONT " %02X", edid[i]);
-		}
-#endif
-	}
-#ifdef DEBUG
-	printk(KERN_CONT "\n");
-#endif
-
-	if (!hdmi->edid_blocks) {
-		fb_edid_to_monspecs(edid, &hdmi->monspec);
-		hdmi->edid_blocks = edid[126] + 1;
-
-		dev_dbg(hdmi->dev, "%d main modes, %d extension blocks\n",
-			hdmi->monspec.modedb_len, hdmi->edid_blocks - 1);
-	} else {
-		dev_dbg(hdmi->dev, "Extension %u detected, DTD start %u\n",
-			edid[0], edid[2]);
-		fb_edid_add_monspecs(edid, &hdmi->monspec);
-	}
-
-	if (hdmi->edid_blocks > hdmi->edid_segment_nr * 2 +
-	    (hdmi->edid_block_addr >> 7) + 1) {
-		/* More blocks to read */
-		if (hdmi->edid_block_addr) {
-			hdmi->edid_block_addr = 0;
-			hdmi->edid_segment_nr++;
-		} else {
-			hdmi->edid_block_addr = 0x80;
-		}
-		/* Set EDID word address  */
-		hdmi_write(hdmi, hdmi->edid_block_addr, HDMI_EDID_WORD_ADDRESS);
-		/* Enable EDID interrupt */
-		hdmi_write(hdmi, 0xC6, HDMI_INTERRUPT_MASK_1);
-		/* Set EDID segment pointer - starts reading EDID */
-		hdmi_write(hdmi, hdmi->edid_segment_nr, HDMI_EDID_SEGMENT_POINTER);
-		return -EAGAIN;
-	}
-
-	/* All E-EDID blocks ready */
-	dev_dbg(hdmi->dev, "%d main and extended modes\n", hdmi->monspec.modedb_len);
-
-	fb_get_options("sh_mobile_lcdc", &forced);
-	if (forced && *forced) {
-		/* Only primitive parsing so far */
-		i = sscanf(forced, "%ux%u@%u",
-			   &f_width, &f_height, &f_refresh);
-		if (i < 2) {
-			f_width = 0;
-			f_height = 0;
-		} else {
-			/* The user wants us to use the EDID data */
-			scanning = true;
-		}
-		dev_dbg(hdmi->dev, "Forced mode %ux%u@%uHz\n",
-			f_width, f_height, f_refresh);
-	}
-
-	/* Walk monitor modes to find the best or the exact match */
-	for (i = 0, mode = hdmi->monspec.modedb;
-	     i < hdmi->monspec.modedb_len && scanning;
-	     i++, mode++) {
-		unsigned long rate_error;
-
-		if (!f_width && !f_height) {
-			/*
-			 * A parameter string "video=sh_mobile_lcdc:0x0" means
-			 * use the preferred EDID mode. If it is rejected by
-			 * .fb_check_var(), keep looking, until an acceptable
-			 * one is found.
-			 */
-			if ((mode->flag & FB_MODE_IS_FIRST) || preferred_bad)
-				scanning = false;
-			else
-				continue;
-		} else if (f_width != mode->xres || f_height != mode->yres) {
-			/* No interest in unmatching modes */
-			continue;
-		}
-
-		rate_error = sh_hdmi_rate_error(hdmi, mode, hdmi_rate, parent_rate);
-
-		if (scanning) {
-			if (f_refresh == mode->refresh || (!f_refresh && !rate_error))
-				/*
-				 * Exact match if either the refresh rate
-				 * matches or it hasn't been specified and we've
-				 * found a mode, for which we can configure the
-				 * clock precisely
-				 */
-				scanning = false;
-			else if (found && found_rate_error <= rate_error)
-				/*
-				 * We otherwise search for the closest matching
-				 * clock rate - either if no refresh rate has
-				 * been specified or we cannot find an exactly
-				 * matching one
-				 */
-				continue;
-		}
-
-		/* Check if supported: sufficient fb memory, supported clock-rate */
-		if (ch && ch->notify &&
-		    ch->notify(ch, SH_MOBILE_LCDC_EVENT_DISPLAY_MODE, mode,
-			       NULL)) {
-			scanning = true;
-			preferred_bad = true;
-			continue;
-		}
-
-		found = mode;
-		found_rate_error = rate_error;
-		use_edid_mode = true;
-	}
-
-	/*
-	 * TODO 1: if no default mode is present, postpone running the config
-	 * until after the LCDC channel is initialized.
-	 * TODO 2: consider registering the HDMI platform device from the LCDC
-	 * driver.
-	 */
-	if (!found && hdmi->entity.def_mode.xres != 0) {
-		found = &hdmi->entity.def_mode;
-		found_rate_error = sh_hdmi_rate_error(hdmi, found, hdmi_rate,
-						      parent_rate);
-	}
-
-	/* No cookie today */
-	if (!found)
-		return -ENXIO;
-
-	if (found->xres == 640 && found->yres == 480 && found->refresh == 60)
-		hdmi->preprogrammed_vic = 1;
-	else if (found->xres == 720 && found->yres == 480 && found->refresh == 60)
-		hdmi->preprogrammed_vic = 2;
-	else if (found->xres == 720 && found->yres == 576 && found->refresh == 50)
-		hdmi->preprogrammed_vic = 17;
-	else if (found->xres == 1280 && found->yres == 720 && found->refresh == 60)
-		hdmi->preprogrammed_vic = 4;
-	else if (found->xres == 1920 && found->yres == 1080 && found->refresh == 24)
-		hdmi->preprogrammed_vic = 32;
-	else if (found->xres == 1920 && found->yres == 1080 && found->refresh == 50)
-		hdmi->preprogrammed_vic = 31;
-	else if (found->xres == 1920 && found->yres == 1080 && found->refresh == 60)
-		hdmi->preprogrammed_vic = 16;
-	else
-		hdmi->preprogrammed_vic = 0;
-
-	dev_dbg(hdmi->dev, "Using %s %s mode %ux%u@%uHz (%luHz), "
-		"clock error %luHz\n", use_edid_mode ? "EDID" : "default",
-		hdmi->preprogrammed_vic ? "VIC" : "external", found->xres,
-		found->yres, found->refresh, PICOS2KHZ(found->pixclock) * 1000,
-		found_rate_error);
-
-	hdmi->mode = *found;
-	sh_hdmi_external_video_param(hdmi);
-
-	return 0;
-}
-
-static irqreturn_t sh_hdmi_hotplug(int irq, void *dev_id)
-{
-	struct sh_hdmi *hdmi = dev_id;
-	u8 status1, status2, mask1, mask2;
-
-	/* mode_b and PLLA and PLLB reset */
-	hdmi_bit_set(hdmi, 0xFC, 0x2C, HDMI_SYSTEM_CTRL);
-
-	/* How long shall reset be held? */
-	udelay(10);
-
-	/* mode_b and PLLA and PLLB reset release */
-	hdmi_bit_set(hdmi, 0xFC, 0x20, HDMI_SYSTEM_CTRL);
-
-	status1 = hdmi_read(hdmi, HDMI_INTERRUPT_STATUS_1);
-	status2 = hdmi_read(hdmi, HDMI_INTERRUPT_STATUS_2);
-
-	mask1 = hdmi_read(hdmi, HDMI_INTERRUPT_MASK_1);
-	mask2 = hdmi_read(hdmi, HDMI_INTERRUPT_MASK_2);
-
-	/* Correct would be to ack only set bits, but the datasheet requires 0xff */
-	hdmi_write(hdmi, 0xFF, HDMI_INTERRUPT_STATUS_1);
-	hdmi_write(hdmi, 0xFF, HDMI_INTERRUPT_STATUS_2);
-
-	if (printk_ratelimit())
-		dev_dbg(hdmi->dev, "IRQ #%d: Status #1: 0x%x & 0x%x, #2: 0x%x & 0x%x\n",
-			irq, status1, mask1, status2, mask2);
-
-	if (!((status1 & mask1) | (status2 & mask2))) {
-		return IRQ_NONE;
-	} else if (status1 & 0xc0) {
-		u8 msens;
-
-		/* Datasheet specifies 10ms... */
-		udelay(500);
-
-		msens = hdmi_read(hdmi, HDMI_HOT_PLUG_MSENS_STATUS);
-		dev_dbg(hdmi->dev, "MSENS 0x%x\n", msens);
-		/* Check, if hot plug & MSENS pin status are both high */
-		if ((msens & 0xC0) == 0xC0) {
-			/* Display plug in */
-			hdmi->edid_segment_nr = 0;
-			hdmi->edid_block_addr = 0;
-			hdmi->edid_blocks = 0;
-			hdmi->hp_state = HDMI_HOTPLUG_CONNECTED;
-
-			/* Set EDID word address  */
-			hdmi_write(hdmi, 0x00, HDMI_EDID_WORD_ADDRESS);
-			/* Enable EDID interrupt */
-			hdmi_write(hdmi, 0xC6, HDMI_INTERRUPT_MASK_1);
-			/* Set EDID segment pointer - starts reading EDID */
-			hdmi_write(hdmi, 0x00, HDMI_EDID_SEGMENT_POINTER);
-		} else if (!(status1 & 0x80)) {
-			/* Display unplug, beware multiple interrupts */
-			if (hdmi->hp_state != HDMI_HOTPLUG_DISCONNECTED) {
-				hdmi->hp_state = HDMI_HOTPLUG_DISCONNECTED;
-				schedule_delayed_work(&hdmi->edid_work, 0);
-			}
-			/* display_off will switch back to mode_a */
-		}
-	} else if (status1 & 2) {
-		/* EDID error interrupt: retry */
-		/* Set EDID word address  */
-		hdmi_write(hdmi, hdmi->edid_block_addr, HDMI_EDID_WORD_ADDRESS);
-		/* Set EDID segment pointer */
-		hdmi_write(hdmi, hdmi->edid_segment_nr, HDMI_EDID_SEGMENT_POINTER);
-	} else if (status1 & 4) {
-		/* Disable EDID interrupt */
-		hdmi_write(hdmi, 0xC0, HDMI_INTERRUPT_MASK_1);
-		schedule_delayed_work(&hdmi->edid_work, msecs_to_jiffies(10));
-	}
-
-	return IRQ_HANDLED;
-}
-
-static int sh_hdmi_display_on(struct sh_mobile_lcdc_entity *entity)
-{
-	struct sh_hdmi *hdmi = entity_to_sh_hdmi(entity);
-
-	dev_dbg(hdmi->dev, "%s(%p): state %x\n", __func__, hdmi,
-		hdmi->hp_state);
-
-	/*
-	 * hp_state can be set to
-	 * HDMI_HOTPLUG_DISCONNECTED:	on monitor unplug
-	 * HDMI_HOTPLUG_CONNECTED:	on monitor plug-in
-	 * HDMI_HOTPLUG_EDID_DONE:	on EDID read completion
-	 */
-	if (hdmi->hp_state == HDMI_HOTPLUG_EDID_DONE) {
-		/* PS mode d->e. All functions are active */
-		hdmi_bit_set(hdmi, 0xFC, 0x80, HDMI_SYSTEM_CTRL);
-		dev_dbg(hdmi->dev, "HDMI running\n");
-	}
-
-	return hdmi->hp_state == HDMI_HOTPLUG_DISCONNECTED
-		? SH_MOBILE_LCDC_DISPLAY_DISCONNECTED
-		: SH_MOBILE_LCDC_DISPLAY_CONNECTED;
-}
-
-static void sh_hdmi_display_off(struct sh_mobile_lcdc_entity *entity)
-{
-	struct sh_hdmi *hdmi = entity_to_sh_hdmi(entity);
-
-	dev_dbg(hdmi->dev, "%s(%p)\n", __func__, hdmi);
-	/* PS mode e->a */
-	hdmi_bit_set(hdmi, 0xFC, 0x10, HDMI_SYSTEM_CTRL);
-}
-
-static const struct sh_mobile_lcdc_entity_ops sh_hdmi_ops = {
-	.display_on = sh_hdmi_display_on,
-	.display_off = sh_hdmi_display_off,
-};
-
-/**
- * sh_hdmi_clk_configure() - set HDMI clock frequency and enable the clock
- * @hdmi:		driver context
- * @hdmi_rate:		HDMI clock frequency in Hz
- * @parent_rate:	if != 0 - set parent clock rate for optimal precision
- * return:		configured positive rate if successful
- *			0 if couldn't set the rate, but managed to enable the
- *			clock, negative error, if couldn't enable the clock
- */
-static long sh_hdmi_clk_configure(struct sh_hdmi *hdmi, unsigned long hdmi_rate,
-				  unsigned long parent_rate)
-{
-	int ret;
-
-	if (parent_rate && clk_get_parent(hdmi->hdmi_clk)) {
-		ret = clk_set_rate(clk_get_parent(hdmi->hdmi_clk), parent_rate);
-		if (ret < 0) {
-			dev_warn(hdmi->dev, "Cannot set parent rate %ld: %d\n", parent_rate, ret);
-			hdmi_rate = clk_round_rate(hdmi->hdmi_clk, hdmi_rate);
-		} else {
-			dev_dbg(hdmi->dev, "HDMI set parent frequency %lu\n", parent_rate);
-		}
-	}
-
-	ret = clk_set_rate(hdmi->hdmi_clk, hdmi_rate);
-	if (ret < 0) {
-		dev_warn(hdmi->dev, "Cannot set rate %ld: %d\n", hdmi_rate, ret);
-		hdmi_rate = 0;
-	} else {
-		dev_dbg(hdmi->dev, "HDMI set frequency %lu\n", hdmi_rate);
-	}
-
-	return hdmi_rate;
-}
-
-/* Hotplug interrupt occurred, read EDID */
-static void sh_hdmi_edid_work_fn(struct work_struct *work)
-{
-	struct sh_hdmi *hdmi = container_of(work, struct sh_hdmi, edid_work.work);
-	struct sh_mobile_lcdc_chan *ch = hdmi->entity.lcdc;
-	int ret;
-
-	dev_dbg(hdmi->dev, "%s(%p): begin, hotplug status %d\n", __func__, hdmi,
-		hdmi->hp_state);
-
-	if (hdmi->hp_state == HDMI_HOTPLUG_CONNECTED) {
-		unsigned long parent_rate = 0, hdmi_rate;
-
-		ret = sh_hdmi_read_edid(hdmi, &hdmi_rate, &parent_rate);
-		if (ret < 0)
-			goto out;
-
-		hdmi->hp_state = HDMI_HOTPLUG_EDID_DONE;
-
-		/* Reconfigure the clock */
-		ret = sh_hdmi_clk_configure(hdmi, hdmi_rate, parent_rate);
-		if (ret < 0)
-			goto out;
-
-		msleep(10);
-		sh_hdmi_configure(hdmi);
-		/* Switched to another (d) power-save mode */
-		msleep(10);
-
-		if (ch && ch->notify)
-			ch->notify(ch, SH_MOBILE_LCDC_EVENT_DISPLAY_CONNECT,
-				   &hdmi->mode, &hdmi->monspec);
-	} else {
-		hdmi->monspec.modedb_len = 0;
-		fb_destroy_modedb(hdmi->monspec.modedb);
-		hdmi->monspec.modedb = NULL;
-
-		if (ch && ch->notify)
-			ch->notify(ch, SH_MOBILE_LCDC_EVENT_DISPLAY_DISCONNECT,
-				   NULL, NULL);
-
-		ret = 0;
-	}
-
-out:
-	if (ret < 0 && ret != -EAGAIN)
-		hdmi->hp_state = HDMI_HOTPLUG_DISCONNECTED;
-
-	dev_dbg(hdmi->dev, "%s(%p): end\n", __func__, hdmi);
-}
-
-static void sh_hdmi_htop1_init(struct sh_hdmi *hdmi)
-{
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_MODE);
-	hdmi_htop1_write(hdmi, 0x0000000b, 0x0010);
-	hdmi_htop1_write(hdmi, 0x00006710, HDMI_HTOP1_HTOP_DCL_FRC_MODE);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y1_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y1_2);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB1_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB1_2);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR1_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR1_2);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y2_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_Y2_2);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB2_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CB2_2);
-	hdmi_htop1_write(hdmi, 0x01020406, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR2_1);
-	hdmi_htop1_write(hdmi, 0x07080806, HDMI_HTOP1_HTOP_DCL_FIL_PARA_CR2_2);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_Y1);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_CB1);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_CR1);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_Y2);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_CB2);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_HTOP_DCL_COR_PARA_CR2);
-	hdmi_htop1_write(hdmi, 0x00000008, HDMI_HTOP1_CURRENT);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_TISEMP0_1);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_TISEMP2_C);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_PHY_TEST_MODE);
-	hdmi_htop1_write(hdmi, 0x00000081, HDMI_HTOP1_TISIDRV);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_PLLBW);
-	hdmi_htop1_write(hdmi, 0x0000000f, HDMI_HTOP1_TISEN);
-	hdmi_htop1_write(hdmi, 0x0000000f, HDMI_HTOP1_TISDREN);
-	hdmi_htop1_write(hdmi, 0x00000003, HDMI_HTOP1_ENABLE_SELECTOR);
-	hdmi_htop1_write(hdmi, 0x00000001, HDMI_HTOP1_MACRO_RESET);
-	hdmi_htop1_write(hdmi, 0x00000016, HDMI_HTOP1_CISRANGE);
-	msleep(100);
-	hdmi_htop1_write(hdmi, 0x00000001, HDMI_HTOP1_ENABLE_SELECTOR);
-	msleep(100);
-	hdmi_htop1_write(hdmi, 0x00000003, HDMI_HTOP1_ENABLE_SELECTOR);
-	hdmi_htop1_write(hdmi, 0x00000001, HDMI_HTOP1_MACRO_RESET);
-	hdmi_htop1_write(hdmi, 0x0000000f, HDMI_HTOP1_TISEN);
-	hdmi_htop1_write(hdmi, 0x0000000f, HDMI_HTOP1_TISDREN);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_VIDEO_INPUT);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_CLK_TO_PHY);
-	hdmi_htop1_write(hdmi, 0x00000000, HDMI_HTOP1_VIDEO_INPUT2);
-	hdmi_htop1_write(hdmi, 0x0000000a, HDMI_HTOP1_CLK_SET);
-}
-
-static int __init sh_hdmi_probe(struct platform_device *pdev)
-{
-	struct sh_mobile_hdmi_info *pdata = dev_get_platdata(&pdev->dev);
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	struct resource *htop1_res;
-	int irq = platform_get_irq(pdev, 0), ret;
-	struct sh_hdmi *hdmi;
-	long rate;
-
-	if (!res || !pdata || irq < 0)
-		return -ENODEV;
-
-	htop1_res = NULL;
-	if (pdata->flags & HDMI_HAS_HTOP1) {
-		htop1_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-		if (!htop1_res) {
-			dev_err(&pdev->dev, "htop1 needs register base\n");
-			return -EINVAL;
-		}
-	}
-
-	hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
-	if (!hdmi) {
-		dev_err(&pdev->dev, "Cannot allocate device data\n");
-		return -ENOMEM;
-	}
-
-	hdmi->dev = &pdev->dev;
-	hdmi->entity.owner = THIS_MODULE;
-	hdmi->entity.ops = &sh_hdmi_ops;
-	hdmi->irq = irq;
-
-	hdmi->hdmi_clk = clk_get(&pdev->dev, "ick");
-	if (IS_ERR(hdmi->hdmi_clk)) {
-		ret = PTR_ERR(hdmi->hdmi_clk);
-		dev_err(&pdev->dev, "Unable to get clock: %d\n", ret);
-		return ret;
-	}
-
-	/* select register access functions */
-	if (pdata->flags & HDMI_32BIT_REG) {
-		hdmi->write	= __hdmi_write32;
-		hdmi->read	= __hdmi_read32;
-	} else {
-		hdmi->write	= __hdmi_write8;
-		hdmi->read	= __hdmi_read8;
-	}
-
-	/* An arbitrary relaxed pixclock just to get things started: from standard 480p */
-	rate = clk_round_rate(hdmi->hdmi_clk, PICOS2KHZ(37037));
-	if (rate > 0)
-		rate = sh_hdmi_clk_configure(hdmi, rate, 0);
-
-	if (rate < 0) {
-		ret = rate;
-		goto erate;
-	}
-
-	ret = clk_prepare_enable(hdmi->hdmi_clk);
-	if (ret < 0) {
-		dev_err(hdmi->dev, "Cannot enable clock: %d\n", ret);
-		goto erate;
-	}
-
-	dev_dbg(&pdev->dev, "Enabled HDMI clock at %luHz\n", rate);
-
-	if (!request_mem_region(res->start, resource_size(res), dev_name(&pdev->dev))) {
-		dev_err(&pdev->dev, "HDMI register region already claimed\n");
-		ret = -EBUSY;
-		goto ereqreg;
-	}
-
-	hdmi->base = ioremap(res->start, resource_size(res));
-	if (!hdmi->base) {
-		dev_err(&pdev->dev, "HDMI register region already claimed\n");
-		ret = -ENOMEM;
-		goto emap;
-	}
-
-	platform_set_drvdata(pdev, &hdmi->entity);
-
-	INIT_DELAYED_WORK(&hdmi->edid_work, sh_hdmi_edid_work_fn);
-
-	pm_runtime_enable(&pdev->dev);
-	pm_runtime_get_sync(&pdev->dev);
-
-	/* init interrupt polarity */
-	if (pdata->flags & HDMI_OUTPUT_PUSH_PULL)
-		hdmi_bit_set(hdmi, 0x02, 0x02, HDMI_SYSTEM_CTRL);
-
-	if (pdata->flags & HDMI_OUTPUT_POLARITY_HI)
-		hdmi_bit_set(hdmi, 0x01, 0x01, HDMI_SYSTEM_CTRL);
-
-	/* enable htop1 register if needed */
-	if (htop1_res) {
-		hdmi->htop1 = ioremap(htop1_res->start, resource_size(htop1_res));
-		if (!hdmi->htop1) {
-			dev_err(&pdev->dev, "control register region already claimed\n");
-			ret = -ENOMEM;
-			goto emap_htop1;
-		}
-		sh_hdmi_htop1_init(hdmi);
-	}
-
-	/* Product and revision IDs are 0 in sh-mobile version */
-	dev_info(&pdev->dev, "Detected HDMI controller 0x%x:0x%x\n",
-		 hdmi_read(hdmi, HDMI_PRODUCT_ID), hdmi_read(hdmi, HDMI_REVISION_ID));
-
-	ret = request_irq(irq, sh_hdmi_hotplug, 0,
-			  dev_name(&pdev->dev), hdmi);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Unable to request irq: %d\n", ret);
-		goto ereqirq;
-	}
-
-	ret = snd_soc_register_codec(&pdev->dev,
-			&soc_codec_dev_sh_hdmi, &sh_hdmi_dai, 1);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "codec registration failed\n");
-		goto ecodec;
-	}
-
-	return 0;
-
-ecodec:
-	free_irq(irq, hdmi);
-ereqirq:
-	if (hdmi->htop1)
-		iounmap(hdmi->htop1);
-emap_htop1:
-	pm_runtime_put(&pdev->dev);
-	pm_runtime_disable(&pdev->dev);
-	iounmap(hdmi->base);
-emap:
-	release_mem_region(res->start, resource_size(res));
-ereqreg:
-	clk_disable_unprepare(hdmi->hdmi_clk);
-erate:
-	clk_put(hdmi->hdmi_clk);
-
-	return ret;
-}
-
-static int __exit sh_hdmi_remove(struct platform_device *pdev)
-{
-	struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev));
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	snd_soc_unregister_codec(&pdev->dev);
-
-	/* No new work will be scheduled, wait for running ISR */
-	free_irq(hdmi->irq, hdmi);
-	/* Wait for already scheduled work */
-	cancel_delayed_work_sync(&hdmi->edid_work);
-	pm_runtime_put(&pdev->dev);
-	pm_runtime_disable(&pdev->dev);
-	clk_disable_unprepare(hdmi->hdmi_clk);
-	clk_put(hdmi->hdmi_clk);
-	if (hdmi->htop1)
-		iounmap(hdmi->htop1);
-	iounmap(hdmi->base);
-	release_mem_region(res->start, resource_size(res));
-
-	return 0;
-}
-
-static int sh_hdmi_suspend(struct device *dev)
-{
-	struct platform_device *pdev = to_platform_device(dev);
-	struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev));
-
-	disable_irq(hdmi->irq);
-	/* Wait for already scheduled work */
-	cancel_delayed_work_sync(&hdmi->edid_work);
-	return 0;
-}
-
-static int sh_hdmi_resume(struct device *dev)
-{
-	struct platform_device *pdev = to_platform_device(dev);
-	struct sh_mobile_hdmi_info *pdata = dev_get_platdata(dev);
-	struct sh_hdmi *hdmi = entity_to_sh_hdmi(platform_get_drvdata(pdev));
-
-	/* Re-init interrupt polarity */
-	if (pdata->flags & HDMI_OUTPUT_PUSH_PULL)
-		hdmi_bit_set(hdmi, 0x02, 0x02, HDMI_SYSTEM_CTRL);
-
-	if (pdata->flags & HDMI_OUTPUT_POLARITY_HI)
-		hdmi_bit_set(hdmi, 0x01, 0x01, HDMI_SYSTEM_CTRL);
-
-	/* Re-init htop1 */
-	if (hdmi->htop1)
-		sh_hdmi_htop1_init(hdmi);
-
-	/* Now it's safe to enable interrupts again */
-	enable_irq(hdmi->irq);
-	return 0;
-}
-
-static const struct dev_pm_ops sh_hdmi_pm_ops = {
-	.suspend	= sh_hdmi_suspend,
-	.resume		= sh_hdmi_resume,
-};
-
-static struct platform_driver sh_hdmi_driver = {
-	.remove		= __exit_p(sh_hdmi_remove),
-	.driver = {
-		.name	= "sh-mobile-hdmi",
-		.pm	= &sh_hdmi_pm_ops,
-	},
-};
-
-module_platform_driver_probe(sh_hdmi_driver, sh_hdmi_probe);
-
-MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
-MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");
-MODULE_LICENSE("GPL v2");
--- a/include/video/sh_mobile_hdmi.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SH-Mobile High-Definition Multimedia Interface (HDMI)
- *
- * Copyright (C) 2010, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef SH_MOBILE_HDMI_H
-#define SH_MOBILE_HDMI_H
-
-struct sh_mobile_lcdc_chan_cfg;
-struct device;
-struct clk;
-
-/*
- * flags format
- *
- * 0x00000CBA
- *
- * A: Audio source select
- * B: Int output option
- * C: Chip specific option
- */
-
-/* Audio source select */
-#define HDMI_SND_SRC_MASK	(0xF << 0)
-#define HDMI_SND_SRC_I2S	(0 << 0) /* default */
-#define HDMI_SND_SRC_SPDIF	(1 << 0)
-#define HDMI_SND_SRC_DSD	(2 << 0)
-#define HDMI_SND_SRC_HBR	(3 << 0)
-
-/* Int output option */
-#define HDMI_OUTPUT_PUSH_PULL	(1 << 4) /* System control : output mode */
-#define HDMI_OUTPUT_POLARITY_HI	(1 << 5) /* System control : output polarity */
-
-/* Chip specific option */
-#define HDMI_32BIT_REG		(1 << 8)
-#define HDMI_HAS_HTOP1		(1 << 9)
-
-struct sh_mobile_hdmi_info {
-	unsigned int			 flags;
-	long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq,
-				    unsigned long *parent_freq);
-};
-
-#endif



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

* [PATCH 4.4 108/159] fbdev: Ditch fb_edid_add_monspecs
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (106 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 107/159] fbdev: Remove unused SH-Mobile HDMI driver Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 109/159] block: introduce blk_rq_is_passthrough Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Linus Torvalds, Tavis Ormandy,
	Daniel Vetter, Bartlomiej Zolnierkiewicz

From: Daniel Vetter <daniel.vetter@ffwll.ch>

commit 3b8720e63f4a1fc6f422a49ecbaa3b59c86d5aaf upstream.

It's dead code ever since

commit 34280340b1dc74c521e636f45cd728f9abf56ee2
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Fri Dec 4 17:01:43 2015 +0100

    fbdev: Remove unused SH-Mobile HDMI driver

Also with this gone we can remove the cea_modes db. This entire thing
is massively incomplete anyway, compared to the CEA parsing that
drm_edid.c does.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tavis Ormandy <taviso@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190721201956.941-1-daniel.vetter@ffwll.ch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/video/fbdev/core/fbmon.c  |   95 --------------------------------------
 drivers/video/fbdev/core/modedb.c |   57 ----------------------
 include/linux/fb.h                |    3 -
 3 files changed, 155 deletions(-)

--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -997,97 +997,6 @@ void fb_edid_to_monspecs(unsigned char *
 	DPRINTK("========================================\n");
 }
 
-/**
- * fb_edid_add_monspecs() - add monitor video modes from E-EDID data
- * @edid:	128 byte array with an E-EDID block
- * @spacs:	monitor specs to be extended
- */
-void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
-{
-	unsigned char *block;
-	struct fb_videomode *m;
-	int num = 0, i;
-	u8 svd[64], edt[(128 - 4) / DETAILED_TIMING_DESCRIPTION_SIZE];
-	u8 pos = 4, svd_n = 0;
-
-	if (!edid)
-		return;
-
-	if (!edid_checksum(edid))
-		return;
-
-	if (edid[0] != 0x2 ||
-	    edid[2] < 4 || edid[2] > 128 - DETAILED_TIMING_DESCRIPTION_SIZE)
-		return;
-
-	DPRINTK("  Short Video Descriptors\n");
-
-	while (pos < edid[2]) {
-		u8 len = edid[pos] & 0x1f, type = (edid[pos] >> 5) & 7;
-		pr_debug("Data block %u of %u bytes\n", type, len);
-		if (type == 2) {
-			for (i = pos; i < pos + len; i++) {
-				u8 idx = edid[pos + i] & 0x7f;
-				svd[svd_n++] = idx;
-				pr_debug("N%sative mode #%d\n",
-					 edid[pos + i] & 0x80 ? "" : "on-n", idx);
-			}
-		} else if (type == 3 && len >= 3) {
-			/* Check Vendor Specific Data Block.  For HDMI,
-			   it is always 00-0C-03 for HDMI Licensing, LLC. */
-			if (edid[pos + 1] == 3 && edid[pos + 2] == 0xc &&
-			    edid[pos + 3] == 0)
-				specs->misc |= FB_MISC_HDMI;
-		}
-		pos += len + 1;
-	}
-
-	block = edid + edid[2];
-
-	DPRINTK("  Extended Detailed Timings\n");
-
-	for (i = 0; i < (128 - edid[2]) / DETAILED_TIMING_DESCRIPTION_SIZE;
-	     i++, block += DETAILED_TIMING_DESCRIPTION_SIZE)
-		if (PIXEL_CLOCK)
-			edt[num++] = block - edid;
-
-	/* Yikes, EDID data is totally useless */
-	if (!(num + svd_n))
-		return;
-
-	m = kzalloc((specs->modedb_len + num + svd_n) *
-		       sizeof(struct fb_videomode), GFP_KERNEL);
-
-	if (!m)
-		return;
-
-	memcpy(m, specs->modedb, specs->modedb_len * sizeof(struct fb_videomode));
-
-	for (i = specs->modedb_len; i < specs->modedb_len + num; i++) {
-		get_detailed_timing(edid + edt[i - specs->modedb_len], &m[i]);
-		if (i == specs->modedb_len)
-			m[i].flag |= FB_MODE_IS_FIRST;
-		pr_debug("Adding %ux%u@%u\n", m[i].xres, m[i].yres, m[i].refresh);
-	}
-
-	for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
-		int idx = svd[i - specs->modedb_len - num];
-		if (!idx || idx >= ARRAY_SIZE(cea_modes)) {
-			pr_warning("Reserved SVD code %d\n", idx);
-		} else if (!cea_modes[idx].xres) {
-			pr_warning("Unimplemented SVD code %d\n", idx);
-		} else {
-			memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
-			pr_debug("Adding SVD #%d: %ux%u@%u\n", idx,
-				 m[i].xres, m[i].yres, m[i].refresh);
-		}
-	}
-
-	kfree(specs->modedb);
-	specs->modedb = m;
-	specs->modedb_len = specs->modedb_len + num + svd_n;
-}
-
 /*
  * VESA Generalized Timing Formula (GTF)
  */
@@ -1498,9 +1407,6 @@ void fb_edid_to_monspecs(unsigned char *
 {
 	specs = NULL;
 }
-void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
-{
-}
 void fb_destroy_modedb(struct fb_videomode *modedb)
 {
 }
@@ -1608,7 +1514,6 @@ EXPORT_SYMBOL(fb_firmware_edid);
 
 EXPORT_SYMBOL(fb_parse_edid);
 EXPORT_SYMBOL(fb_edid_to_monspecs);
-EXPORT_SYMBOL(fb_edid_add_monspecs);
 EXPORT_SYMBOL(fb_get_mode);
 EXPORT_SYMBOL(fb_validate_mode);
 EXPORT_SYMBOL(fb_destroy_modedb);
--- a/drivers/video/fbdev/core/modedb.c
+++ b/drivers/video/fbdev/core/modedb.c
@@ -289,63 +289,6 @@ static const struct fb_videomode modedb[
 };
 
 #ifdef CONFIG_FB_MODE_HELPERS
-const struct fb_videomode cea_modes[65] = {
-	/* #1: 640x480p@59.94/60Hz */
-	[1] = {
-		NULL, 60, 640, 480, 39722, 48, 16, 33, 10, 96, 2, 0,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #3: 720x480p@59.94/60Hz */
-	[3] = {
-		NULL, 60, 720, 480, 37037, 60, 16, 30, 9, 62, 6, 0,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #5: 1920x1080i@59.94/60Hz */
-	[5] = {
-		NULL, 60, 1920, 1080, 13763, 148, 88, 15, 2, 44, 5,
-		FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-		FB_VMODE_INTERLACED, 0,
-	},
-	/* #7: 720(1440)x480iH@59.94/60Hz */
-	[7] = {
-		NULL, 60, 1440, 480, 18554/*37108*/, 114, 38, 15, 4, 124, 3, 0,
-		FB_VMODE_INTERLACED, 0,
-	},
-	/* #9: 720(1440)x240pH@59.94/60Hz */
-	[9] = {
-		NULL, 60, 1440, 240, 18554, 114, 38, 16, 4, 124, 3, 0,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #18: 720x576pH@50Hz */
-	[18] = {
-		NULL, 50, 720, 576, 37037, 68, 12, 39, 5, 64, 5, 0,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #19: 1280x720p@50Hz */
-	[19] = {
-		NULL, 50, 1280, 720, 13468, 220, 440, 20, 5, 40, 5,
-		FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #20: 1920x1080i@50Hz */
-	[20] = {
-		NULL, 50, 1920, 1080, 13480, 148, 528, 15, 5, 528, 5,
-		FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-		FB_VMODE_INTERLACED, 0,
-	},
-	/* #32: 1920x1080p@23.98/24Hz */
-	[32] = {
-		NULL, 24, 1920, 1080, 13468, 148, 638, 36, 4, 44, 5,
-		FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-	/* #35: (2880)x480p4x@59.94/60Hz */
-	[35] = {
-		NULL, 60, 2880, 480, 9250, 240, 64, 30, 9, 248, 6, 0,
-		FB_VMODE_NONINTERLACED, 0,
-	},
-};
-
 const struct fb_videomode vesa_modes[] = {
 	/* 0 640x350-85 VESA */
 	{ NULL, 85, 640, 350, 31746,  96, 32, 60, 32, 64, 3,
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -716,8 +716,6 @@ extern int fb_parse_edid(unsigned char *
 extern const unsigned char *fb_firmware_edid(struct device *device);
 extern void fb_edid_to_monspecs(unsigned char *edid,
 				struct fb_monspecs *specs);
-extern void fb_edid_add_monspecs(unsigned char *edid,
-				 struct fb_monspecs *specs);
 extern void fb_destroy_modedb(struct fb_videomode *modedb);
 extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
 extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
@@ -791,7 +789,6 @@ struct dmt_videomode {
 
 extern const char *fb_mode_option;
 extern const struct fb_videomode vesa_modes[];
-extern const struct fb_videomode cea_modes[65];
 extern const struct dmt_videomode dmt_modes[];
 
 struct fb_modelist {



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

* [PATCH 4.4 109/159] block: introduce blk_rq_is_passthrough
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (107 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 108/159] fbdev: Ditch fb_edid_add_monspecs Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 110/159] libata: have ata_scsi_rw_xlat() fail invalid passthrough requests Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Jens Axboe

From: Christoph Hellwig <hch@lst.de>

commit 57292b58ddb58689e8c3b4c6eadbef10d9ca44dd upstream.

This can be used to check for fs vs non-fs requests and basically
removes all knowledge of BLOCK_PC specific from the block layer,
as well as preparing for removing the cmd_type field in struct request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
[only take the blkdev.h changes as we only want the function for backported
patches - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/blkdev.h |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -199,6 +199,11 @@ struct request {
 	struct request *next_rq;
 };
 
+static inline bool blk_rq_is_passthrough(struct request *rq)
+{
+	return rq->cmd_type != REQ_TYPE_FS;
+}
+
 static inline unsigned short req_get_ioprio(struct request *req)
 {
 	return req->ioprio;
@@ -582,9 +587,10 @@ static inline void queue_flag_clear(unsi
 	((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \
 			     REQ_FAILFAST_DRIVER))
 
-#define blk_account_rq(rq) \
-	(((rq)->cmd_flags & REQ_STARTED) && \
-	 ((rq)->cmd_type == REQ_TYPE_FS))
+static inline bool blk_account_rq(struct request *rq)
+{
+	return (rq->cmd_flags & REQ_STARTED) && !blk_rq_is_passthrough(rq);
+}
 
 #define blk_rq_cpu_valid(rq)	((rq)->cpu != -1)
 #define blk_bidi_rq(rq)		((rq)->next_rq != NULL)
@@ -645,7 +651,7 @@ static inline void blk_clear_rl_full(str
 
 static inline bool rq_mergeable(struct request *rq)
 {
-	if (rq->cmd_type != REQ_TYPE_FS)
+	if (blk_rq_is_passthrough(rq))
 		return false;
 
 	if (rq->cmd_flags & REQ_NOMERGE_FLAGS)
@@ -890,7 +896,7 @@ static inline unsigned int blk_rq_get_ma
 {
 	struct request_queue *q = rq->q;
 
-	if (unlikely(rq->cmd_type != REQ_TYPE_FS))
+	if (blk_rq_is_passthrough(rq))
 		return q->limits.max_hw_sectors;
 
 	if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD))



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

* [PATCH 4.4 110/159] libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (108 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 109/159] block: introduce blk_rq_is_passthrough Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 111/159] net: ovs: fix return type of ndo_start_xmit function Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Krishna Ram Prakash R, Kees Cook, Jens Axboe

From: Jens Axboe <axboe@kernel.dk>

commit 2d7271501720038381d45fb3dcbe4831228fc8cc upstream.

For passthrough requests, libata-scsi takes what the user passes in
as gospel. This can be problematic if the user fills in the CDB
incorrectly. One example of that is in request sizes. For read/write
commands, the CDB contains fields describing the transfer length of
the request. These should match with the SG_IO header fields, but
libata-scsi currently does no validation of that.

Check that the number of blocks in the CDB for passthrough requests
matches what was mapped into the request. If the CDB asks for more
data then the validated SG_IO header fields, error it.

Reported-by: Krishna Ram Prakash R <krp@gtux.in>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-scsi.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1654,6 +1654,21 @@ nothing_to_do:
 	return 1;
 }
 
+static bool ata_check_nblocks(struct scsi_cmnd *scmd, u32 n_blocks)
+{
+	struct request *rq = scmd->request;
+	u32 req_blocks;
+
+	if (!blk_rq_is_passthrough(rq))
+		return true;
+
+	req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size;
+	if (n_blocks > req_blocks)
+		return false;
+
+	return true;
+}
+
 /**
  *	ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one
  *	@qc: Storage for translated ATA taskfile
@@ -1693,6 +1708,8 @@ static unsigned int ata_scsi_rw_xlat(str
 		scsi_10_lba_len(cdb, &block, &n_block);
 		if (cdb[1] & (1 << 3))
 			tf_flags |= ATA_TFLAG_FUA;
+		if (!ata_check_nblocks(scmd, n_block))
+			goto invalid_fld;
 		break;
 	case READ_6:
 	case WRITE_6:
@@ -1705,6 +1722,8 @@ static unsigned int ata_scsi_rw_xlat(str
 		 */
 		if (!n_block)
 			n_block = 256;
+		if (!ata_check_nblocks(scmd, n_block))
+			goto invalid_fld;
 		break;
 	case READ_16:
 	case WRITE_16:
@@ -1713,6 +1732,8 @@ static unsigned int ata_scsi_rw_xlat(str
 		scsi_16_lba_len(cdb, &block, &n_block);
 		if (cdb[1] & (1 << 3))
 			tf_flags |= ATA_TFLAG_FUA;
+		if (!ata_check_nblocks(scmd, n_block))
+			goto invalid_fld;
 		break;
 	default:
 		DPRINTK("no-byte command\n");



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

* [PATCH 4.4 111/159] net: ovs: fix return type of ndo_start_xmit function
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (109 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 110/159] libata: have ata_scsi_rw_xlat() fail invalid passthrough requests Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 112/159] ARM: dts: omap5: enable OTG role for DWC3 controller Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, David S. Miller, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit eddf11e18dff0e8671e06ce54e64cfc843303ab9 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/openvswitch/vport-internal_dev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index ec76398a792fb..12ec61b259b9f 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -44,7 +44,8 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev)
 }
 
 /* Called with rcu_read_lock_bh. */
-static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t
+internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
 	int len, err;
 
@@ -63,7 +64,7 @@ static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
 	} else {
 		netdev->stats.tx_errors++;
 	}
-	return 0;
+	return NETDEV_TX_OK;
 }
 
 static int internal_dev_open(struct net_device *netdev)
-- 
2.20.1




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

* [PATCH 4.4 112/159] ARM: dts: omap5: enable OTG role for DWC3 controller
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (110 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 111/159] net: ovs: fix return type of ndo_start_xmit function Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 113/159] f2fs: return correct errno in f2fs_gc Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Roger Quadros, H. Nikolaus Schaller,
	Tony Lindgren, Sasha Levin

From: H. Nikolaus Schaller <hns@goldelico.com>

[ Upstream commit 656c1a65ab555ee5c7cd0d6aee8ab82ca3c1795f ]

Since SMPS10 and OTG cable detection extcon are described here, and
work to enable OTG power when an OTG cable is plugged in, we can
define OTG mode in the controller (which is disabled by default in
omap5.dtsi).

Tested on OMAP5EVM and Pyra.

Suggested-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index 41e80e7f20bea..d2398d2a0c08c 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -633,6 +633,10 @@
 	vbus-supply = <&smps10_out1_reg>;
 };
 
+&dwc3 {
+	dr_mode = "otg";
+};
+
 &mcspi1 {
 
 };
-- 
2.20.1




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

* [PATCH 4.4 113/159] f2fs: return correct errno in f2fs_gc
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (111 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 112/159] ARM: dts: omap5: enable OTG role for DWC3 controller Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 114/159] SUNRPC: Fix priority queue fairness Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chao Yu, Jaegeuk Kim, Sasha Levin

From: Jaegeuk Kim <jaegeuk@kernel.org>

[ Upstream commit 61f7725aa148ee870436a29d3a24d5c00ab7e9af ]

This fixes overriding error number in f2fs_gc.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/f2fs/gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 928b9e046d8a8..de32dfaaa492d 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -880,7 +880,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync)
 
 	put_gc_inode(&gc_list);
 
-	if (sync)
+	if (sync && !ret)
 		ret = sec_freed ? 0 : -EAGAIN;
 	return ret;
 }
-- 
2.20.1




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

* [PATCH 4.4 114/159] SUNRPC: Fix priority queue fairness
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (112 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 113/159] f2fs: return correct errno in f2fs_gc Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 115/159] ath10k: fix vdev-start timeout on error Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Trond Myklebust, Sasha Levin

From: Trond Myklebust <trond.myklebust@hammerspace.com>

[ Upstream commit f42f7c283078ce3c1e8368b140e270755b1ae313 ]

Fix up the priority queue to not batch by owner, but by queue, so that
we allow '1 << priority' elements to be dequeued before switching to
the next priority queue.
The owner field is still used to wake up requests in round robin order
by owner to avoid single processes hogging the RPC layer by loading the
queues.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/sunrpc/sched.h |   2 -
 net/sunrpc/sched.c           | 109 +++++++++++++++++------------------
 2 files changed, 54 insertions(+), 57 deletions(-)

diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index d703f0ef37d8f..7d347e8cf944e 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -181,7 +181,6 @@ struct rpc_timer {
 struct rpc_wait_queue {
 	spinlock_t		lock;
 	struct list_head	tasks[RPC_NR_PRIORITY];	/* task queue for each priority level */
-	pid_t			owner;			/* process id of last task serviced */
 	unsigned char		maxpriority;		/* maximum priority (0 if queue is not a priority queue) */
 	unsigned char		priority;		/* current priority */
 	unsigned char		nr;			/* # tasks remaining for cookie */
@@ -197,7 +196,6 @@ struct rpc_wait_queue {
  * from a single cookie.  The aim is to improve
  * performance of NFS operations such as read/write.
  */
-#define RPC_BATCH_COUNT			16
 #define RPC_IS_PRIORITY(q)		((q)->maxpriority > 0)
 
 /*
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 1cb35c753dcda..3eed71a2ff2bb 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -98,64 +98,78 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task)
 	list_add(&task->u.tk_wait.timer_list, &queue->timer_list.list);
 }
 
-static void rpc_rotate_queue_owner(struct rpc_wait_queue *queue)
-{
-	struct list_head *q = &queue->tasks[queue->priority];
-	struct rpc_task *task;
-
-	if (!list_empty(q)) {
-		task = list_first_entry(q, struct rpc_task, u.tk_wait.list);
-		if (task->tk_owner == queue->owner)
-			list_move_tail(&task->u.tk_wait.list, q);
-	}
-}
-
 static void rpc_set_waitqueue_priority(struct rpc_wait_queue *queue, int priority)
 {
 	if (queue->priority != priority) {
-		/* Fairness: rotate the list when changing priority */
-		rpc_rotate_queue_owner(queue);
 		queue->priority = priority;
+		queue->nr = 1U << priority;
 	}
 }
 
-static void rpc_set_waitqueue_owner(struct rpc_wait_queue *queue, pid_t pid)
-{
-	queue->owner = pid;
-	queue->nr = RPC_BATCH_COUNT;
-}
-
 static void rpc_reset_waitqueue_priority(struct rpc_wait_queue *queue)
 {
 	rpc_set_waitqueue_priority(queue, queue->maxpriority);
-	rpc_set_waitqueue_owner(queue, 0);
 }
 
 /*
- * Add new request to a priority queue.
+ * Add a request to a queue list
  */
-static void __rpc_add_wait_queue_priority(struct rpc_wait_queue *queue,
-		struct rpc_task *task,
-		unsigned char queue_priority)
+static void
+__rpc_list_enqueue_task(struct list_head *q, struct rpc_task *task)
 {
-	struct list_head *q;
 	struct rpc_task *t;
 
-	INIT_LIST_HEAD(&task->u.tk_wait.links);
-	if (unlikely(queue_priority > queue->maxpriority))
-		queue_priority = queue->maxpriority;
-	if (queue_priority > queue->priority)
-		rpc_set_waitqueue_priority(queue, queue_priority);
-	q = &queue->tasks[queue_priority];
 	list_for_each_entry(t, q, u.tk_wait.list) {
 		if (t->tk_owner == task->tk_owner) {
-			list_add_tail(&task->u.tk_wait.list, &t->u.tk_wait.links);
+			list_add_tail(&task->u.tk_wait.links,
+					&t->u.tk_wait.links);
+			/* Cache the queue head in task->u.tk_wait.list */
+			task->u.tk_wait.list.next = q;
+			task->u.tk_wait.list.prev = NULL;
 			return;
 		}
 	}
+	INIT_LIST_HEAD(&task->u.tk_wait.links);
 	list_add_tail(&task->u.tk_wait.list, q);
 }
 
+/*
+ * Remove request from a queue list
+ */
+static void
+__rpc_list_dequeue_task(struct rpc_task *task)
+{
+	struct list_head *q;
+	struct rpc_task *t;
+
+	if (task->u.tk_wait.list.prev == NULL) {
+		list_del(&task->u.tk_wait.links);
+		return;
+	}
+	if (!list_empty(&task->u.tk_wait.links)) {
+		t = list_first_entry(&task->u.tk_wait.links,
+				struct rpc_task,
+				u.tk_wait.links);
+		/* Assume __rpc_list_enqueue_task() cached the queue head */
+		q = t->u.tk_wait.list.next;
+		list_add_tail(&t->u.tk_wait.list, q);
+		list_del(&task->u.tk_wait.links);
+	}
+	list_del(&task->u.tk_wait.list);
+}
+
+/*
+ * Add new request to a priority queue.
+ */
+static void __rpc_add_wait_queue_priority(struct rpc_wait_queue *queue,
+		struct rpc_task *task,
+		unsigned char queue_priority)
+{
+	if (unlikely(queue_priority > queue->maxpriority))
+		queue_priority = queue->maxpriority;
+	__rpc_list_enqueue_task(&queue->tasks[queue_priority], task);
+}
+
 /*
  * Add new request to wait queue.
  *
@@ -193,13 +207,7 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue,
  */
 static void __rpc_remove_wait_queue_priority(struct rpc_task *task)
 {
-	struct rpc_task *t;
-
-	if (!list_empty(&task->u.tk_wait.links)) {
-		t = list_entry(task->u.tk_wait.links.next, struct rpc_task, u.tk_wait.list);
-		list_move(&t->u.tk_wait.list, &task->u.tk_wait.list);
-		list_splice_init(&task->u.tk_wait.links, &t->u.tk_wait.links);
-	}
+	__rpc_list_dequeue_task(task);
 }
 
 /*
@@ -211,7 +219,8 @@ static void __rpc_remove_wait_queue(struct rpc_wait_queue *queue, struct rpc_tas
 	__rpc_disable_timer(queue, task);
 	if (RPC_IS_PRIORITY(queue))
 		__rpc_remove_wait_queue_priority(task);
-	list_del(&task->u.tk_wait.list);
+	else
+		list_del(&task->u.tk_wait.list);
 	queue->qlen--;
 	dprintk("RPC: %5u removed from queue %p \"%s\"\n",
 			task->tk_pid, queue, rpc_qname(queue));
@@ -467,17 +476,9 @@ static struct rpc_task *__rpc_find_next_queued_priority(struct rpc_wait_queue *q
 	 * Service a batch of tasks from a single owner.
 	 */
 	q = &queue->tasks[queue->priority];
-	if (!list_empty(q)) {
-		task = list_entry(q->next, struct rpc_task, u.tk_wait.list);
-		if (queue->owner == task->tk_owner) {
-			if (--queue->nr)
-				goto out;
-			list_move_tail(&task->u.tk_wait.list, q);
-		}
-		/*
-		 * Check if we need to switch queues.
-		 */
-		goto new_owner;
+	if (!list_empty(q) && --queue->nr) {
+		task = list_first_entry(q, struct rpc_task, u.tk_wait.list);
+		goto out;
 	}
 
 	/*
@@ -489,7 +490,7 @@ static struct rpc_task *__rpc_find_next_queued_priority(struct rpc_wait_queue *q
 		else
 			q = q - 1;
 		if (!list_empty(q)) {
-			task = list_entry(q->next, struct rpc_task, u.tk_wait.list);
+			task = list_first_entry(q, struct rpc_task, u.tk_wait.list);
 			goto new_queue;
 		}
 	} while (q != &queue->tasks[queue->priority]);
@@ -499,8 +500,6 @@ static struct rpc_task *__rpc_find_next_queued_priority(struct rpc_wait_queue *q
 
 new_queue:
 	rpc_set_waitqueue_priority(queue, (unsigned int)(q - &queue->tasks[0]));
-new_owner:
-	rpc_set_waitqueue_owner(queue, task->tk_owner);
 out:
 	return task;
 }
-- 
2.20.1




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

* [PATCH 4.4 115/159] ath10k: fix vdev-start timeout on error
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (113 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 114/159] SUNRPC: Fix priority queue fairness Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 116/159] ath9k: fix reporting calculated new FFT upper max Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ben Greear, Kalle Valo, Sasha Levin

From: Ben Greear <greearb@candelatech.com>

[ Upstream commit 833fd34d743c728afe6d127ef7bee67e7d9199a8 ]

The vdev-start-response message should cause the
completion to fire, even in the error case.  Otherwise,
the user still gets no useful information and everything
is blocked until the timeout period.

Add some warning text to print out the invalid status
code to aid debugging, and propagate failure code.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath10k/core.h |  1 +
 drivers/net/wireless/ath/ath10k/mac.c  |  2 +-
 drivers/net/wireless/ath/ath10k/wmi.c  | 19 ++++++++++++++++---
 drivers/net/wireless/ath/ath10k/wmi.h  |  8 +++++++-
 4 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 257836a0cfbc0..a7fab3b0a443f 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -755,6 +755,7 @@ struct ath10k {
 
 	struct completion install_key_done;
 
+	int last_wmi_vdev_start_status;
 	struct completion vdev_setup_done;
 
 	struct workqueue_struct *workqueue;
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5a0138c1c0455..7fbf2abcfc433 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -850,7 +850,7 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
 	if (time_left == 0)
 		return -ETIMEDOUT;
 
-	return 0;
+	return ar->last_wmi_vdev_start_status;
 }
 
 static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index f7ce99f67b5c5..4d8cdbfc9d422 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2945,18 +2945,31 @@ void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb)
 {
 	struct wmi_vdev_start_ev_arg arg = {};
 	int ret;
+	u32 status;
 
 	ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_START_RESP_EVENTID\n");
 
+	ar->last_wmi_vdev_start_status = 0;
+
 	ret = ath10k_wmi_pull_vdev_start(ar, skb, &arg);
 	if (ret) {
 		ath10k_warn(ar, "failed to parse vdev start event: %d\n", ret);
-		return;
+		ar->last_wmi_vdev_start_status = ret;
+		goto out;
 	}
 
-	if (WARN_ON(__le32_to_cpu(arg.status)))
-		return;
+	status = __le32_to_cpu(arg.status);
+	if (WARN_ON_ONCE(status)) {
+		ath10k_warn(ar, "vdev-start-response reports status error: %d (%s)\n",
+			    status, (status == WMI_VDEV_START_CHAN_INVALID) ?
+			    "chan-invalid" : "unknown");
+		/* Setup is done one way or another though, so we should still
+		 * do the completion, so don't return here.
+		 */
+		ar->last_wmi_vdev_start_status = -EINVAL;
+	}
 
+out:
 	complete(&ar->vdev_setup_done);
 }
 
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index a8b2553e8988a..66148a82ad25a 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -5969,11 +5969,17 @@ struct wmi_ch_info_ev_arg {
 	__le32 rx_frame_count;
 };
 
+/* From 10.4 firmware, not sure all have the same values. */
+enum wmi_vdev_start_status {
+	WMI_VDEV_START_OK = 0,
+	WMI_VDEV_START_CHAN_INVALID,
+};
+
 struct wmi_vdev_start_ev_arg {
 	__le32 vdev_id;
 	__le32 req_id;
 	__le32 resp_type; /* %WMI_VDEV_RESP_ */
-	__le32 status;
+	__le32 status; /* See wmi_vdev_start_status enum above */
 };
 
 struct wmi_peer_kick_ev_arg {
-- 
2.20.1




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

* [PATCH 4.4 116/159] ath9k: fix reporting calculated new FFT upper max
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (114 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 115/159] ath10k: fix vdev-start timeout on error Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 117/159] usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status() Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nick Kossifidis, Simon Wunderlich,
	Kalle Valo, Sasha Levin

From: Simon Wunderlich <sw@simonwunderlich.de>

[ Upstream commit 4fb5837ac2bd46a85620b297002c704e9958f64d ]

Since the debug print code is outside of the loop, it shouldn't use the loop
iterator anymore but instead print the found maximum index.

Cc: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index 03945731eb65a..ec805fe6dddbb 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -411,7 +411,7 @@ ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,
 
 		ath_dbg(common, SPECTRAL_SCAN,
 			"Calculated new upper max 0x%X at %i\n",
-			tmp_mag, i);
+			tmp_mag, fft_sample_40.upper_max_index);
 	} else
 	for (i = dc_pos; i < SPECTRAL_HT20_40_NUM_BINS; i++) {
 		if (fft_sample_40.data[i] == (upper_mag >> max_exp))
-- 
2.20.1




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

* [PATCH 4.4 117/159] usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (115 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 116/159] ath9k: fix reporting calculated new FFT upper max Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 118/159] nl80211: Fix a GET_KEY reply attribute Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jia-Ju Bai, Felipe Balbi, Sasha Levin

From: Jia-Ju Bai <baijiaju1990@gmail.com>

[ Upstream commit 2337a77c1cc86bc4e504ecf3799f947659c86026 ]

The driver may sleep in an interrupt handler.
The function call path (from bottom to top) in Linux-4.17 is:

[FUNC] fotg210_ep_queue(GFP_KERNEL)
drivers/usb/gadget/udc/fotg210-udc.c, 744:
	fotg210_ep_queue in fotg210_get_status
drivers/usb/gadget/udc/fotg210-udc.c, 768:
	fotg210_get_status in fotg210_setup_packet
drivers/usb/gadget/udc/fotg210-udc.c, 949:
	fotg210_setup_packet in fotg210_irq (interrupt handler)

To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.
If possible, spin_unlock() and spin_lock() around fotg210_ep_queue()
can be also removed.

This bug is found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/gadget/udc/fotg210-udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c
index 95df2b3bb6a1a..76e991557116a 100644
--- a/drivers/usb/gadget/udc/fotg210-udc.c
+++ b/drivers/usb/gadget/udc/fotg210-udc.c
@@ -744,7 +744,7 @@ static void fotg210_get_status(struct fotg210_udc *fotg210,
 	fotg210->ep0_req->length = 2;
 
 	spin_unlock(&fotg210->lock);
-	fotg210_ep_queue(fotg210->gadget.ep0, fotg210->ep0_req, GFP_KERNEL);
+	fotg210_ep_queue(fotg210->gadget.ep0, fotg210->ep0_req, GFP_ATOMIC);
 	spin_lock(&fotg210->lock);
 }
 
-- 
2.20.1




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

* [PATCH 4.4 118/159] nl80211: Fix a GET_KEY reply attribute
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (116 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 117/159] usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 119/159] dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andrew Zaborowski, Johannes Berg,
	Sasha Levin

From: Andrew Zaborowski <andrew.zaborowski@intel.com>

[ Upstream commit efdfce7270de85a8706d1ea051bef3a7486809ff ]

Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in
NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy.
This is unlikely to affect existing userspace.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4de66dbd5bb60..fd0bf278067ef 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2879,7 +2879,7 @@ static void get_key_callback(void *c, struct key_params *params)
 			 params->cipher)))
 		goto nla_put_failure;
 
-	if (nla_put_u8(cookie->msg, NL80211_ATTR_KEY_IDX, cookie->idx))
+	if (nla_put_u8(cookie->msg, NL80211_KEY_IDX, cookie->idx))
 		goto nla_put_failure;
 
 	nla_nest_end(cookie->msg, key);
-- 
2.20.1




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

* [PATCH 4.4 119/159] dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (117 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 118/159] nl80211: Fix a GET_KEY reply attribute Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 120/159] dmaengine: timb_dma: Use proper enum in td_prep_slave_sg Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nick Desaulniers, Nathan Chancellor,
	Vinod Koul, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 9524d6b265f9b2b9a61fceb2ee2ce1c2a83e39ca ]

Clang warns when implicitly converting from one enumerated type to
another. Avoid this by using the equivalent value from the expected
type.

In file included from drivers/dma/ep93xx_dma.c:30:
./include/linux/platform_data/dma-ep93xx.h:88:10: warning: implicit
conversion from enumeration type 'enum dma_data_direction' to different
enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
                return DMA_NONE;
                ~~~~~~ ^~~~~~~~
1 warning generated.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/platform_data/dma-ep93xx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/platform_data/dma-ep93xx.h b/include/linux/platform_data/dma-ep93xx.h
index e82c642fa53cd..5913be0793a26 100644
--- a/include/linux/platform_data/dma-ep93xx.h
+++ b/include/linux/platform_data/dma-ep93xx.h
@@ -84,7 +84,7 @@ static inline enum dma_transfer_direction
 ep93xx_dma_chan_direction(struct dma_chan *chan)
 {
 	if (!ep93xx_dma_chan_is_m2p(chan))
-		return DMA_NONE;
+		return DMA_TRANS_NONE;
 
 	/* even channels are for TX, odd for RX */
 	return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-- 
2.20.1




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

* [PATCH 4.4 120/159] dmaengine: timb_dma: Use proper enum in td_prep_slave_sg
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (118 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 119/159] dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 121/159] mei: samples: fix a signedness bug in amt_host_if_call() Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nick Desaulniers, Nathan Chancellor,
	Vinod Koul, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 5e621f5d538985f010035c6f3e28c22829d36db1 ]

Clang warns when implicitly converting from one enumerated type to
another. Avoid this by using the equivalent value from the expected
type.

drivers/dma/timb_dma.c:548:27: warning: implicit conversion from
enumeration type 'enum dma_transfer_direction' to different enumeration
type 'enum dma_data_direction' [-Wenum-conversion]
                td_desc->desc_list_len, DMA_MEM_TO_DEV);
                                        ^~~~~~~~~~~~~~
1 warning generated.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/timb_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 559cd4073698c..cf741187c9bb6 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -552,7 +552,7 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
 	}
 
 	dma_sync_single_for_device(chan2dmadev(chan), td_desc->txd.phys,
-		td_desc->desc_list_len, DMA_MEM_TO_DEV);
+		td_desc->desc_list_len, DMA_TO_DEVICE);
 
 	return &td_desc->txd;
 }
-- 
2.20.1




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

* [PATCH 4.4 121/159] mei: samples: fix a signedness bug in amt_host_if_call()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (119 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 120/159] dmaengine: timb_dma: Use proper enum in td_prep_slave_sg Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 122/159] cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit 185647813cac080453cb73a2e034a8821049f2a7 ]

"out_buf_sz" needs to be signed for the error handling to work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Documentation/misc-devices/mei/mei-amt-version.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c
index 57d0d871dcf71..33e67bd1dc343 100644
--- a/Documentation/misc-devices/mei/mei-amt-version.c
+++ b/Documentation/misc-devices/mei/mei-amt-version.c
@@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
 			unsigned int expected_sz)
 {
 	uint32_t in_buf_sz;
-	uint32_t out_buf_sz;
+	ssize_t out_buf_sz;
 	ssize_t written;
 	uint32_t status;
 	struct amt_host_if_resp_header *msg_hdr;
-- 
2.20.1




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

* [PATCH 4.4 122/159] cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (120 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 121/159] mei: samples: fix a signedness bug in amt_host_if_call() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 123/159] cxgb4: Use proper enum in IEEE_FAUX_SYNC Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Chancellor, Nick Desaulniers,
	David S. Miller, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 3b0b8f0d9a259f6a428af63e7a77547325f8e081 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                         ? CXGB4_DCB_STATE_FW_ALLSYNCED
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                         : CXGB4_DCB_STATE_FW_INCOMPLETE);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

Use the equivalent value of the expected type to silence Clang while
resulting in no functional change.

CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2
CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
index 052c660aca80a..658609c1bdabe 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
@@ -266,8 +266,8 @@ void cxgb4_dcb_handle_fw_update(struct adapter *adap,
 		enum cxgb4_dcb_state_input input =
 			((pcmd->u.dcb.control.all_syncd_pkd &
 			  FW_PORT_CMD_ALL_SYNCD_F)
-			 ? CXGB4_DCB_STATE_FW_ALLSYNCED
-			 : CXGB4_DCB_STATE_FW_INCOMPLETE);
+			 ? CXGB4_DCB_INPUT_FW_ALLSYNCED
+			 : CXGB4_DCB_INPUT_FW_INCOMPLETE);
 
 		if (dcb->dcb_version != FW_PORT_DCB_VER_UNKNOWN) {
 			dcb_running_version = FW_PORT_CMD_DCB_VERSION_G(
-- 
2.20.1




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

* [PATCH 4.4 123/159] cxgb4: Use proper enum in IEEE_FAUX_SYNC
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (121 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 122/159] cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 124/159] powerpc/pseries: Fix DTL buffer registration Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Chancellor, Nick Desaulniers,
	David S. Miller, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 258b6d141878530ba1f8fc44db683822389de914 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                        IEEE_FAUX_SYNC(dev, dcb);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded
from macro 'IEEE_FAUX_SYNC'
                                            CXGB4_DCB_STATE_FW_ALLSYNCED);
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the equivalent value of the expected type to silence Clang while
resulting in no functional change.

CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h
index ccf24d3dc9824..2c418c405c508 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h
@@ -67,7 +67,7 @@
 	do { \
 		if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \
 			cxgb4_dcb_state_fsm((__dev), \
-					    CXGB4_DCB_STATE_FW_ALLSYNCED); \
+					    CXGB4_DCB_INPUT_FW_ALLSYNCED); \
 	} while (0)
 
 /* States we can be in for a port's Data Center Bridging.
-- 
2.20.1




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

* [PATCH 4.4 124/159] powerpc/pseries: Fix DTL buffer registration
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (122 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 123/159] cxgb4: Use proper enum in IEEE_FAUX_SYNC Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 125/159] powerpc/pseries: Fix how we iterate over the DTL entries Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Naveen N. Rao, Michael Ellerman, Sasha Levin

From: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

[ Upstream commit db787af1b8a6b4be428ee2ea7d409dafcaa4a43c ]

When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we register the DTL
buffer for a cpu when the associated file under powerpc/dtl in debugfs
is opened. When doing so, we need to set the size of the buffer being
registered in the second u32 word of the buffer. This needs to be in big
endian, but we are not doing the conversion resulting in the below error
showing up in dmesg:

	dtl_start: DTL registration for cpu 0 (hw 0) failed with -4

Fix this in the obvious manner.

Fixes: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/platforms/pseries/dtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c
index 39049e4884fbd..37de83c5ef172 100644
--- a/arch/powerpc/platforms/pseries/dtl.c
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -150,7 +150,7 @@ static int dtl_start(struct dtl *dtl)
 
 	/* Register our dtl buffer with the hypervisor. The HV expects the
 	 * buffer size to be passed in the second word of the buffer */
-	((u32 *)dtl->buf)[1] = DISPATCH_LOG_BYTES;
+	((u32 *)dtl->buf)[1] = cpu_to_be32(DISPATCH_LOG_BYTES);
 
 	hwcpu = get_hard_smp_processor_id(dtl->cpu);
 	addr = __pa(dtl->buf);
-- 
2.20.1




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

* [PATCH 4.4 125/159] powerpc/pseries: Fix how we iterate over the DTL entries
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (123 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 124/159] powerpc/pseries: Fix DTL buffer registration Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 126/159] mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Naveen N. Rao, Michael Ellerman, Sasha Levin

From: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

[ Upstream commit 9258227e9dd1da8feddb07ad9702845546a581c9 ]

When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set, we look up dtl_idx in
the lppaca to determine the number of entries in the buffer. Since
lppaca is in big endian, we need to do an endian conversion before using
this in our calculation to determine the number of entries in the
buffer. Without this, we do not iterate over the existing entries in the
DTL buffer properly.

Fixes: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/platforms/pseries/dtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c
index 37de83c5ef172..7a4d172c93765 100644
--- a/arch/powerpc/platforms/pseries/dtl.c
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -185,7 +185,7 @@ static void dtl_stop(struct dtl *dtl)
 
 static u64 dtl_current_index(struct dtl *dtl)
 {
-	return lppaca_of(dtl->cpu).dtl_idx;
+	return be64_to_cpu(lppaca_of(dtl->cpu).dtl_idx);
 }
 #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
 
-- 
2.20.1




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

* [PATCH 4.4 126/159] mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (124 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 125/159] powerpc/pseries: Fix how we iterate over the DTL entries Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 127/159] ixgbe: Fix crash with VFs and flow director on interface flap Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nick Desaulniers, Nathan Chancellor,
	Miquel Raynal, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit e2bfa4ca23d9b5a7bdfcf21319fad9b59e38a05c ]

Clang warns when one enumerated type is converted implicitly to another:

drivers/mtd/nand/raw/sh_flctl.c:483:46: warning: implicit conversion
from enumeration type 'enum dma_transfer_direction' to different
enumeration type 'enum dma_data_direction' [-Wenum-conversion]
                flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_DEV_TO_MEM) > 0)
                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
drivers/mtd/nand/raw/sh_flctl.c:542:46: warning: implicit conversion
from enumeration type 'enum dma_transfer_direction' to different
enumeration type 'enum dma_data_direction' [-Wenum-conversion]
                flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_MEM_TO_DEV) > 0)
                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
2 warnings generated.

Use the proper enums from dma_data_direction to satisfy Clang.

DMA_MEM_TO_DEV = DMA_TO_DEVICE = 1
DMA_DEV_TO_MEM = DMA_FROM_DEVICE = 2

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/mtd/nand/sh_flctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 1f2785ee909fe..c00a180306e50 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -428,7 +428,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
 
 	/* initiate DMA transfer */
 	if (flctl->chan_fifo0_rx && rlen >= 32 &&
-		flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_DEV_TO_MEM) > 0)
+		flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
 			goto convert;	/* DMA success */
 
 	/* do polling transfer */
@@ -487,7 +487,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
 
 	/* initiate DMA transfer */
 	if (flctl->chan_fifo0_tx && rlen >= 32 &&
-		flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_MEM_TO_DEV) > 0)
+		flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
 			return;	/* DMA success */
 
 	/* do polling transfer */
-- 
2.20.1




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

* [PATCH 4.4 127/159] ixgbe: Fix crash with VFs and flow director on interface flap
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (125 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 126/159] mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 128/159] IB/mthca: Fix error return code in __mthca_init_one() Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Radoslaw Tyl, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

From: Radoslaw Tyl <radoslawx.tyl@intel.com>

[ Upstream commit 5d826d209164b0752c883607be4cdbbcf7cab494 ]

This patch fix crash when we have restore flow director filters after reset
adapter. In ixgbe_fdir_filter_restore() filter->action is outside of the
rx_ring array, as it has a VF identifier in the upper 32 bits.

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@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 <sashal@kernel.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a5b443171b8bd..4521181aa0ed9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4532,6 +4532,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
 	struct ixgbe_hw *hw = &adapter->hw;
 	struct hlist_node *node2;
 	struct ixgbe_fdir_filter *filter;
+	u64 action;
 
 	spin_lock(&adapter->fdir_perfect_lock);
 
@@ -4540,12 +4541,17 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter)
 
 	hlist_for_each_entry_safe(filter, node2,
 				  &adapter->fdir_filter_list, fdir_node) {
+		action = filter->action;
+		if (action != IXGBE_FDIR_DROP_QUEUE && action != 0)
+			action =
+			(action >> ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF) - 1;
+
 		ixgbe_fdir_write_perfect_filter_82599(hw,
 				&filter->filter,
 				filter->sw_idx,
-				(filter->action == IXGBE_FDIR_DROP_QUEUE) ?
+				(action == IXGBE_FDIR_DROP_QUEUE) ?
 				IXGBE_FDIR_DROP_QUEUE :
-				adapter->rx_ring[filter->action]->reg_idx);
+				adapter->rx_ring[action]->reg_idx);
 	}
 
 	spin_unlock(&adapter->fdir_perfect_lock);
-- 
2.20.1




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

* [PATCH 4.4 128/159] IB/mthca: Fix error return code in __mthca_init_one()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (126 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 127/159] ixgbe: Fix crash with VFs and flow director on interface flap Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 129/159] ata: ep93xx: Use proper enums for directions Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wei Yongjun, Jason Gunthorpe, Sasha Levin

From: Wei Yongjun <weiyongjun1@huawei.com>

[ Upstream commit 39f2495618c5e980d2873ea3f2d1877dd253e07a ]

Fix to return a negative error code from the mthca_cmd_init() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 80fd8238734c ("[PATCH] IB/mthca: Encapsulate command interface init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/mthca/mthca_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index ded76c101dde3..834b06aacc2bf 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -989,7 +989,8 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
 		goto err_free_dev;
 	}
 
-	if (mthca_cmd_init(mdev)) {
+	err = mthca_cmd_init(mdev);
+	if (err) {
 		mthca_err(mdev, "Failed to init command interface, aborting.\n");
 		goto err_free_dev;
 	}
-- 
2.20.1




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

* [PATCH 4.4 129/159] ata: ep93xx: Use proper enums for directions
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (127 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 128/159] IB/mthca: Fix error return code in __mthca_init_one() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 130/159] ALSA: hda/sigmatel - Disable automute for Elo VuPoint Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bartlomiej Zolnierkiewicz,
	Nathan Chancellor, Jens Axboe, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 6adde4a36f1b6a562a1057fbb1065007851050e7 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/ata/pata_ep93xx.c:662:36: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
        drv_data->dma_rx_data.direction = DMA_FROM_DEVICE;
                                        ~ ^~~~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:670:36: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
        drv_data->dma_tx_data.direction = DMA_TO_DEVICE;
                                        ~ ^~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:681:19: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
        conf.direction = DMA_FROM_DEVICE;
                       ~ ^~~~~~~~~~~~~~~
drivers/ata/pata_ep93xx.c:692:19: warning: implicit conversion from
enumeration type 'enum dma_data_direction' to different enumeration type
'enum dma_transfer_direction' [-Wenum-conversion]
        conf.direction = DMA_TO_DEVICE;
                       ~ ^~~~~~~~~~~~~

Use the equivalent valued enums from the expected type so that Clang no
longer warns about a conversion.

DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1
DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/ata/pata_ep93xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index bd6b089c67a3a..634c814cbeda4 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -659,7 +659,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
 	 * start of new transfer.
 	 */
 	drv_data->dma_rx_data.port = EP93XX_DMA_IDE;
-	drv_data->dma_rx_data.direction = DMA_FROM_DEVICE;
+	drv_data->dma_rx_data.direction = DMA_DEV_TO_MEM;
 	drv_data->dma_rx_data.name = "ep93xx-pata-rx";
 	drv_data->dma_rx_channel = dma_request_channel(mask,
 		ep93xx_pata_dma_filter, &drv_data->dma_rx_data);
@@ -667,7 +667,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
 		return;
 
 	drv_data->dma_tx_data.port = EP93XX_DMA_IDE;
-	drv_data->dma_tx_data.direction = DMA_TO_DEVICE;
+	drv_data->dma_tx_data.direction = DMA_MEM_TO_DEV;
 	drv_data->dma_tx_data.name = "ep93xx-pata-tx";
 	drv_data->dma_tx_channel = dma_request_channel(mask,
 		ep93xx_pata_dma_filter, &drv_data->dma_tx_data);
@@ -678,7 +678,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
 
 	/* Configure receive channel direction and source address */
 	memset(&conf, 0, sizeof(conf));
-	conf.direction = DMA_FROM_DEVICE;
+	conf.direction = DMA_DEV_TO_MEM;
 	conf.src_addr = drv_data->udma_in_phys;
 	conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	if (dmaengine_slave_config(drv_data->dma_rx_channel, &conf)) {
@@ -689,7 +689,7 @@ static void ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
 
 	/* Configure transmit channel direction and destination address */
 	memset(&conf, 0, sizeof(conf));
-	conf.direction = DMA_TO_DEVICE;
+	conf.direction = DMA_MEM_TO_DEV;
 	conf.dst_addr = drv_data->udma_out_phys;
 	conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 	if (dmaengine_slave_config(drv_data->dma_tx_channel, &conf)) {
-- 
2.20.1




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

* [PATCH 4.4 130/159] ALSA: hda/sigmatel - Disable automute for Elo VuPoint
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (128 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 129/159] ata: ep93xx: Use proper enums for directions Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 131/159] KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michael Pobega, Takashi Iwai, Sasha Levin

From: Michael Pobega <mpobega@neverware.com>

[ Upstream commit d153135e93a50cdb6f1b52e238909e9965b56056 ]

The Elo VuPoint 15MX has two headphone jacks of which neither work by
default. Disabling automute allows ALSA to work normally with the
speakers & left headphone jack.

Future pin configuration changes may be required in the future to get
the right headphone jack working in tandem.

Signed-off-by: Michael Pobega <mpobega@neverware.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 0abab7926dca3..d1a6d20ace0da 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -77,6 +77,7 @@ enum {
 	STAC_DELL_M6_BOTH,
 	STAC_DELL_EQ,
 	STAC_ALIENWARE_M17X,
+	STAC_ELO_VUPOINT_15MX,
 	STAC_92HD89XX_HP_FRONT_JACK,
 	STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK,
 	STAC_92HD73XX_ASUS_MOBO,
@@ -1875,6 +1876,18 @@ static void stac92hd73xx_fixup_no_jd(struct hda_codec *codec,
 		codec->no_jack_detect = 1;
 }
 
+
+static void stac92hd73xx_disable_automute(struct hda_codec *codec,
+				     const struct hda_fixup *fix, int action)
+{
+	struct sigmatel_spec *spec = codec->spec;
+
+	if (action != HDA_FIXUP_ACT_PRE_PROBE)
+		return;
+
+	spec->gen.suppress_auto_mute = 1;
+}
+
 static const struct hda_fixup stac92hd73xx_fixups[] = {
 	[STAC_92HD73XX_REF] = {
 		.type = HDA_FIXUP_FUNC,
@@ -1900,6 +1913,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = stac92hd73xx_fixup_alienware_m17x,
 	},
+	[STAC_ELO_VUPOINT_15MX] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = stac92hd73xx_disable_automute,
+	},
 	[STAC_92HD73XX_INTEL] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = intel_dg45id_pin_configs,
@@ -1938,6 +1955,7 @@ static const struct hda_model_fixup stac92hd73xx_models[] = {
 	{ .id = STAC_DELL_M6_BOTH, .name = "dell-m6" },
 	{ .id = STAC_DELL_EQ, .name = "dell-eq" },
 	{ .id = STAC_ALIENWARE_M17X, .name = "alienware" },
+	{ .id = STAC_ELO_VUPOINT_15MX, .name = "elo-vupoint-15mx" },
 	{ .id = STAC_92HD73XX_ASUS_MOBO, .name = "asus-mobo" },
 	{}
 };
@@ -1987,6 +2005,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
 		      "Alienware M17x", STAC_ALIENWARE_M17X),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
 		      "Alienware M17x R3", STAC_DELL_EQ),
+	SND_PCI_QUIRK(0x1059, 0x1011,
+		      "ELO VuPoint 15MX", STAC_ELO_VUPOINT_15MX),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1927,
 				"HP Z1 G2", STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
-- 
2.20.1




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

* [PATCH 4.4 131/159] KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (129 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 130/159] ALSA: hda/sigmatel - Disable automute for Elo VuPoint Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 132/159] USB: serial: cypress_m8: fix interrupt-out transfer length Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Cameron Kaiser, Paul Mackerras, Sasha Levin

From: Cameron Kaiser <spectre@floodgap.com>

[ Upstream commit 1006284c5e411872333967b1970c2ca46a9e225f ]

When an OS (currently only classic Mac OS) is running in KVM-PR and makes a
linked jump from code with split hack addressing enabled into code that does
not, LR is not correctly updated and reflects the previously munged PC.

To fix this, this patch undoes the address munge when exiting split
hack mode so that code relying on LR being a proper address will now
execute. This does not affect OS X or other operating systems running
on KVM-PR.

Signed-off-by: Cameron Kaiser <spectre@floodgap.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/kvm/book3s.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 4aab1c9c83e1a..41ac54bfdfdd9 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -70,8 +70,11 @@ void kvmppc_unfixup_split_real(struct kvm_vcpu *vcpu)
 {
 	if (vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) {
 		ulong pc = kvmppc_get_pc(vcpu);
+		ulong lr = kvmppc_get_lr(vcpu);
 		if ((pc & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS)
 			kvmppc_set_pc(vcpu, pc & ~SPLIT_HACK_MASK);
+		if ((lr & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS)
+			kvmppc_set_lr(vcpu, lr & ~SPLIT_HACK_MASK);
 		vcpu->arch.hflags &= ~BOOK3S_HFLAG_SPLIT_HACK;
 	}
 }
-- 
2.20.1




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

* [PATCH 4.4 132/159] USB: serial: cypress_m8: fix interrupt-out transfer length
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (130 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 131/159] KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 133/159] mtd: physmap_of: Release resources on error Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold, Sasha Levin

From: Johan Hovold <johan@kernel.org>

[ Upstream commit 56445eef55cb5904096fed7a73cf87b755dfffc7 ]

Fix interrupt-out transfer length which was being set to the
transfer-buffer length rather than the size of the outgoing packet.

Note that no slab data was leaked as the whole transfer buffer is always
cleared before each transfer.

Fixes: 9aa8dae7b1fa ("cypress_m8: use usb_fill_int_urb where appropriate")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/serial/cypress_m8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 244acb1299a95..e92cd1eceefa2 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -773,7 +773,7 @@ static void cypress_send(struct usb_serial_port *port)
 
 	usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
 		usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress),
-		port->interrupt_out_buffer, port->interrupt_out_size,
+		port->interrupt_out_buffer, actual_size,
 		cypress_write_int_callback, port, priv->write_urb_interval);
 	result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
 	if (result) {
-- 
2.20.1




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

* [PATCH 4.4 133/159] mtd: physmap_of: Release resources on error
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (131 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 132/159] USB: serial: cypress_m8: fix interrupt-out transfer length Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 134/159] brcmfmac: fix full timeout waiting for action frame on-channel tx Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ricardo Ribalda Delgado,
	Boris Brezillon, Sasha Levin

From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>

[ Upstream commit ef0de747f7ad179c7698a5b0e28db05f18ecbf57 ]

During probe, if there was an error the memory region and the memory
map were not properly released.This can lead a system unusable if
deferred probe is in use.

Replace mem_request and map with devm_ioremap_resource

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/mtd/maps/physmap_of.c | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index e46b4e9836668..77e7542fa8e42 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -28,7 +28,6 @@
 struct of_flash_list {
 	struct mtd_info *mtd;
 	struct map_info map;
-	struct resource *res;
 };
 
 struct of_flash {
@@ -53,18 +52,10 @@ static int of_flash_remove(struct platform_device *dev)
 			mtd_concat_destroy(info->cmtd);
 	}
 
-	for (i = 0; i < info->list_size; i++) {
+	for (i = 0; i < info->list_size; i++)
 		if (info->list[i].mtd)
 			map_destroy(info->list[i].mtd);
 
-		if (info->list[i].map.virt)
-			iounmap(info->list[i].map.virt);
-
-		if (info->list[i].res) {
-			release_resource(info->list[i].res);
-			kfree(info->list[i].res);
-		}
-	}
 	return 0;
 }
 
@@ -223,10 +214,11 @@ static int of_flash_probe(struct platform_device *dev)
 
 		err = -EBUSY;
 		res_size = resource_size(&res);
-		info->list[i].res = request_mem_region(res.start, res_size,
-						       dev_name(&dev->dev));
-		if (!info->list[i].res)
+		info->list[i].map.virt = devm_ioremap_resource(&dev->dev, &res);
+		if (IS_ERR(info->list[i].map.virt)) {
+			err = PTR_ERR(info->list[i].map.virt);
 			goto err_out;
+		}
 
 		err = -ENXIO;
 		width = of_get_property(dp, "bank-width", NULL);
@@ -242,15 +234,6 @@ static int of_flash_probe(struct platform_device *dev)
 		info->list[i].map.bankwidth = be32_to_cpup(width);
 		info->list[i].map.device_node = dp;
 
-		err = -ENOMEM;
-		info->list[i].map.virt = ioremap(info->list[i].map.phys,
-						 info->list[i].map.size);
-		if (!info->list[i].map.virt) {
-			dev_err(&dev->dev, "Failed to ioremap() flash"
-				" region\n");
-			goto err_out;
-		}
-
 		simple_map_init(&info->list[i].map);
 
 		/*
-- 
2.20.1




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

* [PATCH 4.4 134/159] brcmfmac: fix full timeout waiting for action frame on-channel tx
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (132 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 133/159] mtd: physmap_of: Release resources on error Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 135/159] NFSv4.x: fix lock recovery during delegation recall Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chung-Hsien Hsu, Chi-Hsien Lin,
	Kalle Valo, Sasha Levin

From: Chung-Hsien Hsu <stanley.hsu@cypress.com>

[ Upstream commit fbf07000960d9c8a13fdc17c6de0230d681c7543 ]

The driver sends an action frame down and waits for a completion signal
triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
to continue the process. However, the action frame could be transmitted
either on the current channel or on an off channel. For the on-channel
case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
the frame is transmitted, which make the driver always wait a full
timeout duration. This patch has the completion signal be triggered by
receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
case.

This change fixes WFA p2p certification 5.1.19 failure.

Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++--
 drivers/net/wireless/brcm80211/brcmfmac/p2p.h |  2 ++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
index e6c8b0d5afe06..7dae935701a72 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
@@ -1469,10 +1469,12 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp,
 		return 0;
 
 	if (e->event_code == BRCMF_E_ACTION_FRAME_COMPLETE) {
-		if (e->status == BRCMF_E_STATUS_SUCCESS)
+		if (e->status == BRCMF_E_STATUS_SUCCESS) {
 			set_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED,
 				&p2p->status);
-		else {
+			if (!p2p->wait_for_offchan_complete)
+				complete(&p2p->send_af_done);
+		} else {
 			set_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status);
 			/* If there is no ack, we don't need to wait for
 			 * WLC_E_ACTION_FRAME_OFFCHAN_COMPLETE event
@@ -1523,6 +1525,17 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
 	p2p->af_sent_channel = le32_to_cpu(af_params->channel);
 	p2p->af_tx_sent_jiffies = jiffies;
 
+	if (test_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, &p2p->status) &&
+	    p2p->af_sent_channel ==
+	    ieee80211_frequency_to_channel(p2p->remain_on_channel.center_freq))
+		p2p->wait_for_offchan_complete = false;
+	else
+		p2p->wait_for_offchan_complete = true;
+
+	brcmf_dbg(TRACE, "Waiting for %s tx completion event\n",
+		  (p2p->wait_for_offchan_complete) ?
+		   "off-channel" : "on-channel");
+
 	timeout = wait_for_completion_timeout(&p2p->send_af_done,
 					msecs_to_jiffies(P2P_AF_MAX_WAIT_TIME));
 
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.h b/drivers/net/wireless/brcm80211/brcmfmac/p2p.h
index 5d49059021a9f..59e902adfc087 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.h
@@ -125,6 +125,7 @@ struct afx_hdl {
  * @gon_req_action: about to send go negotiation requets frame.
  * @block_gon_req_tx: drop tx go negotiation requets frame.
  * @p2pdev_dynamically: is p2p device if created by module param or supplicant.
+ * @wait_for_offchan_complete: wait for off-channel tx completion event.
  */
 struct brcmf_p2p_info {
 	struct brcmf_cfg80211_info *cfg;
@@ -146,6 +147,7 @@ struct brcmf_p2p_info {
 	bool gon_req_action;
 	bool block_gon_req_tx;
 	bool p2pdev_dynamically;
+	bool wait_for_offchan_complete;
 };
 
 s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced);
-- 
2.20.1




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

* [PATCH 4.4 135/159] NFSv4.x: fix lock recovery during delegation recall
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (133 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 134/159] brcmfmac: fix full timeout waiting for action frame on-channel tx Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 136/159] dmaengine: ioat: fix prototype of ioat_enumerate_channels Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Olga Kornievskaia, Trond Myklebust,
	Sasha Levin

From: Olga Kornievskaia <kolga@netapp.com>

[ Upstream commit 44f411c353bf6d98d5a34f8f1b8605d43b2e50b8 ]

Running "./nfstest_delegation --runtest recall26" uncovers that
client doesn't recover the lock when we have an appending open,
where the initial open got a write delegation.

Instead of checking for the passed in open context against
the file lock's open context. Check that the state is the same.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfs/delegation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 5dac3382405ce..b50315ad0391a 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -101,7 +101,7 @@ int nfs4_check_delegation(struct inode *inode, fmode_t flags)
 	return nfs4_do_check_delegation(inode, flags, false);
 }
 
-static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
+static int nfs_delegation_claim_locks(struct nfs4_state *state, const nfs4_stateid *stateid)
 {
 	struct inode *inode = state->inode;
 	struct file_lock *fl;
@@ -116,7 +116,7 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_
 	spin_lock(&flctx->flc_lock);
 restart:
 	list_for_each_entry(fl, list, fl_list) {
-		if (nfs_file_open_context(fl->fl_file) != ctx)
+		if (nfs_file_open_context(fl->fl_file)->state != state)
 			continue;
 		spin_unlock(&flctx->flc_lock);
 		status = nfs4_lock_delegation_recall(fl, state, stateid);
@@ -163,7 +163,7 @@ static int nfs_delegation_claim_opens(struct inode *inode,
 		seq = raw_seqcount_begin(&sp->so_reclaim_seqcount);
 		err = nfs4_open_delegation_recall(ctx, state, stateid, type);
 		if (!err)
-			err = nfs_delegation_claim_locks(ctx, state, stateid);
+			err = nfs_delegation_claim_locks(state, stateid);
 		if (!err && read_seqcount_retry(&sp->so_reclaim_seqcount, seq))
 			err = -EAGAIN;
 		mutex_unlock(&sp->so_delegreturn_mutex);
-- 
2.20.1




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

* [PATCH 4.4 136/159] dmaengine: ioat: fix prototype of ioat_enumerate_channels
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (134 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 135/159] NFSv4.x: fix lock recovery during delegation recall Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 137/159] Input: st1232 - set INPUT_PROP_DIRECT property Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rami Rosen, Vinod Koul, Sasha Levin

From: Rami Rosen <ramirose@gmail.com>

[ Upstream commit f4d34aa8c887a8a2d23ef546da0efa10e3f77241 ]

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/ioat/init.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index 106fa9b327d92..92b0a7a042ee0 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -128,7 +128,7 @@ static void
 ioat_init_channel(struct ioatdma_device *ioat_dma,
 		  struct ioatdma_chan *ioat_chan, int idx);
 static void ioat_intr_quirk(struct ioatdma_device *ioat_dma);
-static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma);
+static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma);
 static int ioat3_dma_self_test(struct ioatdma_device *ioat_dma);
 
 static int ioat_dca_enabled = 1;
@@ -593,7 +593,7 @@ static void ioat_dma_remove(struct ioatdma_device *ioat_dma)
  * ioat_enumerate_channels - find and initialize the device's channels
  * @ioat_dma: the ioat dma device to be enumerated
  */
-static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
+static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
 {
 	struct ioatdma_chan *ioat_chan;
 	struct device *dev = &ioat_dma->pdev->dev;
@@ -612,7 +612,7 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
 	xfercap_log = readb(ioat_dma->reg_base + IOAT_XFERCAP_OFFSET);
 	xfercap_log &= 0x1f; /* bits [4:0] valid */
 	if (xfercap_log == 0)
-		return 0;
+		return;
 	dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
 
 	for (i = 0; i < dma->chancnt; i++) {
@@ -629,7 +629,6 @@ static int ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
 		}
 	}
 	dma->chancnt = i;
-	return i;
 }
 
 /**
-- 
2.20.1




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

* [PATCH 4.4 137/159] Input: st1232 - set INPUT_PROP_DIRECT property
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (135 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 136/159] dmaengine: ioat: fix prototype of ioat_enumerate_channels Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 138/159] x86/olpc: Fix build error with CONFIG_MFD_CS5535=m Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin Kepplinger, Dmitry Torokhov,
	Sasha Levin

From: Martin Kepplinger <martink@posteo.de>

[ Upstream commit 20bbb312079494a406c10c90932e3c80837c9d94 ]

This is how userspace checks for touchscreen devices most reliably.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/touchscreen/st1232.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index e943678ce54cd..f1c574d6be17f 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -203,6 +203,7 @@ static int st1232_ts_probe(struct i2c_client *client,
 	input_dev->id.bustype = BUS_I2C;
 	input_dev->dev.parent = &client->dev;
 
+	__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
 	__set_bit(EV_SYN, input_dev->evbit);
 	__set_bit(EV_KEY, input_dev->evbit);
 	__set_bit(EV_ABS, input_dev->evbit);
-- 
2.20.1




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

* [PATCH 4.4 138/159] x86/olpc: Fix build error with CONFIG_MFD_CS5535=m
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (136 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 137/159] Input: st1232 - set INPUT_PROP_DIRECT property Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 139/159] crypto: mxs-dcp - Fix SHA null hashes and output length Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Borislav Petkov, Lubomir Rintel, x86,
	Sasha Levin

From: Borislav Petkov <bp@suse.de>

[ Upstream commit fa112cf1e8bc693d5a666b1c479a2859c8b6e0f1 ]

When building a 32-bit config which has the above MFD item as module
but OLPC_XO1_PM is enabled =y - which is bool, btw - the kernel fails
building with:

  ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_remove':
  /home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:159: undefined reference to `mfd_cell_disable'
  ld: arch/x86/platform/olpc/olpc-xo1-pm.o: in function `xo1_pm_probe':
  /home/boris/kernel/linux/arch/x86/platform/olpc/olpc-xo1-pm.c:133: undefined reference to `mfd_cell_enable'
  make: *** [Makefile:1030: vmlinux] Error 1

Force MFD_CS5535 to y if OLPC_XO1_PM is enabled.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20181005131750.GA5366@zn.tnic
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 53b429811aef0..1bee1c6a9891b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2526,8 +2526,7 @@ config OLPC
 
 config OLPC_XO1_PM
 	bool "OLPC XO-1 Power Management"
-	depends on OLPC && MFD_CS5535 && PM_SLEEP
-	select MFD_CORE
+	depends on OLPC && MFD_CS5535=y && PM_SLEEP
 	---help---
 	  Add support for poweroff and suspend of the OLPC XO-1 laptop.
 
-- 
2.20.1




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

* [PATCH 4.4 139/159] crypto: mxs-dcp - Fix SHA null hashes and output length
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (137 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 138/159] x86/olpc: Fix build error with CONFIG_MFD_CS5535=m Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 140/159] crypto: mxs-dcp - Fix AES issues Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Radu Solea, Leonard Crestez,
	Herbert Xu, Sasha Levin

From: Radu Solea <radu.solea@nxp.com>

[ Upstream commit c709eebaf5c5faa8a0f140355f9cfe67e8f7afb1 ]

DCP writes at least 32 bytes in the output buffer instead of hash length
as documented. Add intermediate buffer to prevent write out of bounds.

When requested to produce null hashes DCP fails to produce valid output.
Add software workaround to bypass hardware and return valid output.

Signed-off-by: Radu Solea <radu.solea@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/crypto/mxs-dcp.c | 47 +++++++++++++++++++++++++++++++---------
 1 file changed, 37 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index fe8cfe24c518f..38c5dd8891138 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -28,9 +28,24 @@
 
 #define DCP_MAX_CHANS	4
 #define DCP_BUF_SZ	PAGE_SIZE
+#define DCP_SHA_PAY_SZ  64
 
 #define DCP_ALIGNMENT	64
 
+/*
+ * Null hashes to align with hw behavior on imx6sl and ull
+ * these are flipped for consistency with hw output
+ */
+const uint8_t sha1_null_hash[] =
+	"\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf"
+	"\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda";
+
+const uint8_t sha256_null_hash[] =
+	"\x55\xb8\x52\x78\x1b\x99\x95\xa4"
+	"\x4c\x93\x9b\x64\xe4\x41\xae\x27"
+	"\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a"
+	"\x14\x1c\xfc\x98\x42\xc4\xb0\xe3";
+
 /* DCP DMA descriptor. */
 struct dcp_dma_desc {
 	uint32_t	next_cmd_addr;
@@ -48,6 +63,7 @@ struct dcp_coherent_block {
 	uint8_t			aes_in_buf[DCP_BUF_SZ];
 	uint8_t			aes_out_buf[DCP_BUF_SZ];
 	uint8_t			sha_in_buf[DCP_BUF_SZ];
+	uint8_t			sha_out_buf[DCP_SHA_PAY_SZ];
 
 	uint8_t			aes_key[2 * AES_KEYSIZE_128];
 
@@ -518,8 +534,6 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
 	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
 	struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm);
 	struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req);
-	struct hash_alg_common *halg = crypto_hash_alg_common(tfm);
-
 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
 
 	dma_addr_t digest_phys = 0;
@@ -541,10 +555,23 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
 	desc->payload = 0;
 	desc->status = 0;
 
+	/*
+	 * Align driver with hw behavior when generating null hashes
+	 */
+	if (rctx->init && rctx->fini && desc->size == 0) {
+		struct hash_alg_common *halg = crypto_hash_alg_common(tfm);
+		const uint8_t *sha_buf =
+			(actx->alg == MXS_DCP_CONTROL1_HASH_SELECT_SHA1) ?
+			sha1_null_hash : sha256_null_hash;
+		memcpy(sdcp->coh->sha_out_buf, sha_buf, halg->digestsize);
+		ret = 0;
+		goto done_run;
+	}
+
 	/* Set HASH_TERM bit for last transfer block. */
 	if (rctx->fini) {
-		digest_phys = dma_map_single(sdcp->dev, req->result,
-					     halg->digestsize, DMA_FROM_DEVICE);
+		digest_phys = dma_map_single(sdcp->dev, sdcp->coh->sha_out_buf,
+					     DCP_SHA_PAY_SZ, DMA_FROM_DEVICE);
 		desc->control0 |= MXS_DCP_CONTROL0_HASH_TERM;
 		desc->payload = digest_phys;
 	}
@@ -552,9 +579,10 @@ static int mxs_dcp_run_sha(struct ahash_request *req)
 	ret = mxs_dcp_start_dma(actx);
 
 	if (rctx->fini)
-		dma_unmap_single(sdcp->dev, digest_phys, halg->digestsize,
+		dma_unmap_single(sdcp->dev, digest_phys, DCP_SHA_PAY_SZ,
 				 DMA_FROM_DEVICE);
 
+done_run:
 	dma_unmap_single(sdcp->dev, buf_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
 
 	return ret;
@@ -572,6 +600,7 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
 	const int nents = sg_nents(req->src);
 
 	uint8_t *in_buf = sdcp->coh->sha_in_buf;
+	uint8_t *out_buf = sdcp->coh->sha_out_buf;
 
 	uint8_t *src_buf;
 
@@ -626,11 +655,9 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
 
 		actx->fill = 0;
 
-		/* For some reason, the result is flipped. */
-		for (i = 0; i < halg->digestsize / 2; i++) {
-			swap(req->result[i],
-			     req->result[halg->digestsize - i - 1]);
-		}
+		/* For some reason the result is flipped */
+		for (i = 0; i < halg->digestsize; i++)
+			req->result[i] = out_buf[halg->digestsize - i - 1];
 	}
 
 	return 0;
-- 
2.20.1




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

* [PATCH 4.4 140/159] crypto: mxs-dcp - Fix AES issues
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (138 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 139/159] crypto: mxs-dcp - Fix SHA null hashes and output length Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 141/159] ACPI / SBS: Fix rare oops when removing modules Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Radu Solea, Franck LENORMAND,
	Leonard Crestez, Herbert Xu, Sasha Levin

From: Radu Solea <radu.solea@nxp.com>

[ Upstream commit fadd7a6e616b89c7f4f7bfa7b824f290bab32c3c ]

The DCP driver does not obey cryptlen, when doing android CTS this
results in passing to hardware input stream lengths which are not
multiple of block size.

Add a check to prevent future erroneous stream lengths from reaching the
hardware and adjust the scatterlist walking code to obey cryptlen.

Also properly copy-out the IV for chaining.

Signed-off-by: Radu Solea <radu.solea@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/crypto/mxs-dcp.c | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 38c5dd8891138..4b82cf9da0ba7 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -225,6 +225,12 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
 	dma_addr_t dst_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_out_buf,
 					     DCP_BUF_SZ, DMA_FROM_DEVICE);
 
+	if (actx->fill % AES_BLOCK_SIZE) {
+		dev_err(sdcp->dev, "Invalid block size!\n");
+		ret = -EINVAL;
+		goto aes_done_run;
+	}
+
 	/* Fill in the DMA descriptor. */
 	desc->control0 = MXS_DCP_CONTROL0_DECR_SEMAPHORE |
 		    MXS_DCP_CONTROL0_INTERRUPT |
@@ -254,6 +260,7 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
 
 	ret = mxs_dcp_start_dma(actx);
 
+aes_done_run:
 	dma_unmap_single(sdcp->dev, key_phys, 2 * AES_KEYSIZE_128,
 			 DMA_TO_DEVICE);
 	dma_unmap_single(sdcp->dev, src_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
@@ -280,13 +287,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
 
 	uint8_t *out_tmp, *src_buf, *dst_buf = NULL;
 	uint32_t dst_off = 0;
+	uint32_t last_out_len = 0;
 
 	uint8_t *key = sdcp->coh->aes_key;
 
 	int ret = 0;
 	int split = 0;
-	unsigned int i, len, clen, rem = 0;
+	unsigned int i, len, clen, rem = 0, tlen = 0;
 	int init = 0;
+	bool limit_hit = false;
 
 	actx->fill = 0;
 
@@ -305,6 +314,11 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
 	for_each_sg(req->src, src, nents, i) {
 		src_buf = sg_virt(src);
 		len = sg_dma_len(src);
+		tlen += len;
+		limit_hit = tlen > req->nbytes;
+
+		if (limit_hit)
+			len = req->nbytes - (tlen - len);
 
 		do {
 			if (actx->fill + len > out_off)
@@ -321,13 +335,15 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
 			 * If we filled the buffer or this is the last SG,
 			 * submit the buffer.
 			 */
-			if (actx->fill == out_off || sg_is_last(src)) {
+			if (actx->fill == out_off || sg_is_last(src) ||
+				limit_hit) {
 				ret = mxs_dcp_run_aes(actx, req, init);
 				if (ret)
 					return ret;
 				init = 0;
 
 				out_tmp = out_buf;
+				last_out_len = actx->fill;
 				while (dst && actx->fill) {
 					if (!split) {
 						dst_buf = sg_virt(dst);
@@ -350,6 +366,19 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq)
 				}
 			}
 		} while (len);
+
+		if (limit_hit)
+			break;
+	}
+
+	/* Copy the IV for CBC for chaining */
+	if (!rctx->ecb) {
+		if (rctx->enc)
+			memcpy(req->info, out_buf+(last_out_len-AES_BLOCK_SIZE),
+				AES_BLOCK_SIZE);
+		else
+			memcpy(req->info, in_buf+(last_out_len-AES_BLOCK_SIZE),
+				AES_BLOCK_SIZE);
 	}
 
 	return ret;
-- 
2.20.1




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

* [PATCH 4.4 141/159] ACPI / SBS: Fix rare oops when removing modules
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (139 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 140/159] crypto: mxs-dcp - Fix AES issues Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 142/159] fbdev: sbuslib: use checked version of put_user() Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ronald Tschalär,
	Rafael J. Wysocki, Sasha Levin

From: Ronald Tschalär <ronald@innovation.ch>

[ Upstream commit 757c968c442397f1249bb775a7c8c03842e3e0c7 ]

There was a small race when removing the sbshc module where
smbus_alarm() had queued acpi_smbus_callback() for deferred execution
but it hadn't been run yet, so that when it did run hc had been freed
and the module unloaded, resulting in an invalid paging request.

A similar race existed when removing the sbs module with regards to
acpi_sbs_callback() (which is called from acpi_smbus_callback()).

We therefore need to ensure no callbacks are pending or executing before
the cleanups are done and the modules are removed.

Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/acpi/osl.c   | 1 +
 drivers/acpi/sbshc.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index a000ecb995e66..e59f50576f2ae 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1186,6 +1186,7 @@ void acpi_os_wait_events_complete(void)
 	flush_workqueue(kacpid_wq);
 	flush_workqueue(kacpi_notify_wq);
 }
+EXPORT_SYMBOL(acpi_os_wait_events_complete);
 
 struct acpi_hp_work {
 	struct work_struct work;
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 7a3431018e0ab..5008ead4609a4 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -196,6 +196,7 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc)
 	hc->callback = NULL;
 	hc->context = NULL;
 	mutex_unlock(&hc->lock);
+	acpi_os_wait_events_complete();
 	return 0;
 }
 
@@ -292,6 +293,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device)
 
 	hc = acpi_driver_data(device);
 	acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
+	acpi_os_wait_events_complete();
 	kfree(hc);
 	device->driver_data = NULL;
 	return 0;
-- 
2.20.1




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

* [PATCH 4.4 142/159] fbdev: sbuslib: use checked version of put_user()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (140 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 141/159] ACPI / SBS: Fix rare oops when removing modules Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 143/159] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Philippe Ombredanne,
	Mathieu Malaterre, Bartlomiej Zolnierkiewicz, Sasha Levin,
	Peter Malone

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit d8bad911e5e55e228d59c0606ff7e6b8131ca7bf ]

I'm not sure why the code assumes that only the first put_user() needs
an access_ok() check.  I have made all the put_user() and get_user()
calls checked.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Mathieu Malaterre <malat@debian.org>
Cc: Peter Malone <peter.malone@gmail.com>,
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/video/fbdev/sbuslib.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/video/fbdev/sbuslib.c b/drivers/video/fbdev/sbuslib.c
index 31c301d6be621..b425718925c01 100644
--- a/drivers/video/fbdev/sbuslib.c
+++ b/drivers/video/fbdev/sbuslib.c
@@ -105,11 +105,11 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
 		struct fbtype __user *f = (struct fbtype __user *) arg;
 
 		if (put_user(type, &f->fb_type) ||
-		    __put_user(info->var.yres, &f->fb_height) ||
-		    __put_user(info->var.xres, &f->fb_width) ||
-		    __put_user(fb_depth, &f->fb_depth) ||
-		    __put_user(0, &f->fb_cmsize) ||
-		    __put_user(fb_size, &f->fb_cmsize))
+		    put_user(info->var.yres, &f->fb_height) ||
+		    put_user(info->var.xres, &f->fb_width) ||
+		    put_user(fb_depth, &f->fb_depth) ||
+		    put_user(0, &f->fb_cmsize) ||
+		    put_user(fb_size, &f->fb_cmsize))
 			return -EFAULT;
 		return 0;
 	}
@@ -124,10 +124,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
 		unsigned int index, count, i;
 
 		if (get_user(index, &c->index) ||
-		    __get_user(count, &c->count) ||
-		    __get_user(ured, &c->red) ||
-		    __get_user(ugreen, &c->green) ||
-		    __get_user(ublue, &c->blue))
+		    get_user(count, &c->count) ||
+		    get_user(ured, &c->red) ||
+		    get_user(ugreen, &c->green) ||
+		    get_user(ublue, &c->blue))
 			return -EFAULT;
 
 		cmap.len = 1;
@@ -164,10 +164,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
 		u8 red, green, blue;
 
 		if (get_user(index, &c->index) ||
-		    __get_user(count, &c->count) ||
-		    __get_user(ured, &c->red) ||
-		    __get_user(ugreen, &c->green) ||
-		    __get_user(ublue, &c->blue))
+		    get_user(count, &c->count) ||
+		    get_user(ured, &c->red) ||
+		    get_user(ugreen, &c->green) ||
+		    get_user(ublue, &c->blue))
 			return -EFAULT;
 
 		if (index + count > cmap->len)
-- 
2.20.1




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

* [PATCH 4.4 143/159] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (141 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 142/159] fbdev: sbuslib: use checked version of put_user() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 144/159] bcache: recal cached_dev_sectors on detach Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Peter Malone,
	Philippe Ombredanne, Mathieu Malaterre,
	Bartlomiej Zolnierkiewicz, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit e5017716adb8aa5c01c52386c1b7470101ffe9c5 ]

The "index + count" addition can overflow.  Both come directly from the
user.  This bug leads to an information leak.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Peter Malone <peter.malone@gmail.com>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/video/fbdev/sbuslib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sbuslib.c b/drivers/video/fbdev/sbuslib.c
index b425718925c01..52e161dbd2047 100644
--- a/drivers/video/fbdev/sbuslib.c
+++ b/drivers/video/fbdev/sbuslib.c
@@ -170,7 +170,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
 		    get_user(ublue, &c->blue))
 			return -EFAULT;
 
-		if (index + count > cmap->len)
+		if (index > cmap->len || count > cmap->len - index)
 			return -EINVAL;
 
 		for (i = 0; i < count; i++) {
-- 
2.20.1




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

* [PATCH 4.4 144/159] bcache: recal cached_dev_sectors on detach
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (142 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 143/159] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 145/159] proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted() Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shenghui Wang, Coly Li, Jens Axboe,
	Sasha Levin

From: Shenghui Wang <shhuiw@foxmail.com>

[ Upstream commit 46010141da6677b81cc77f9b47f8ac62bd1cbfd3 ]

Recal cached_dev_sectors on cached_dev detached, as recal done on
cached_dev attached.

Update the cached_dev_sectors before bcache_device_detach called
as bcache_device_detach will set bcache_device->c to NULL.

Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/md/bcache/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index e420921460836..df8f1e69077f6 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -902,6 +902,7 @@ static void cached_dev_detach_finish(struct work_struct *w)
 	bch_write_bdev_super(dc, &cl);
 	closure_sync(&cl);
 
+	calc_cached_dev_sectors(dc->disk.c);
 	bcache_device_detach(&dc->disk);
 	list_move(&dc->list, &uncached_devices);
 
-- 
2.20.1




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

* [PATCH 4.4 145/159] proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (143 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 144/159] bcache: recal cached_dev_sectors on detach Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 146/159] backlight: lm3639: Unconditionally call led_classdev_unregister Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lianbo Jiang, Borislav Petkov, x86,
	Sasha Levin

From: Borislav Petkov <bp@suse.de>

[ Upstream commit cf089611f4c446285046fcd426d90c18f37d2905 ]

Lianbo reported a build error with a particular 32-bit config, see Link
below for details.

Provide a weak copy_oldmem_page_encrypted() function which architectures
can override, in the same manner other functionality in that file is
supplied.

Reported-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: x86@kernel.org
Link: http://lkml.kernel.org/r/710b9d95-2f70-eadf-c4a1-c3dc80ee4ebb@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/proc/vmcore.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 4e61388ec03d2..08143139b65a7 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -164,6 +164,16 @@ int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma,
 	return remap_pfn_range(vma, from, pfn, size, prot);
 }
 
+/*
+ * Architectures which support memory encryption override this.
+ */
+ssize_t __weak
+copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize,
+			   unsigned long offset, int userbuf)
+{
+	return copy_oldmem_page(pfn, buf, csize, offset, userbuf);
+}
+
 /*
  * Copy to either kernel or user space
  */
-- 
2.20.1




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

* [PATCH 4.4 146/159] backlight: lm3639: Unconditionally call led_classdev_unregister
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (144 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 145/159] proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted() Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 147/159] printk: Give error on attempt to set log buffer length to over 2G Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Chancellor, Daniel Thompson,
	Lee Jones, Sasha Levin

From: Nathan Chancellor <natechancellor@gmail.com>

[ Upstream commit 7cea645ae9c5a54aa7904fddb2cdf250acd63a6c ]

Clang warns that the address of a pointer will always evaluated as true
in a boolean context.

drivers/video/backlight/lm3639_bl.c:403:14: warning: address of
'pchip->cdev_torch' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (&pchip->cdev_torch)
        ~~   ~~~~~~~^~~~~~~~~~
drivers/video/backlight/lm3639_bl.c:405:14: warning: address of
'pchip->cdev_flash' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (&pchip->cdev_flash)
        ~~   ~~~~~~~^~~~~~~~~~
2 warnings generated.

These statements have been present since 2012, introduced by
commit 0f59858d5119 ("backlight: add new lm3639 backlight
driver"). Given that they have been called unconditionally since
then presumably without any issues, removing the always true if
statements to fix the warnings without any real world changes.

Link: https://github.com/ClangBuiltLinux/linux/issues/119
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/video/backlight/lm3639_bl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c
index cd50df5807ead..086611c7bc03c 100644
--- a/drivers/video/backlight/lm3639_bl.c
+++ b/drivers/video/backlight/lm3639_bl.c
@@ -400,10 +400,8 @@ static int lm3639_remove(struct i2c_client *client)
 
 	regmap_write(pchip->regmap, REG_ENABLE, 0x00);
 
-	if (&pchip->cdev_torch)
-		led_classdev_unregister(&pchip->cdev_torch);
-	if (&pchip->cdev_flash)
-		led_classdev_unregister(&pchip->cdev_flash);
+	led_classdev_unregister(&pchip->cdev_torch);
+	led_classdev_unregister(&pchip->cdev_flash);
 	if (pchip->bled)
 		device_remove_file(&(pchip->bled->dev), &dev_attr_bled_mode);
 	return 0;
-- 
2.20.1




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

* [PATCH 4.4 147/159] printk: Give error on attempt to set log buffer length to over 2G
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (145 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 146/159] backlight: lm3639: Unconditionally call led_classdev_unregister Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:28 ` [PATCH 4.4 148/159] media: isif: fix a NULL pointer dereference bug Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, rostedt, Sergey Senozhatsky, He Zhe,
	Petr Mladek, Sasha Levin

From: He Zhe <zhe.he@windriver.com>

[ Upstream commit e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e ]

The current printk() is ready to handle log buffer size up to 2G.
Give an explicit error for users who want to use larger log buffer.

Also fix printk formatting to show the 2G as a positive number.

Link: http://lkml.kernel.org/r/20181008135916.gg4kkmoki5bgtco5@pathway.suse.cz
Cc: rostedt@goodmis.org
Cc: linux-kernel@vger.kernel.org
Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
[pmladek: Fixed to the really safe limit 2GB.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/printk/printk.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 5a1b2a914b4e5..699c18c9d7633 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -279,6 +279,7 @@ static u32 clear_idx;
 #define LOG_ALIGN __alignof__(struct printk_log)
 #endif
 #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT)
+#define LOG_BUF_LEN_MAX (u32)(1 << 31)
 static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
 static char *log_buf = __log_buf;
 static u32 log_buf_len = __LOG_BUF_LEN;
@@ -870,18 +871,23 @@ void log_buf_kexec_setup(void)
 static unsigned long __initdata new_log_buf_len;
 
 /* we practice scaling the ring buffer by powers of 2 */
-static void __init log_buf_len_update(unsigned size)
+static void __init log_buf_len_update(u64 size)
 {
+	if (size > (u64)LOG_BUF_LEN_MAX) {
+		size = (u64)LOG_BUF_LEN_MAX;
+		pr_err("log_buf over 2G is not supported.\n");
+	}
+
 	if (size)
 		size = roundup_pow_of_two(size);
 	if (size > log_buf_len)
-		new_log_buf_len = size;
+		new_log_buf_len = (unsigned long)size;
 }
 
 /* save requested log_buf_len since it's too early to process it */
 static int __init log_buf_len_setup(char *str)
 {
-	unsigned int size;
+	u64 size;
 
 	if (!str)
 		return -EINVAL;
@@ -951,7 +957,7 @@ void __init setup_log_buf(int early)
 	}
 
 	if (unlikely(!new_log_buf)) {
-		pr_err("log_buf_len: %ld bytes not available\n",
+		pr_err("log_buf_len: %lu bytes not available\n",
 			new_log_buf_len);
 		return;
 	}
@@ -964,8 +970,8 @@ void __init setup_log_buf(int early)
 	memcpy(log_buf, __log_buf, __LOG_BUF_LEN);
 	raw_spin_unlock_irqrestore(&logbuf_lock, flags);
 
-	pr_info("log_buf_len: %d bytes\n", log_buf_len);
-	pr_info("early log buf free: %d(%d%%)\n",
+	pr_info("log_buf_len: %u bytes\n", log_buf_len);
+	pr_info("early log buf free: %u(%u%%)\n",
 		free, (free * 100) / __LOG_BUF_LEN);
 }
 
-- 
2.20.1




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

* [PATCH 4.4 148/159] media: isif: fix a NULL pointer dereference bug
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (146 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 147/159] printk: Give error on attempt to set log buffer length to over 2G Greg Kroah-Hartman
@ 2019-11-22 10:28 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 149/159] GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wenwen Wang, Hans Verkuil,
	Mauro Carvalho Chehab, Sasha Levin

From: Wenwen Wang <wang6495@umn.edu>

[ Upstream commit a26ac6c1bed951b2066cc4b2257facd919e35c0b ]

In isif_probe(), there is a while loop to get the ISIF base address and
linearization table0 and table1 address. In the loop body, the function
platform_get_resource() is called to get the resource. If
platform_get_resource() returns NULL, the loop is terminated and the
execution goes to 'fail_nobase_res'. Suppose the loop is terminated at the
first iteration because platform_get_resource() returns NULL and the
execution goes to 'fail_nobase_res'. Given that there is another while loop
at 'fail_nobase_res' and i equals to 0, one iteration of the second while
loop will be executed. However, the second while loop does not check the
return value of platform_get_resource(). This can cause a NULL pointer
dereference bug if the return value is a NULL pointer.

This patch avoids the above issue by adding a check in the second while
loop after the call to platform_get_resource().

Signed-off-by: Wenwen Wang <wang6495@umn.edu>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/davinci/isif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
index 99faea2e84c6b..78e37cf3470f2 100644
--- a/drivers/media/platform/davinci/isif.c
+++ b/drivers/media/platform/davinci/isif.c
@@ -1106,7 +1106,8 @@ static int isif_probe(struct platform_device *pdev)
 
 	while (i >= 0) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		release_mem_region(res->start, resource_size(res));
+		if (res)
+			release_mem_region(res->start, resource_size(res));
 		i--;
 	}
 	vpfe_unregister_ccdc_device(&isif_hw_dev);
-- 
2.20.1




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

* [PATCH 4.4 149/159] GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (147 preceding siblings ...)
  2019-11-22 10:28 ` [PATCH 4.4 148/159] media: isif: fix a NULL pointer dereference bug Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 150/159] media: cx231xx: fix potential sign-extension overflow on large shift Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tim Smith, Mark Syms, Bob Peterson,
	Sasha Levin

From: Tim Smith <tim.smith@citrix.com>

[ Upstream commit 1eb8d7387908022951792a46fa040ad3942b3b08 ]

Flushing the workqueue can cause operations to happen which might
call gfs2_log_reserve(), or get stuck waiting for locks taken by such
operations.  gfs2_log_reserve() can io_schedule(). If this happens, it
will never wake because the only thing which can wake it is gfs2_logd()
which was already stopped.

This causes umount of a gfs2 filesystem to wedge permanently if, for
example, the umount immediately follows a large delete operation.

When this occured, the following stack trace was obtained from the
umount command

[<ffffffff81087968>] flush_workqueue+0x1c8/0x520
[<ffffffffa0666e29>] gfs2_make_fs_ro+0x69/0x160 [gfs2]
[<ffffffffa0667279>] gfs2_put_super+0xa9/0x1c0 [gfs2]
[<ffffffff811b7edf>] generic_shutdown_super+0x6f/0x100
[<ffffffff811b7ff7>] kill_block_super+0x27/0x70
[<ffffffffa0656a71>] gfs2_kill_sb+0x71/0x80 [gfs2]
[<ffffffff811b792b>] deactivate_locked_super+0x3b/0x70
[<ffffffff811b79b9>] deactivate_super+0x59/0x60
[<ffffffff811d2998>] cleanup_mnt+0x58/0x80
[<ffffffff811d2a12>] __cleanup_mnt+0x12/0x20
[<ffffffff8108c87d>] task_work_run+0x7d/0xa0
[<ffffffff8106d7d9>] exit_to_usermode_loop+0x73/0x98
[<ffffffff81003961>] syscall_return_slowpath+0x41/0x50
[<ffffffff815a594c>] int_ret_from_sys_call+0x25/0x8f
[<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Tim Smith <tim.smith@citrix.com>
Signed-off-by: Mark Syms <mark.syms@citrix.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/gfs2/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 894fb01a91dab..a4eb38c1f5548 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -835,10 +835,10 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp)
 	if (error && !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
 		return error;
 
+	flush_workqueue(gfs2_delete_workqueue);
 	kthread_stop(sdp->sd_quotad_process);
 	kthread_stop(sdp->sd_logd_process);
 
-	flush_workqueue(gfs2_delete_workqueue);
 	gfs2_quota_sync(sdp->sd_vfs, 0);
 	gfs2_statfs_sync(sdp->sd_vfs, 0);
 
-- 
2.20.1




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

* [PATCH 4.4 150/159] media: cx231xx: fix potential sign-extension overflow on large shift
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (148 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 149/159] GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29   ` Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Colin Ian King, Hans Verkuil,
	Mauro Carvalho Chehab, Sasha Levin

From: Colin Ian King <colin.king@canonical.com>

[ Upstream commit 32ae592036d7aeaabcccb2b1715373a68639a768 ]

Shifting the u8 value[3] by an int can lead to sign-extension
overflow. For example, if value[3] is 0xff and the shift is 24 then it
is promoted to int and then the top bit is sign-extended so that all
upper 32 bits are set.  Fix this by casting value[3] to a u32 before
the shift.

Detected by CoverityScan, CID#1016522 ("Unintended sign extension")

Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/usb/cx231xx/cx231xx-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index d0d8f08e37c87..de80925ee4cbd 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1346,7 +1346,7 @@ int cx231xx_g_register(struct file *file, void *priv,
 		ret = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
 				(u16)reg->reg, value, 4);
 		reg->val = value[0] | value[1] << 8 |
-			value[2] << 16 | value[3] << 24;
+			value[2] << 16 | (u32)value[3] << 24;
 		reg->size = 4;
 		break;
 	case 1:	/* AFE - read byte */
-- 
2.20.1




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

* [PATCH 4.4 151/159] x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
@ 2019-11-22 10:29   ` Greg Kroah-Hartman
  2019-11-22 10:26 ` [PATCH 4.4 002/159] ax88172a: fix information leak on short answers Greg Kroah-Hartman
                     ` (161 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bjorn Helgaas, Borislav Petkov,
	H. Peter Anvin, Andrew Morton, Brijesh Singh, Ingo Molnar,
	Lianbo Jiang, Takashi Iwai, Thomas Gleixner, Tom Lendacky,
	Vivek Goyal, baiyaowei, bhe, dan.j.williams, dyoung, kexec,
	Sasha Levin

From: Bjorn Helgaas <bhelgaas@google.com>

[ Upstream commit 51fbf14f2528a8c6401290e37f1c893a2412f1d3 ]

The only use of KEXEC_BACKUP_SRC_END is as an argument to
walk_system_ram_res():

  int crash_load_segments(struct kimage *image)
  {
    ...
    walk_system_ram_res(KEXEC_BACKUP_SRC_START, KEXEC_BACKUP_SRC_END,
                        image, determine_backup_region);

walk_system_ram_res() expects "start, end" arguments that are inclusive,
i.e., the range to be walked includes both the start and end addresses.

KEXEC_BACKUP_SRC_END was previously defined as (640 * 1024UL), which is the
first address *past* the desired 0-640KB range.

Define KEXEC_BACKUP_SRC_END as (640 * 1024UL - 1) so the KEXEC_BACKUP_SRC
region is [0-0x9ffff], not [0-0xa0000].

Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Brijesh Singh <brijesh.singh@amd.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Ingo Molnar <mingo@redhat.com>
CC: Lianbo Jiang <lijiang@redhat.com>
CC: Takashi Iwai <tiwai@suse.de>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tom Lendacky <thomas.lendacky@amd.com>
CC: Vivek Goyal <vgoyal@redhat.com>
CC: baiyaowei@cmss.chinamobile.com
CC: bhe@redhat.com
CC: dan.j.williams@intel.com
CC: dyoung@redhat.com
CC: kexec@lists.infradead.org
Link: http://lkml.kernel.org/r/153805811578.1157.6948388946904655969.stgit@bhelgaas-glaptop.roam.corp.google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/include/asm/kexec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index d2434c1cad055..414f9b52e58e6 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -66,7 +66,7 @@ struct kimage;
 
 /* Memory to backup during crash kdump */
 #define KEXEC_BACKUP_SRC_START	(0UL)
-#define KEXEC_BACKUP_SRC_END	(640 * 1024UL)	/* 640K */
+#define KEXEC_BACKUP_SRC_END	(640 * 1024UL - 1)	/* 640K */
 
 /*
  * CPU does not save ss and sp on stack if execution is already
-- 
2.20.1




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

* [PATCH 4.4 151/159] x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error
@ 2019-11-22 10:29   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sasha Levin, Tom Lendacky, Brijesh Singh, Lianbo Jiang, bhe,
	Takashi Iwai, Greg Kroah-Hartman, dan.j.williams, stable, kexec,
	Ingo Molnar, baiyaowei, H. Peter Anvin, Bjorn Helgaas,
	Andrew Morton, Borislav Petkov, dyoung, Thomas Gleixner,
	Vivek Goyal

From: Bjorn Helgaas <bhelgaas@google.com>

[ Upstream commit 51fbf14f2528a8c6401290e37f1c893a2412f1d3 ]

The only use of KEXEC_BACKUP_SRC_END is as an argument to
walk_system_ram_res():

  int crash_load_segments(struct kimage *image)
  {
    ...
    walk_system_ram_res(KEXEC_BACKUP_SRC_START, KEXEC_BACKUP_SRC_END,
                        image, determine_backup_region);

walk_system_ram_res() expects "start, end" arguments that are inclusive,
i.e., the range to be walked includes both the start and end addresses.

KEXEC_BACKUP_SRC_END was previously defined as (640 * 1024UL), which is the
first address *past* the desired 0-640KB range.

Define KEXEC_BACKUP_SRC_END as (640 * 1024UL - 1) so the KEXEC_BACKUP_SRC
region is [0-0x9ffff], not [0-0xa0000].

Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Brijesh Singh <brijesh.singh@amd.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Ingo Molnar <mingo@redhat.com>
CC: Lianbo Jiang <lijiang@redhat.com>
CC: Takashi Iwai <tiwai@suse.de>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tom Lendacky <thomas.lendacky@amd.com>
CC: Vivek Goyal <vgoyal@redhat.com>
CC: baiyaowei@cmss.chinamobile.com
CC: bhe@redhat.com
CC: dan.j.williams@intel.com
CC: dyoung@redhat.com
CC: kexec@lists.infradead.org
Link: http://lkml.kernel.org/r/153805811578.1157.6948388946904655969.stgit@bhelgaas-glaptop.roam.corp.google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/x86/include/asm/kexec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h
index d2434c1cad055..414f9b52e58e6 100644
--- a/arch/x86/include/asm/kexec.h
+++ b/arch/x86/include/asm/kexec.h
@@ -66,7 +66,7 @@ struct kimage;
 
 /* Memory to backup during crash kdump */
 #define KEXEC_BACKUP_SRC_START	(0UL)
-#define KEXEC_BACKUP_SRC_END	(640 * 1024UL)	/* 640K */
+#define KEXEC_BACKUP_SRC_END	(640 * 1024UL - 1)	/* 640K */
 
 /*
  * CPU does not save ss and sp on stack if execution is already
-- 
2.20.1




_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* [PATCH 4.4 152/159] gpio: syscon: Fix possible NULL ptr usage
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (150 preceding siblings ...)
  2019-11-22 10:29   ` Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 153/159] spi: spidev: Fix OF tree warning logic Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Vasut, Linus Walleij, Sasha Levin

From: Marek Vasut <marex@denx.de>

[ Upstream commit 70728c29465bc4bfa7a8c14304771eab77e923c7 ]

The priv->data->set can be NULL while flags contains GPIO_SYSCON_FEAT_OUT
and chip->set is valid pointer. This happens in case the controller uses
the default GPIO setter. Always use chip->set to access the setter to avoid
possible NULL pointer dereferencing.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpio/gpio-syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c
index 7b25fdf648023..f579938552cc5 100644
--- a/drivers/gpio/gpio-syscon.c
+++ b/drivers/gpio/gpio-syscon.c
@@ -127,7 +127,7 @@ static int syscon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, int val)
 				   BIT(offs % SYSCON_REG_BITS));
 	}
 
-	priv->data->set(chip, offset, val);
+	chip->set(chip, offset, val);
 
 	return 0;
 }
-- 
2.20.1




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

* [PATCH 4.4 153/159] spi: spidev: Fix OF tree warning logic
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (151 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 152/159] gpio: syscon: Fix possible NULL ptr usage Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 154/159] ARM: 8802/1: Call syscall_trace_exit even when system call skipped Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Trent Piepho, Jan Kundrát,
	Geert Uytterhoeven, Mark Brown, Sasha Levin

From: Trent Piepho <tpiepho@impinj.com>

[ Upstream commit 605b3bec73cbd74b4ac937b580cd0b47d1300484 ]

spidev will make a big fuss if a device tree node binds a device by
using "spidev" as the node's compatible property.

However, the logic for this isn't looking for "spidev" in the
compatible, but rather checking that the device is NOT compatible with
spidev's list of devices.

This causes a false positive if a device not named "rohm,dh2228fv", etc.
binds to spidev, even if a means other than putting "spidev" in the
device tree was used.  E.g., the sysfs driver_override attribute.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spidev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index d0e7dfc647cf2..c5f1045561acc 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -713,11 +713,9 @@ static int spidev_probe(struct spi_device *spi)
 	 * compatible string, it is a Linux implementation thing
 	 * rather than a description of the hardware.
 	 */
-	if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
-		dev_err(&spi->dev, "buggy DT: spidev listed directly in DT\n");
-		WARN_ON(spi->dev.of_node &&
-			!of_match_device(spidev_dt_ids, &spi->dev));
-	}
+	WARN(spi->dev.of_node &&
+	     of_device_is_compatible(spi->dev.of_node, "spidev"),
+	     "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
 
 	/* Allocate driver data */
 	spidev = kzalloc(sizeof(*spidev), GFP_KERNEL);
-- 
2.20.1




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

* [PATCH 4.4 154/159] ARM: 8802/1: Call syscall_trace_exit even when system call skipped
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (152 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 153/159] spi: spidev: Fix OF tree warning logic Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 155/159] hwmon: (pwm-fan) Silence error on probe deferral Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Timothy E Baldwin,
	Eugene Syromyatnikov, Kees Cook, Russell King, Sasha Levin

From: Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>

[ Upstream commit f18aef742c8fbd68e280dff0a63ba0ca6ee8ad85 ]

On at least x86 and ARM64, and as documented in the ptrace man page
a skipped system call will still cause a syscall exit ptrace stop.

Previous to this commit 32-bit ARM did not, resulting in strace
being confused when seccomp skips system calls.

This change also impacts programs that use ptrace to skip system calls.

Fixes: ad75b51459ae ("ARM: 7579/1: arch/allow a scno of -1 to not cause a SIGILL")
Signed-off-by: Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/kernel/entry-common.S | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index e969b18d9ff93..d31f0300d2c98 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -261,16 +261,15 @@ __sys_trace:
 	cmp	scno, #-1			@ skip the syscall?
 	bne	2b
 	add	sp, sp, #S_OFF			@ restore stack
-	b	ret_slow_syscall
 
-__sys_trace_return:
-	str	r0, [sp, #S_R0 + S_OFF]!	@ save returned r0
+__sys_trace_return_nosave:
+	enable_irq_notrace
 	mov	r0, sp
 	bl	syscall_trace_exit
 	b	ret_slow_syscall
 
-__sys_trace_return_nosave:
-	enable_irq_notrace
+__sys_trace_return:
+	str	r0, [sp, #S_R0 + S_OFF]!	@ save returned r0
 	mov	r0, sp
 	bl	syscall_trace_exit
 	b	ret_slow_syscall
-- 
2.20.1




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

* [PATCH 4.4 155/159] hwmon: (pwm-fan) Silence error on probe deferral
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (153 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 154/159] ARM: 8802/1: Call syscall_trace_exit even when system call skipped Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 156/159] mac80211: minstrel: fix CCK rate group streams value Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thierry Reding, Guenter Roeck, Sasha Levin

From: Thierry Reding <treding@nvidia.com>

[ Upstream commit 9f67f7583e77fe5dc57aab3a6159c2642544eaad ]

Probe deferrals aren't actual errors, so silence the error message in
case the PWM cannot yet be acquired.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/hwmon/pwm-fan.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 3e23003f78b01..993c61e95d30c 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -227,8 +227,12 @@ static int pwm_fan_probe(struct platform_device *pdev)
 
 	ctx->pwm = devm_of_pwm_get(&pdev->dev, pdev->dev.of_node, NULL);
 	if (IS_ERR(ctx->pwm)) {
-		dev_err(&pdev->dev, "Could not get PWM\n");
-		return PTR_ERR(ctx->pwm);
+		ret = PTR_ERR(ctx->pwm);
+
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "Could not get PWM: %d\n", ret);
+
+		return ret;
 	}
 
 	platform_set_drvdata(pdev, ctx);
-- 
2.20.1




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

* [PATCH 4.4 156/159] mac80211: minstrel: fix CCK rate group streams value
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (154 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 155/159] hwmon: (pwm-fan) Silence error on probe deferral Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 157/159] spi: rockchip: initialize dma_slave_config properly Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Felix Fietkau, Johannes Berg, Sasha Levin

From: Felix Fietkau <nbd@nbd.name>

[ Upstream commit 80df9be67c44cb636bbc92caeddad8caf334c53c ]

Fixes a harmless underflow issue when CCK rates are actively being used

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/rc80211_minstrel_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 239ed6e92b89d..ff3b28e7dbce8 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -128,7 +128,7 @@
 
 #define CCK_GROUP					\
 	[MINSTREL_CCK_GROUP] = {			\
-		.streams = 0,				\
+		.streams = 1,				\
 		.flags = 0,				\
 		.duration = {				\
 			CCK_DURATION_LIST(false),	\
-- 
2.20.1




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

* [PATCH 4.4 157/159] spi: rockchip: initialize dma_slave_config properly
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (155 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 156/159] mac80211: minstrel: fix CCK rate group streams value Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 158/159] ARM: dts: omap5: Fix dual-role mode on Super-Speed port Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Huibin Hong, Emil Renner Berthing,
	Mark Brown, Sasha Levin

From: Huibin Hong <huibin.hong@rock-chips.com>

[ Upstream commit dd8fd2cbc73f8650f651da71fc61a6e4f30c1566 ]

The rxconf and txconf structs are allocated on the
stack, so make sure we zero them before filling out
the relevant fields.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-rockchip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 035767c020720..f42ae9efb255c 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -444,6 +444,9 @@ static void rockchip_spi_prepare_dma(struct rockchip_spi *rs)
 	struct dma_slave_config rxconf, txconf;
 	struct dma_async_tx_descriptor *rxdesc, *txdesc;
 
+	memset(&rxconf, 0, sizeof(rxconf));
+	memset(&txconf, 0, sizeof(txconf));
+
 	spin_lock_irqsave(&rs->lock, flags);
 	rs->state &= ~RXBUSY;
 	rs->state &= ~TXBUSY;
-- 
2.20.1




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

* [PATCH 4.4 158/159] ARM: dts: omap5: Fix dual-role mode on Super-Speed port
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (156 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 157/159] spi: rockchip: initialize dma_slave_config properly Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 10:29 ` [PATCH 4.4 159/159] arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, H. Nikolaus Schaller, Roger Quadros,
	Tony Lindgren, Sasha Levin

From: Roger Quadros <rogerq@ti.com>

[ Upstream commit a763ecc15d0e37c3a15ff6825183061209832685 ]

OMAP5's Super-Speed USB port has a software mailbox register
that needs to be fed with VBUS and ID events from an external
VBUS/ID comparator.

Without this, Host role will not work correctly.

Fixes: 656c1a65ab55 ("ARM: dts: omap5: enable OTG role for DWC3 controller")
Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/omap5-board-common.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
index d2398d2a0c08c..4ea4cf6c5b471 100644
--- a/arch/arm/boot/dts/omap5-board-common.dtsi
+++ b/arch/arm/boot/dts/omap5-board-common.dtsi
@@ -634,6 +634,7 @@
 };
 
 &dwc3 {
+	extcon = <&extcon_usb3>;
 	dr_mode = "otg";
 };
 
-- 
2.20.1




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

* [PATCH 4.4 159/159] arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (157 preceding siblings ...)
  2019-11-22 10:29 ` [PATCH 4.4 158/159] ARM: dts: omap5: Fix dual-role mode on Super-Speed port Greg Kroah-Hartman
@ 2019-11-22 10:29 ` Greg Kroah-Hartman
  2019-11-22 13:14   ` Jon Hunter
                   ` (3 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Catalin Marinas, Mark Rutland,
	Pavel Tatashin, Will Deacon

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

commit 94bb804e1e6f0a9a77acf20d7c70ea141c6c821e upstream.

A number of our uaccess routines ('__arch_clear_user()' and
'__arch_copy_{in,from,to}_user()') fail to re-enable PAN if they
encounter an unhandled fault whilst accessing userspace.

For CPUs implementing both hardware PAN and UAO, this bug has no effect
when both extensions are in use by the kernel.

For CPUs implementing hardware PAN but not UAO, this means that a kernel
using hardware PAN may execute portions of code with PAN inadvertently
disabled, opening us up to potential security vulnerabilities that rely
on userspace access from within the kernel which would usually be
prevented by this mechanism. In other words, parts of the kernel run the
same way as they would on a CPU without PAN implemented/emulated at all.

For CPUs not implementing hardware PAN and instead relying on software
emulation via 'CONFIG_ARM64_SW_TTBR0_PAN=y', the impact is unfortunately
much worse. Calling 'schedule()' with software PAN disabled means that
the next task will execute in the kernel using the page-table and ASID
of the previous process even after 'switch_mm()', since the actual
hardware switch is deferred until return to userspace. At this point, or
if there is a intermediate call to 'uaccess_enable()', the page-table
and ASID of the new process are installed. Sadly, due to the changes
introduced by KPTI, this is not an atomic operation and there is a very
small window (two instructions) where the CPU is configured with the
page-table of the old task and the ASID of the new task; a speculative
access in this state is disastrous because it would corrupt the TLB
entries for the new task with mappings from the previous address space.

As Pavel explains:

  | I was able to reproduce memory corruption problem on Broadcom's SoC
  | ARMv8-A like this:
  |
  | Enable software perf-events with PERF_SAMPLE_CALLCHAIN so userland's
  | stack is accessed and copied.
  |
  | The test program performed the following on every CPU and forking
  | many processes:
  |
  |	unsigned long *map = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE,
  |				  MAP_SHARED | MAP_ANONYMOUS, -1, 0);
  |	map[0] = getpid();
  |	sched_yield();
  |	if (map[0] != getpid()) {
  |		fprintf(stderr, "Corruption detected!");
  |	}
  |	munmap(map, PAGE_SIZE);
  |
  | From time to time I was getting map[0] to contain pid for a
  | different process.

Ensure that PAN is re-enabled when returning after an unhandled user
fault from our uaccess routines.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: 338d4f49d6f7 ("arm64: kernel: Add support for Privileged Access Never")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
[will: rewrote commit message]
[will: backport for 4.4.y stable kernels]
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/lib/clear_user.S     |    2 ++
 arch/arm64/lib/copy_from_user.S |    2 ++
 arch/arm64/lib/copy_in_user.S   |    2 ++
 arch/arm64/lib/copy_to_user.S   |    2 ++
 4 files changed, 8 insertions(+)

--- a/arch/arm64/lib/clear_user.S
+++ b/arch/arm64/lib/clear_user.S
@@ -62,5 +62,7 @@ ENDPROC(__clear_user)
 	.section .fixup,"ax"
 	.align	2
 9:	mov	x0, x2			// return the original size
+ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
+	    CONFIG_ARM64_PAN)
 	ret
 	.previous
--- a/arch/arm64/lib/copy_from_user.S
+++ b/arch/arm64/lib/copy_from_user.S
@@ -85,5 +85,7 @@ ENDPROC(__copy_from_user)
 	strb	wzr, [dst], #1			// zero remaining buffer space
 	cmp	dst, end
 	b.lo	9999b
+ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
+	    CONFIG_ARM64_PAN)
 	ret
 	.previous
--- a/arch/arm64/lib/copy_in_user.S
+++ b/arch/arm64/lib/copy_in_user.S
@@ -81,5 +81,7 @@ ENDPROC(__copy_in_user)
 	.section .fixup,"ax"
 	.align	2
 9998:	sub	x0, end, dst			// bytes not copied
+ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
+	    CONFIG_ARM64_PAN)
 	ret
 	.previous
--- a/arch/arm64/lib/copy_to_user.S
+++ b/arch/arm64/lib/copy_to_user.S
@@ -79,5 +79,7 @@ ENDPROC(__copy_to_user)
 	.section .fixup,"ax"
 	.align	2
 9998:	sub	x0, end, dst			// bytes not copied
+ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \
+	    CONFIG_ARM64_PAN)
 	ret
 	.previous



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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
@ 2019-11-22 13:14   ` Jon Hunter
  2019-11-22 10:26 ` [PATCH 4.4 002/159] ax88172a: fix information leak on short answers Greg Kroah-Hartman
                     ` (161 subsequent siblings)
  162 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 13:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.203 release.
> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:

...

> Marek Szyprowski <m.szyprowski@samsung.com>
>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC

The above commit is causing the following build error for ARM ...

Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-22 13:14   ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 13:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.203 release.
> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:

...

> Marek Szyprowski <m.szyprowski@samsung.com>
>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC

The above commit is causing the following build error for ARM ...

Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 13:14   ` Jon Hunter
@ 2019-11-22 13:35     ` Jon Hunter
  -1 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 13:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 22/11/2019 13:14, Jon Hunter wrote:
> 
> On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.4.203 release.
>> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
> 
> ...
> 
>> Marek Szyprowski <m.szyprowski@samsung.com>
>>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
> 
> The above commit is causing the following build error for ARM ...
> 
> Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
> make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1

FYI ... after reverting the above all the tests are passing for Tegra.

Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-22 13:35     ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 13:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 22/11/2019 13:14, Jon Hunter wrote:
> 
> On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.4.203 release.
>> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
> 
> ...
> 
>> Marek Szyprowski <m.szyprowski@samsung.com>
>>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
> 
> The above commit is causing the following build error for ARM ...
> 
> Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
> make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1

FYI ... after reverting the above all the tests are passing for Tegra.

Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 13:14   ` Jon Hunter
  (?)
  (?)
@ 2019-11-22 13:39   ` Greg Kroah-Hartman
  2019-11-22 13:41     ` Greg Kroah-Hartman
  -1 siblings, 1 reply; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 13:39 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Fri, Nov 22, 2019 at 01:14:28PM +0000, Jon Hunter wrote:
> 
> On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.203 release.
> > There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
> 
> ...
> 
> > Marek Szyprowski <m.szyprowski@samsung.com>
> >     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
> 
> The above commit is causing the following build error for ARM ...
> 
> Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
> make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1

Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y
tree?

thanks,

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 13:39   ` Greg Kroah-Hartman
@ 2019-11-22 13:41     ` Greg Kroah-Hartman
  2019-11-22 13:46       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 13:41 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Fri, Nov 22, 2019 at 02:39:31PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Nov 22, 2019 at 01:14:28PM +0000, Jon Hunter wrote:
> > 
> > On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
> > > This is the start of the stable review cycle for the 4.4.203 release.
> > > There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> > > Anything received after that time might be too late.
> > > 
> > > The whole patch series can be found in one patch at:
> > > 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
> > 
> > ...
> > 
> > > Marek Szyprowski <m.szyprowski@samsung.com>
> > >     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
> > 
> > The above commit is causing the following build error for ARM ...
> > 
> > Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
> > FATAL ERROR: Unable to parse input tree
> > scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
> > make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
> 
> Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y
> tree?

Ah, I see your other email now, so I'll leave it in 4.9.y and push out a
new 4.4.y tree now.

thanks,

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 13:41     ` Greg Kroah-Hartman
@ 2019-11-22 13:46       ` Greg Kroah-Hartman
  2019-11-22 14:48           ` Jon Hunter
  0 siblings, 1 reply; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-22 13:46 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Fri, Nov 22, 2019 at 02:41:31PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Nov 22, 2019 at 02:39:31PM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Nov 22, 2019 at 01:14:28PM +0000, Jon Hunter wrote:
> > > 
> > > On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
> > > > This is the start of the stable review cycle for the 4.4.203 release.
> > > > There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> > > > Anything received after that time might be too late.
> > > > 
> > > > The whole patch series can be found in one patch at:
> > > > 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
> > > 
> > > ...
> > > 
> > > > Marek Szyprowski <m.szyprowski@samsung.com>
> > > >     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
> > > 
> > > The above commit is causing the following build error for ARM ...
> > > 
> > > Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
> > > FATAL ERROR: Unable to parse input tree
> > > scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
> > > make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
> > 
> > Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y
> > tree?
> 
> Ah, I see your other email now, so I'll leave it in 4.9.y and push out a
> new 4.4.y tree now.

-rc2 is out now, with that patch removed, thanks.

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 13:46       ` Greg Kroah-Hartman
@ 2019-11-22 14:48           ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 14:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 22/11/2019 13:46, Greg Kroah-Hartman wrote:
> On Fri, Nov 22, 2019 at 02:41:31PM +0100, Greg Kroah-Hartman wrote:
>> On Fri, Nov 22, 2019 at 02:39:31PM +0100, Greg Kroah-Hartman wrote:
>>> On Fri, Nov 22, 2019 at 01:14:28PM +0000, Jon Hunter wrote:
>>>>
>>>> On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
>>>>> This is the start of the stable review cycle for the 4.4.203 release.
>>>>> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
>>>>> Anything received after that time might be too late.
>>>>>
>>>>> The whole patch series can be found in one patch at:
>>>>> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
>>>>
>>>> ...
>>>>
>>>>> Marek Szyprowski <m.szyprowski@samsung.com>
>>>>>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
>>>>
>>>> The above commit is causing the following build error for ARM ...
>>>>
>>>> Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
>>>> FATAL ERROR: Unable to parse input tree
>>>> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
>>>> make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
>>>
>>> Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y
>>> tree?
>>
>> Ah, I see your other email now, so I'll leave it in 4.9.y and push out a
>> new 4.4.y tree now.
> 
> -rc2 is out now, with that patch removed, thanks.

Thanks. Well this is odd, now I see ...

Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2


This is caused by the following commit ...

commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <hns@goldelico.com>
Date:   Fri Sep 28 17:54:00 2018 +0200

    ARM: dts: omap5: enable OTG role for DWC3 controller


I was wondering why I did not see this before as it was listed
in the original email but looking back at the git log of what I
tested before, I don't see it ...

$ git log --oneline bc69c961f595..7bbe76363f8f arch/arm/boot
b883613d6f68 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
a1496418067c ARM: dts: tegra30: fix xcvr-setup-use-fuses
e3c8a2e4d6b6 ARM: dts: ste: Fix SPI controller node names
1c9e00b657ad ARM: dts: ux500: Fix LCDA clock line muxing
ec144e236880 ARM: dts: ux500: Correct SCU unit address
98c94b7bce20 ARM: dts: am335x-evm: fix number of cpsw
13b662ab1602 libfdt: Ensure INT_MAX is defined in libfdt_env.h
2b6e4587d0f5 ARM: dts: socfpga: Fix I2C bus unit-address error
1c4b78b0c003 ARM: dts: omap3-gta04: keep vpll2 always on
0c7dc0f3b2c3 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
3ecbffc9b6e4 ARM: dts: omap3-gta04: tvout: enable as display1 alias
a787cf8ff717 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
83264404b9c9 ARM: dts: exynos: Disable pull control for S5M8767 PMIC
dbe192b499b7 ARM: dts: pxa: fix power i2c base address
f1a2904901ad ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
9742b4c1d281 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45

Anyway, not sure what happen there, but looks like the above
omap5 commit also needs to be dropped. I think you also need
to drop the following as there is a dependency between the two
...

commit 56bfbfd3fd46d250749fa4d5974147eb1e456a5b
Author: Roger Quadros <rogerq@ti.com>
Date:   Wed Dec 5 19:27:44 2018 +0200

    ARM: dts: omap5: Fix dual-role mode on Super-Speed port

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-22 14:48           ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-22 14:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 22/11/2019 13:46, Greg Kroah-Hartman wrote:
> On Fri, Nov 22, 2019 at 02:41:31PM +0100, Greg Kroah-Hartman wrote:
>> On Fri, Nov 22, 2019 at 02:39:31PM +0100, Greg Kroah-Hartman wrote:
>>> On Fri, Nov 22, 2019 at 01:14:28PM +0000, Jon Hunter wrote:
>>>>
>>>> On 22/11/2019 10:26, Greg Kroah-Hartman wrote:
>>>>> This is the start of the stable review cycle for the 4.4.203 release.
>>>>> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
>>>>> Anything received after that time might be too late.
>>>>>
>>>>> The whole patch series can be found in one patch at:
>>>>> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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:
>>>>
>>>> ...
>>>>
>>>>> Marek Szyprowski <m.szyprowski@samsung.com>
>>>>>     ARM: dts: exynos: Disable pull control for S5M8767 PMIC
>>>>
>>>> The above commit is causing the following build error for ARM ...
>>>>
>>>> Error: /dvs/git/dirty/git-master_l4t-upstream/kernel/arch/arm/boot/dts/exynos5250-arndale.dts:560.22-23 syntax error
>>>> FATAL ERROR: Unable to parse input tree
>>>> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/exynos5250-arndale.dtb' failed
>>>> make[2]: *** [arch/arm/boot/dts/exynos5250-arndale.dtb] Error 1
>>>
>>> Ugh. I'll go drop this from 4.4.y, is it also an issue in the 4.9.y
>>> tree?
>>
>> Ah, I see your other email now, so I'll leave it in 4.9.y and push out a
>> new 4.4.y tree now.
> 
> -rc2 is out now, with that patch removed, thanks.

Thanks. Well this is odd, now I see ...

Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
arch/arm/Makefile:338: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2


This is caused by the following commit ...

commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
Author: H. Nikolaus Schaller <hns@goldelico.com>
Date:   Fri Sep 28 17:54:00 2018 +0200

    ARM: dts: omap5: enable OTG role for DWC3 controller


I was wondering why I did not see this before as it was listed
in the original email but looking back at the git log of what I
tested before, I don't see it ...

$ git log --oneline bc69c961f595..7bbe76363f8f arch/arm/boot
b883613d6f68 ARM: tegra: apalis_t30: fix mmc1 cmd pull-up
a1496418067c ARM: dts: tegra30: fix xcvr-setup-use-fuses
e3c8a2e4d6b6 ARM: dts: ste: Fix SPI controller node names
1c9e00b657ad ARM: dts: ux500: Fix LCDA clock line muxing
ec144e236880 ARM: dts: ux500: Correct SCU unit address
98c94b7bce20 ARM: dts: am335x-evm: fix number of cpsw
13b662ab1602 libfdt: Ensure INT_MAX is defined in libfdt_env.h
2b6e4587d0f5 ARM: dts: socfpga: Fix I2C bus unit-address error
1c4b78b0c003 ARM: dts: omap3-gta04: keep vpll2 always on
0c7dc0f3b2c3 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
3ecbffc9b6e4 ARM: dts: omap3-gta04: tvout: enable as display1 alias
a787cf8ff717 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
83264404b9c9 ARM: dts: exynos: Disable pull control for S5M8767 PMIC
dbe192b499b7 ARM: dts: pxa: fix power i2c base address
f1a2904901ad ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
9742b4c1d281 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45

Anyway, not sure what happen there, but looks like the above
omap5 commit also needs to be dropped. I think you also need
to drop the following as there is a dependency between the two
...

commit 56bfbfd3fd46d250749fa4d5974147eb1e456a5b
Author: Roger Quadros <rogerq@ti.com>
Date:   Wed Dec 5 19:27:44 2018 +0200

    ARM: dts: omap5: Fix dual-role mode on Super-Speed port

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (159 preceding siblings ...)
  2019-11-22 13:14   ` Jon Hunter
@ 2019-11-22 18:09 ` Guenter Roeck
  2019-11-22 20:20 ` shuah
  2019-11-22 23:49 ` Daniel Díaz
  162 siblings, 0 replies; 189+ messages in thread
From: Guenter Roeck @ 2019-11-22 18:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Fri, Nov 22, 2019 at 11:26:31AM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.203 release.
> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> Anything received after that time might be too late.
> 

For v4.4.202-159-gdbaac4c54573:

Build results:
	total: 170 pass: 168 fail: 2
Failed builds:
	arm:allmodconfig
	arm:omap2plus_defconfig
Qemu test results:
	total: 325 pass: 307 fail: 18
Failed tests:
	<many arm tests>

------------
Error log:
Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
FATAL ERROR: Syntax error parsing input tree

Guenter

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (160 preceding siblings ...)
  2019-11-22 18:09 ` Guenter Roeck
@ 2019-11-22 20:20 ` shuah
  2019-11-22 23:49 ` Daniel Díaz
  162 siblings, 0 replies; 189+ messages in thread
From: shuah @ 2019-11-22 20:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, lkft-triage,
	stable, shuah

On 11/22/19 3:26 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.203 release.
> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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] 189+ messages in thread

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
                   ` (161 preceding siblings ...)
  2019-11-22 20:20 ` shuah
@ 2019-11-22 23:49 ` Daniel Díaz
  162 siblings, 0 replies; 189+ messages in thread
From: Daniel Díaz @ 2019-11-22 23:49 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable

Hello!

On 11/22/19 4:26 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.203 release.
> There are 159 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 Sun, 24 Nov 2019 09:59:19 +0000.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.203-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.
No regressions on arm64, arm, x86_64, and i386.

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

kernel: 4.4.203-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: dbaac4c54573d428113956f3e4c56f9d94920c28
git describe: v4.4.202-159-gdbaac4c54573
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.202-159-gdbaac4c54573


No regressions (compared to build v4.4.202)

No fixes (compared to build v4.4.202)

Ran 20213 total tests in the following environments and test suites.

Environments
--------------
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* perf
* prep-tmp-disk
* spectre-meltdown-checker-test
* kvm-unit-tests
* v4l2-compliance
* install-android-platform-tools-r2600
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* ssuite


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

kernel: 4.4.203-rc2
git repo: https://git.linaro.org/lkft/arm64-stable-rc.git
git branch: 4.4.203-rc2-hikey-20191122-613
git commit: fd5ba88e671977887fb59d54fa2697987c38931d
git describe: 4.4.203-rc2-hikey-20191122-613
Test details: https://qa-reports.linaro.org/lkft/linaro-hikey-stable-rc-4.4-oe/build/4.4.203-rc2-hikey-20191122-613


No regressions (compared to build 4.4.202-rc1-hikey-20191115-607)

No fixes (compared to build 4.4.202-rc1-hikey-20191115-607)

Ran 1605 total tests in the following environments and test suites.

Environments
--------------
- hi6220-hikey - arm64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance


Greetings!

Daniel Díaz
daniel.diaz@linaro.org


-- 
Linaro LKFT
https://lkft.linaro.org

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-22 14:48           ` Jon Hunter
  (?)
@ 2019-11-23 15:46           ` Guenter Roeck
  2019-11-24 20:31               ` Jon Hunter
  -1 siblings, 1 reply; 189+ messages in thread
From: Guenter Roeck @ 2019-11-23 15:46 UTC (permalink / raw)
  To: Jon Hunter, Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra

On 11/22/19 6:48 AM, Jon Hunter wrote:

[ ... ]

> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path dwc3 not found
> FATAL ERROR: Syntax error parsing input tree
> scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
> arch/arm/Makefile:338: recipe for target 'dtbs' failed
> make: *** [dtbs] Error 2
> 
> 
> This is caused by the following commit ...
> 
> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
> Author: H. Nikolaus Schaller <hns@goldelico.com>
> Date:   Fri Sep 28 17:54:00 2018 +0200
> 
>      ARM: dts: omap5: enable OTG role for DWC3 controller
> 

On top of the breakage caused by this patch, I would also argue
that it is not a bug fix and should not have been included
in the first place.

The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
that patch, I highly doubt that a backport to 4.4 would work.

Guenter

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-23 15:46           ` Guenter Roeck
@ 2019-11-24 20:31               ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-24 20:31 UTC (permalink / raw)
  To: Guenter Roeck, Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 23/11/2019 15:46, Guenter Roeck wrote:
> On 11/22/19 6:48 AM, Jon Hunter wrote:
> 
> [ ... ]
> 
>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>> dwc3 not found
>> FATAL ERROR: Syntax error parsing input tree
>> scripts/Makefile.lib:293: recipe for target
>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>> make: *** [dtbs] Error 2
>>
>>
>> This is caused by the following commit ...
>>
>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>
>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>
> 
> On top of the breakage caused by this patch, I would also argue
> that it is not a bug fix and should not have been included
> in the first place.
> 
> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> that patch, I highly doubt that a backport to 4.4 would work.

FYI ... I am still seeing a build failure because of this with -rc2 ...

Test results for stable-v4.4:
    6 builds:	3 pass, 3 fail
    6 boots:	6 pass, 0 fail
    11 tests:	11 pass, 0 fail

Linux version:	4.4.203-rc2-gdbaac4c54573
Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
                tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-24 20:31               ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-24 20:31 UTC (permalink / raw)
  To: Guenter Roeck, Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 23/11/2019 15:46, Guenter Roeck wrote:
> On 11/22/19 6:48 AM, Jon Hunter wrote:
> 
> [ ... ]
> 
>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>> dwc3 not found
>> FATAL ERROR: Syntax error parsing input tree
>> scripts/Makefile.lib:293: recipe for target
>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>> make: *** [dtbs] Error 2
>>
>>
>> This is caused by the following commit ...
>>
>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>
>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>
> 
> On top of the breakage caused by this patch, I would also argue
> that it is not a bug fix and should not have been included
> in the first place.
> 
> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> that patch, I highly doubt that a backport to 4.4 would work.

FYI ... I am still seeing a build failure because of this with -rc2 ...

Test results for stable-v4.4:
    6 builds:	3 pass, 3 fail
    6 boots:	6 pass, 0 fail
    11 tests:	11 pass, 0 fail

Linux version:	4.4.203-rc2-gdbaac4c54573
Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
                tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-24 20:31               ` Jon Hunter
  (?)
@ 2019-11-25  9:41               ` Greg Kroah-Hartman
  2019-11-25 13:22                   ` Jon Hunter
  2019-11-25 14:08                 ` Guenter Roeck
  -1 siblings, 2 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-25  9:41 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
> 
> On 23/11/2019 15:46, Guenter Roeck wrote:
> > On 11/22/19 6:48 AM, Jon Hunter wrote:
> > 
> > [ ... ]
> > 
> >> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
> >> dwc3 not found
> >> FATAL ERROR: Syntax error parsing input tree
> >> scripts/Makefile.lib:293: recipe for target
> >> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
> >> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
> >> arch/arm/Makefile:338: recipe for target 'dtbs' failed
> >> make: *** [dtbs] Error 2
> >>
> >>
> >> This is caused by the following commit ...
> >>
> >> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
> >> Author: H. Nikolaus Schaller <hns@goldelico.com>
> >> Date:   Fri Sep 28 17:54:00 2018 +0200
> >>
> >>      ARM: dts: omap5: enable OTG role for DWC3 controller
> >>
> > 
> > On top of the breakage caused by this patch, I would also argue
> > that it is not a bug fix and should not have been included
> > in the first place.
> > 
> > The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> > Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> > that patch, I highly doubt that a backport to 4.4 would work.

Good catch, I have now dropped both of these patches and pushed out a
-rc3

> FYI ... I am still seeing a build failure because of this with -rc2 ...

Can you see if -rc3 is also giving you problems?

thanks,

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25  9:41               ` Greg Kroah-Hartman
@ 2019-11-25 13:22                   ` Jon Hunter
  2019-11-25 14:08                 ` Guenter Roeck
  1 sibling, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-25 13:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>
>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>
>>> [ ... ]
>>>
>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>> dwc3 not found
>>>> FATAL ERROR: Syntax error parsing input tree
>>>> scripts/Makefile.lib:293: recipe for target
>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>> make: *** [dtbs] Error 2
>>>>
>>>>
>>>> This is caused by the following commit ...
>>>>
>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>
>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>
>>>
>>> On top of the breakage caused by this patch, I would also argue
>>> that it is not a bug fix and should not have been included
>>> in the first place.
>>>
>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>> that patch, I highly doubt that a backport to 4.4 would work.
> 
> Good catch, I have now dropped both of these patches and pushed out a
> -rc3
> 
>> FYI ... I am still seeing a build failure because of this with -rc2 ...
> 
> Can you see if -rc3 is also giving you problems?

Better, but I appear to be seeing some random suspend failures with this
now on one board. I will try to bisect this.

Test results for stable-v4.4:
    6 builds:	6 pass, 0 fail
    12 boots:	12 pass, 0 fail
    19 tests:	18 pass, 1 fail

Linux version:	4.4.203-rc3-g2576206c30b5
Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
                tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-25 13:22                   ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-25 13:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>
>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>
>>> [ ... ]
>>>
>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>> dwc3 not found
>>>> FATAL ERROR: Syntax error parsing input tree
>>>> scripts/Makefile.lib:293: recipe for target
>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>> make: *** [dtbs] Error 2
>>>>
>>>>
>>>> This is caused by the following commit ...
>>>>
>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>
>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>
>>>
>>> On top of the breakage caused by this patch, I would also argue
>>> that it is not a bug fix and should not have been included
>>> in the first place.
>>>
>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>> that patch, I highly doubt that a backport to 4.4 would work.
> 
> Good catch, I have now dropped both of these patches and pushed out a
> -rc3
> 
>> FYI ... I am still seeing a build failure because of this with -rc2 ...
> 
> Can you see if -rc3 is also giving you problems?

Better, but I appear to be seeing some random suspend failures with this
now on one board. I will try to bisect this.

Test results for stable-v4.4:
    6 builds:	6 pass, 0 fail
    12 boots:	12 pass, 0 fail
    19 tests:	18 pass, 1 fail

Linux version:	4.4.203-rc3-g2576206c30b5
Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
                tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25  9:41               ` Greg Kroah-Hartman
  2019-11-25 13:22                   ` Jon Hunter
@ 2019-11-25 14:08                 ` Guenter Roeck
  2019-11-25 16:02                   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 189+ messages in thread
From: Guenter Roeck @ 2019-11-25 14:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jon Hunter
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra

On 11/25/19 1:41 AM, Greg Kroah-Hartman wrote:
> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>
>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>
>>> [ ... ]
>>>
>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>> dwc3 not found
>>>> FATAL ERROR: Syntax error parsing input tree
>>>> scripts/Makefile.lib:293: recipe for target
>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>> make: *** [dtbs] Error 2
>>>>
>>>>
>>>> This is caused by the following commit ...
>>>>
>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>
>>>>       ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>
>>>
>>> On top of the breakage caused by this patch, I would also argue
>>> that it is not a bug fix and should not have been included
>>> in the first place.
>>>
>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>> that patch, I highly doubt that a backport to 4.4 would work.
> 
> Good catch, I have now dropped both of these patches and pushed out a
> -rc3
> 
>> FYI ... I am still seeing a build failure because of this with -rc2 ...
> 
> Can you see if -rc3 is also giving you problems?
> 

For v4.4.202-157-g2576206c30b5:

Build results:
	total: 170 pass: 170 fail: 0
Qemu test results:
	total: 324 pass: 324 fail: 0

Guenter

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25 14:08                 ` Guenter Roeck
@ 2019-11-25 16:02                   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-25 16:02 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jon Hunter, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Mon, Nov 25, 2019 at 06:08:17AM -0800, Guenter Roeck wrote:
> On 11/25/19 1:41 AM, Greg Kroah-Hartman wrote:
> > On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
> > > 
> > > On 23/11/2019 15:46, Guenter Roeck wrote:
> > > > On 11/22/19 6:48 AM, Jon Hunter wrote:
> > > > 
> > > > [ ... ]
> > > > 
> > > > > Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
> > > > > dwc3 not found
> > > > > FATAL ERROR: Syntax error parsing input tree
> > > > > scripts/Makefile.lib:293: recipe for target
> > > > > 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
> > > > > make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
> > > > > arch/arm/Makefile:338: recipe for target 'dtbs' failed
> > > > > make: *** [dtbs] Error 2
> > > > > 
> > > > > 
> > > > > This is caused by the following commit ...
> > > > > 
> > > > > commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
> > > > > Author: H. Nikolaus Schaller <hns@goldelico.com>
> > > > > Date:   Fri Sep 28 17:54:00 2018 +0200
> > > > > 
> > > > >       ARM: dts: omap5: enable OTG role for DWC3 controller
> > > > > 
> > > > 
> > > > On top of the breakage caused by this patch, I would also argue
> > > > that it is not a bug fix and should not have been included
> > > > in the first place.
> > > > 
> > > > The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> > > > Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> > > > that patch, I highly doubt that a backport to 4.4 would work.
> > 
> > Good catch, I have now dropped both of these patches and pushed out a
> > -rc3
> > 
> > > FYI ... I am still seeing a build failure because of this with -rc2 ...
> > 
> > Can you see if -rc3 is also giving you problems?
> > 
> 
> For v4.4.202-157-g2576206c30b5:
> 
> Build results:
> 	total: 170 pass: 170 fail: 0
> Qemu test results:
> 	total: 324 pass: 324 fail: 0

Thanks for testing, I'll go with this tree now.

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25 13:22                   ` Jon Hunter
  (?)
@ 2019-11-25 16:03                   ` Greg Kroah-Hartman
  2019-11-25 22:45                       ` Jon Hunter
  -1 siblings, 1 reply; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-25 16:03 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
> 
> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
> > On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
> >>
> >> On 23/11/2019 15:46, Guenter Roeck wrote:
> >>> On 11/22/19 6:48 AM, Jon Hunter wrote:
> >>>
> >>> [ ... ]
> >>>
> >>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
> >>>> dwc3 not found
> >>>> FATAL ERROR: Syntax error parsing input tree
> >>>> scripts/Makefile.lib:293: recipe for target
> >>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
> >>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
> >>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
> >>>> make: *** [dtbs] Error 2
> >>>>
> >>>>
> >>>> This is caused by the following commit ...
> >>>>
> >>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
> >>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
> >>>> Date:   Fri Sep 28 17:54:00 2018 +0200
> >>>>
> >>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
> >>>>
> >>>
> >>> On top of the breakage caused by this patch, I would also argue
> >>> that it is not a bug fix and should not have been included
> >>> in the first place.
> >>>
> >>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> >>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> >>> that patch, I highly doubt that a backport to 4.4 would work.
> > 
> > Good catch, I have now dropped both of these patches and pushed out a
> > -rc3
> > 
> >> FYI ... I am still seeing a build failure because of this with -rc2 ...
> > 
> > Can you see if -rc3 is also giving you problems?
> 
> Better, but I appear to be seeing some random suspend failures with this
> now on one board. I will try to bisect this.
> 
> Test results for stable-v4.4:
>     6 builds:	6 pass, 0 fail
>     12 boots:	12 pass, 0 fail
>     19 tests:	18 pass, 1 fail
> 
> Linux version:	4.4.203-rc3-g2576206c30b5
> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
>                 tegra30-cardhu-a04

Odd.  If you find anything interesting, please let me know.

thanks for testing,

greg k-h

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25 16:03                   ` Greg Kroah-Hartman
@ 2019-11-25 22:45                       ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-25 22:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 16:03, Greg Kroah-Hartman wrote:
> On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
>>
>> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
>>> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>>>
>>>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>>>
>>>>> [ ... ]
>>>>>
>>>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>>>> dwc3 not found
>>>>>> FATAL ERROR: Syntax error parsing input tree
>>>>>> scripts/Makefile.lib:293: recipe for target
>>>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>>>> make: *** [dtbs] Error 2
>>>>>>
>>>>>>
>>>>>> This is caused by the following commit ...
>>>>>>
>>>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>>>
>>>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>>>
>>>>>
>>>>> On top of the breakage caused by this patch, I would also argue
>>>>> that it is not a bug fix and should not have been included
>>>>> in the first place.
>>>>>
>>>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>>>> that patch, I highly doubt that a backport to 4.4 would work.
>>>
>>> Good catch, I have now dropped both of these patches and pushed out a
>>> -rc3
>>>
>>>> FYI ... I am still seeing a build failure because of this with -rc2 ...
>>>
>>> Can you see if -rc3 is also giving you problems?
>>
>> Better, but I appear to be seeing some random suspend failures with this
>> now on one board. I will try to bisect this.
>>
>> Test results for stable-v4.4:
>>     6 builds:	6 pass, 0 fail
>>     12 boots:	12 pass, 0 fail
>>     19 tests:	18 pass, 1 fail
>>
>> Linux version:	4.4.203-rc3-g2576206c30b5
>> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
>>                 tegra30-cardhu-a04
> 
> Odd.  If you find anything interesting, please let me know.

Yes will do. Bisect has not found anything yet, so will keeping looking
to see if this is a false-positive or not.

Cheers Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-25 22:45                       ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-25 22:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 16:03, Greg Kroah-Hartman wrote:
> On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
>>
>> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
>>> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>>>
>>>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>>>
>>>>> [ ... ]
>>>>>
>>>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>>>> dwc3 not found
>>>>>> FATAL ERROR: Syntax error parsing input tree
>>>>>> scripts/Makefile.lib:293: recipe for target
>>>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>>>> make: *** [dtbs] Error 2
>>>>>>
>>>>>>
>>>>>> This is caused by the following commit ...
>>>>>>
>>>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>>>
>>>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>>>
>>>>>
>>>>> On top of the breakage caused by this patch, I would also argue
>>>>> that it is not a bug fix and should not have been included
>>>>> in the first place.
>>>>>
>>>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>>>> that patch, I highly doubt that a backport to 4.4 would work.
>>>
>>> Good catch, I have now dropped both of these patches and pushed out a
>>> -rc3
>>>
>>>> FYI ... I am still seeing a build failure because of this with -rc2 ...
>>>
>>> Can you see if -rc3 is also giving you problems?
>>
>> Better, but I appear to be seeing some random suspend failures with this
>> now on one board. I will try to bisect this.
>>
>> Test results for stable-v4.4:
>>     6 builds:	6 pass, 0 fail
>>     12 boots:	12 pass, 0 fail
>>     19 tests:	18 pass, 1 fail
>>
>> Linux version:	4.4.203-rc3-g2576206c30b5
>> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
>>                 tegra30-cardhu-a04
> 
> Odd.  If you find anything interesting, please let me know.

Yes will do. Bisect has not found anything yet, so will keeping looking
to see if this is a false-positive or not.

Cheers Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-25 22:45                       ` Jon Hunter
@ 2019-11-28  9:26                         ` Jon Hunter
  -1 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-28  9:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 22:45, Jon Hunter wrote:
> 
> On 25/11/2019 16:03, Greg Kroah-Hartman wrote:
>> On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
>>>
>>> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
>>>> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>>>>
>>>>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>>>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>>>>
>>>>>> [ ... ]
>>>>>>
>>>>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>>>>> dwc3 not found
>>>>>>> FATAL ERROR: Syntax error parsing input tree
>>>>>>> scripts/Makefile.lib:293: recipe for target
>>>>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>>>>> make: *** [dtbs] Error 2
>>>>>>>
>>>>>>>
>>>>>>> This is caused by the following commit ...
>>>>>>>
>>>>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>>>>
>>>>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>>>>
>>>>>>
>>>>>> On top of the breakage caused by this patch, I would also argue
>>>>>> that it is not a bug fix and should not have been included
>>>>>> in the first place.
>>>>>>
>>>>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>>>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>>>>> that patch, I highly doubt that a backport to 4.4 would work.
>>>>
>>>> Good catch, I have now dropped both of these patches and pushed out a
>>>> -rc3
>>>>
>>>>> FYI ... I am still seeing a build failure because of this with -rc2 ...
>>>>
>>>> Can you see if -rc3 is also giving you problems?
>>>
>>> Better, but I appear to be seeing some random suspend failures with this
>>> now on one board. I will try to bisect this.
>>>
>>> Test results for stable-v4.4:
>>>     6 builds:	6 pass, 0 fail
>>>     12 boots:	12 pass, 0 fail
>>>     19 tests:	18 pass, 1 fail
>>>
>>> Linux version:	4.4.203-rc3-g2576206c30b5
>>> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
>>>                 tegra30-cardhu-a04
>>
>> Odd.  If you find anything interesting, please let me know.
> 
> Yes will do. Bisect has not found anything yet, so will keeping looking
> to see if this is a false-positive or not.

I have been doing some more testing and it appears that I see
intermittent suspend failures on Tegra124 with linux-4.4.y. Apparently
this issue has always been there and appears to be fixed in v4.5. I am
still trying to find a way to fix this. The changes in v4.5 that appear
to resolve this are too complex for stable (several patches in Tegra clk
drivers). Anyway, ignore this for now, I will see how we can fix or
workaround for linux-4.4.y.

Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
@ 2019-11-28  9:26                         ` Jon Hunter
  0 siblings, 0 replies; 189+ messages in thread
From: Jon Hunter @ 2019-11-28  9:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra


On 25/11/2019 22:45, Jon Hunter wrote:
> 
> On 25/11/2019 16:03, Greg Kroah-Hartman wrote:
>> On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
>>>
>>> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
>>>> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
>>>>>
>>>>> On 23/11/2019 15:46, Guenter Roeck wrote:
>>>>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
>>>>>>
>>>>>> [ ... ]
>>>>>>
>>>>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
>>>>>>> dwc3 not found
>>>>>>> FATAL ERROR: Syntax error parsing input tree
>>>>>>> scripts/Makefile.lib:293: recipe for target
>>>>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
>>>>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
>>>>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
>>>>>>> make: *** [dtbs] Error 2
>>>>>>>
>>>>>>>
>>>>>>> This is caused by the following commit ...
>>>>>>>
>>>>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
>>>>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
>>>>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
>>>>>>>
>>>>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
>>>>>>>
>>>>>>
>>>>>> On top of the breakage caused by this patch, I would also argue
>>>>>> that it is not a bug fix and should not have been included
>>>>>> in the first place.
>>>>>>
>>>>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
>>>>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
>>>>>> that patch, I highly doubt that a backport to 4.4 would work.
>>>>
>>>> Good catch, I have now dropped both of these patches and pushed out a
>>>> -rc3
>>>>
>>>>> FYI ... I am still seeing a build failure because of this with -rc2 ...
>>>>
>>>> Can you see if -rc3 is also giving you problems?
>>>
>>> Better, but I appear to be seeing some random suspend failures with this
>>> now on one board. I will try to bisect this.
>>>
>>> Test results for stable-v4.4:
>>>     6 builds:	6 pass, 0 fail
>>>     12 boots:	12 pass, 0 fail
>>>     19 tests:	18 pass, 1 fail
>>>
>>> Linux version:	4.4.203-rc3-g2576206c30b5
>>> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
>>>                 tegra30-cardhu-a04
>>
>> Odd.  If you find anything interesting, please let me know.
> 
> Yes will do. Bisect has not found anything yet, so will keeping looking
> to see if this is a false-positive or not.

I have been doing some more testing and it appears that I see
intermittent suspend failures on Tegra124 with linux-4.4.y. Apparently
this issue has always been there and appears to be fixed in v4.5. I am
still trying to find a way to fix this. The changes in v4.5 that appear
to resolve this are too complex for stable (several patches in Tegra clk
drivers). Anyway, ignore this for now, I will see how we can fix or
workaround for linux-4.4.y.

Jon

-- 
nvpublic

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

* Re: [PATCH 4.4 000/159] 4.4.203-stable review
  2019-11-28  9:26                         ` Jon Hunter
  (?)
@ 2019-11-28 10:35                         ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 189+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-28 10:35 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Guenter Roeck, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Thu, Nov 28, 2019 at 09:26:25AM +0000, Jon Hunter wrote:
> 
> On 25/11/2019 22:45, Jon Hunter wrote:
> > 
> > On 25/11/2019 16:03, Greg Kroah-Hartman wrote:
> >> On Mon, Nov 25, 2019 at 01:22:58PM +0000, Jon Hunter wrote:
> >>>
> >>> On 25/11/2019 09:41, Greg Kroah-Hartman wrote:
> >>>> On Sun, Nov 24, 2019 at 08:31:46PM +0000, Jon Hunter wrote:
> >>>>>
> >>>>> On 23/11/2019 15:46, Guenter Roeck wrote:
> >>>>>> On 11/22/19 6:48 AM, Jon Hunter wrote:
> >>>>>>
> >>>>>> [ ... ]
> >>>>>>
> >>>>>>> Error: arch/arm/boot/dts/omap5-board-common.dtsi:636.1-6 Label or path
> >>>>>>> dwc3 not found
> >>>>>>> FATAL ERROR: Syntax error parsing input tree
> >>>>>>> scripts/Makefile.lib:293: recipe for target
> >>>>>>> 'arch/arm/boot/dts/omap5-igep0050.dtb' failed
> >>>>>>> make[1]: *** [arch/arm/boot/dts/omap5-igep0050.dtb] Error 1
> >>>>>>> arch/arm/Makefile:338: recipe for target 'dtbs' failed
> >>>>>>> make: *** [dtbs] Error 2
> >>>>>>>
> >>>>>>>
> >>>>>>> This is caused by the following commit ...
> >>>>>>>
> >>>>>>> commit d0abc07b3d752cbe2a8d315f662c53c772caed0f
> >>>>>>> Author: H. Nikolaus Schaller <hns@goldelico.com>
> >>>>>>> Date:   Fri Sep 28 17:54:00 2018 +0200
> >>>>>>>
> >>>>>>>      ARM: dts: omap5: enable OTG role for DWC3 controller
> >>>>>>>
> >>>>>>
> >>>>>> On top of the breakage caused by this patch, I would also argue
> >>>>>> that it is not a bug fix and should not have been included
> >>>>>> in the first place.
> >>>>>>
> >>>>>> The dwc3 label was added with commit 4c387984618fe ("ARM: dts: omap5:
> >>>>>> Add l4 interconnect hierarchy and ti-sysc data"). Given the size of
> >>>>>> that patch, I highly doubt that a backport to 4.4 would work.
> >>>>
> >>>> Good catch, I have now dropped both of these patches and pushed out a
> >>>> -rc3
> >>>>
> >>>>> FYI ... I am still seeing a build failure because of this with -rc2 ...
> >>>>
> >>>> Can you see if -rc3 is also giving you problems?
> >>>
> >>> Better, but I appear to be seeing some random suspend failures with this
> >>> now on one board. I will try to bisect this.
> >>>
> >>> Test results for stable-v4.4:
> >>>     6 builds:	6 pass, 0 fail
> >>>     12 boots:	12 pass, 0 fail
> >>>     19 tests:	18 pass, 1 fail
> >>>
> >>> Linux version:	4.4.203-rc3-g2576206c30b5
> >>> Boards tested:	tegra124-jetson-tk1, tegra20-ventana,
> >>>                 tegra30-cardhu-a04
> >>
> >> Odd.  If you find anything interesting, please let me know.
> > 
> > Yes will do. Bisect has not found anything yet, so will keeping looking
> > to see if this is a false-positive or not.
> 
> I have been doing some more testing and it appears that I see
> intermittent suspend failures on Tegra124 with linux-4.4.y. Apparently
> this issue has always been there and appears to be fixed in v4.5. I am
> still trying to find a way to fix this. The changes in v4.5 that appear
> to resolve this are too complex for stable (several patches in Tegra clk
> drivers). Anyway, ignore this for now, I will see how we can fix or
> workaround for linux-4.4.y.

Ok, thanks for letting us know and good luck with it.

greg k-h

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

end of thread, other threads:[~2019-11-28 10:35 UTC | newest]

Thread overview: 189+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 10:26 [PATCH 4.4 000/159] 4.4.203-stable review Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 001/159] slip: Fix memory leak in slip_open error path Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 002/159] ax88172a: fix information leak on short answers Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 003/159] ALSA: usb-audio: Fix missing error check at mixer resolution test Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 004/159] ALSA: usb-audio: not submit urb for stopped endpoint Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 005/159] Input: ff-memless - kill timer in destroy() Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 006/159] ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 007/159] ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 008/159] iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 009/159] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm() Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 010/159] mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup() Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 011/159] mmc: sdhci-of-at91: fix quirk2 overwrite Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 012/159] iio: dac: mcp4922: fix error handling in mcp4922_write_raw Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 013/159] ALSA: pcm: signedness bug in snd_pcm_plug_alloc() Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 014/159] ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45 Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 015/159] ALSA: seq: Do error checks at creating system ports Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 016/159] gfs2: Dont set GFS2_RDF_UPTODATE when the lvb is updated Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 017/159] ASoC: dpcm: Properly initialise hw->rate_max Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 018/159] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3 Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 019/159] ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 020/159] i40e: use correct length for strncpy Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 021/159] i40e: hold the rtnl lock on clearing interrupt scheme Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 022/159] i40e: Prevent deleting MAC address from VF when set by PF Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 023/159] ARM: dts: pxa: fix power i2c base address Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 024/159] rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 025/159] net: lan78xx: Bail out if lan78xx_get_endpoints fails Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 026/159] ASoC: sgtl5000: avoid division by zero if lo_vag is zero Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 027/159] ARM: dts: exynos: Disable pull control for S5M8767 PMIC Greg Kroah-Hartman
2019-11-22 10:26 ` [PATCH 4.4 028/159] ath10k: wmi: disable softirqs while calling ieee80211_rx Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 029/159] mips: txx9: fix iounmap related issue Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 030/159] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 031/159] ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 032/159] ARM: dts: omap3-gta04: tvout: enable as display1 alias Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 033/159] ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 034/159] ARM: dts: omap3-gta04: keep vpll2 always on Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 035/159] dmaengine: dma-jz4780: Further residue status fix Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 036/159] signal: Always ignore SIGKILL and SIGSTOP sent to the global init Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 037/159] signal: Properly deliver SIGILL from uprobes Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 038/159] signal: Properly deliver SIGSEGV from x86 uprobes Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 039/159] scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 040/159] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 041/159] scsi: pm80xx: Corrected dma_unmap_sg() parameter Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 042/159] scsi: pm80xx: Fixed system hang issue during kexec boot Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 043/159] kprobes: Dont call BUG_ON() if there is a kprobe in use on free list Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 044/159] nvmem: core: return error code instead of NULL from nvmem_device_get Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 045/159] media: fix: media: pci: meye: validate offset to avoid arbitrary access Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 046/159] ALSA: intel8x0m: Register irq handler after register initializations Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 047/159] pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 048/159] llc: avoid blocking in llc_sap_close() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 049/159] powerpc/vdso: Correct call frame information Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 050/159] ARM: dts: socfpga: Fix I2C bus unit-address error Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 051/159] pinctrl: at91: dont use the same irqchip with multiple gpiochips Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 052/159] cxgb4: Fix endianness issue in t4_fwcache() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 053/159] power: supply: ab8500_fg: silence uninitialized variable warnings Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 054/159] power: supply: max8998-charger: Fix platform data retrieval Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 055/159] kernfs: Fix range checks in kernfs_get_target_path Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 056/159] s390/qeth: invoke softirqs after napi_schedule() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 057/159] PCI/ACPI: Correct error message for ASPM disabling Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 058/159] serial: mxs-auart: Fix potential infinite loop Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 059/159] powerpc/iommu: Avoid derefence before pointer check Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 060/159] powerpc/64s/hash: Fix stab_rr off by one initialization Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 061/159] powerpc/pseries: Disable CPU hotplug across migrations Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 062/159] libfdt: Ensure INT_MAX is defined in libfdt_env.h Greg Kroah-Hartman
2019-11-22 10:27   ` Greg Kroah-Hartman
2019-11-22 10:27   ` Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 063/159] power: supply: twl4030_charger: fix charging current out-of-bounds Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 064/159] power: supply: twl4030_charger: disable eoc interrupt on linear charge Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 065/159] net: toshiba: fix return type of ndo_start_xmit function Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 066/159] net: xilinx: " Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 067/159] net: broadcom: " Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 068/159] net: amd: " Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 069/159] usb: chipidea: Fix otg event handler Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 070/159] ARM: dts: am335x-evm: fix number of cpsw Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 071/159] ARM: dts: ux500: Correct SCU unit address Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 072/159] ARM: dts: ux500: Fix LCDA clock line muxing Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 073/159] ARM: dts: ste: Fix SPI controller node names Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 074/159] cpufeature: avoid warning when compiling with clang Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 075/159] bnx2x: Ignore bandwidth attention in single function mode Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 076/159] net: micrel: fix return type of ndo_start_xmit function Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 077/159] x86/CPU: Use correct macros for Cyrix calls Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 078/159] MIPS: kexec: Relax memory restriction Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 079/159] media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init() Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 080/159] media: davinci: Fix implicit enum conversion warning Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 081/159] usb: gadget: uvc: configfs: Drop leaked references to config items Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 082/159] usb: gadget: uvc: configfs: Prevent format changes after linking header Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 083/159] usb: gadget: uvc: Factor out video USB request queueing Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 084/159] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 085/159] misc: kgdbts: Fix restrict error Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 086/159] misc: genwqe: should return proper error value Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 087/159] vfio/pci: Fix potential memory leak in vfio_msi_cap_len Greg Kroah-Hartman
2019-11-22 10:27 ` [PATCH 4.4 088/159] scsi: libsas: always unregister the old device if going to discover new Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 089/159] ARM: dts: tegra30: fix xcvr-setup-use-fuses Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 090/159] ARM: tegra: apalis_t30: fix mmc1 cmd pull-up Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 091/159] net: smsc: fix return type of ndo_start_xmit function Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 092/159] EDAC: Raise the maximum number of memory controllers Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 093/159] Bluetooth: L2CAP: Detect if remote is not able to use the whole MPS Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 094/159] arm64: dts: amd: Fix SPI bus warnings Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 095/159] fuse: use READ_ONCE on congestion_threshold and max_background Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 096/159] Bluetooth: hci_ldisc: Fix null pointer derefence in case of early data Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 097/159] Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 098/159] memfd: Use radix_tree_deref_slot_protected to avoid the warning Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 099/159] slcan: Fix memory leak in error path Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 100/159] net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 101/159] x86/atomic: Fix smp_mb__{before,after}_atomic() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 102/159] apparmor: fix uninitialized lsm_audit member Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 103/159] apparmor: fix update the mtime of the profile file on replacement Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 104/159] apparmor: fix module parameters can be changed after policy is locked Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 105/159] kprobes/x86: Prohibit probing on exception masking instructions Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 106/159] uprobes/x86: Prohibit probing on MOV SS instruction Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 107/159] fbdev: Remove unused SH-Mobile HDMI driver Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 108/159] fbdev: Ditch fb_edid_add_monspecs Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 109/159] block: introduce blk_rq_is_passthrough Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 110/159] libata: have ata_scsi_rw_xlat() fail invalid passthrough requests Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 111/159] net: ovs: fix return type of ndo_start_xmit function Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 112/159] ARM: dts: omap5: enable OTG role for DWC3 controller Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 113/159] f2fs: return correct errno in f2fs_gc Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 114/159] SUNRPC: Fix priority queue fairness Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 115/159] ath10k: fix vdev-start timeout on error Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 116/159] ath9k: fix reporting calculated new FFT upper max Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 117/159] usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 118/159] nl80211: Fix a GET_KEY reply attribute Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 119/159] dmaengine: ep93xx: Return proper enum in ep93xx_dma_chan_direction Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 120/159] dmaengine: timb_dma: Use proper enum in td_prep_slave_sg Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 121/159] mei: samples: fix a signedness bug in amt_host_if_call() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 122/159] cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 123/159] cxgb4: Use proper enum in IEEE_FAUX_SYNC Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 124/159] powerpc/pseries: Fix DTL buffer registration Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 125/159] powerpc/pseries: Fix how we iterate over the DTL entries Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 126/159] mtd: rawnand: sh_flctl: Use proper enum for flctl_dma_fifo0_transfer Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 127/159] ixgbe: Fix crash with VFs and flow director on interface flap Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 128/159] IB/mthca: Fix error return code in __mthca_init_one() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 129/159] ata: ep93xx: Use proper enums for directions Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 130/159] ALSA: hda/sigmatel - Disable automute for Elo VuPoint Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 131/159] KVM: PPC: Book3S PR: Exiting split hack mode needs to fixup both PC and LR Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 132/159] USB: serial: cypress_m8: fix interrupt-out transfer length Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 133/159] mtd: physmap_of: Release resources on error Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 134/159] brcmfmac: fix full timeout waiting for action frame on-channel tx Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 135/159] NFSv4.x: fix lock recovery during delegation recall Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 136/159] dmaengine: ioat: fix prototype of ioat_enumerate_channels Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 137/159] Input: st1232 - set INPUT_PROP_DIRECT property Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 138/159] x86/olpc: Fix build error with CONFIG_MFD_CS5535=m Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 139/159] crypto: mxs-dcp - Fix SHA null hashes and output length Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 140/159] crypto: mxs-dcp - Fix AES issues Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 141/159] ACPI / SBS: Fix rare oops when removing modules Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 142/159] fbdev: sbuslib: use checked version of put_user() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 143/159] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 144/159] bcache: recal cached_dev_sectors on detach Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 145/159] proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted() Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 146/159] backlight: lm3639: Unconditionally call led_classdev_unregister Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 147/159] printk: Give error on attempt to set log buffer length to over 2G Greg Kroah-Hartman
2019-11-22 10:28 ` [PATCH 4.4 148/159] media: isif: fix a NULL pointer dereference bug Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 149/159] GFS2: Flush the GFS2 delete workqueue before stopping the kernel threads Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 150/159] media: cx231xx: fix potential sign-extension overflow on large shift Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 151/159] x86/kexec: Correct KEXEC_BACKUP_SRC_END off-by-one error Greg Kroah-Hartman
2019-11-22 10:29   ` Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 152/159] gpio: syscon: Fix possible NULL ptr usage Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 153/159] spi: spidev: Fix OF tree warning logic Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 154/159] ARM: 8802/1: Call syscall_trace_exit even when system call skipped Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 155/159] hwmon: (pwm-fan) Silence error on probe deferral Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 156/159] mac80211: minstrel: fix CCK rate group streams value Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 157/159] spi: rockchip: initialize dma_slave_config properly Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 158/159] ARM: dts: omap5: Fix dual-role mode on Super-Speed port Greg Kroah-Hartman
2019-11-22 10:29 ` [PATCH 4.4 159/159] arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault Greg Kroah-Hartman
2019-11-22 13:14 ` [PATCH 4.4 000/159] 4.4.203-stable review Jon Hunter
2019-11-22 13:14   ` Jon Hunter
2019-11-22 13:35   ` Jon Hunter
2019-11-22 13:35     ` Jon Hunter
2019-11-22 13:39   ` Greg Kroah-Hartman
2019-11-22 13:41     ` Greg Kroah-Hartman
2019-11-22 13:46       ` Greg Kroah-Hartman
2019-11-22 14:48         ` Jon Hunter
2019-11-22 14:48           ` Jon Hunter
2019-11-23 15:46           ` Guenter Roeck
2019-11-24 20:31             ` Jon Hunter
2019-11-24 20:31               ` Jon Hunter
2019-11-25  9:41               ` Greg Kroah-Hartman
2019-11-25 13:22                 ` Jon Hunter
2019-11-25 13:22                   ` Jon Hunter
2019-11-25 16:03                   ` Greg Kroah-Hartman
2019-11-25 22:45                     ` Jon Hunter
2019-11-25 22:45                       ` Jon Hunter
2019-11-28  9:26                       ` Jon Hunter
2019-11-28  9:26                         ` Jon Hunter
2019-11-28 10:35                         ` Greg Kroah-Hartman
2019-11-25 14:08                 ` Guenter Roeck
2019-11-25 16:02                   ` Greg Kroah-Hartman
2019-11-22 18:09 ` Guenter Roeck
2019-11-22 20:20 ` shuah
2019-11-22 23:49 ` Daniel Díaz

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.