All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.19 000/243] 4.19.89-stable review
@ 2019-12-11 15:02 Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 001/243] rsi: release skb if rsi_prepare_beacon fails Greg Kroah-Hartman
                   ` (249 more replies)
  0 siblings, 250 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 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.19.89 release.
There are 243 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
and the diffstat can be found below.

thanks,

greg k-h

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

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

Jann Horn <jannh@google.com>
    binder: Handle start==NULL in binder_update_page_range()

Jann Horn <jannh@google.com>
    binder: Fix race between mmap() and binder_alloc_print_pages()

Nicolas Pitre <nico@fluxnic.net>
    vcs: prevent write access to vcsu devices

Wei Wang <wvw@google.com>
    thermal: Fix deadlock in thermal thermal_zone_device_check

Jan Kara <jack@suse.cz>
    iomap: Fix pipe page leakage during splicing

Viresh Kumar <viresh.kumar@linaro.org>
    RDMA/qib: Validate ->show()/store() callbacks before calling them

Johan Hovold <johan@kernel.org>
    can: ucan: fix non-atomic allocation in completion handler

Sharvari Harisangam <sharvari@marvell.com>
    mwifiex: update set_mac_address logic

Gregory CLEMENT <gregory.clement@bootlin.com>
    spi: atmel: Fix CS high support

Navid Emamdoost <navid.emamdoost@gmail.com>
    crypto: user - fix memory leak in crypto_report

Ard Biesheuvel <ard.biesheuvel@linaro.org>
    crypto: ecdh - fix big endian bug in ECC library

Mark Salter <msalter@redhat.com>
    crypto: ccp - fix uninitialized list head

Ayush Sawal <ayush.sawal@chelsio.com>
    crypto: af_alg - cast ki_complete ternary op to int

Tudor Ambarus <tudor.ambarus@microchip.com>
    crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize

Christian Lamparter <chunkeey@gmail.com>
    crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr

Sean Christopherson <sean.j.christopherson@intel.com>
    KVM: x86: Grab KVM's srcu lock when setting nested state

Paolo Bonzini <pbonzini@redhat.com>
    KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES

Paolo Bonzini <pbonzini@redhat.com>
    KVM: x86: do not modify masked bits of shared MSRs

Zenghui Yu <yuzenghui@huawei.com>
    KVM: arm/arm64: vgic: Don't rely on the wrong pending table

Marek Szyprowski <m.szyprowski@samsung.com>
    arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node"

Dan Carpenter <dan.carpenter@oracle.com>
    drm/i810: Prevent underflow in ioctl

Johan Hovold <johan@kernel.org>
    drm/msm: fix memleak on release

Jan Kara <jack@suse.cz>
    jbd2: Fix possible overflow in jbd2_log_space_left()

Tejun Heo <tj@kernel.org>
    kernfs: fix ino wrap-around detection

Jouni Hogander <jouni.hogander@unikie.com>
    can: slcan: Fix use-after-free Read in slcan_open

Dmitry Torokhov <dmitry.torokhov@gmail.com>
    tty: vt: keyboard: reject invalid keycodes

Pavel Shilovsky <pshilov@microsoft.com>
    CIFS: Fix SMB2 oplock break processing

Pavel Shilovsky <pshilov@microsoft.com>
    CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks

Nicolas Dichtel <nicolas.dichtel@6wind.com>
    xfrm interface: fix management of phydev

Nicolas Dichtel <nicolas.dichtel@6wind.com>
    xfrm interface: fix list corruption for x-netns

Nicolas Dichtel <nicolas.dichtel@6wind.com>
    xfrm interface: avoid corruption on changelink

Nicolas Dichtel <nicolas.dichtel@6wind.com>
    xfrm interface: fix memory leak on creation

Kai-Heng Feng <kai.heng.feng@canonical.com>
    x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect

Joerg Roedel <jroedel@suse.de>
    x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()

Navid Emamdoost <navid.emamdoost@gmail.com>
    Input: Fix memory leak in psxpad_spi_probe

Mike Leach <mike.leach@linaro.org>
    coresight: etm4x: Fix input validation for sysfs.

Hans de Goede <hdegoede@redhat.com>
    Input: goodix - add upside-down quirk for Teclast X89 tablet

Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers

Lucas Stach <l.stach@pengutronix.de>
    Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash

Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus

Kai-Heng Feng <kai.heng.feng@canonical.com>
    ALSA: hda - Add mute led support for HP ProBook 645 G4

Takashi Iwai <tiwai@suse.de>
    ALSA: pcm: oss: Avoid potential buffer overflows

Kailang Yang <kailang@realtek.com>
    ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236

Hui Wang <hui.wang@canonical.com>
    ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop

Jian-Hong Pan <jian-hong@endlessm.com>
    ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC

Miklos Szeredi <mszeredi@redhat.com>
    fuse: verify attributes

Miklos Szeredi <mszeredi@redhat.com>
    fuse: verify nlink

Xuewei Zhang <xueweiz@google.com>
    sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision

Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
    net: aquantia: fix RSS table and key sizes

Helen Fornazier <helen.koike@collabora.com>
    media: vimc: fix start stream when link is disabled

Felix Brack <fb@ltec.ch>
    ARM: dts: am335x-pdu001: Fix polarity of card detection input

Rob Herring <robh@kernel.org>
    ARM: dts: sunxi: Fix PMU compatible strings

Ladislav Michl <ladis@linux-mips.org>
    ASoC: max9867: Fix power management

Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    clk: renesas: rcar-gen3: Set state when registering SD clocks

YueHaibing <yuehaibing@huawei.com>
    usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler

Qian Cai <cai@gmx.us>
    mlx4: Use snprintf instead of complicated strcpy

Mike Marciniszyn <mike.marciniszyn@intel.com>
    IB/hfi1: Close VNIC sdma_progress sleep window

Kaike Wan <kaike.wan@intel.com>
    IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state

Chen-Yu Tsai <wens@csie.org>
    ARM: dts: sun8i: a23/a33: Fix up RTC device node

Nir Dotan <nird@mellanox.com>
    mlxsw: spectrum_router: Relax GRE decap matching check

Geert Uytterhoeven <geert+renesas@glider.be>
    soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B}

Jakub Audykowicz <jakub.audykowicz@gmail.com>
    sctp: frag_point sanity check

Bjorn Andersson <bjorn.andersson@linaro.org>
    clk: qcom: gcc-msm8998: Disable halt check of UFS clocks

Jonathan Marek <jonathan@marek.ca>
    firmware: qcom: scm: fix compilation error when disabled

Andreas Pape <ap@ca-pape.de>
    media: stkwebcam: Bugfix for wrong return values

Dmitry Safonov <dima@arista.com>
    tty: Don't block on IO when ldisc change is pending

Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    ARM: dts: sun8i: h3: Fix the system-control register range

Ryan Case <ryandcase@chromium.org>
    tty: serial: qcom_geni_serial: Fix softlock

Kieran Bingham <kieran.bingham@ideasonboard.com>
    media: uvcvideo: Abstract streaming object lifetime

zhengbin <zhengbin13@huawei.com>
    nfsd: Return EPERM, not EACCES, in some SETATTR cases

Aaro Koskinen <aaro.koskinen@iki.fi>
    MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition

Geert Uytterhoeven <geert+renesas@glider.be>
    clk: renesas: r8a77995: Correct parent clock of DU

Takeshi Kihara <takeshi.kihara.df@renesas.com>
    clk: renesas: r8a77990: Correct parent clock of DU

Joel Stanley <joel@jms.id.au>
    powerpc/math-emu: Update macros from GCC

Kees Cook <keescook@chromium.org>
    pstore/ram: Avoid NULL deref in ftrace merging failure path

Erez Alfasi <ereza@mellanox.com>
    net/mlx4_core: Fix return codes of unsupported operations

David Teigland <teigland@redhat.com>
    dlm: fix invalid cluster name warning

Rob Herring <robh@kernel.org>
    ARM: dts: realview: Fix some more duplicate regulator nodes

Neil Armstrong <narmstrong@baylibre.com>
    media: cxd2880-spi: fix probe when dvb_attach fails

Jeffrey Hugo <jhugo@codeaurora.org>
    clk: qcom: Fix MSM8998 resets

Chen-Yu Tsai <wens@csie.org>
    clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent

Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    clk: meson: meson8b: fix the offset of vid_pll_dco's N value

Daniel Mack <daniel@zonque.org>
    ARM: dts: pxa: clean up USB controller nodes

Miquel Raynal <miquel.raynal@bootlin.com>
    mtd: fix mtd_oobavail() incoherent returned value

Masahiro Yamada <yamada.masahiro@socionext.com>
    kbuild: fix single target build for external module

Paul Walmsley <paul.walmsley@sifive.com>
    modpost: skip ELF local symbols during section mismatch check

Yuchung Cheng <ycheng@google.com>
    tcp: fix SNMP TCP timeout under-estimation

Yuchung Cheng <ycheng@google.com>
    tcp: fix SNMP under-estimation on failed retransmission

Yuchung Cheng <ycheng@google.com>
    tcp: fix off-by-one bug on aborting window-probing socket

Rob Herring <robh@kernel.org>
    ARM: dts: realview-pbx: Fix duplicate regulator nodes

Lubomir Rintel <lkundrak@v3.sk>
    ARM: dts: mmp2: fix the gpio interrupt cell number

Eric Dumazet <edumazet@google.com>
    tcp: make tcp_space() aware of socket backlog

Rob Herring <robh@kernel.org>
    kbuild: disable dtc simple_bus_reg warnings by default

Geert Uytterhoeven <geert+renesas@glider.be>
    soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy

Geert Uytterhoeven <geert+renesas@glider.be>
    soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains

Geert Uytterhoeven <geert+renesas@glider.be>
    soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains

Stephen Boyd <sboyd@kernel.org>
    clk: mediatek: Drop more __init markings for driver probe

Stephen Boyd <sboyd@kernel.org>
    clk: mediatek: Drop __init from mtk_clk_register_cpumuxes()

Yonghong Song <yhs@fb.com>
    tools/bpf: make libbpf _GNU_SOURCE friendly

Martin Schiller <ms@dev.tdt.de>
    net/x25: fix null_x25_address handling

Martin Schiller <ms@dev.tdt.de>
    net/x25: fix called/calling length calculation in x25_parse_address_block

Neil Armstrong <narmstrong@baylibre.com>
    arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names

Neil Armstrong <narmstrong@baylibre.com>
    arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names

Neil Armstrong <narmstrong@baylibre.com>
    arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names

Neil Armstrong <narmstrong@baylibre.com>
    arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names

Aaro Koskinen <aaro.koskinen@iki.fi>
    ARM: OMAP1/2: fix SoC name printing

Linus Walleij <linus.walleij@linaro.org>
    gpio: OF: Parse MMC-specific CD and WP properties

Young_X <YangX92@hotmail.com>
    ASoC: au8540: use 64-bit arithmetic instead of 32-bit

Yonghong Song <yhs@fb.com>
    tools: bpftool: fix a bitfield pretty print issue

Yonghong Song <yhs@fb.com>
    bpf: btf: check name validity for various types

Yonghong Song <yhs@fb.com>
    bpf: btf: implement btf_name_valid_identifier()

Scott Mayhew <smayhew@redhat.com>
    nfsd: fix a warning in __cld_pipe_upcall()

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

Clément Péron <peron.clem@gmail.com>
    ARM: debug: enable UART1 for socfpga Cyclone5

Wen Yang <wen.yang99@zte.com.cn>
    dlm: NULL check before kmem_cache_destroy is not needed

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun7i: Fix HDMI output DTC warning

Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    ARM: dts: r8a779[01]: Disable unconnected LVDS encoders

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun5i: a10s: Fix HDMI output DTC warning

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun4i: Fix HDMI output DTC warning

Maxime Ripard <maxime.ripard@bootlin.com>
    ARM: dts: sun4i: Fix gpio-keys warning

Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()

Joerg Roedel <jroedel@suse.de>
    iommu/amd: Fix line-break in error log reporting

Xin Long <lucien.xin@gmail.com>
    sctp: increase sk_wmem_alloc when head->truesize is increased

J. Bruce Fields <bfields@redhat.com>
    lockd: fix decoding of TEST results

Thierry Reding <treding@nvidia.com>
    gpu: host1x: Fix syncpoint ID field size on Tegra186

Neil Armstrong <narmstrong@baylibre.com>
    clk: meson: Fix GXL HDMI PLL fractional bits width

Lucas Stach <l.stach@pengutronix.de>
    i2c: imx: don't print error message on probe defer

Stefan Agner <stefan@agner.ch>
    serial: imx: fix error handling in console_setup

Colin Ian King <colin.king@canonical.com>
    altera-stapl: check for a null key before strcasecmp'ing it

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    slimbus: ngd: Fix build error on x86

Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    dma-mapping: fix return type of dma_set_max_seg_size()

Keith Busch <keith.busch@intel.com>
    nvme: Free ctrl device name on init failure

David Miller <davem@davemloft.net>
    sparc: Correct ctx->saw_frame_pointer logic.

David Miller <davem@davemloft.net>
    sparc: Fix JIT fused branch convergance.

Sahitya Tummala <stummala@codeaurora.org>
    f2fs: fix to allow node segment for GC by ioctl path

Otavio Salvador <otavio@ossystems.com.br>
    ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108

Otavio Salvador <otavio@ossystems.com.br>
    ARM: dts: rockchip: Fix the PMU interrupt number for rv1108

Yunlong Song <yunlong.song@huawei.com>
    f2fs: change segment to section in f2fs_ioc_gc_range

Yunlong Song <yunlong.song@huawei.com>
    f2fs: fix count of seg_freed to make sec_freed correct

Chao Yu <yuchao0@huawei.com>
    f2fs: fix to account preflush command for noflush_merge mode

Alexey Dobriyan <adobriyan@gmail.com>
    ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()

Brian Norris <briannorris@chromium.org>
    usb: dwc3: don't log probe deferrals; but do log other error codes

Thinh Nguyen <thinh.nguyen@synopsys.com>
    usb: dwc3: debugfs: Properly print/set link state for HS

Breno Leitao <leitao@debian.org>
    selftests/powerpc: Skip test instead of failing

Breno Leitao <leitao@debian.org>
    selftests/powerpc: Allocate base registers

Colin Ian King <colin.king@canonical.com>
    net: qualcomm: rmnet: move null check on dev before dereferecing it

Christian Lamparter <chunkeey@gmail.com>
    dmaengine: dw-dmac: implement dma protection control setting

Vinod Koul <vkoul@kernel.org>
    dmaengine: coh901318: Remove unused variable

Jia-Ju Bai <baijiaju1990@gmail.com>
    dmaengine: coh901318: Fix a double-lock bug

Hangbin Liu <liuhangbin@gmail.com>
    net/ipv6: re-do dad when interface has IFF_NOARP flag change

Magnus Damm <damm+renesas@opensource.se>
    ravb: Clean up duplex handling

Luca Coelho <luciano.coelho@intel.com>
    iwlwifi: fix cfg structs for 22000 with different RF modules

Hans Verkuil <hverkuil-cisco@xs4all.nl>
    media: cec: report Vendor ID after initialization

Hans Verkuil <hverkuil@xs4all.nl>
    media: pulse8-cec: return 0 when invalidating the logical address

Philipp Zabel <p.zabel@pengutronix.de>
    media: coda: fix memory corruption in case more than 32 instances are opened

Marek Szyprowski <m.szyprowski@samsung.com>
    ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module

Baruch Siach <baruch@tkos.co.il>
    rtc: dt-binding: abx80x: fix resistance scale

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'

Nylon Chen <nylon7@andestech.com>
    nds32: Fix the items of hwcap_str ordering issue.

Vincent Chen <vincentc@andestech.com>
    math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning

Ursula Braun <ursula.braun@linux.ibm.com>
    net/smc: use after free fix in smc_wr_tx_put_slot()

Aaro Koskinen <aaro.koskinen@iki.fi>
    MIPS: OCTEON: octeon-platform: fix typing

Steve Wise <swise@opengridcomputing.com>
    iw_cxgb4: only reconnect with MPAv1 if the peer aborts

Dave Chinner <dchinner@redhat.com>
    iomap: readpages doesn't zero page tail beyond EOF

Dave Chinner <dchinner@redhat.com>
    iomap: dio data corruption and spurious errors when pipes fill

Dave Chinner <dchinner@redhat.com>
    iomap: sub-block dio needs to zeroout beyond EOF

Dave Chinner <dchinner@redhat.com>
    iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents

Bruce Allan <bruce.w.allan@intel.com>
    ice: Fix possible NULL pointer de-reference

Dave Ertman <david.m.ertman@intel.com>
    ice: Fix return value from NAPI poll

Xue Chaojing <xuechaojing@huawei.com>
    net-next/hinic: fix a bug in rx data flow

Xue Chaojing <xuechaojing@huawei.com>
    net-next/hinic:fix a bug in set mac address

Dave Chinner <dchinner@redhat.com>
    xfs: extent shifting doesn't fully invalidate page cache

Ji-Ze Hong (Peter Hong) <hpeter@gmail.com>
    USB: serial: f81534: fix reading old/new IC config

Mark Brown <broonie@kernel.org>
    regulator: Fix return value of _set_load() stub

Xin Long <lucien.xin@gmail.com>
    sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit

Katsuhiro Suzuki <katsuhiro@katsuster.net>
    clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328

Katsuhiro Suzuki <katsuhiro@katsuster.net>
    clk: rockchip: fix I2S1 clock gate register for rk3328

Janne Huttunen <janne.huttunen@nokia.com>
    mm/vmstat.c: fix NUMA statistics updates

James Hughes <james.hughes@raspberrypi.org>
    firmware: raspberrypi: Fix firmware calls with large buffers

Shreeya Patel <shreeya.patel23498@gmail.com>
    Staging: iio: adt7316: Fix i2c data reading, set the data field

Brian Masney <masneyb@onstation.org>
    pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues

Michal Simek <michal.simek@xilinx.com>
    arm64: dts: zynqmp: Fix node names which contain "_"

Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
    crypto: bcm - fix normal/non key hash algorithm failure

Vitaly Chikunov <vt@altlinux.org>
    crypto: ecc - check for invalid values in the key verification test

Lucas Stach <l.stach@pengutronix.de>
    ARM: dts: imx6: RDU2: fix eGalax touchscreen node

Tony Lindgren <tony@atomide.com>
    bus: ti-sysc: Fix getting optional clocks in clock_roles

Maxime Jourdan <mjourdan@baylibre.com>
    drivers: soc: Allow building the amlogic drivers without ARCH_MESON

Steffen Maier <maier@linux.ibm.com>
    scsi: zfcp: drop default switch case which might paper over missing case

Steffen Maier <maier@linux.ibm.com>
    scsi: zfcp: update kernel message for invalid FCP_CMND length, it's not the CDB

Andrew Lunn <andrew@lunn.ch>
    net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2

Maciej W. Rozycki <macro@linux-mips.org>
    MIPS: SiByte: Enable ZONE_DMA32 for LittleSur

David Teigland <teigland@redhat.com>
    dlm: fix missing idr_destroy for recover_idr

John Keeping <john@metanate.com>
    ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name

Heiko Stuebner <heiko@sntech.de>
    clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering

Finley Xiao <finley.xiao@rock-chips.com>
    clk: rockchip: fix rk3188 sclk_smc gate data

Alice Michael <alice.michael@intel.com>
    virtchnl: Fix off by one error

Mitch Williams <mitch.a.williams@intel.com>
    i40e: don't restart nway if autoneg not supported

Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    rtc: max77686: Fix the returned value in case of error in 'max77686_rtc_read_time()'

Marek Szyprowski <m.szyprowski@samsung.com>
    rtc: s3c-rtc: Avoid using broken ALMYEAR register

Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
    net: ethernet: ti: cpts: correct debug for expired txq skb

Marek Szyprowski <m.szyprowski@samsung.com>
    extcon: max8997: Fix lack of path setting in USB device mode

Anand Moon <linux.amoon@gmail.com>
    ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1

Denis V. Lunev <den@openvz.org>
    dlm: fix possible call to kfree() for non-initialized pointer

Lev Faerman <lev.faerman@intel.com>
    ice: Fix NVM mask defines

Jagan Teki <jagan@amarulasolutions.com>
    clk: sunxi-ng: a64: Fix gate bit of DSI DPHY

Moni Shoua <monis@mellanox.com>
    net/mlx5: Release resource on error flow

Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
    ARC: IOC: panic if kernel was started with previously enabled IOC

Florian Westphal <fw@strlen.de>
    netfilter: nf_tables: don't use position attribute on rule replacement

Jan Kara <jack@suse.cz>
    audit: Embed key into chunk

Vincent Whitchurch <vincent.whitchurch@axis.com>
    ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+

Andrei Otcheretianski <andrei.otcheretianski@intel.com>
    iwlwifi: mvm: Send non offchannel traffic via AP sta

Shahar S Matityahu <shahar.s.matityahu@intel.com>
    iwlwifi: trans: Clear persistence bit when starting the FW

Johannes Berg <johannes.berg@intel.com>
    iwlwifi: mvm: synchronize TID queue removal

Arjun Vynipadath <arjun@chelsio.com>
    cxgb4vf: fix memleak in mac_hlist initialization

Douglas Anderson <dianders@chromium.org>
    serial: core: Allow processing sysrq at port unlock time

Wen Yang <wenyang@linux.alibaba.com>
    i2c: core: fix use after free in of_i2c_notify

Chuhong Yuan <hslester96@gmail.com>
    net: ep93xx_eth: fix mismatch of request_mem_region in remove

Chuhong Yuan <hslester96@gmail.com>
    rsxx: add missed destroy_workqueue calls in remove

Vitaly Kuznetsov <vkuznets@redhat.com>
    selftests: kvm: fix build with glibc >= 2.30

Yunhao Tian <t123yh@outlook.com>
    drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.

paulhsia <paulhsia@chromium.org>
    ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()

Alexander Shishkin <alexander.shishkin@linux.intel.com>
    perf/core: Consistently fail fork on allocation failures

Peter Zijlstra <peterz@infradead.org>
    sched/core: Avoid spurious lock dependencies

Pan Bian <bianpan2016@163.com>
    Input: cyttsp4_core - fix use after free bug

Xiaodong Xu <stid.smth@gmail.com>
    xfrm: release device reference for invalid state

Stephan Gerhold <stephan@gerhold.net>
    NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error

Al Viro <viro@zeniv.linux.org.uk>
    audit_get_nd(): don't unlock parent too early

Al Viro <viro@zeniv.linux.org.uk>
    exportfs_decode_fh(): negative pinned may become positive without the parent locked

Mordechay Goodstein <mordechay.goodstein@intel.com>
    iwlwifi: pcie: don't consider IV len in A-MSDU

Sirong Wang <wangsirong@huawei.com>
    RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN

Al Viro <viro@zeniv.linux.org.uk>
    autofs: fix a leak in autofs_expire_indirect()

Chuhong Yuan <hslester96@gmail.com>
    serial: ifx6x60: add missed pm_runtime_disable

Jiangfeng Xiao <xiaojiangfeng@huawei.com>
    serial: serial_core: Perform NULL checks for break_ctl ops

Vincent Whitchurch <vincent.whitchurch@axis.com>
    serial: pl011: Fix DMA ->flush_buffer()

Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
    tty: serial: msm_serial: Fix flow control

Peng Fan <peng.fan@nxp.com>
    tty: serial: fsl_lpuart: use the sg count from dma_map_sg

Michał Mirosław <mirq-linux@rere.qmqm.pl>
    usb: gadget: u_serial: add missing port entry locking

Arnd Bergmann <arnd@arndb.de>
    lp: fix sparc64 LPSETTIMEOUT ioctl

Tuowen Zhao <ztuowen@gmail.com>
    sparc64: implement ioremap_uc

Jon Hunter <jonathanh@nvidia.com>
    arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator

Navid Emamdoost <navid.emamdoost@gmail.com>
    rsi: release skb if rsi_prepare_beacon fails


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

Diffstat:

 .../devicetree/bindings/rtc/abracon,abx80x.txt     |   2 +-
 Makefile                                           |  15 +--
 arch/arc/include/asm/cache.h                       |   2 +
 arch/arc/mm/cache.c                                |  20 +++-
 arch/arm/Kconfig.debug                             |  23 ++--
 arch/arm/boot/dts/am335x-pdu001.dts                |   2 +-
 arch/arm/boot/dts/arm-realview-pb1176.dts          |   4 +-
 arch/arm/boot/dts/arm-realview-pb11mp.dts          |   4 +-
 arch/arm/boot/dts/arm-realview-pbx.dtsi            |   5 +-
 arch/arm/boot/dts/exynos3250.dtsi                  |   2 +-
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      |   2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi            |   5 +-
 arch/arm/boot/dts/mmp2.dtsi                        |   2 +-
 arch/arm/boot/dts/pxa27x.dtsi                      |   2 +-
 arch/arm/boot/dts/pxa2xx.dtsi                      |   7 --
 arch/arm/boot/dts/pxa3xx.dtsi                      |   2 +-
 arch/arm/boot/dts/r8a7790-lager.dts                |   2 -
 arch/arm/boot/dts/r8a7791-koelsch.dts              |   2 -
 arch/arm/boot/dts/r8a7791-porter.dts               |   2 -
 arch/arm/boot/dts/rk3288-rock2-som.dtsi            |   2 +-
 arch/arm/boot/dts/rv1108.dtsi                      |  10 +-
 arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts       |   2 -
 arch/arm/boot/dts/sun4i-a10-pcduino.dts            |   2 -
 arch/arm/boot/dts/sun4i-a10.dtsi                   |   2 -
 arch/arm/boot/dts/sun5i-a10s.dtsi                  |   2 -
 arch/arm/boot/dts/sun6i-a31.dtsi                   |   2 +-
 arch/arm/boot/dts/sun7i-a20.dtsi                   |   4 +-
 arch/arm/boot/dts/sun8i-a23-a33.dtsi               |   6 +-
 arch/arm/boot/dts/sun8i-h3.dtsi                    |   8 +-
 arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts       |   4 +-
 arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts      |   4 +-
 arch/arm/boot/dts/sun8i-v3s.dtsi                   |  10 +-
 arch/arm/include/asm/uaccess.h                     |  18 +++
 arch/arm/lib/getuser.S                             |  11 ++
 arch/arm/lib/putuser.S                             |  20 ++--
 arch/arm/mach-omap1/id.c                           |   6 +-
 arch/arm/mach-omap2/id.c                           |   4 +-
 .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      |   4 +-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |   4 +-
 .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts     |   4 +-
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts   |   4 +-
 arch/arm64/boot/dts/exynos/exynos5433.dtsi         |   6 +-
 arch/arm64/boot/dts/exynos/exynos7.dtsi            |   6 +-
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi         |   4 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts  |   4 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts  |  10 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts  |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts  |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi             |   4 +-
 arch/mips/Kconfig                                  |   1 +
 arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c |   2 +-
 arch/mips/cavium-octeon/octeon-platform.c          |   2 +-
 arch/mips/include/asm/octeon/cvmx-pko.h            |   2 +-
 arch/nds32/kernel/setup.c                          |   3 +-
 arch/powerpc/include/asm/sfp-machine.h             |  92 +++++---------
 arch/sparc/include/asm/io_64.h                     |   1 +
 arch/sparc/net/bpf_jit_comp_64.c                   |  89 +++++++++-----
 arch/x86/kvm/x86.c                                 |  17 ++-
 arch/x86/mm/fault.c                                |   2 +-
 arch/x86/pci/fixup.c                               |  11 ++
 crypto/af_alg.c                                    |   2 +-
 crypto/crypto_user.c                               |   4 +-
 crypto/ecc.c                                       |  45 ++++---
 drivers/android/binder_alloc.c                     |  30 +++--
 drivers/block/rsxx/core.c                          |   2 +
 drivers/bus/ti-sysc.c                              |   9 +-
 drivers/char/lp.c                                  |   4 +
 drivers/clk/mediatek/clk-cpumux.c                  |   8 +-
 drivers/clk/mediatek/clk-mt7622.c                  |   4 +-
 drivers/clk/meson/gxbb.c                           |   8 +-
 drivers/clk/meson/meson8b.c                        |   2 +-
 drivers/clk/qcom/gcc-msm8998.c                     |  44 +++----
 drivers/clk/renesas/r8a77990-cpg-mssr.c            |   4 +-
 drivers/clk/renesas/r8a77995-cpg-mssr.c            |   4 +-
 drivers/clk/renesas/rcar-gen3-cpg.c                |  16 +--
 drivers/clk/rockchip/clk-rk3188.c                  |   8 +-
 drivers/clk/rockchip/clk-rk3328.c                  |   2 +-
 drivers/clk/sunxi-ng/ccu-sun50i-a64.c              |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-h3.c                |   2 +-
 drivers/crypto/amcc/crypto4xx_core.c               |   6 +-
 drivers/crypto/atmel-aes.c                         |  53 +++++----
 drivers/crypto/bcm/cipher.c                        |   6 +-
 drivers/crypto/ccp/ccp-dmaengine.c                 |   1 +
 drivers/dma/coh901318.c                            |   5 -
 drivers/dma/dw/core.c                              |   2 +
 drivers/dma/dw/platform.c                          |   6 +
 drivers/dma/dw/regs.h                              |   4 +
 drivers/extcon/extcon-max8997.c                    |  10 +-
 drivers/firmware/raspberrypi.c                     |  35 +++---
 drivers/gpio/gpiolib-of.c                          |  39 ++++++
 drivers/gpu/drm/i810/i810_dma.c                    |   4 +-
 drivers/gpu/drm/msm/msm_debugfs.c                  |   6 +-
 drivers/gpu/drm/sun4i/sun4i_tcon.c                 |   2 +-
 drivers/gpu/host1x/hw/hw_host1x06_uclass.h         |   2 +-
 .../hwtracing/coresight/coresight-etm4x-sysfs.c    |  21 ++--
 drivers/i2c/busses/i2c-imx.c                       |   3 +-
 drivers/i2c/i2c-core-of.c                          |   4 +-
 drivers/infiniband/hw/cxgb4/cm.c                   |   3 +-
 drivers/infiniband/hw/hfi1/chip.c                  |  47 +++++++-
 drivers/infiniband/hw/hfi1/vnic_sdma.c             |  15 +--
 drivers/infiniband/hw/hns/hns_roce_hem.h           |   2 +-
 drivers/infiniband/hw/mlx4/sysfs.c                 |  12 +-
 drivers/infiniband/hw/qib/qib_sysfs.c              |   6 +
 drivers/input/joystick/psxpad-spi.c                |   2 +-
 drivers/input/mouse/synaptics.c                    |   1 +
 drivers/input/rmi4/rmi_f34v7.c                     |   3 +
 drivers/input/rmi4/rmi_smbus.c                     |   2 -
 drivers/input/touchscreen/cyttsp4_core.c           |   7 --
 drivers/input/touchscreen/goodix.c                 |   9 ++
 drivers/iommu/amd_iommu.c                          |  22 ++--
 drivers/media/cec/cec-adap.c                       |   7 ++
 drivers/media/platform/coda/coda-common.c          |  26 ++--
 drivers/media/platform/coda/coda.h                 |   3 +-
 drivers/media/platform/vimc/vimc-common.c          |   2 +
 drivers/media/spi/cxd2880-spi.c                    |   1 +
 drivers/media/usb/pulse8-cec/pulse8-cec.c          |   2 +-
 drivers/media/usb/stkwebcam/stk-webcam.c           |   6 +-
 drivers/media/usb/uvc/uvc_driver.c                 |  54 ++++++---
 drivers/misc/altera-stapl/altera.c                 |   3 +-
 drivers/net/can/slcan.c                            |   1 +
 drivers/net/can/usb/ucan.c                         |   2 +-
 drivers/net/can/xilinx_can.c                       |   2 +-
 drivers/net/dsa/mv88e6xxx/chip.c                   |  21 +++-
 drivers/net/ethernet/aquantia/atlantic/aq_cfg.h    |   4 +-
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c    |   2 +-
 .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c    |   6 +-
 drivers/net/ethernet/cirrus/ep93xx_eth.c           |   5 +-
 drivers/net/ethernet/huawei/hinic/hinic_main.c     |   7 +-
 drivers/net/ethernet/huawei/hinic/hinic_rx.c       |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  10 +-
 drivers/net/ethernet/intel/ice/ice_adminq_cmd.h    |   6 +-
 drivers/net/ethernet/intel/ice/ice_switch.c        |   3 +
 drivers/net/ethernet/intel/ice/ice_txrx.c          |   3 +-
 drivers/net/ethernet/mellanox/mlx4/main.c          |  11 +-
 drivers/net/ethernet/mellanox/mlx5/core/qp.c       |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |   5 +-
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c |   5 +-
 drivers/net/ethernet/renesas/ravb.h                |   1 -
 drivers/net/ethernet/renesas/ravb_main.c           |  19 +--
 drivers/net/ethernet/ti/cpts.c                     |   4 +-
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c     |   1 -
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h      |   7 ++
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  15 +++
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |  10 ++
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |  34 +++++-
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |  20 ++--
 drivers/net/wireless/marvell/mwifiex/main.c        |   6 +-
 drivers/net/wireless/rsi/rsi_91x_mgmt.c            |   1 +
 drivers/nfc/nxp-nci/i2c.c                          |   6 +-
 drivers/nvme/host/core.c                           |   2 +-
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c           |  23 +++-
 drivers/rtc/rtc-max77686.c                         |   2 +-
 drivers/rtc/rtc-max8997.c                          |   2 +-
 drivers/rtc/rtc-s3c.c                              |   6 -
 drivers/s390/scsi/zfcp_erp.c                       |   3 -
 drivers/s390/scsi/zfcp_fsf.c                       |   7 +-
 drivers/slimbus/qcom-ngd-ctrl.c                    |   5 +-
 drivers/soc/Makefile                               |   2 +-
 drivers/soc/renesas/r8a77970-sysc.c                |   4 +-
 drivers/soc/renesas/r8a77980-sysc.c                |  10 +-
 drivers/soc/renesas/r8a77990-sysc.c                |  23 +---
 drivers/spi/spi-atmel.c                            |   6 +-
 drivers/staging/iio/addac/adt7316-i2c.c            |   2 +
 drivers/thermal/thermal_core.c                     |   4 +-
 drivers/tty/n_hdlc.c                               |   4 +-
 drivers/tty/n_r3964.c                              |   2 +-
 drivers/tty/n_tty.c                                |   8 +-
 drivers/tty/serial/amba-pl011.c                    |   6 +-
 drivers/tty/serial/fsl_lpuart.c                    |   4 +-
 drivers/tty/serial/ifx6x60.c                       |   3 +
 drivers/tty/serial/imx.c                           |   2 +-
 drivers/tty/serial/msm_serial.c                    |   6 +-
 drivers/tty/serial/qcom_geni_serial.c              |  56 ++++++---
 drivers/tty/serial/serial_core.c                   |   2 +-
 drivers/tty/tty_ldisc.c                            |   7 ++
 drivers/tty/vt/keyboard.c                          |   2 +-
 drivers/tty/vt/vc_screen.c                         |   3 +
 drivers/usb/dwc3/core.c                            |   3 +-
 drivers/usb/dwc3/debug.h                           |  29 +++++
 drivers/usb/dwc3/debugfs.c                         |  19 ++-
 drivers/usb/gadget/function/u_serial.c             |   2 +
 drivers/usb/mtu3/mtu3_qmu.c                        |   2 +-
 drivers/usb/serial/f81534.c                        |  20 +++-
 fs/autofs/expire.c                                 |   5 +-
 fs/cifs/file.c                                     |   7 +-
 fs/cifs/smb2misc.c                                 |   7 +-
 fs/dlm/lockspace.c                                 |   1 +
 fs/dlm/member.c                                    |   2 +-
 fs/dlm/memory.c                                    |   9 +-
 fs/dlm/user.c                                      |   3 +-
 fs/exportfs/expfs.c                                |  31 +++--
 fs/f2fs/file.c                                     |   2 +-
 fs/f2fs/gc.c                                       |  10 +-
 fs/f2fs/segment.c                                  |   2 +
 fs/fuse/dir.c                                      |  27 +++--
 fs/fuse/fuse_i.h                                   |   2 +
 fs/iomap.c                                         |  62 ++++++++--
 fs/kernfs/dir.c                                    |   5 +-
 fs/lockd/clnt4xdr.c                                |  22 +---
 fs/lockd/clntxdr.c                                 |  22 +---
 fs/nfsd/nfs4recover.c                              |  17 +--
 fs/nfsd/vfs.c                                      |  17 ++-
 fs/pstore/ram.c                                    |   2 +-
 fs/xfs/xfs_bmap_util.c                             |   8 +-
 include/dt-bindings/clock/rk3328-cru.h             |   2 +-
 include/dt-bindings/power/r8a77970-sysc.h          |   6 +-
 include/dt-bindings/power/r8a77980-sysc.h          |   6 +-
 include/linux/acpi.h                               |   2 +-
 include/linux/avf/virtchnl.h                       |   4 +-
 include/linux/dma-mapping.h                        |   3 +-
 include/linux/jbd2.h                               |   4 +-
 include/linux/kernfs.h                             |   1 +
 include/linux/mtd/mtd.h                            |   2 +-
 include/linux/platform_data/dma-dw.h               |   6 +
 include/linux/qcom_scm.h                           |   3 +
 include/linux/regulator/consumer.h                 |   2 +-
 include/linux/serial_core.h                        |  37 +++++-
 include/linux/tty.h                                |   7 ++
 include/math-emu/soft-fp.h                         |   2 +-
 include/net/sctp/sctp.h                            |   5 +
 include/net/tcp.h                                  |   2 +-
 include/net/xfrm.h                                 |   1 -
 kernel/audit_tree.c                                |  27 ++---
 kernel/audit_watch.c                               |   2 +-
 kernel/bpf/btf.c                                   |  82 +++++++++++++
 kernel/events/core.c                               |   2 +-
 kernel/sched/core.c                                |   3 +-
 kernel/sched/fair.c                                |  36 +++---
 mm/vmstat.c                                        |   7 +-
 net/ipv4/tcp_output.c                              |   2 +-
 net/ipv4/tcp_timer.c                               |  10 +-
 net/ipv6/addrconf.c                                |  19 ++-
 net/netfilter/nf_tables_api.c                      |  17 ++-
 net/sctp/chunk.c                                   |   6 +
 net/sctp/output.c                                  |  22 +---
 net/sctp/socket.c                                  |   3 +-
 net/smc/smc_wr.c                                   |   4 +-
 net/x25/af_x25.c                                   |  18 +--
 net/xfrm/xfrm_input.c                              |   3 +
 net/xfrm/xfrm_interface.c                          | 132 +++++++--------------
 scripts/Makefile.lib                               |   1 +
 scripts/mod/modpost.c                              |  12 ++
 sound/core/oss/linear.c                            |   2 +
 sound/core/oss/mulaw.c                             |   2 +
 sound/core/oss/route.c                             |   2 +
 sound/core/pcm_lib.c                               |   8 +-
 sound/pci/hda/patch_conexant.c                     |   1 +
 sound/pci/hda/patch_realtek.c                      |  18 ++-
 sound/soc/codecs/max9867.c                         |  72 ++++++-----
 sound/soc/codecs/max9867.h                         |   2 +-
 sound/soc/codecs/nau8540.c                         |   2 +-
 sound/soc/sh/rcar/core.c                           |  12 ++
 sound/soc/sh/rcar/dvc.c                            |   8 --
 tools/bpf/bpftool/btf_dumper.c                     |   6 +-
 tools/lib/bpf/libbpf.c                             |   2 +
 tools/lib/bpf/libbpf_errno.c                       |   1 +
 tools/testing/selftests/kvm/lib/assert.c           |   4 +-
 tools/testing/selftests/powerpc/ptrace/core-pkey.c |   5 +-
 .../testing/selftests/powerpc/ptrace/ptrace-gpr.c  |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-gpr.c       |   4 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spd-tar.c   |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c   |   3 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spr.c       |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-tar.c       |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-vsx.c       |   3 +-
 virt/kvm/arm/vgic/vgic-v3.c                        |   6 +-
 268 files changed, 1563 insertions(+), 1024 deletions(-)



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

* [PATCH 4.19 001/243] rsi: release skb if rsi_prepare_beacon fails
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 002/243] arm64: tegra: Fix active-low warning for Jetson TX1 regulator Greg Kroah-Hartman
                   ` (248 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Navid Emamdoost, Kalle Valo

From: Navid Emamdoost <navid.emamdoost@gmail.com>

commit d563131ef23cbc756026f839a82598c8445bc45f upstream.

In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1583,6 +1583,7 @@ static int rsi_send_beacon(struct rsi_co
 		skb_pull(skb, (64 - dword_align_bytes));
 	if (rsi_prepare_beacon(common, skb)) {
 		rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n");
+		dev_kfree_skb(skb);
 		return -EINVAL;
 	}
 	skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);



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

* [PATCH 4.19 002/243] arm64: tegra: Fix active-low warning for Jetson TX1 regulator
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 001/243] rsi: release skb if rsi_prepare_beacon fails Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 003/243] sparc64: implement ioremap_uc Greg Kroah-Hartman
                   ` (247 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jon Hunter, Thierry Reding

From: Jon Hunter <jonathanh@nvidia.com>

commit 1e5e929c009559bd7e898ac8e17a5d01037cb057 upstream.

Commit 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1")
added a regulator for HDMI on the Jetson TX1 platform. This regulator
has an active high enable, but the GPIO specifier for enabling the
regulator incorrectly defines it as active-low. This causes the
following warning to occur on boot ...

 WARNING KERN regulator@10 GPIO handle specifies active low - ignored

The fixed-regulator binding does not use the active-low flag from the
gpio specifier and purely relies of the presence of the
'enable-active-high' property to determine if it is active high or low
(if this property is omitted). Fix this warning by setting the GPIO
to active-high in the GPIO specifier which aligns with the presense of
the 'enable-active-high' property.

Fixes: 34993594181d ("arm64: tegra: Enable HDMI on Jetson TX1")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1589,7 +1589,7 @@
 			regulator-name = "VDD_HDMI_5V0";
 			regulator-min-microvolt = <5000000>;
 			regulator-max-microvolt = <5000000>;
-			gpio = <&exp1 12 GPIO_ACTIVE_LOW>;
+			gpio = <&exp1 12 GPIO_ACTIVE_HIGH>;
 			enable-active-high;
 			vin-supply = <&vdd_5v0_sys>;
 		};



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

* [PATCH 4.19 003/243] sparc64: implement ioremap_uc
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 001/243] rsi: release skb if rsi_prepare_beacon fails Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 002/243] arm64: tegra: Fix active-low warning for Jetson TX1 regulator Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 004/243] lp: fix sparc64 LPSETTIMEOUT ioctl Greg Kroah-Hartman
                   ` (246 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, kbuild test robot, Tuowen Zhao,
	David S. Miller, Lee Jones

From: Tuowen Zhao <ztuowen@gmail.com>

commit 38e45d81d14e5f78cd67922596b1c37b4c22ec74 upstream.

On sparc64, the whole physical IO address space is accessible using
physically addressed loads and stores. *_uc does nothing like the
others.

Cc: <stable@vger.kernel.org> # v4.19+
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Tuowen Zhao <ztuowen@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/sparc/include/asm/io_64.h |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -409,6 +409,7 @@ static inline void __iomem *ioremap(unsi
 }
 
 #define ioremap_nocache(X,Y)		ioremap((X),(Y))
+#define ioremap_uc(X,Y)			ioremap((X),(Y))
 #define ioremap_wc(X,Y)			ioremap((X),(Y))
 #define ioremap_wt(X,Y)			ioremap((X),(Y))
 



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

* [PATCH 4.19 004/243] lp: fix sparc64 LPSETTIMEOUT ioctl
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 003/243] sparc64: implement ioremap_uc Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 005/243] usb: gadget: u_serial: add missing port entry locking Greg Kroah-Hartman
                   ` (245 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

commit 45a2d64696b11913bcf1087b041740edbade3e21 upstream.

The layout of struct timeval is different on sparc64 from
anything else, and the patch I did long ago failed to take
this into account.

Change it now to handle sparc64 user space correctly again.

Quite likely nobody cares about parallel ports on sparc64,
but there is no reason not to fix it.

Cc: stable@vger.kernel.org
Fixes: 9a450484089d ("lp: support 64-bit time_t user space")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20191108203435.112759-7-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/char/lp.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -708,6 +708,10 @@ static int lp_set_timeout64(unsigned int
 	if (copy_from_user(karg, arg, sizeof(karg)))
 		return -EFAULT;
 
+	/* sparc64 suseconds_t is 32-bit only */
+	if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
+		karg[1] >>= 32;
+
 	return lp_set_timeout(minor, karg[0], karg[1]);
 }
 



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

* [PATCH 4.19 005/243] usb: gadget: u_serial: add missing port entry locking
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 004/243] lp: fix sparc64 LPSETTIMEOUT ioctl Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 006/243] tty: serial: fsl_lpuart: use the sg count from dma_map_sg Greg Kroah-Hartman
                   ` (244 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michał Mirosław,
	Ladislav Michl, Felipe Balbi

From: Michał Mirosław <mirq-linux@rere.qmqm.pl>

commit daf82bd24e308c5a83758047aff1bd81edda4f11 upstream.

gserial_alloc_line() misses locking (for a release barrier) while
resetting port entry on TTY allocation failure. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/function/u_serial.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -1246,8 +1246,10 @@ int gserial_alloc_line(unsigned char *li
 				__func__, port_num, PTR_ERR(tty_dev));
 
 		ret = PTR_ERR(tty_dev);
+		mutex_lock(&ports[port_num].lock);
 		port = ports[port_num].port;
 		ports[port_num].port = NULL;
+		mutex_unlock(&ports[port_num].lock);
 		gserial_free_port(port);
 		goto err;
 	}



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

* [PATCH 4.19 006/243] tty: serial: fsl_lpuart: use the sg count from dma_map_sg
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 005/243] usb: gadget: u_serial: add missing port entry locking Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 007/243] tty: serial: msm_serial: Fix flow control Greg Kroah-Hartman
                   ` (243 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

commit 487ee861de176090b055eba5b252b56a3b9973d6 upstream.

The dmaengine_prep_slave_sg needs to use sg count returned
by dma_map_sg, not use sport->dma_tx_nents, because the return
value of dma_map_sg is not always same with "nents".

When enabling iommu for lpuart + edma, iommu framework may concatenate
two sgs into one.

Fixes: 6250cc30c4c4e ("tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx")
Cc: <stable@vger.kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1572932977-17866-1-git-send-email-peng.fan@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/fsl_lpuart.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -376,8 +376,8 @@ static void lpuart_dma_tx(struct lpuart_
 	}
 
 	sport->dma_tx_desc = dmaengine_prep_slave_sg(sport->dma_tx_chan, sgl,
-					sport->dma_tx_nents,
-					DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
+					ret, DMA_MEM_TO_DEV,
+					DMA_PREP_INTERRUPT);
 	if (!sport->dma_tx_desc) {
 		dma_unmap_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE);
 		dev_err(dev, "Cannot prepare TX slave DMA!\n");



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

* [PATCH 4.19 007/243] tty: serial: msm_serial: Fix flow control
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 006/243] tty: serial: fsl_lpuart: use the sg count from dma_map_sg Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 008/243] serial: pl011: Fix DMA ->flush_buffer() Greg Kroah-Hartman
                   ` (242 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jeffrey Hugo, Bjorn Andersson, Andy Gross

From: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>

commit b027ce258369cbfa88401a691c23dad01deb9f9b upstream.

hci_qca interfaces to the wcn3990 via a uart_dm on the msm8998 mtp and
Lenovo Miix 630 laptop.  As part of initializing the wcn3990, hci_qca
disables flow, configures the uart baudrate, and then reenables flow - at
which point an event is expected to be received over the uart from the
wcn3990.  It is observed that this event comes after the baudrate change
but before hci_qca re-enables flow. This is unexpected, and is a result of
msm_reset() being broken.

According to the uart_dm hardware documentation, it is recommended that
automatic hardware flow control be enabled by setting RX_RDY_CTL.  Auto
hw flow control will manage RFR based on the configured watermark.  When
there is space to receive data, the hw will assert RFR.  When the watermark
is hit, the hw will de-assert RFR.

The hardware documentation indicates that RFR can me manually managed via
CR when RX_RDY_CTL is not set.  SET_RFR asserts RFR, and RESET_RFR
de-asserts RFR.

msm_reset() is broken because after resetting the hardware, it
unconditionally asserts RFR via SET_RFR.  This enables flow regardless of
the current configuration, and would undo a previous flow disable
operation.  It should instead de-assert RFR via RESET_RFR to block flow
until the hardware is reconfigured.  msm_serial should rely on the client
to specify that flow should be enabled, either via mctrl() or the termios
structure, and only assert RFR in response to those triggers.

Fixes: 04896a77a97b ("msm_serial: serial driver for MSM7K onboard serial peripheral.")
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Andy Gross <agross@kernel.org>
Link: https://lore.kernel.org/r/20191021154616.25457-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/msm_serial.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -980,6 +980,7 @@ static unsigned int msm_get_mctrl(struct
 static void msm_reset(struct uart_port *port)
 {
 	struct msm_port *msm_port = UART_TO_MSM(port);
+	unsigned int mr;
 
 	/* reset everything */
 	msm_write(port, UART_CR_CMD_RESET_RX, UART_CR);
@@ -987,7 +988,10 @@ static void msm_reset(struct uart_port *
 	msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
 	msm_write(port, UART_CR_CMD_RESET_BREAK_INT, UART_CR);
 	msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR);
-	msm_write(port, UART_CR_CMD_SET_RFR, UART_CR);
+	msm_write(port, UART_CR_CMD_RESET_RFR, UART_CR);
+	mr = msm_read(port, UART_MR1);
+	mr &= ~UART_MR1_RX_RDY_CTL;
+	msm_write(port, mr, UART_MR1);
 
 	/* Disable DM modes */
 	if (msm_port->is_uartdm)



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

* [PATCH 4.19 008/243] serial: pl011: Fix DMA ->flush_buffer()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 007/243] tty: serial: msm_serial: Fix flow control Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 009/243] serial: serial_core: Perform NULL checks for break_ctl ops Greg Kroah-Hartman
                   ` (241 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Vincent Whitchurch

From: Vincent Whitchurch <vincent.whitchurch@axis.com>

commit f6a196477184b99a31d16366a8e826558aa11f6d upstream.

PL011's ->flush_buffer() implementation releases and reacquires the port
lock.  Due to a race condition here, data can end up being added to the
circular buffer but neither being discarded nor being sent out.  This
leads to, for example, tcdrain(2) waiting indefinitely.

Process A                       Process B

uart_flush_buffer()
 - acquire lock
 - circ_clear
 - pl011_flush_buffer()
 -- release lock
 -- dmaengine_terminate_all()

                                uart_write()
                                - acquire lock
                                - add chars to circ buffer
                                - start_tx()
                                -- start DMA
                                - release lock

 -- acquire lock
 -- turn off DMA
 -- release lock

                                // Data in circ buffer but DMA is off

According to the comment in the code, the releasing of the lock around
dmaengine_terminate_all() is to avoid a deadlock with the DMA engine
callback.  However, since the time this code was written, the DMA engine
API documentation seems to have been clarified to say that
dmaengine_terminate_all() (in the identically implemented but
differently named dmaengine_terminate_async() variant) does not wait for
any running complete callback to be completed and can even be called
from a complete callback.  So there is no possibility of deadlock if the
DMA engine driver implements this API correctly.

So we should be able to just remove this release and reacquire of the
lock to prevent the aforementioned race condition.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191118092547.32135-1-vincent.whitchurch@axis.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/amba-pl011.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -813,10 +813,8 @@ __acquires(&uap->port.lock)
 	if (!uap->using_tx_dma)
 		return;
 
-	/* Avoid deadlock with the DMA engine callback */
-	spin_unlock(&uap->port.lock);
-	dmaengine_terminate_all(uap->dmatx.chan);
-	spin_lock(&uap->port.lock);
+	dmaengine_terminate_async(uap->dmatx.chan);
+
 	if (uap->dmatx.queued) {
 		dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1,
 			     DMA_TO_DEVICE);



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

* [PATCH 4.19 009/243] serial: serial_core: Perform NULL checks for break_ctl ops
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 008/243] serial: pl011: Fix DMA ->flush_buffer() Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 010/243] serial: ifx6x60: add missed pm_runtime_disable Greg Kroah-Hartman
                   ` (240 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jiangfeng Xiao

From: Jiangfeng Xiao <xiaojiangfeng@huawei.com>

commit 7d73170e1c282576419f8b50a771f1fcd2b81a94 upstream.

Doing fuzz test on sbsa uart device, causes a kernel crash
due to NULL pointer dereference:

------------[ cut here ]------------
Unable to handle kernel paging request at virtual address fffffffffffffffc
pgd = ffffffe331723000
[fffffffffffffffc] *pgd=0000002333595003, *pud=0000002333595003, *pmd=00000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: ping(O) jffs2 rtos_snapshot(O) pramdisk(O) hisi_sfc(O)
Drv_Nandc_K(O) Drv_SysCtl_K(O) Drv_SysClk_K(O) bsp_reg(O) hns3(O)
hns3_uio_enet(O) hclgevf(O) hclge(O) hnae3(O) mdio_factory(O)
mdio_registry(O) mdio_dev(O) mdio(O) hns3_info(O) rtos_kbox_panic(O)
uart_suspend(O) rsm(O) stp llc tunnel4 xt_tcpudp ipt_REJECT nf_reject_ipv4
iptable_filter ip_tables x_tables sd_mod xhci_plat_hcd xhci_pci xhci_hcd
usbmon usbhid usb_storage ohci_platform ohci_pci ohci_hcd hid_generic hid
ehci_platform ehci_pci ehci_hcd vfat fat usbcore usb_common scsi_mod
yaffs2multi(O) ext4 jbd2 ext2 mbcache ofpart i2c_dev i2c_core uio ubi nand
nand_ecc nand_ids cfi_cmdset_0002 cfi_cmdset_0001 cfi_probe gen_probe
cmdlinepart chipreg mtdblock mtd_blkdevs mtd nfsd auth_rpcgss oid_registry
nfsv3 nfs nfs_acl lockd sunrpc grace autofs4
CPU: 2 PID: 2385 Comm: tty_fuzz_test Tainted: G           O    4.4.193 #1
task: ffffffe32b23f110 task.stack: ffffffe32bda4000
PC is at uart_break_ctl+0x44/0x84
LR is at uart_break_ctl+0x34/0x84
pc : [<ffffff8393196098>] lr : [<ffffff8393196088>] pstate: 80000005
sp : ffffffe32bda7cc0
x29: ffffffe32bda7cc0 x28: ffffffe32b23f110
x27: ffffff8393402000 x26: 0000000000000000
x25: ffffffe32b233f40 x24: ffffffc07a8ec680
x23: 0000000000005425 x22: 00000000ffffffff
x21: ffffffe33ed73c98 x20: 0000000000000000
x19: ffffffe33ed94168 x18: 0000000000000004
x17: 0000007f92ae9d30 x16: ffffff8392fa6064
x15: 0000000000000010 x14: 0000000000000000
x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000020 x10: 0000007ffdac1708
x9 : 0000000000000078 x8 : 000000000000001d
x7 : 0000000052a64887 x6 : ffffffe32bda7e08
x5 : ffffffe32b23c000 x4 : 0000005fbc5b0000
x3 : ffffff83938d5018 x2 : 0000000000000080
x1 : ffffffe32b23c040 x0 : ffffff83934428f8
virtual start addr offset is 38ac00000
module base offset is 2cd4cf1000
linear region base offset is : 0
Process tty_fuzz_test (pid: 2385, stack limit = 0xffffffe32bda4000)
Stack: (0xffffffe32bda7cc0 to 0xffffffe32bda8000)
7cc0: ffffffe32bda7cf0 ffffff8393177718 ffffffc07a8ec680 ffffff8393196054
7ce0: 000000001739f2e0 0000007ffdac1978 ffffffe32bda7d20 ffffff8393179a1c
7d00: 0000000000000000 ffffff8393c0a000 ffffffc07a8ec680 cb88537fdc8ba600
7d20: ffffffe32bda7df0 ffffff8392fa5a40 ffffff8393c0a000 0000000000005425
7d40: 0000007ffdac1978 ffffffe32b233f40 ffffff8393178dcc 0000000000000003
7d60: 000000000000011d 000000000000001d ffffffe32b23f110 000000000000029e
7d80: ffffffe34fe8d5d0 0000000000000000 ffffffe32bda7e14 cb88537fdc8ba600
7da0: ffffffe32bda7e30 ffffff8393042cfc ffffff8393c41720 ffffff8393c46410
7dc0: ffffff839304fa68 ffffffe32b233f40 0000000000005425 0000007ffdac1978
7de0: 000000000000011d cb88537fdc8ba600 ffffffe32bda7e70 ffffff8392fa60cc
7e00: 0000000000000000 ffffffe32b233f40 ffffffe32b233f40 0000000000000003
7e20: 0000000000005425 0000007ffdac1978 ffffffe32bda7e70 ffffff8392fa60b0
7e40: 0000000000000280 ffffffe32b233f40 ffffffe32b233f40 0000000000000003
7e60: 0000000000005425 cb88537fdc8ba600 0000000000000000 ffffff8392e02e78
7e80: 0000000000000280 0000005fbc5b0000 ffffffffffffffff 0000007f92ae9d3c
7ea0: 0000000060000000 0000000000000015 0000000000000003 0000000000005425
7ec0: 0000007ffdac1978 0000000000000000 00000000a54c910e 0000007f92b95014
7ee0: 0000007f92b95090 0000000052a64887 000000000000001d 0000000000000078
7f00: 0000007ffdac1708 0000000000000020 0000000000000000 0000000000000000
7f20: 0000000000000000 0000000000000010 000000556acf0090 0000007f92ae9d30
7f40: 0000000000000004 000000556acdef10 0000000000000000 000000556acdebd0
7f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
7f80: 0000000000000000 0000000000000000 0000000000000000 0000007ffdac1840
7fa0: 000000556acdedcc 0000007ffdac1840 0000007f92ae9d3c 0000000060000000
7fc0: 0000000000000000 0000000000000000 0000000000000003 000000000000001d
7fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Call trace:
Exception stack(0xffffffe32bda7ab0 to 0xffffffe32bda7bf0)
7aa0:                                   0000000000001000 0000007fffffffff
7ac0: ffffffe32bda7cc0 ffffff8393196098 0000000080000005 0000000000000025
7ae0: ffffffe32b233f40 ffffff83930d777c ffffffe32bda7b30 ffffff83930d777c
7b00: ffffffe32bda7be0 ffffff83938d5000 ffffffe32bda7be0 ffffffe32bda7c20
7b20: ffffffe32bda7b60 ffffff83930d777c ffffffe32bda7c10 ffffff83938d5000
7b40: ffffffe32bda7c10 ffffffe32bda7c50 ffffff8393c0a000 ffffffe32b23f110
7b60: ffffffe32bda7b70 ffffff8392e09df4 ffffffe32bda7bb0 cb88537fdc8ba600
7b80: ffffff83934428f8 ffffffe32b23c040 0000000000000080 ffffff83938d5018
7ba0: 0000005fbc5b0000 ffffffe32b23c000 ffffffe32bda7e08 0000000052a64887
7bc0: 000000000000001d 0000000000000078 0000007ffdac1708 0000000000000020
7be0: 0000000000000000 0000000000000000
[<ffffff8393196098>] uart_break_ctl+0x44/0x84
[<ffffff8393177718>] send_break+0xa0/0x114
[<ffffff8393179a1c>] tty_ioctl+0xc50/0xe84
[<ffffff8392fa5a40>] do_vfs_ioctl+0xc4/0x6e8
[<ffffff8392fa60cc>] SyS_ioctl+0x68/0x9c
[<ffffff8392e02e78>] __sys_trace_return+0x0/0x4
Code: b9410ea0 34000160 f9408aa0 f9402814 (b85fc280)
---[ end trace 8606094f1960c5e0 ]---
Kernel panic - not syncing: Fatal exception

Fix this problem by adding NULL checks prior to calling break_ctl ops.

Signed-off-by: Jiangfeng Xiao <xiaojiangfeng@huawei.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1574263133-28259-1-git-send-email-xiaojiangfeng@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1112,7 +1112,7 @@ static int uart_break_ctl(struct tty_str
 	if (!uport)
 		goto out;
 
-	if (uport->type != PORT_UNKNOWN)
+	if (uport->type != PORT_UNKNOWN && uport->ops->break_ctl)
 		uport->ops->break_ctl(uport, break_state);
 	ret = 0;
 out:



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

* [PATCH 4.19 010/243] serial: ifx6x60: add missed pm_runtime_disable
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 009/243] serial: serial_core: Perform NULL checks for break_ctl ops Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 011/243] autofs: fix a leak in autofs_expire_indirect() Greg Kroah-Hartman
                   ` (239 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Chuhong Yuan

From: Chuhong Yuan <hslester96@gmail.com>

commit 50b2b571c5f3df721fc81bf9a12c521dfbe019ba upstream.

The driver forgets to call pm_runtime_disable in remove.
Add the missed calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191118024833.21587-1-hslester96@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/ifx6x60.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1230,6 +1230,9 @@ static int ifx_spi_spi_remove(struct spi
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
 	/* stop activity */
 	tasklet_kill(&ifx_dev->io_work_tasklet);
+
+	pm_runtime_disable(&spi->dev);
+
 	/* free irq */
 	free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), ifx_dev);
 	free_irq(gpio_to_irq(ifx_dev->gpio.srdy), ifx_dev);



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

* [PATCH 4.19 011/243] autofs: fix a leak in autofs_expire_indirect()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 010/243] serial: ifx6x60: add missed pm_runtime_disable Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 012/243] RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN Greg Kroah-Hartman
                   ` (238 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro, Sasha Levin

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

[ Upstream commit 03ad0d703df75c43f78bd72e16124b5b94a95188 ]

if the second call of should_expire() in there ends up
grabbing and returning a new reference to dentry, we need
to drop it before continuing.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/autofs/expire.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/autofs/expire.c b/fs/autofs/expire.c
index 28d9c2b1b3bb3..70e9afe589fbf 100644
--- a/fs/autofs/expire.c
+++ b/fs/autofs/expire.c
@@ -501,9 +501,10 @@ static struct dentry *autofs_expire_indirect(struct super_block *sb,
 		 */
 		how &= ~AUTOFS_EXP_LEAVES;
 		found = should_expire(expired, mnt, timeout, how);
-		if (!found || found != expired)
-			/* Something has changed, continue */
+		if (found != expired) { // something has changed, continue
+			dput(found);
 			goto next;
+		}
 
 		if (expired != dentry)
 			dput(dentry);
-- 
2.20.1




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

* [PATCH 4.19 012/243] RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 011/243] autofs: fix a leak in autofs_expire_indirect() Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 013/243] iwlwifi: pcie: dont consider IV len in A-MSDU Greg Kroah-Hartman
                   ` (237 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sirong Wang, Weihang Li,
	Jason Gunthorpe, Sasha Levin

From: Sirong Wang <wangsirong@huawei.com>

[ Upstream commit 531eb45b3da4267fc2a64233ba256c8ffb02edd2 ]

Size of pointer to buf field of struct hns_roce_hem_chunk should be
considered when calculating HNS_ROCE_HEM_CHUNK_LEN, or sg table size will
be larger than expected when allocating hem.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/1572575610-52530-2-git-send-email-liweihang@hisilicon.com
Signed-off-by: Sirong Wang <wangsirong@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/hns/hns_roce_hem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.h b/drivers/infiniband/hw/hns/hns_roce_hem.h
index e8850d59e7804..a94444db3045a 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hem.h
+++ b/drivers/infiniband/hw/hns/hns_roce_hem.h
@@ -54,7 +54,7 @@ enum {
 
 #define HNS_ROCE_HEM_CHUNK_LEN	\
 	 ((256 - sizeof(struct list_head) - 2 * sizeof(int)) /	 \
-	 (sizeof(struct scatterlist)))
+	 (sizeof(struct scatterlist) + sizeof(void *)))
 
 #define check_whether_bt_num_3(type, hop_num) \
 	(type < HEM_TYPE_MTT && hop_num == 2)
-- 
2.20.1




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

* [PATCH 4.19 013/243] iwlwifi: pcie: dont consider IV len in A-MSDU
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 012/243] RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 014/243] exportfs_decode_fh(): negative pinned may become positive without the parent locked Greg Kroah-Hartman
                   ` (236 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mordechay Goodstein, Luca Coelho,
	Kalle Valo, Sasha Levin

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

[ Upstream commit cb1a4badf59275eb7221dcec621e8154917eabd1 ]

>From gen2 PN is totally offloaded to hardware (also the space for the
IV isn't part of the skb).  As you can see in mvm/mac80211.c:3545, the
MAC for cipher types CCMP/GCMP doesn't set
IEEE80211_KEY_FLAG_PUT_IV_SPACE for gen2 NICs.

This causes all the AMSDU data to be corrupted with cipher enabled.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 20 +++++++------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
index 316e2ba0c34d7..7b1dff92b7094 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
@@ -242,27 +242,23 @@ static int iwl_pcie_gen2_build_amsdu(struct iwl_trans *trans,
 	struct ieee80211_hdr *hdr = (void *)skb->data;
 	unsigned int snap_ip_tcp_hdrlen, ip_hdrlen, total_len, hdr_room;
 	unsigned int mss = skb_shinfo(skb)->gso_size;
-	u16 length, iv_len, amsdu_pad;
+	u16 length, amsdu_pad;
 	u8 *start_hdr;
 	struct iwl_tso_hdr_page *hdr_page;
 	struct page **page_ptr;
 	struct tso_t tso;
 
-	/* if the packet is protected, then it must be CCMP or GCMP */
-	iv_len = ieee80211_has_protected(hdr->frame_control) ?
-		IEEE80211_CCMP_HDR_LEN : 0;
-
 	trace_iwlwifi_dev_tx(trans->dev, skb, tfd, sizeof(*tfd),
 			     &dev_cmd->hdr, start_len, 0);
 
 	ip_hdrlen = skb_transport_header(skb) - skb_network_header(skb);
 	snap_ip_tcp_hdrlen = 8 + ip_hdrlen + tcp_hdrlen(skb);
-	total_len = skb->len - snap_ip_tcp_hdrlen - hdr_len - iv_len;
+	total_len = skb->len - snap_ip_tcp_hdrlen - hdr_len;
 	amsdu_pad = 0;
 
 	/* total amount of header we may need for this A-MSDU */
 	hdr_room = DIV_ROUND_UP(total_len, mss) *
-		(3 + snap_ip_tcp_hdrlen + sizeof(struct ethhdr)) + iv_len;
+		(3 + snap_ip_tcp_hdrlen + sizeof(struct ethhdr));
 
 	/* Our device supports 9 segments at most, it will fit in 1 page */
 	hdr_page = get_page_hdr(trans, hdr_room);
@@ -273,14 +269,12 @@ static int iwl_pcie_gen2_build_amsdu(struct iwl_trans *trans,
 	start_hdr = hdr_page->pos;
 	page_ptr = (void *)((u8 *)skb->cb + trans_pcie->page_offs);
 	*page_ptr = hdr_page->page;
-	memcpy(hdr_page->pos, skb->data + hdr_len, iv_len);
-	hdr_page->pos += iv_len;
 
 	/*
-	 * Pull the ieee80211 header + IV to be able to use TSO core,
+	 * Pull the ieee80211 header to be able to use TSO core,
 	 * we will restore it for the tx_status flow.
 	 */
-	skb_pull(skb, hdr_len + iv_len);
+	skb_pull(skb, hdr_len);
 
 	/*
 	 * Remove the length of all the headers that we don't actually
@@ -355,8 +349,8 @@ static int iwl_pcie_gen2_build_amsdu(struct iwl_trans *trans,
 		}
 	}
 
-	/* re -add the WiFi header and IV */
-	skb_push(skb, hdr_len + iv_len);
+	/* re -add the WiFi header */
+	skb_push(skb, hdr_len);
 
 	return 0;
 
-- 
2.20.1




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

* [PATCH 4.19 014/243] exportfs_decode_fh(): negative pinned may become positive without the parent locked
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 013/243] iwlwifi: pcie: dont consider IV len in A-MSDU Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 015/243] audit_get_nd(): dont unlock parent too early Greg Kroah-Hartman
                   ` (235 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro, Sasha Levin

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

[ Upstream commit a2ece088882666e1dc7113744ac912eb161e3f87 ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/exportfs/expfs.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 63707abcbeb3e..808cae6d5f50f 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -517,26 +517,33 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
 		 * inode is actually connected to the parent.
 		 */
 		err = exportfs_get_name(mnt, target_dir, nbuf, result);
-		if (!err) {
-			inode_lock(target_dir->d_inode);
-			nresult = lookup_one_len(nbuf, target_dir,
-						 strlen(nbuf));
-			inode_unlock(target_dir->d_inode);
-			if (!IS_ERR(nresult)) {
-				if (nresult->d_inode) {
-					dput(result);
-					result = nresult;
-				} else
-					dput(nresult);
-			}
+		if (err) {
+			dput(target_dir);
+			goto err_result;
 		}
 
+		inode_lock(target_dir->d_inode);
+		nresult = lookup_one_len(nbuf, target_dir, strlen(nbuf));
+		if (!IS_ERR(nresult)) {
+			if (unlikely(nresult->d_inode != result->d_inode)) {
+				dput(nresult);
+				nresult = ERR_PTR(-ESTALE);
+			}
+		}
+		inode_unlock(target_dir->d_inode);
 		/*
 		 * At this point we are done with the parent, but it's pinned
 		 * by the child dentry anyway.
 		 */
 		dput(target_dir);
 
+		if (IS_ERR(nresult)) {
+			err = PTR_ERR(nresult);
+			goto err_result;
+		}
+		dput(result);
+		result = nresult;
+
 		/*
 		 * And finally make sure the dentry is actually acceptable
 		 * to NFSD.
-- 
2.20.1




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

* [PATCH 4.19 015/243] audit_get_nd(): dont unlock parent too early
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 014/243] exportfs_decode_fh(): negative pinned may become positive without the parent locked Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 016/243] NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error Greg Kroah-Hartman
                   ` (234 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Al Viro, Sasha Levin

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

[ Upstream commit 69924b89687a2923e88cc42144aea27868913d0e ]

if the child has been negative and just went positive
under us, we want coherent d_is_positive() and ->d_inode.
Don't unlock the parent until we'd done that work...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/audit_watch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 787c7afdf8294..4f7262eba73d8 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -366,12 +366,12 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
 	struct dentry *d = kern_path_locked(watch->path, parent);
 	if (IS_ERR(d))
 		return PTR_ERR(d);
-	inode_unlock(d_backing_inode(parent->dentry));
 	if (d_is_positive(d)) {
 		/* update watch filter fields */
 		watch->dev = d->d_sb->s_dev;
 		watch->ino = d_backing_inode(d)->i_ino;
 	}
+	inode_unlock(d_backing_inode(parent->dentry));
 	dput(d);
 	return 0;
 }
-- 
2.20.1




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

* [PATCH 4.19 016/243] NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 015/243] audit_get_nd(): dont unlock parent too early Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:02 ` [PATCH 4.19 017/243] xfrm: release device reference for invalid state Greg Kroah-Hartman
                   ` (233 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stephan Gerhold, Andy Shevchenko,
	David S. Miller, Sasha Levin

From: Stephan Gerhold <stephan@gerhold.net>

[ Upstream commit a71a29f50de1ef97ab55c151a1598eb12dde379d ]

I2C communication errors (-EREMOTEIO) during the IRQ handler of nxp-nci
result in a NULL pointer dereference at the moment:

    BUG: kernel NULL pointer dereference, address: 0000000000000000
    Oops: 0002 [#1] PREEMPT SMP NOPTI
    CPU: 1 PID: 355 Comm: irq/137-nxp-nci Not tainted 5.4.0-rc6 #1
    RIP: 0010:skb_queue_tail+0x25/0x50
    Call Trace:
     nci_recv_frame+0x36/0x90 [nci]
     nxp_nci_i2c_irq_thread_fn+0xd1/0x285 [nxp_nci_i2c]
     ? preempt_count_add+0x68/0xa0
     ? irq_forced_thread_fn+0x80/0x80
     irq_thread_fn+0x20/0x60
     irq_thread+0xee/0x180
     ? wake_threads_waitq+0x30/0x30
     kthread+0xfb/0x130
     ? irq_thread_check_affinity+0xd0/0xd0
     ? kthread_park+0x90/0x90
     ret_from_fork+0x1f/0x40

Afterward the kernel must be rebooted to work properly again.

This happens because it attempts to call nci_recv_frame() with skb == NULL.
However, unlike nxp_nci_fw_recv_frame(), nci_recv_frame() does not have any
NULL checks for skb, causing the NULL pointer dereference.

Change the code to call only nxp_nci_fw_recv_frame() in case of an error.
Make sure to log it so it is obvious that a communication error occurred.
The error above then becomes:

    nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121
    nci: __nci_request: wait_for_completion_interruptible_timeout failed 0
    nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121

Fixes: 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nfc/nxp-nci/i2c.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index ba695e392c3b7..0df745cad601a 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -236,8 +236,10 @@ static irqreturn_t nxp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
 
 	if (r == -EREMOTEIO) {
 		phy->hard_fault = r;
-		skb = NULL;
-	} else if (r < 0) {
+		if (info->mode == NXP_NCI_MODE_FW)
+			nxp_nci_fw_recv_frame(phy->ndev, NULL);
+	}
+	if (r < 0) {
 		nfc_err(&client->dev, "Read failed with error %d\n", r);
 		goto exit_irq_handled;
 	}
-- 
2.20.1




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

* [PATCH 4.19 017/243] xfrm: release device reference for invalid state
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 016/243] NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error Greg Kroah-Hartman
@ 2019-12-11 15:02 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 018/243] Input: cyttsp4_core - fix use after free bug Greg Kroah-Hartman
                   ` (232 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xiaodong Xu, Bo Chen,
	Steffen Klassert, Sasha Levin

From: Xiaodong Xu <stid.smth@gmail.com>

[ Upstream commit 4944a4b1077f74d89073624bd286219d2fcbfce3 ]

An ESP packet could be decrypted in async mode if the input handler for
this packet returns -EINPROGRESS in xfrm_input(). At this moment the device
reference in skb is held. Later xfrm_input() will be invoked again to
resume the processing.
If the transform state is still valid it would continue to release the
device reference and there won't be a problem; however if the transform
state is not valid when async resumption happens, the packet will be
dropped while the device reference is still being held.
When the device is deleted for some reason and the reference to this
device is not properly released, the kernel will keep logging like:

unregister_netdevice: waiting for ppp2 to become free. Usage count = 1

The issue is observed when running IPsec traffic over a PPPoE device based
on a bridge interface. By terminating the PPPoE connection on the server
end for multiple times, the PPPoE device on the client side will eventually
get stuck on the above warning message.

This patch will check the async mode first and continue to release device
reference in async resumption, before it is dropped due to invalid state.

v2: Do not assign address family from outer_mode in the transform if the
state is invalid

v3: Release device reference in the error path instead of jumping to resume

Fixes: 4ce3dbe397d7b ("xfrm: Fix xfrm_input() to verify state is valid when (encap_type < 0)")
Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>
Reported-by: Bo Chen <chenborfc@163.com>
Tested-by: Bo Chen <chenborfc@163.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/xfrm/xfrm_input.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index d5635908587f4..82b0a99ee1f43 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -246,6 +246,9 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
 			else
 				XFRM_INC_STATS(net,
 					       LINUX_MIB_XFRMINSTATEINVALID);
+
+			if (encap_type == -1)
+				dev_put(skb->dev);
 			goto drop;
 		}
 
-- 
2.20.1




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

* [PATCH 4.19 018/243] Input: cyttsp4_core - fix use after free bug
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2019-12-11 15:02 ` [PATCH 4.19 017/243] xfrm: release device reference for invalid state Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 019/243] sched/core: Avoid spurious lock dependencies Greg Kroah-Hartman
                   ` (231 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Pan Bian, Dmitry Torokhov, Sasha Levin

From: Pan Bian <bianpan2016@163.com>

[ Upstream commit 79aae6acbef16f720a7949f8fc6ac69816c79d62 ]

The device md->input is used after it is released. Setting the device
data to NULL is unnecessary as the device is never used again. Instead,
md->input should be assigned NULL to avoid accessing the freed memory
accidently. Besides, checking md->si against NULL is superfluous as it
points to a variable address, which cannot be NULL.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/1572936379-6423-1-git-send-email-bianpan2016@163.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/input/touchscreen/cyttsp4_core.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index 727c3232517cd..c84ee739a8d50 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -2000,11 +2000,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
 
 	/* get sysinfo */
 	md->si = &cd->sysinfo;
-	if (!md->si) {
-		dev_err(dev, "%s: Fail get sysinfo pointer from core p=%p\n",
-			__func__, md->si);
-		goto error_get_sysinfo;
-	}
 
 	rc = cyttsp4_setup_input_device(cd);
 	if (rc)
@@ -2014,8 +2009,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
 
 error_init_input:
 	input_free_device(md->input);
-error_get_sysinfo:
-	input_set_drvdata(md->input, NULL);
 error_alloc_failed:
 	dev_err(dev, "%s failed.\n", __func__);
 	return rc;
-- 
2.20.1




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

* [PATCH 4.19 019/243] sched/core: Avoid spurious lock dependencies
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 018/243] Input: cyttsp4_core - fix use after free bug Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 020/243] perf/core: Consistently fail fork on allocation failures Greg Kroah-Hartman
                   ` (230 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel),
	Linus Torvalds, Qian Cai, Thomas Gleixner, akpm, bigeasy, cl,
	keescook, penberg, rientjes, thgarnie, tytso, will, Ingo Molnar,
	Sasha Levin

From: Peter Zijlstra <peterz@infradead.org>

[ Upstream commit ff51ff84d82aea5a889b85f2b9fb3aa2b8691668 ]

While seemingly harmless, __sched_fork() does hrtimer_init(), which,
when DEBUG_OBJETS, can end up doing allocations.

This then results in the following lock order:

  rq->lock
    zone->lock.rlock
      batched_entropy_u64.lock

Which in turn causes deadlocks when we do wakeups while holding that
batched_entropy lock -- as the random code does.

Solve this by moving __sched_fork() out from under rq->lock. This is
safe because nothing there relies on rq->lock, as also evident from the
other __sched_fork() callsite.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: bigeasy@linutronix.de
Cc: cl@linux.com
Cc: keescook@chromium.org
Cc: penberg@kernel.org
Cc: rientjes@google.com
Cc: thgarnie@google.com
Cc: tytso@mit.edu
Cc: will@kernel.org
Fixes: b7d5dc21072c ("random: add a spinlock_t to struct batched_entropy")
Link: https://lkml.kernel.org/r/20191001091837.GK4536@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/sched/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 78ecdfae25b69..2befd2c4ce9e6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5413,10 +5413,11 @@ void init_idle(struct task_struct *idle, int cpu)
 	struct rq *rq = cpu_rq(cpu);
 	unsigned long flags;
 
+	__sched_fork(0, idle);
+
 	raw_spin_lock_irqsave(&idle->pi_lock, flags);
 	raw_spin_lock(&rq->lock);
 
-	__sched_fork(0, idle);
 	idle->state = TASK_RUNNING;
 	idle->se.exec_start = sched_clock();
 	idle->flags |= PF_IDLE;
-- 
2.20.1




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

* [PATCH 4.19 020/243] perf/core: Consistently fail fork on allocation failures
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 019/243] sched/core: Avoid spurious lock dependencies Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 021/243] ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed() Greg Kroah-Hartman
                   ` (229 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Shishkin,
	Peter Zijlstra (Intel),
	Arnaldo Carvalho de Melo, David Ahern, Jiri Olsa, Jiri Olsa,
	Linus Torvalds, Mark Rutland, Namhyung Kim, Stephane Eranian,
	Thomas Gleixner, Vince Weaver, Ingo Molnar, Sasha Levin

From: Alexander Shishkin <alexander.shishkin@linux.intel.com>

[ Upstream commit 697d877849d4b34ab58d7078d6930bad0ef6fc66 ]

Commit:

  313ccb9615948 ("perf: Allocate context task_ctx_data for child event")

makes the inherit path skip over the current event in case of task_ctx_data
allocation failure. This, however, is inconsistent with allocation failures
in perf_event_alloc(), which would abort the fork.

Correct this by returning an error code on task_ctx_data allocation
failure and failing the fork in that case.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: https://lkml.kernel.org/r/20191105075702.60319-1-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 625ba462e5bbd..460d5fd3ec4e4 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11377,7 +11377,7 @@ inherit_event(struct perf_event *parent_event,
 						   GFP_KERNEL);
 		if (!child_ctx->task_ctx_data) {
 			free_event(child_event);
-			return NULL;
+			return ERR_PTR(-ENOMEM);
 		}
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 021/243] ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 020/243] perf/core: Consistently fail fork on allocation failures Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 022/243] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1 Greg Kroah-Hartman
                   ` (228 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, paulhsia, Takashi Iwai, Sasha Levin

From: paulhsia <paulhsia@chromium.org>

[ Upstream commit f5cdc9d4003a2f66ea57b3edd3e04acc2b1a4439 ]

If the nullity check for `substream->runtime` is outside of the lock
region, it is possible to have a null runtime in the critical section
if snd_pcm_detach_substream is called right before the lock.

Signed-off-by: paulhsia <paulhsia@chromium.org>
Link: https://lore.kernel.org/r/20191112171715.128727-2-paulhsia@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/core/pcm_lib.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 4e6110d778bd2..ad52126d3d22e 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -1797,11 +1797,14 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
 	struct snd_pcm_runtime *runtime;
 	unsigned long flags;
 
-	if (PCM_RUNTIME_CHECK(substream))
+	if (snd_BUG_ON(!substream))
 		return;
-	runtime = substream->runtime;
 
 	snd_pcm_stream_lock_irqsave(substream, flags);
+	if (PCM_RUNTIME_CHECK(substream))
+		goto _unlock;
+	runtime = substream->runtime;
+
 	if (!snd_pcm_running(substream) ||
 	    snd_pcm_update_hw_ptr0(substream, 1) < 0)
 		goto _end;
@@ -1812,6 +1815,7 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
 #endif
  _end:
 	kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
+ _unlock:
 	snd_pcm_stream_unlock_irqrestore(substream, flags);
 }
 EXPORT_SYMBOL(snd_pcm_period_elapsed);
-- 
2.20.1




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

* [PATCH 4.19 022/243] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 021/243] ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed() Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 023/243] selftests: kvm: fix build with glibc >= 2.30 Greg Kroah-Hartman
                   ` (227 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yunhao Tian, Maxime Ripard, Sasha Levin

From: Yunhao Tian <t123yh@outlook.com>

[ Upstream commit 0b8e7bbde5e7e2c419567e1ee29587dae3b78ee3 ]

The datasheet of V3s (and various other chips) wrote
that TCON0_DCLK_DIV can be >= 1 if only dclk is used,
and must >= 6 if dclk1 or dclk2 is used. As currently
neither dclk1 nor dclk2 is used (no writes to these
bits), let's set minimal division to 1.

If this minimal division is 6, some common dot clock
frequencies can't be produced (e.g. 30MHz will not be
possible and will fallback to 25MHz), which is
obviously not an expected behaviour.

Signed-off-by: Yunhao Tian <t123yh@outlook.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/linux-arm-kernel/MN2PR08MB57905AD8A00C08DA219377C989760@MN2PR08MB5790.namprd08.prod.outlook.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 8c31c9ab06f8b..fda1ae12069a7 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -423,7 +423,7 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
 
 	WARN_ON(!tcon->quirks->has_channel_0);
 
-	tcon->dclk_min_div = 6;
+	tcon->dclk_min_div = 1;
 	tcon->dclk_max_div = 127;
 	sun4i_tcon0_mode_set_common(tcon, mode);
 
-- 
2.20.1




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

* [PATCH 4.19 023/243] selftests: kvm: fix build with glibc >= 2.30
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 022/243] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1 Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 024/243] rsxx: add missed destroy_workqueue calls in remove Greg Kroah-Hartman
                   ` (226 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vitaly Kuznetsov, Paolo Bonzini, Sasha Levin

From: Vitaly Kuznetsov <vkuznets@redhat.com>

[ Upstream commit e37f9f139f62deddff90c7298ae3a85026a71067 ]

Glibc-2.30 gained gettid() wrapper, selftests fail to compile:

lib/assert.c:58:14: error: static declaration of ‘gettid’ follows non-static declaration
   58 | static pid_t gettid(void)
      |              ^~~~~~
In file included from /usr/include/unistd.h:1170,
                 from include/test_util.h:18,
                 from lib/assert.c:10:
/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/testing/selftests/kvm/lib/assert.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kvm/lib/assert.c b/tools/testing/selftests/kvm/lib/assert.c
index cd01144d27c8d..d306677065699 100644
--- a/tools/testing/selftests/kvm/lib/assert.c
+++ b/tools/testing/selftests/kvm/lib/assert.c
@@ -56,7 +56,7 @@ static void test_dump_stack(void)
 #pragma GCC diagnostic pop
 }
 
-static pid_t gettid(void)
+static pid_t _gettid(void)
 {
 	return syscall(SYS_gettid);
 }
@@ -73,7 +73,7 @@ test_assert(bool exp, const char *exp_str,
 		fprintf(stderr, "==== Test Assertion Failure ====\n"
 			"  %s:%u: %s\n"
 			"  pid=%d tid=%d - %s\n",
-			file, line, exp_str, getpid(), gettid(),
+			file, line, exp_str, getpid(), _gettid(),
 			strerror(errno));
 		test_dump_stack();
 		if (fmt) {
-- 
2.20.1




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

* [PATCH 4.19 024/243] rsxx: add missed destroy_workqueue calls in remove
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 023/243] selftests: kvm: fix build with glibc >= 2.30 Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 025/243] net: ep93xx_eth: fix mismatch of request_mem_region " Greg Kroah-Hartman
                   ` (225 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chuhong Yuan, Jens Axboe, Sasha Levin

From: Chuhong Yuan <hslester96@gmail.com>

[ Upstream commit dcb77e4b274b8f13ac6482dfb09160cd2fae9a40 ]

The driver misses calling destroy_workqueue in remove like what is done
when probe fails.
Add the missed calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/block/rsxx/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index f2c631ce793cc..14056dc450642 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -1014,8 +1014,10 @@ static void rsxx_pci_remove(struct pci_dev *dev)
 
 	cancel_work_sync(&card->event_work);
 
+	destroy_workqueue(card->event_wq);
 	rsxx_destroy_dev(card);
 	rsxx_dma_destroy(card);
+	destroy_workqueue(card->creg_ctrl.creg_wq);
 
 	spin_lock_irqsave(&card->irq_lock, flags);
 	rsxx_disable_ier_and_isr(card, CR_INTR_ALL);
-- 
2.20.1




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

* [PATCH 4.19 025/243] net: ep93xx_eth: fix mismatch of request_mem_region in remove
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 024/243] rsxx: add missed destroy_workqueue calls in remove Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 026/243] i2c: core: fix use after free in of_i2c_notify Greg Kroah-Hartman
                   ` (224 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chuhong Yuan, David S. Miller, Sasha Levin

From: Chuhong Yuan <hslester96@gmail.com>

[ Upstream commit 3df70afe8d33f4977d0e0891bdcfb639320b5257 ]

The driver calls release_resource in remove to match request_mem_region
in probe, which is incorrect.
Fix it by using the right one, release_mem_region.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/cirrus/ep93xx_eth.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 13dfdfca49fc7..edc1d19c9c02e 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -767,6 +767,7 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
 {
 	struct net_device *dev;
 	struct ep93xx_priv *ep;
+	struct resource *mem;
 
 	dev = platform_get_drvdata(pdev);
 	if (dev == NULL)
@@ -782,8 +783,8 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
 		iounmap(ep->base_addr);
 
 	if (ep->res != NULL) {
-		release_resource(ep->res);
-		kfree(ep->res);
+		mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		release_mem_region(mem->start, resource_size(mem));
 	}
 
 	free_netdev(dev);
-- 
2.20.1




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

* [PATCH 4.19 026/243] i2c: core: fix use after free in of_i2c_notify
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 025/243] net: ep93xx_eth: fix mismatch of request_mem_region " Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 027/243] serial: core: Allow processing sysrq at port unlock time Greg Kroah-Hartman
                   ` (223 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wen Yang, Wolfram Sang, Sasha Levin

From: Wen Yang <wenyang@linux.alibaba.com>

[ Upstream commit a4c2fec16f5e6a5fee4865e6e0e91e2bc2d10f37 ]

We can't use "adap->dev" after it has been freed.

Fixes: 5bf4fa7daea6 ("i2c: break out OF support into separate file")
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/i2c/i2c-core-of.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 0f01cdba9d2c6..14d4884996968 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -253,14 +253,14 @@ static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
 		}
 
 		client = of_i2c_register_device(adap, rd->dn);
-		put_device(&adap->dev);
-
 		if (IS_ERR(client)) {
 			dev_err(&adap->dev, "failed to create client for '%pOF'\n",
 				 rd->dn);
+			put_device(&adap->dev);
 			of_node_clear_flag(rd->dn, OF_POPULATED);
 			return notifier_from_errno(PTR_ERR(client));
 		}
+		put_device(&adap->dev);
 		break;
 	case OF_RECONFIG_CHANGE_REMOVE:
 		/* already depopulated? */
-- 
2.20.1




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

* [PATCH 4.19 027/243] serial: core: Allow processing sysrq at port unlock time
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 026/243] i2c: core: fix use after free in of_i2c_notify Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 028/243] cxgb4vf: fix memleak in mac_hlist initialization Greg Kroah-Hartman
                   ` (222 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Douglas Anderson, Sasha Levin

From: Douglas Anderson <dianders@chromium.org>

[ Upstream commit d6e1935819db0c91ce4a5af82466f3ab50d17346 ]

Right now serial drivers process sysrq keys deep in their character
receiving code.  This means that they've already grabbed their
port->lock spinlock.  This can end up getting in the way if we've go
to do serial stuff (especially kgdb) in response to the sysrq.

Serial drivers have various hacks in them to handle this.  Looking at
'8250_port.c' you can see that the console_write() skips locking if
we're in the sysrq handler.  Looking at 'msm_serial.c' you can see
that the port lock is dropped around uart_handle_sysrq_char().

It turns out that these hacks aren't exactly perfect.  If you have
lockdep turned on and use something like the 8250_port hack you'll get
a splat that looks like:

  WARNING: possible circular locking dependency detected
  [...] is trying to acquire lock:
  ... (console_owner){-.-.}, at: console_unlock+0x2e0/0x5e4

  but task is already holding lock:
  ... (&port_lock_key){-.-.}, at: serial8250_handle_irq+0x30/0xe4

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #1 (&port_lock_key){-.-.}:
         _raw_spin_lock_irqsave+0x58/0x70
         serial8250_console_write+0xa8/0x250
         univ8250_console_write+0x40/0x4c
         console_unlock+0x528/0x5e4
         register_console+0x2c4/0x3b0
         uart_add_one_port+0x350/0x478
         serial8250_register_8250_port+0x350/0x3a8
         dw8250_probe+0x67c/0x754
         platform_drv_probe+0x58/0xa4
         really_probe+0x150/0x294
         driver_probe_device+0xac/0xe8
         __driver_attach+0x98/0xd0
         bus_for_each_dev+0x84/0xc8
         driver_attach+0x2c/0x34
         bus_add_driver+0xf0/0x1ec
         driver_register+0xb4/0x100
         __platform_driver_register+0x60/0x6c
         dw8250_platform_driver_init+0x20/0x28
	 ...

  -> #0 (console_owner){-.-.}:
         lock_acquire+0x1e8/0x214
         console_unlock+0x35c/0x5e4
         vprintk_emit+0x230/0x274
         vprintk_default+0x7c/0x84
         vprintk_func+0x190/0x1bc
         printk+0x80/0xa0
         __handle_sysrq+0x104/0x21c
         handle_sysrq+0x30/0x3c
         serial8250_read_char+0x15c/0x18c
         serial8250_rx_chars+0x34/0x74
         serial8250_handle_irq+0x9c/0xe4
         dw8250_handle_irq+0x98/0xcc
         serial8250_interrupt+0x50/0xe8
         ...

  other info that might help us debug this:

   Possible unsafe locking scenario:

         CPU0                    CPU1
         ----                    ----
    lock(&port_lock_key);
                                 lock(console_owner);
                                 lock(&port_lock_key);
    lock(console_owner);

   *** DEADLOCK ***

The hack used in 'msm_serial.c' doesn't cause the above splats but it
seems a bit ugly to unlock / lock our spinlock deep in our irq
handler.

It seems like we could defer processing the sysrq until the end of the
interrupt handler right after we've unlocked the port.  With this
scheme if a whole batch of sysrq characters comes in one irq then we
won't handle them all, but that seems like it should be a fine
compromise.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/serial_core.h | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 406edae44ca30..3460b15a26078 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -173,6 +173,7 @@ struct uart_port {
 	struct console		*cons;			/* struct console, if any */
 #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
 	unsigned long		sysrq;			/* sysrq timeout */
+	unsigned int		sysrq_ch;		/* char for sysrq */
 #endif
 
 	/* flags must be updated while holding port mutex */
@@ -482,8 +483,42 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
 	}
 	return 0;
 }
+static inline int
+uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
+{
+	if (port->sysrq) {
+		if (ch && time_before(jiffies, port->sysrq)) {
+			port->sysrq_ch = ch;
+			port->sysrq = 0;
+			return 1;
+		}
+		port->sysrq = 0;
+	}
+	return 0;
+}
+static inline void
+uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
+{
+	int sysrq_ch;
+
+	sysrq_ch = port->sysrq_ch;
+	port->sysrq_ch = 0;
+
+	spin_unlock_irqrestore(&port->lock, irqflags);
+
+	if (sysrq_ch)
+		handle_sysrq(sysrq_ch);
+}
 #else
-#define uart_handle_sysrq_char(port,ch) ({ (void)port; 0; })
+static inline int
+uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) { return 0; }
+static inline int
+uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch) { return 0; }
+static inline void
+uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
+{
+	spin_unlock_irqrestore(&port->lock, irqflags);
+}
 #endif
 
 /*
-- 
2.20.1




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

* [PATCH 4.19 028/243] cxgb4vf: fix memleak in mac_hlist initialization
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 027/243] serial: core: Allow processing sysrq at port unlock time Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 029/243] iwlwifi: mvm: synchronize TID queue removal Greg Kroah-Hartman
                   ` (221 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arjun Vynipadath, Ganesh Goudar,
	David S. Miller, Sasha Levin

From: Arjun Vynipadath <arjun@chelsio.com>

[ Upstream commit 24357e06ba511ad874d664d39475dbb01c1ca450 ]

mac_hlist was initialized during adapter_up, which will be called
every time a vf device is first brought up, or every time when device
is brought up again after bringing all devices down. This means our
state of previous list is lost, causing a memleak if entries are
present in the list. To fix that, move list init to the condition
that performs initial one time adapter setup.

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
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/cxgb4vf/cxgb4vf_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index ff84791a0ff85..972dc7bd721d9 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -722,6 +722,10 @@ static int adapter_up(struct adapter *adapter)
 
 		if (adapter->flags & USING_MSIX)
 			name_msix_vecs(adapter);
+
+		/* Initialize hash mac addr list*/
+		INIT_LIST_HEAD(&adapter->mac_hlist);
+
 		adapter->flags |= FULL_INIT_DONE;
 	}
 
@@ -747,8 +751,6 @@ static int adapter_up(struct adapter *adapter)
 	enable_rx(adapter);
 	t4vf_sge_start(adapter);
 
-	/* Initialize hash mac addr list*/
-	INIT_LIST_HEAD(&adapter->mac_hlist);
 	return 0;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 029/243] iwlwifi: mvm: synchronize TID queue removal
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 028/243] cxgb4vf: fix memleak in mac_hlist initialization Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 030/243] iwlwifi: trans: Clear persistence bit when starting the FW Greg Kroah-Hartman
                   ` (220 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Johannes Berg, Luca Coelho, Sasha Levin

From: Johannes Berg <johannes.berg@intel.com>

[ Upstream commit 06bc6f6ed4ae0246a5e52094d1be90906a1361c7 ]

When we mark a TID as no longer having a queue, there's no
guarantee the TX path isn't using this txq_id right now,
having accessed it just before we reset the value. To fix
this, add synchronize_net() when we change the TIDs from
having a queue to not having one, so that we can then be
sure that the TX path is no longer accessing that queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 04ea516bddcc0..e850aa504b608 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -440,6 +440,16 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
 
 	rcu_read_unlock();
 
+	/*
+	 * The TX path may have been using this TXQ_ID from the tid_data,
+	 * so make sure it's no longer running so that we can safely reuse
+	 * this TXQ later. We've set all the TIDs to IWL_MVM_INVALID_QUEUE
+	 * above, but nothing guarantees we've stopped using them. Thus,
+	 * without this, we could get to iwl_mvm_disable_txq() and remove
+	 * the queue while still sending frames to it.
+	 */
+	synchronize_net();
+
 	return disable_agg_tids;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 030/243] iwlwifi: trans: Clear persistence bit when starting the FW
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 029/243] iwlwifi: mvm: synchronize TID queue removal Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 031/243] iwlwifi: mvm: Send non offchannel traffic via AP sta Greg Kroah-Hartman
                   ` (219 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shahar S Matityahu, Luca Coelho, Sasha Levin

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

[ Upstream commit 8954e1eb2270fa2effffd031b4839253952c76f2 ]

In D3 suspend flow in 9260 gen2 HW, the NIC receives two PERST signals.
The first PERST is expected and indicates the device on coming resume flow.
The second PERST causes FW restart FW restart.
In order to avoid this issue, the FW set the persistence bit on.
Once this bit is set, the FW ignores reset attempts.
The problem is when the FW gets assert during D3 and then the persistence
bit is set and causes the FW to ignore reset.
To handle this issue, the FW opens the preg bit which allows access
to the persistence bit, so that the driver clear the persistence bit
and reset the NIC.

The flow is as follows:
the driver checks if the persistence bit is set.
If the bit is set, the driver checks if he can clear the bit.
If the driver can not clear the bit then there is no point to continue
configuring the NIC since it will fail.

The fix was added is in start HW flow instead of the resume flow since in
general, if the persistence bit is set, the driver can not start the FW.
So it is good to check it when we start configuring the NIC.

The driver does not need to close the preg bit since the FW close it
during the start flow.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h   |  7 +++++++
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 12 ++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
index 421a869633a32..2e512f6e9ebcd 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
@@ -8,6 +8,7 @@
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2016        Intel Deutschland GmbH
+ * Copyright (C) 2018 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -35,6 +36,7 @@
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2016        Intel Deutschland GmbH
+ * Copyright (C) 2018 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -399,6 +401,7 @@ enum aux_misc_master1_en {
 #define AUX_MISC_MASTER1_SMPHR_STATUS	0xA20800
 #define RSA_ENABLE			0xA24B08
 #define PREG_AUX_BUS_WPROT_0		0xA04CC0
+#define PREG_PRPH_WPROT_0		0xA04CE0
 #define SB_CPU_1_STATUS			0xA01E30
 #define SB_CPU_2_STATUS			0xA01E34
 #define UMAG_SB_CPU_1_STATUS		0xA038C0
@@ -425,4 +428,8 @@ enum {
 #define UREG_CHICK		(0xA05C00)
 #define UREG_CHICK_MSI_ENABLE	BIT(24)
 #define UREG_CHICK_MSIX_ENABLE	BIT(25)
+
+#define HPM_DEBUG			0xA03440
+#define PERSISTENCE_BIT			BIT(12)
+#define PREG_WFPM_ACCESS		BIT(12)
 #endif				/* __iwl_prph_h__ */
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 954f932e9c88e..f89d43bc7d4bd 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1747,6 +1747,7 @@ static int iwl_pcie_init_msix_handler(struct pci_dev *pdev,
 static int _iwl_trans_pcie_start_hw(struct iwl_trans *trans, bool low_power)
 {
 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
+	u32 hpm;
 	int err;
 
 	lockdep_assert_held(&trans_pcie->mutex);
@@ -1757,6 +1758,17 @@ static int _iwl_trans_pcie_start_hw(struct iwl_trans *trans, bool low_power)
 		return err;
 	}
 
+	hpm = iwl_trans_read_prph(trans, HPM_DEBUG);
+	if (hpm != 0xa5a5a5a0 && (hpm & PERSISTENCE_BIT)) {
+		if (iwl_trans_read_prph(trans, PREG_PRPH_WPROT_0) &
+		    PREG_WFPM_ACCESS) {
+			IWL_ERR(trans,
+				"Error, can not clear persistence bit\n");
+			return -EPERM;
+		}
+		iwl_trans_write_prph(trans, HPM_DEBUG, hpm & ~PERSISTENCE_BIT);
+	}
+
 	iwl_trans_pcie_sw_reset(trans);
 
 	err = iwl_pcie_apm_init(trans);
-- 
2.20.1




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

* [PATCH 4.19 031/243] iwlwifi: mvm: Send non offchannel traffic via AP sta
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 030/243] iwlwifi: trans: Clear persistence bit when starting the FW Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 032/243] ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+ Greg Kroah-Hartman
                   ` (218 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andrei Otcheretianski, Luca Coelho,
	Sasha Levin

From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

[ Upstream commit dc1aca22f8f38b7e2ad7b118db87404d11e68771 ]

TDLS discovery response frame is a unicast direct frame to the peer.
Since we don't have a STA for this peer, this frame goes through
iwl_tx_skb_non_sta(). As the result aux_sta and some completely
arbitrary queue would be selected for this frame, resulting in a queue
hang.  Fix that by sending such frames through AP sta instead.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 0f357e8c4f940..476c44db0e64b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -820,6 +820,21 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
 	    !ieee80211_is_bufferable_mmpdu(hdr->frame_control))
 		sta = NULL;
 
+	/* If there is no sta, and it's not offchannel - send through AP */
+	if (info->control.vif->type == NL80211_IFTYPE_STATION &&
+	    info->hw_queue != IWL_MVM_OFFCHANNEL_QUEUE && !sta) {
+		struct iwl_mvm_vif *mvmvif =
+			iwl_mvm_vif_from_mac80211(info->control.vif);
+		u8 ap_sta_id = READ_ONCE(mvmvif->ap_sta_id);
+
+		if (ap_sta_id < IWL_MVM_STATION_COUNT) {
+			/* mac80211 holds rcu read lock */
+			sta = rcu_dereference(mvm->fw_id_to_mac_id[ap_sta_id]);
+			if (IS_ERR_OR_NULL(sta))
+				goto drop;
+		}
+	}
+
 	if (sta) {
 		if (iwl_mvm_defer_tx(mvm, sta, skb))
 			return;
-- 
2.20.1




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

* [PATCH 4.19 032/243] ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 031/243] iwlwifi: mvm: Send non offchannel traffic via AP sta Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 033/243] audit: Embed key into chunk Greg Kroah-Hartman
                   ` (217 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vincent Whitchurch, Russell King,
	Sasha Levin

From: Vincent Whitchurch <vincent.whitchurch@axis.com>

[ Upstream commit 344eb5539abf3e0b6ce22568c03e86450073e097 ]

getuser() and putuser() (and there underscored variants) use two
strb[t]/ldrb[t] instructions when they are asked to get/put 16-bits.
This means that the read/write is not atomic even when performed to a
16-bit-aligned address.

This leads to problems with vhost: vhost uses __getuser() to read the
vring's 16-bit avail.index field, and if it happens to observe a partial
update of the index, wrong descriptors will be used which will lead to a
breakdown of the virtio communication.  A similar problem exists for
__putuser() which is used to write to the vring's used.index field.

The reason these functions use strb[t]/ldrb[t] is because strht/ldrht
instructions did not exist until ARMv6T2/ARMv7.  So we should be easily
able to fix this on ARMv7.  Also, since all ARMv6 processors also don't
actually use the unprivileged instructions anymore for uaccess (since
CONFIG_CPU_USE_DOMAINS is not used) we can easily fix them too.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/include/asm/uaccess.h | 18 ++++++++++++++++++
 arch/arm/lib/getuser.S         | 11 +++++++++++
 arch/arm/lib/putuser.S         | 20 ++++++++++----------
 3 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index c136eef8f690b..6390a40f16e73 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -349,6 +349,13 @@ do {									\
 #define __get_user_asm_byte(x, addr, err)			\
 	__get_user_asm(x, addr, err, ldrb)
 
+#if __LINUX_ARM_ARCH__ >= 6
+
+#define __get_user_asm_half(x, addr, err)			\
+	__get_user_asm(x, addr, err, ldrh)
+
+#else
+
 #ifndef __ARMEB__
 #define __get_user_asm_half(x, __gu_addr, err)			\
 ({								\
@@ -367,6 +374,8 @@ do {									\
 })
 #endif
 
+#endif /* __LINUX_ARM_ARCH__ >= 6 */
+
 #define __get_user_asm_word(x, addr, err)			\
 	__get_user_asm(x, addr, err, ldr)
 #endif
@@ -442,6 +451,13 @@ do {									\
 #define __put_user_asm_byte(x, __pu_addr, err)			\
 	__put_user_asm(x, __pu_addr, err, strb)
 
+#if __LINUX_ARM_ARCH__ >= 6
+
+#define __put_user_asm_half(x, __pu_addr, err)			\
+	__put_user_asm(x, __pu_addr, err, strh)
+
+#else
+
 #ifndef __ARMEB__
 #define __put_user_asm_half(x, __pu_addr, err)			\
 ({								\
@@ -458,6 +474,8 @@ do {									\
 })
 #endif
 
+#endif /* __LINUX_ARM_ARCH__ >= 6 */
+
 #define __put_user_asm_word(x, __pu_addr, err)			\
 	__put_user_asm(x, __pu_addr, err, str)
 
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S
index 746e7801dcdf7..b2e4bc3a635e2 100644
--- a/arch/arm/lib/getuser.S
+++ b/arch/arm/lib/getuser.S
@@ -42,6 +42,12 @@ _ASM_NOKPROBE(__get_user_1)
 
 ENTRY(__get_user_2)
 	check_uaccess r0, 2, r1, r2, __get_user_bad
+#if __LINUX_ARM_ARCH__ >= 6
+
+2: TUSER(ldrh)	r2, [r0]
+
+#else
+
 #ifdef CONFIG_CPU_USE_DOMAINS
 rb	.req	ip
 2:	ldrbt	r2, [r0], #1
@@ -56,6 +62,9 @@ rb	.req	r0
 #else
 	orr	r2, rb, r2, lsl #8
 #endif
+
+#endif /* __LINUX_ARM_ARCH__ >= 6 */
+
 	mov	r0, #0
 	ret	lr
 ENDPROC(__get_user_2)
@@ -145,7 +154,9 @@ _ASM_NOKPROBE(__get_user_bad8)
 .pushsection __ex_table, "a"
 	.long	1b, __get_user_bad
 	.long	2b, __get_user_bad
+#if __LINUX_ARM_ARCH__ < 6
 	.long	3b, __get_user_bad
+#endif
 	.long	4b, __get_user_bad
 	.long	5b, __get_user_bad8
 	.long	6b, __get_user_bad8
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S
index 38d660d3705f4..515eeaa9975c6 100644
--- a/arch/arm/lib/putuser.S
+++ b/arch/arm/lib/putuser.S
@@ -41,16 +41,13 @@ ENDPROC(__put_user_1)
 
 ENTRY(__put_user_2)
 	check_uaccess r0, 2, r1, ip, __put_user_bad
-	mov	ip, r2, lsr #8
-#ifdef CONFIG_THUMB2_KERNEL
-#ifndef __ARMEB__
-2: TUSER(strb)	r2, [r0]
-3: TUSER(strb)	ip, [r0, #1]
+#if __LINUX_ARM_ARCH__ >= 6
+
+2: TUSER(strh)	r2, [r0]
+
 #else
-2: TUSER(strb)	ip, [r0]
-3: TUSER(strb)	r2, [r0, #1]
-#endif
-#else	/* !CONFIG_THUMB2_KERNEL */
+
+	mov	ip, r2, lsr #8
 #ifndef __ARMEB__
 2: TUSER(strb)	r2, [r0], #1
 3: TUSER(strb)	ip, [r0]
@@ -58,7 +55,8 @@ ENTRY(__put_user_2)
 2: TUSER(strb)	ip, [r0], #1
 3: TUSER(strb)	r2, [r0]
 #endif
-#endif	/* CONFIG_THUMB2_KERNEL */
+
+#endif /* __LINUX_ARM_ARCH__ >= 6 */
 	mov	r0, #0
 	ret	lr
 ENDPROC(__put_user_2)
@@ -91,7 +89,9 @@ ENDPROC(__put_user_bad)
 .pushsection __ex_table, "a"
 	.long	1b, __put_user_bad
 	.long	2b, __put_user_bad
+#if __LINUX_ARM_ARCH__ < 6
 	.long	3b, __put_user_bad
+#endif
 	.long	4b, __put_user_bad
 	.long	5b, __put_user_bad
 	.long	6b, __put_user_bad
-- 
2.20.1




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

* [PATCH 4.19 033/243] audit: Embed key into chunk
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 032/243] ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+ Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 034/243] netfilter: nf_tables: dont use position attribute on rule replacement Greg Kroah-Hartman
                   ` (216 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Richard Guy Briggs, Jan Kara,
	Paul Moore, Sasha Levin

From: Jan Kara <jack@suse.cz>

[ Upstream commit 8d20d6e9301d7b3777d66d47dd5b89acd645cd39 ]

Currently chunk hash key (which is in fact pointer to the inode) is
derived as chunk->mark.conn->obj. It is tricky to make this dereference
reliable for hash table lookups only under RCU as mark can get detached
from the connector and connector gets freed independently of the
running lookup. Thus there is a possible use after free / NULL ptr
dereference issue:

CPU1					CPU2
					untag_chunk()
					  ...
audit_tree_lookup()
  list_for_each_entry_rcu(p, list, hash) {
					  list_del_rcu(&chunk->hash);
					  fsnotify_destroy_mark(entry);
					  fsnotify_put_mark(entry)
    chunk_to_key(p)
      if (!chunk->mark.connector)
					    ...
					    hlist_del_init_rcu(&mark->obj_list);
					    if (hlist_empty(&conn->list)) {
					      inode = fsnotify_detach_connector_from_object(conn);
					    mark->connector = NULL;
					    ...
					    frees connector from workqueue
      chunk->mark.connector->obj

This race is probably impossible to hit in practice as the race window
on CPU1 is very narrow and CPU2 has a lot of code to execute. Still it's
better to have this fixed. Since the inode the chunk is attached to is
constant during chunk's lifetime it is easy to cache the key in the
chunk itself and thus avoid these issues.

Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/audit_tree.c | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index ea43181cde4a2..04f59dfd3e71f 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -24,6 +24,7 @@ struct audit_tree {
 
 struct audit_chunk {
 	struct list_head hash;
+	unsigned long key;
 	struct fsnotify_mark mark;
 	struct list_head trees;		/* with root here */
 	int dead;
@@ -172,21 +173,6 @@ static unsigned long inode_to_key(const struct inode *inode)
 	return (unsigned long)&inode->i_fsnotify_marks;
 }
 
-/*
- * Function to return search key in our hash from chunk. Key 0 is special and
- * should never be present in the hash.
- */
-static unsigned long chunk_to_key(struct audit_chunk *chunk)
-{
-	/*
-	 * We have a reference to the mark so it should be attached to a
-	 * connector.
-	 */
-	if (WARN_ON_ONCE(!chunk->mark.connector))
-		return 0;
-	return (unsigned long)chunk->mark.connector->obj;
-}
-
 static inline struct list_head *chunk_hash(unsigned long key)
 {
 	unsigned long n = key / L1_CACHE_BYTES;
@@ -196,12 +182,12 @@ static inline struct list_head *chunk_hash(unsigned long key)
 /* hash_lock & entry->lock is held by caller */
 static void insert_hash(struct audit_chunk *chunk)
 {
-	unsigned long key = chunk_to_key(chunk);
 	struct list_head *list;
 
 	if (!(chunk->mark.flags & FSNOTIFY_MARK_FLAG_ATTACHED))
 		return;
-	list = chunk_hash(key);
+	WARN_ON_ONCE(!chunk->key);
+	list = chunk_hash(chunk->key);
 	list_add_rcu(&chunk->hash, list);
 }
 
@@ -213,7 +199,7 @@ struct audit_chunk *audit_tree_lookup(const struct inode *inode)
 	struct audit_chunk *p;
 
 	list_for_each_entry_rcu(p, list, hash) {
-		if (chunk_to_key(p) == key) {
+		if (p->key == key) {
 			atomic_long_inc(&p->refs);
 			return p;
 		}
@@ -297,6 +283,7 @@ static void untag_chunk(struct node *p)
 
 	chunk->dead = 1;
 	spin_lock(&hash_lock);
+	new->key = chunk->key;
 	list_replace_init(&chunk->trees, &new->trees);
 	if (owner->root == chunk) {
 		list_del_init(&owner->same_root);
@@ -378,6 +365,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree)
 		tree->root = chunk;
 		list_add(&tree->same_root, &chunk->trees);
 	}
+	chunk->key = inode_to_key(inode);
 	insert_hash(chunk);
 	spin_unlock(&hash_lock);
 	spin_unlock(&entry->lock);
@@ -462,6 +450,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
 		fsnotify_put_mark(old_entry);
 		return 0;
 	}
+	chunk->key = old->key;
 	list_replace_init(&old->trees, &chunk->trees);
 	for (n = 0, p = chunk->owners; n < old->count; n++, p++) {
 		struct audit_tree *s = old->owners[n].owner;
@@ -661,7 +650,7 @@ void audit_trim_trees(void)
 			/* this could be NULL if the watch is dying else where... */
 			node->index |= 1U<<31;
 			if (iterate_mounts(compare_root,
-					   (void *)chunk_to_key(chunk),
+					   (void *)(chunk->key),
 					   root_mnt))
 				node->index &= ~(1U<<31);
 		}
-- 
2.20.1




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

* [PATCH 4.19 034/243] netfilter: nf_tables: dont use position attribute on rule replacement
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 033/243] audit: Embed key into chunk Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 035/243] ARC: IOC: panic if kernel was started with previously enabled IOC Greg Kroah-Hartman
                   ` (215 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Florian Westphal, Pablo Neira Ayuso,
	Sasha Levin

From: Florian Westphal <fw@strlen.de>

[ Upstream commit 447750f281abef547be44fdcfe3bc4447b3115a8 ]

Its possible to set both HANDLE and POSITION when replacing a rule.
In this case, the rule at POSITION gets replaced using the
userspace-provided handle.  Rule handles are supposed to be generated
by the kernel only.

Duplicate handles should be harmless, however better disable this "feature"
by only checking for the POSITION attribute on insert operations.

Fixes: 5e94846686d0 ("netfilter: nf_tables: add insert operation")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/netfilter/nf_tables_api.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index ec0f8b5bde0aa..0e1b1f7f4745e 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -2610,17 +2610,14 @@ static int nf_tables_newrule(struct net *net, struct sock *nlsk,
 
 		if (chain->use == UINT_MAX)
 			return -EOVERFLOW;
-	}
-
-	if (nla[NFTA_RULE_POSITION]) {
-		if (!(nlh->nlmsg_flags & NLM_F_CREATE))
-			return -EOPNOTSUPP;
 
-		pos_handle = be64_to_cpu(nla_get_be64(nla[NFTA_RULE_POSITION]));
-		old_rule = __nft_rule_lookup(chain, pos_handle);
-		if (IS_ERR(old_rule)) {
-			NL_SET_BAD_ATTR(extack, nla[NFTA_RULE_POSITION]);
-			return PTR_ERR(old_rule);
+		if (nla[NFTA_RULE_POSITION]) {
+			pos_handle = be64_to_cpu(nla_get_be64(nla[NFTA_RULE_POSITION]));
+			old_rule = __nft_rule_lookup(chain, pos_handle);
+			if (IS_ERR(old_rule)) {
+				NL_SET_BAD_ATTR(extack, nla[NFTA_RULE_POSITION]);
+				return PTR_ERR(old_rule);
+			}
 		}
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 035/243] ARC: IOC: panic if kernel was started with previously enabled IOC
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 034/243] netfilter: nf_tables: dont use position attribute on rule replacement Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 036/243] net/mlx5: Release resource on error flow Greg Kroah-Hartman
                   ` (214 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Eugeniy Paltsev, Vineet Gupta, Sasha Levin

From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>

[ Upstream commit 3624379d90ad2b65f9dbb30d7f7ce5498d2fe322 ]

If IOC was already enabled (due to bootloader) it technically needs to
be reconfigured with aperture base,size corresponding to Linux memory map
which will certainly be different than uboot's. But disabling and
reenabling IOC when DMA might be potentially active is tricky business.
To avoid random memory issues later, just panic here and ask user to
upgrade bootloader to one which doesn't enable IOC

This was actually seen as issue on some of the HSDK board with a version
of uboot which enabled IOC. There were random issues later with starting
of X or peripherals etc.

Also while I'm at it, replace hardcoded bits in ARC_REG_IO_COH_PARTIAL
and ARC_REG_IO_COH_ENABLE registers by definitions.

Inspired by: https://lkml.org/lkml/2018/1/19/557
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arc/include/asm/cache.h |  2 ++
 arch/arc/mm/cache.c          | 20 +++++++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h
index db681cf4959c8..2ad77fb43639c 100644
--- a/arch/arc/include/asm/cache.h
+++ b/arch/arc/include/asm/cache.h
@@ -124,7 +124,9 @@ extern unsigned long perip_base, perip_end;
 
 /* IO coherency related Auxiliary registers */
 #define ARC_REG_IO_COH_ENABLE	0x500
+#define ARC_IO_COH_ENABLE_BIT	BIT(0)
 #define ARC_REG_IO_COH_PARTIAL	0x501
+#define ARC_IO_COH_PARTIAL_BIT	BIT(0)
 #define ARC_REG_IO_COH_AP0_BASE	0x508
 #define ARC_REG_IO_COH_AP0_SIZE	0x509
 
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index f2701c13a66b2..cf9619d4efb4f 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -1144,6 +1144,20 @@ noinline void __init arc_ioc_setup(void)
 {
 	unsigned int ioc_base, mem_sz;
 
+	/*
+	 * If IOC was already enabled (due to bootloader) it technically needs to
+	 * be reconfigured with aperture base,size corresponding to Linux memory map
+	 * which will certainly be different than uboot's. But disabling and
+	 * reenabling IOC when DMA might be potentially active is tricky business.
+	 * To avoid random memory issues later, just panic here and ask user to
+	 * upgrade bootloader to one which doesn't enable IOC
+	 */
+	if (read_aux_reg(ARC_REG_IO_COH_ENABLE) & ARC_IO_COH_ENABLE_BIT)
+		panic("IOC already enabled, please upgrade bootloader!\n");
+
+	if (!ioc_enable)
+		return;
+
 	/*
 	 * As for today we don't support both IOC and ZONE_HIGHMEM enabled
 	 * simultaneously. This happens because as of today IOC aperture covers
@@ -1187,8 +1201,8 @@ noinline void __init arc_ioc_setup(void)
 		panic("IOC Aperture start must be aligned to the size of the aperture");
 
 	write_aux_reg(ARC_REG_IO_COH_AP0_BASE, ioc_base >> 12);
-	write_aux_reg(ARC_REG_IO_COH_PARTIAL, 1);
-	write_aux_reg(ARC_REG_IO_COH_ENABLE, 1);
+	write_aux_reg(ARC_REG_IO_COH_PARTIAL, ARC_IO_COH_PARTIAL_BIT);
+	write_aux_reg(ARC_REG_IO_COH_ENABLE, ARC_IO_COH_ENABLE_BIT);
 
 	/* Re-enable L1 dcache */
 	__dc_enable();
@@ -1265,7 +1279,7 @@ void __init arc_cache_init_master(void)
 	if (is_isa_arcv2() && l2_line_sz && !slc_enable)
 		arc_slc_disable();
 
-	if (is_isa_arcv2() && ioc_enable)
+	if (is_isa_arcv2() && ioc_exists)
 		arc_ioc_setup();
 
 	if (is_isa_arcv2() && l2_line_sz && slc_enable) {
-- 
2.20.1




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

* [PATCH 4.19 036/243] net/mlx5: Release resource on error flow
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 035/243] ARC: IOC: panic if kernel was started with previously enabled IOC Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 037/243] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY Greg Kroah-Hartman
                   ` (213 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Moni Shoua, Majd Dibbiny,
	Leon Romanovsky, Sasha Levin

From: Moni Shoua <monis@mellanox.com>

[ Upstream commit 698114968a22f6c0c9f42e983ba033cc36bb7217 ]

Fix reference counting leakage when the event handler aborts due to an
unsupported event for the resource type.

Fixes: a14c2d4beee5 ("net/mlx5_core: Warn on unsupported events of QP/RQ/SQ")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/qp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/qp.c b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
index 4ca07bfb6b14f..f33707ce8b6b0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
@@ -132,7 +132,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
 	if (!is_event_type_allowed((rsn >> MLX5_USER_INDEX_LEN), event_type)) {
 		mlx5_core_warn(dev, "event 0x%.2x is not allowed on resource 0x%.8x\n",
 			       event_type, rsn);
-		return;
+		goto out;
 	}
 
 	switch (common->res) {
@@ -150,7 +150,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
 	default:
 		mlx5_core_warn(dev, "invalid resource type for 0x%x\n", rsn);
 	}
-
+out:
 	mlx5_core_put_rsc(common);
 }
 
-- 
2.20.1




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

* [PATCH 4.19 037/243] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 036/243] net/mlx5: Release resource on error flow Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 038/243] ice: Fix NVM mask defines Greg Kroah-Hartman
                   ` (212 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jagan Teki, Stephen Boyd,
	Maxime Ripard, Sasha Levin

From: Jagan Teki <jagan@amarulasolutions.com>

[ Upstream commit ee678706e46d0d185c27cc214ad97828e0643159 ]

DSI DPHY gate bit on MIPI DSI clock register is bit 15
not bit 30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index 2a60981799216..dec4a130390a3 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -582,7 +582,7 @@ static const char * const dsi_dphy_parents[] = { "pll-video0", "pll-periph0" };
 static const u8 dsi_dphy_table[] = { 0, 2, };
 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(dsi_dphy_clk, "dsi-dphy",
 				       dsi_dphy_parents, dsi_dphy_table,
-				       0x168, 0, 4, 8, 2, BIT(31), CLK_SET_RATE_PARENT);
+				       0x168, 0, 4, 8, 2, BIT(15), CLK_SET_RATE_PARENT);
 
 static SUNXI_CCU_M_WITH_GATE(gpu_clk, "gpu", "pll-gpu",
 			     0x1a0, 0, 3, BIT(31), CLK_SET_RATE_PARENT);
-- 
2.20.1




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

* [PATCH 4.19 038/243] ice: Fix NVM mask defines
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 037/243] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 039/243] dlm: fix possible call to kfree() for non-initialized pointer Greg Kroah-Hartman
                   ` (211 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lev Faerman, Anirudh Venkataramanan,
	Andrew Bowers, Jeff Kirsher, Sasha Levin

From: Lev Faerman <lev.faerman@intel.com>

[ Upstream commit 6263e811f4d4418660c20b36a08063c6d2c3fb9d ]

Fixes bad masks that would break compilation when evaluated.

Signed-off-by: Lev Faerman <lev.faerman@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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/ice/ice_adminq_cmd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index a0614f472658a..328d293bc3ff5 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -1056,10 +1056,10 @@ struct ice_aqc_nvm {
 #define ICE_AQC_NVM_LAST_CMD		BIT(0)
 #define ICE_AQC_NVM_PCIR_REQ		BIT(0)	/* Used by NVM Update reply */
 #define ICE_AQC_NVM_PRESERVATION_S	1
-#define ICE_AQC_NVM_PRESERVATION_M	(3 << CSR_AQ_NVM_PRESERVATION_S)
-#define ICE_AQC_NVM_NO_PRESERVATION	(0 << CSR_AQ_NVM_PRESERVATION_S)
+#define ICE_AQC_NVM_PRESERVATION_M	(3 << ICE_AQC_NVM_PRESERVATION_S)
+#define ICE_AQC_NVM_NO_PRESERVATION	(0 << ICE_AQC_NVM_PRESERVATION_S)
 #define ICE_AQC_NVM_PRESERVE_ALL	BIT(1)
-#define ICE_AQC_NVM_PRESERVE_SELECTED	(3 << CSR_AQ_NVM_PRESERVATION_S)
+#define ICE_AQC_NVM_PRESERVE_SELECTED	(3 << ICE_AQC_NVM_PRESERVATION_S)
 #define ICE_AQC_NVM_FLASH_ONLY		BIT(7)
 	__le16 module_typeid;
 	__le16 length;
-- 
2.20.1




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

* [PATCH 4.19 039/243] dlm: fix possible call to kfree() for non-initialized pointer
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 038/243] ice: Fix NVM mask defines Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 040/243] ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 Greg Kroah-Hartman
                   ` (210 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Denis V. Lunev, David Teigland, Sasha Levin

From: Denis V. Lunev <den@openvz.org>

[ Upstream commit 58a923adf4d9aca8bf7205985c9c8fc531c65d72 ]

Technically dlm_config_nodes() could return error and keep nodes
uninitialized. After that on the fail path of we'll call kfree()
for that uninitialized value.

The patch is simple - we should just initialize nodes with NULL.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/dlm/member.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index cad6d85911a80..0bc43b35d2c53 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -671,7 +671,7 @@ int dlm_ls_stop(struct dlm_ls *ls)
 int dlm_ls_start(struct dlm_ls *ls)
 {
 	struct dlm_recover *rv, *rv_old;
-	struct dlm_config_node *nodes;
+	struct dlm_config_node *nodes = NULL;
 	int error, count;
 
 	rv = kzalloc(sizeof(*rv), GFP_NOFS);
-- 
2.20.1




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

* [PATCH 4.19 040/243] ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 039/243] dlm: fix possible call to kfree() for non-initialized pointer Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 041/243] extcon: max8997: Fix lack of path setting in USB device mode Greg Kroah-Hartman
                   ` (209 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anand Moon, Krzysztof Kozlowski, Sasha Levin

From: Anand Moon <linux.amoon@gmail.com>

[ Upstream commit 8fe325fa9d065aa54db4914fdaccab2169fd67a8 ]

>From Odroid XU3/XU4/HC1 schematics the LDO13 regulator for SD2, can be
set on 1.8V or 2.8V so the minimal value should be fixed to 1.8V.  This
is necessary to support UHS-I tuning (otherwise card won't be detected
during boot).

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 27214e6ebe4f4..d476ba0f07b6b 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -224,7 +224,7 @@
 
 			ldo13_reg: LDO13 {
 				regulator-name = "vddq_mmc2";
-				regulator-min-microvolt = <2800000>;
+				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <2800000>;
 			};
 
-- 
2.20.1




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

* [PATCH 4.19 041/243] extcon: max8997: Fix lack of path setting in USB device mode
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 040/243] ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 042/243] net: ethernet: ti: cpts: correct debug for expired txq skb Greg Kroah-Hartman
                   ` (208 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Szyprowski, Chanwoo Choi, Sasha Levin

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

[ Upstream commit a2dc50914744eea9f83a70a5db0486be625e5dc0 ]

MAX8997 driver disables automatic path selection from MicroUSB connector
and manually sets path to either UART or USB lines. However the code for
setting USB path worked only for USB host mode (when ID pin is set
to ground). When standard USB cable (USB device mode) is connected, path
registers are not touched. This means that once the non-USB accessory is
connected to MAX8997-operated micro USB port, the path is no longer set
to USB and USB device mode doesn't work. This patch fixes it by setting
USB path both for USB and USB host modes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/extcon/extcon-max8997.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 9f30f4929b729..7a767b66dd865 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -321,12 +321,10 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info,
 {
 	int ret = 0;
 
-	if (usb_type == MAX8997_USB_HOST) {
-		ret = max8997_muic_set_path(info, info->path_usb, attached);
-		if (ret < 0) {
-			dev_err(info->dev, "failed to update muic register\n");
-			return ret;
-		}
+	ret = max8997_muic_set_path(info, info->path_usb, attached);
+	if (ret < 0) {
+		dev_err(info->dev, "failed to update muic register\n");
+		return ret;
 	}
 
 	switch (usb_type) {
-- 
2.20.1




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

* [PATCH 4.19 042/243] net: ethernet: ti: cpts: correct debug for expired txq skb
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 041/243] extcon: max8997: Fix lack of path setting in USB device mode Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 043/243] rtc: s3c-rtc: Avoid using broken ALMYEAR register Greg Kroah-Hartman
                   ` (207 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ivan Khoronzhuk, David S. Miller,
	Sasha Levin

From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

[ Upstream commit d0e14c4d9bcef0d4aa1057d2959adaa6f18d4a17 ]

The msgtype and seqid that is smth that belongs to event for
comparison but not for staled txq skb.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/ti/cpts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 4f644ac314fe8..d7543811dfae2 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -119,9 +119,7 @@ static bool cpts_match_tx_ts(struct cpts *cpts, struct cpts_event *event)
 
 		if (time_after(jiffies, skb_cb->tmo)) {
 			/* timeout any expired skbs over 1s */
-			dev_dbg(cpts->dev,
-				"expiring tx timestamp mtype %u seqid %04x\n",
-				mtype, seqid);
+			dev_dbg(cpts->dev, "expiring tx timestamp from txq\n");
 			__skb_unlink(skb, &cpts->txq);
 			dev_consume_skb_any(skb);
 		}
-- 
2.20.1




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

* [PATCH 4.19 043/243] rtc: s3c-rtc: Avoid using broken ALMYEAR register
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 042/243] net: ethernet: ti: cpts: correct debug for expired txq skb Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 044/243] rtc: max77686: Fix the returned value in case of error in max77686_rtc_read_time() Greg Kroah-Hartman
                   ` (206 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Szyprowski, Alexandre Belloni,
	Sasha Levin

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

[ Upstream commit 50c8aec4212a966817e868056efc9bfbb73337c0 ]

(RTC,ALM)YEAR registers of Exynos built-in RTC device contains 3 BCD
characters. s3c-rtc driver uses only 2 lower of them and supports years
from 2000..2099 range. The third BCD value is typically set to 0, but it
looks that handling of it is broken in the hardware. It sometimes
defaults to a random (even non-BCD) value. This is not an issue
for handling RTCYEAR register, because bcd2bin() properly handles only
8bit values (2 BCD characters, the third one is skipped). The problem
is however with ALMYEAR register and proper RTC alarm operation. When
YEAREN bit is set for the configured alarm, RTC hardware triggers alarm
only when ALMYEAR and RTCYEAR matches. This usually doesn't happen
because of the random noise on the third BCD character.

Fix this by simply skipping setting ALMYEAR register in alarm
configuration. This workaround fixes broken alarm operation on Exynos
built-in rtc device. My tests revealed that the issue happens on the
following Exynos series: 3250, 4210, 4412, 5250 and 5410.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/rtc/rtc-s3c.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 75c8c5033e087..58e03ac3578b7 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -327,7 +327,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 	struct rtc_time *tm = &alrm->time;
 	unsigned int alrm_en;
 	int ret;
-	int year = tm->tm_year - 100;
 
 	dev_dbg(dev, "s3c_rtc_setalarm: %d, %04d.%02d.%02d %02d:%02d:%02d\n",
 		alrm->enabled,
@@ -356,11 +355,6 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 		writeb(bin2bcd(tm->tm_hour), info->base + S3C2410_ALMHOUR);
 	}
 
-	if (year < 100 && year >= 0) {
-		alrm_en |= S3C2410_RTCALM_YEAREN;
-		writeb(bin2bcd(year), info->base + S3C2410_ALMYEAR);
-	}
-
 	if (tm->tm_mon < 12 && tm->tm_mon >= 0) {
 		alrm_en |= S3C2410_RTCALM_MONEN;
 		writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_ALMMON);
-- 
2.20.1




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

* [PATCH 4.19 044/243] rtc: max77686: Fix the returned value in case of error in max77686_rtc_read_time()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 043/243] rtc: s3c-rtc: Avoid using broken ALMYEAR register Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 045/243] i40e: dont restart nway if autoneg not supported Greg Kroah-Hartman
                   ` (205 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christophe JAILLET, Chanwoo Choi,
	Alexandre Belloni, Sasha Levin

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

[ Upstream commit b28cc6cec3d814f5184cbebb2d1f987e769f534a ]

In case of error, we return 0.
This is spurious and not consistent with the other functions of the driver.
Commit e115a2bf1426 has modified more than what is said in the commit
message. Reverse part of it znd return an error when needed, as it was
previously.

Fixes: e115a2bf1426 ("rtc: max77686: stop validating rtc_time in .read_time")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/rtc/rtc-max77686.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 8a60900d6b8b5..4aff349ae301a 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -360,7 +360,7 @@ static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
 out:
 	mutex_unlock(&info->lock);
-	return 0;
+	return ret;
 }
 
 static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
-- 
2.20.1




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

* [PATCH 4.19 045/243] i40e: dont restart nway if autoneg not supported
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 044/243] rtc: max77686: Fix the returned value in case of error in max77686_rtc_read_time() Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 046/243] virtchnl: Fix off by one error Greg Kroah-Hartman
                   ` (204 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 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 7c3758f7839377ab67529cc50264a640636c47af ]

On link types that do not support autoneg, we cannot attempt to restart
nway negotiation. This results in a dead link that requires a power
cycle to remedy.

Fix this by saving off the autoneg state and checking this value before
we try to restart nway.

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_ethtool.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 5ff6caa83948c..a6b0f605a7d8b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1136,6 +1136,7 @@ static int i40e_set_pauseparam(struct net_device *netdev,
 	i40e_status status;
 	u8 aq_failures;
 	int err = 0;
+	u32 is_an;
 
 	/* Changing the port's flow control is not supported if this isn't the
 	 * port's controlling PF
@@ -1148,15 +1149,14 @@ static int i40e_set_pauseparam(struct net_device *netdev,
 	if (vsi != pf->vsi[pf->lan_vsi])
 		return -EOPNOTSUPP;
 
-	if (pause->autoneg != ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ?
-	    AUTONEG_ENABLE : AUTONEG_DISABLE)) {
+	is_an = hw_link_info->an_info & I40E_AQ_AN_COMPLETED;
+	if (pause->autoneg != is_an) {
 		netdev_info(netdev, "To change autoneg please use: ethtool -s <dev> autoneg <on|off>\n");
 		return -EOPNOTSUPP;
 	}
 
 	/* If we have link and don't have autoneg */
-	if (!test_bit(__I40E_DOWN, pf->state) &&
-	    !(hw_link_info->an_info & I40E_AQ_AN_COMPLETED)) {
+	if (!test_bit(__I40E_DOWN, pf->state) && !is_an) {
 		/* Send message that it might not necessarily work*/
 		netdev_info(netdev, "Autoneg did not complete so changing settings may not result in an actual change.\n");
 	}
@@ -1207,7 +1207,7 @@ static int i40e_set_pauseparam(struct net_device *netdev,
 		err = -EAGAIN;
 	}
 
-	if (!test_bit(__I40E_DOWN, pf->state)) {
+	if (!test_bit(__I40E_DOWN, pf->state) && is_an) {
 		/* Give it a little more time to try to come back */
 		msleep(75);
 		if (!test_bit(__I40E_DOWN, pf->state))
-- 
2.20.1




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

* [PATCH 4.19 046/243] virtchnl: Fix off by one error
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 045/243] i40e: dont restart nway if autoneg not supported Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 047/243] clk: rockchip: fix rk3188 sclk_smc gate data Greg Kroah-Hartman
                   ` (203 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alice Michael, Andrew Bowers,
	Jeff Kirsher, Sasha Levin

From: Alice Michael <alice.michael@intel.com>

[ Upstream commit 843faff87af261bf55eda719a06087af0486a168 ]

When calculating the valid length for a VIRTCHNL_OP_ENABLE_CHANNELS
message, we accidentally allowed messages with one extra
virtchnl_channel_info structure on the end. This happened due
to an off by one error, because we forgot that valid_len already
accounted for one virtchnl_channel_info structure, so we need to
subtract one from the num_tc value.

Signed-off-by: Alice Michael <alice.michael@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>
---
 include/linux/avf/virtchnl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 212b3822d1804..92d179fb6d59e 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -798,8 +798,8 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
 		if (msglen >= valid_len) {
 			struct virtchnl_tc_info *vti =
 				(struct virtchnl_tc_info *)msg;
-			valid_len += vti->num_tc *
-				sizeof(struct virtchnl_channel_info);
+			valid_len += (vti->num_tc - 1) *
+				     sizeof(struct virtchnl_channel_info);
 			if (vti->num_tc == 0)
 				err_msg_format = true;
 		}
-- 
2.20.1




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

* [PATCH 4.19 047/243] clk: rockchip: fix rk3188 sclk_smc gate data
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 046/243] virtchnl: Fix off by one error Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 048/243] clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering Greg Kroah-Hartman
                   ` (202 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Finley Xiao, Johan Jonker,
	Heiko Stuebner, Sasha Levin

From: Finley Xiao <finley.xiao@rock-chips.com>

[ Upstream commit a9f0c0e563717b9f63b3bb1c4a7c2df436a206d9 ]

Fix sclk_smc gate data.
Change variable order, flags come before the register address.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Johan Jonker <jbx9999@hotmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/rockchip/clk-rk3188.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index 69fb3afc970fb..9a6ad5a4cdf06 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -391,8 +391,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
 	 * Clock-Architecture Diagram 4
 	 */
 
-	GATE(SCLK_SMC, "sclk_smc", "hclk_peri",
-			RK2928_CLKGATE_CON(2), 4, 0, GFLAGS),
+	GATE(SCLK_SMC, "sclk_smc", "hclk_peri", 0,
+			RK2928_CLKGATE_CON(2), 4, GFLAGS),
 
 	COMPOSITE_NOMUX(SCLK_SPI0, "sclk_spi0", "pclk_peri", 0,
 			RK2928_CLKSEL_CON(25), 0, 7, DFLAGS,
-- 
2.20.1




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

* [PATCH 4.19 048/243] clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 047/243] clk: rockchip: fix rk3188 sclk_smc gate data Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 049/243] ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name Greg Kroah-Hartman
                   ` (201 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Heiko Stuebner, Sasha Levin

From: Heiko Stuebner <heiko@sntech.de>

[ Upstream commit ac8cb53829a6ba119082e067f5bc8fab3611ce6a ]

Similar to commit a9f0c0e56371 ("clk: rockchip: fix rk3188 sclk_smc
gate data") there is one other gate clock in the rk3188 clock driver
with a similar wrong ordering, the sclk_mac_lbtest. So fix it as well.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/rockchip/clk-rk3188.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index 9a6ad5a4cdf06..2ca7e2be2f09e 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -362,8 +362,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
 			RK2928_CLKGATE_CON(2), 5, GFLAGS),
 	MUX(SCLK_MAC, "sclk_macref", mux_sclk_macref_p, CLK_SET_RATE_PARENT,
 			RK2928_CLKSEL_CON(21), 4, 1, MFLAGS),
-	GATE(0, "sclk_mac_lbtest", "sclk_macref",
-			RK2928_CLKGATE_CON(2), 12, 0, GFLAGS),
+	GATE(0, "sclk_mac_lbtest", "sclk_macref", 0,
+			RK2928_CLKGATE_CON(2), 12, GFLAGS),
 
 	COMPOSITE(0, "hsadc_src", mux_pll_src_gpll_cpll_p, 0,
 			RK2928_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
-- 
2.20.1




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

* [PATCH 4.19 049/243] ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 048/243] clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 050/243] dlm: fix missing idr_destroy for recover_idr Greg Kroah-Hartman
                   ` (200 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, John Keeping, Heiko Stuebner, Sasha Levin

From: John Keeping <john@metanate.com>

[ Upstream commit 03d9f8fa2bfdc791865624d3adc29070cf67814e ]

There is no functional change from this, but it is confusing to find two
copies of vcc_sys and no vcc_flash when looking in
/sys/class/regulator/*/name.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/rk3288-rock2-som.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
index 50325489c0ced..32e1ab3366629 100644
--- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
@@ -25,7 +25,7 @@
 
 	vcc_flash: flash-regulator {
 		compatible = "regulator-fixed";
-		regulator-name = "vcc_sys";
+		regulator-name = "vcc_flash";
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
 		startup-delay-us = <150>;
-- 
2.20.1




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

* [PATCH 4.19 050/243] dlm: fix missing idr_destroy for recover_idr
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 049/243] ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 051/243] MIPS: SiByte: Enable ZONE_DMA32 for LittleSur Greg Kroah-Hartman
                   ` (199 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Teigland, Sasha Levin

From: David Teigland <teigland@redhat.com>

[ Upstream commit 8fc6ed9a3508a0435b9270c313600799d210d319 ]

Which would leak memory for the idr internals.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/dlm/lockspace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 6a1529e478f3d..f1261fa0af8a1 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -807,6 +807,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
 
 	dlm_delete_debug_file(ls);
 
+	idr_destroy(&ls->ls_recover_idr);
 	kfree(ls->ls_recover_buf);
 
 	/*
-- 
2.20.1




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

* [PATCH 4.19 051/243] MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 050/243] dlm: fix missing idr_destroy for recover_idr Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 052/243] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2 Greg Kroah-Hartman
                   ` (198 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maciej W. Rozycki, Paul Burton,
	Christoph Hellwig, Ralf Baechle, linux-mips, Sasha Levin

From: Maciej W. Rozycki <macro@linux-mips.org>

[ Upstream commit 756d6d836dbfb04a5a486bc2ec89397aa4533737 ]

The LittleSur board is marked for high memory support and therefore
clearly must provide a way to have enough memory installed for some to
be present outside the low 4GiB physical address range.  With the memory
map of the BCM1250 SOC it has been built around it means over 1GiB of
actual DRAM, as only the first 1GiB is mapped in the low 4GiB physical
address range[1].

Complement commit cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need
DMA32.") then and also enable ZONE_DMA32 for LittleSur.


[1] "BCM1250/BCM1125/BCM1125H User Manual", Revision 1250_1125-UM100-R,
    Broadcom Corporation, 21 Oct 2002, Section 3: "System Overview",
    "Memory Map", pp. 34-38

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Patchwork: https://patchwork.linux-mips.org/patch/21107/
Fixes: cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32.")
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 201caf226b47b..a830a9701e501 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -806,6 +806,7 @@ config SIBYTE_LITTLESUR
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_HIGHMEM
 	select SYS_SUPPORTS_LITTLE_ENDIAN
+	select ZONE_DMA32 if 64BIT
 
 config SIBYTE_SENTOSA
 	bool "Sibyte BCM91250E-Sentosa"
-- 
2.20.1




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

* [PATCH 4.19 052/243] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 051/243] MIPS: SiByte: Enable ZONE_DMA32 for LittleSur Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 053/243] scsi: zfcp: update kernel message for invalid FCP_CMND length, its not the CDB Greg Kroah-Hartman
                   ` (197 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chris Healy, Andrew Lunn,
	David S. Miller, Sasha Levin

From: Andrew Lunn <andrew@lunn.ch>

[ Upstream commit ddc49acb659a2d8bfc5fdb0de0ef197712c11d75 ]

We already have a workaround for a couple of switches whose internal
PHYs only have the Marvel OUI, but no model number. We detect such
PHYs and give them the 6390 ID as the model number. However the
mv88e6161 has two SERDES interfaces in the same address range as its
internal PHYs. These suffer from the same problem, the Marvell OUI,
but no model number. As a result, these SERDES interfaces were getting
the same PHY ID as the mv88e6390, even though they are not PHYs, and
the Marvell PHY driver was trying to drive them.

Add a special case to stop this from happen.

Reported-by: Chris Healy <Chris.Healy@zii.aero>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 411ae9961bf4f..43b00e8bcdcd7 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2645,11 +2645,22 @@ static int mv88e6xxx_mdio_read(struct mii_bus *bus, int phy, int reg)
 	mutex_unlock(&chip->reg_lock);
 
 	if (reg == MII_PHYSID2) {
-		/* Some internal PHYS don't have a model number.  Use
-		 * the mv88e6390 family model number instead.
-		 */
-		if (!(val & 0x3f0))
-			val |= MV88E6XXX_PORT_SWITCH_ID_PROD_6390 >> 4;
+		/* Some internal PHYs don't have a model number. */
+		if (chip->info->family != MV88E6XXX_FAMILY_6165)
+			/* Then there is the 6165 family. It gets is
+			 * PHYs correct. But it can also have two
+			 * SERDES interfaces in the PHY address
+			 * space. And these don't have a model
+			 * number. But they are not PHYs, so we don't
+			 * want to give them something a PHY driver
+			 * will recognise.
+			 *
+			 * Use the mv88e6390 family model number
+			 * instead, for anything which really could be
+			 * a PHY,
+			 */
+			if (!(val & 0x3f0))
+				val |= MV88E6XXX_PORT_SWITCH_ID_PROD_6390 >> 4;
 	}
 
 	return err ? err : val;
-- 
2.20.1




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

* [PATCH 4.19 053/243] scsi: zfcp: update kernel message for invalid FCP_CMND length, its not the CDB
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 052/243] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2 Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 054/243] scsi: zfcp: drop default switch case which might paper over missing case Greg Kroah-Hartman
                   ` (196 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Steffen Maier, Benjamin Block,
	Martin K. Petersen, Sasha Levin

From: Steffen Maier <maier@linux.ibm.com>

[ Upstream commit 724e144387f4d7e7668d3da913d0efc44a9b4664 ]

The CDB is just a part inside of FCP_CMND, see zfcp_fc_scsi_to_fcp().
While at it, fix the device driver reaction: adapter not LUN shutdown.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/s390/scsi/zfcp_fsf.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index df888506e363e..91aa4bfcf8d61 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2104,11 +2104,8 @@ static void zfcp_fsf_fcp_handler_common(struct zfcp_fsf_req *req,
 		break;
 	case FSF_CMND_LENGTH_NOT_VALID:
 		dev_err(&req->adapter->ccw_device->dev,
-			"Incorrect CDB length %d, LUN 0x%016Lx on "
-			"port 0x%016Lx closed\n",
-			req->qtcb->bottom.io.fcp_cmnd_length,
-			(unsigned long long)zfcp_scsi_dev_lun(sdev),
-			(unsigned long long)zfcp_sdev->port->wwpn);
+			"Incorrect FCP_CMND length %d, FCP device closed\n",
+			req->qtcb->bottom.io.fcp_cmnd_length);
 		zfcp_erp_adapter_shutdown(req->adapter, 0, "fssfch4");
 		req->status |= ZFCP_STATUS_FSFREQ_ERROR;
 		break;
-- 
2.20.1




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

* [PATCH 4.19 054/243] scsi: zfcp: drop default switch case which might paper over missing case
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 053/243] scsi: zfcp: update kernel message for invalid FCP_CMND length, its not the CDB Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 055/243] drivers: soc: Allow building the amlogic drivers without ARCH_MESON Greg Kroah-Hartman
                   ` (195 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Steffen Maier, Benjamin Block,
	Martin K. Petersen, Sasha Levin

From: Steffen Maier <maier@linux.ibm.com>

[ Upstream commit 0c902936e55cff9335b27ed632fc45e7115ced75 ]

This was introduced with v4.18 commit 8c3d20aada70 ("scsi: zfcp: fix
missing REC trigger trace for all objects in ERP_FAILED") but would now
suppress helpful -Wswitch compiler warnings when building with W=1 such as
the following forced example:

drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_handle_failed':
drivers/s390/scsi/zfcp_erp.c:126:2: warning: enumeration value 'ZFCP_ERP_ACTION_REOPEN_PORT_FORCED' not handled in switch [-Wswitch]
  switch (want) {
  ^~~~~~

But then again, only with W=1 we would notice unhandled enum cases.
Without the default cases and a missed unhandled enum case, the code might
perform unforeseen things we might not want...

As of today, we never run through the removed default case, so removing it
is no functional change.  In the future, we never should run through a
default case but introduce the necessary specific case(s) to handle new
functionality.

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/s390/scsi/zfcp_erp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 332701db7379d..f602b42b8343d 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -172,9 +172,6 @@ static int zfcp_erp_handle_failed(int want, struct zfcp_adapter *adapter,
 				adapter, ZFCP_STATUS_COMMON_ERP_FAILED);
 		}
 		break;
-	default:
-		need = 0;
-		break;
 	}
 
 	return need;
-- 
2.20.1




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

* [PATCH 4.19 055/243] drivers: soc: Allow building the amlogic drivers without ARCH_MESON
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 054/243] scsi: zfcp: drop default switch case which might paper over missing case Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 056/243] bus: ti-sysc: Fix getting optional clocks in clock_roles Greg Kroah-Hartman
                   ` (194 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Jourdan, Kevin Hilman, Sasha Levin

From: Maxime Jourdan <mjourdan@baylibre.com>

[ Upstream commit 41bb5769b7f4b7a85e4b92c37429228279b4f569 ]

The current condition makes it difficult to compile the amlogic/
drivers with COMPILE_TEST, or without ARCH_MESON in general.

Fixes kbuild errors with patch series that depend on drivers in that
directory, for instance the meson video decoder.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
index 113e884697fd8..f0d46b16e08c4 100644
--- a/drivers/soc/Makefile
+++ b/drivers/soc/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_ARCH_GEMINI)	+= gemini/
 obj-$(CONFIG_ARCH_MXC)		+= imx/
 obj-$(CONFIG_SOC_XWAY)		+= lantiq/
 obj-y				+= mediatek/
-obj-$(CONFIG_ARCH_MESON)	+= amlogic/
+obj-y				+= amlogic/
 obj-y				+= qcom/
 obj-y				+= renesas/
 obj-$(CONFIG_ARCH_ROCKCHIP)	+= rockchip/
-- 
2.20.1




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

* [PATCH 4.19 056/243] bus: ti-sysc: Fix getting optional clocks in clock_roles
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 055/243] drivers: soc: Allow building the amlogic drivers without ARCH_MESON Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 057/243] ARM: dts: imx6: RDU2: fix eGalax touchscreen node Greg Kroah-Hartman
                   ` (193 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

From: Tony Lindgren <tony@atomide.com>

[ Upstream commit 7b4f8ac2f1acdff3c0cce23d8c3b86434a6e768a ]

We can have holes in clock_roles with interface clock missing for
example. Currently getting an optional clock will fail if there are
only a functional clock and an optional clock.

Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/bus/ti-sysc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 5b31131d0cba2..b6f63e7620214 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -217,8 +217,13 @@ static int sysc_get_clocks(struct sysc *ddata)
 	if (!ddata->clocks)
 		return -ENOMEM;
 
-	for (i = 0; i < ddata->nr_clocks; i++) {
-		error = sysc_get_one_clock(ddata, ddata->clock_roles[i]);
+	for (i = 0; i < SYSC_MAX_CLOCKS; i++) {
+		const char *name = ddata->clock_roles[i];
+
+		if (!name)
+			continue;
+
+		error = sysc_get_one_clock(ddata, name);
 		if (error && error != -ENOENT)
 			return error;
 	}
-- 
2.20.1




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

* [PATCH 4.19 057/243] ARM: dts: imx6: RDU2: fix eGalax touchscreen node
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 056/243] bus: ti-sysc: Fix getting optional clocks in clock_roles Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 058/243] crypto: ecc - check for invalid values in the key verification test Greg Kroah-Hartman
                   ` (192 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lucas Stach, Shawn Guo, Sasha Levin

From: Lucas Stach <l.stach@pengutronix.de>

[ Upstream commit 749a5068f2e2453a38777b1d5fc322d503cabf1d ]

Use the correct compatible for the new protocol used by the firmware
on the touch controller, the GPIO wakeup isn't used in that case.
Also eGalax touch needs axis swapping, just as with the RMI4 touch.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index 7fff3717cf7c0..315d0e7615f33 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -609,13 +609,14 @@
 	};
 
 	touchscreen@2a {
-		compatible = "eeti,egalax_ts";
+		compatible = "eeti,exc3000";
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_ts>;
 		reg = <0x2a>;
 		interrupt-parent = <&gpio1>;
 		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
-		wakeup-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+		touchscreen-inverted-x;
+		touchscreen-swapped-x-y;
 		status = "disabled";
 	};
 
-- 
2.20.1




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

* [PATCH 4.19 058/243] crypto: ecc - check for invalid values in the key verification test
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 057/243] ARM: dts: imx6: RDU2: fix eGalax touchscreen node Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 059/243] crypto: bcm - fix normal/non key hash algorithm failure Greg Kroah-Hartman
                   ` (191 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vitaly Chikunov, Herbert Xu, Sasha Levin

From: Vitaly Chikunov <vt@altlinux.org>

[ Upstream commit 2eb4942b6609d35a4e835644a33203b0aef7443d ]

Currently used scalar multiplication algorithm (Matthieu Rivain, 2011)
have invalid values for scalar == 1, n-1, and for regularized version
n-2, which was previously not checked. Verify that they are not used as
private keys.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 crypto/ecc.c | 42 ++++++++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/crypto/ecc.c b/crypto/ecc.c
index adcce310f6462..ed1237115066b 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -912,30 +912,43 @@ static inline void ecc_swap_digits(const u64 *in, u64 *out,
 		out[i] = __swab64(in[ndigits - 1 - i]);
 }
 
-int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
-		     const u64 *private_key, unsigned int private_key_len)
+static int __ecc_is_key_valid(const struct ecc_curve *curve,
+			      const u64 *private_key, unsigned int ndigits)
 {
-	int nbytes;
-	const struct ecc_curve *curve = ecc_get_curve(curve_id);
+	u64 one[ECC_MAX_DIGITS] = { 1, };
+	u64 res[ECC_MAX_DIGITS];
 
 	if (!private_key)
 		return -EINVAL;
 
-	nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
-
-	if (private_key_len != nbytes)
+	if (curve->g.ndigits != ndigits)
 		return -EINVAL;
 
-	if (vli_is_zero(private_key, ndigits))
+	/* Make sure the private key is in the range [2, n-3]. */
+	if (vli_cmp(one, private_key, ndigits) != -1)
 		return -EINVAL;
-
-	/* Make sure the private key is in the range [1, n-1]. */
-	if (vli_cmp(curve->n, private_key, ndigits) != 1)
+	vli_sub(res, curve->n, one, ndigits);
+	vli_sub(res, res, one, ndigits);
+	if (vli_cmp(res, private_key, ndigits) != 1)
 		return -EINVAL;
 
 	return 0;
 }
 
+int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
+		     const u64 *private_key, unsigned int private_key_len)
+{
+	int nbytes;
+	const struct ecc_curve *curve = ecc_get_curve(curve_id);
+
+	nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
+
+	if (private_key_len != nbytes)
+		return -EINVAL;
+
+	return __ecc_is_key_valid(curve, private_key, ndigits);
+}
+
 /*
  * ECC private keys are generated using the method of extra random bits,
  * equivalent to that described in FIPS 186-4, Appendix B.4.1.
@@ -979,11 +992,8 @@ int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey)
 	if (err)
 		return err;
 
-	if (vli_is_zero(priv, ndigits))
-		return -EINVAL;
-
-	/* Make sure the private key is in the range [1, n-1]. */
-	if (vli_cmp(curve->n, priv, ndigits) != 1)
+	/* Make sure the private key is in the valid range. */
+	if (__ecc_is_key_valid(curve, priv, ndigits))
 		return -EINVAL;
 
 	ecc_swap_digits(priv, privkey, ndigits);
-- 
2.20.1




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

* [PATCH 4.19 059/243] crypto: bcm - fix normal/non key hash algorithm failure
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 058/243] crypto: ecc - check for invalid values in the key verification test Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 060/243] arm64: dts: zynqmp: Fix node names which contain "_" Greg Kroah-Hartman
                   ` (190 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Raveendra Padasalagi, Herbert Xu,
	Sasha Levin

From: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>

[ Upstream commit 4f0129d13e69bad0363fd75553fb22897b32c379 ]

Remove setkey() callback handler for normal/non key
hash algorithms and keep it for AES-CBC/CMAC which needs key.

Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/crypto/bcm/cipher.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
index cd464637b0cb6..49c0097fa4749 100644
--- a/drivers/crypto/bcm/cipher.c
+++ b/drivers/crypto/bcm/cipher.c
@@ -4634,12 +4634,16 @@ static int spu_register_ahash(struct iproc_alg_s *driver_alg)
 	hash->halg.statesize = sizeof(struct spu_hash_export_s);
 
 	if (driver_alg->auth_info.mode != HASH_MODE_HMAC) {
-		hash->setkey = ahash_setkey;
 		hash->init = ahash_init;
 		hash->update = ahash_update;
 		hash->final = ahash_final;
 		hash->finup = ahash_finup;
 		hash->digest = ahash_digest;
+		if ((driver_alg->auth_info.alg == HASH_ALG_AES) &&
+		    ((driver_alg->auth_info.mode == HASH_MODE_XCBC) ||
+		    (driver_alg->auth_info.mode == HASH_MODE_CMAC))) {
+			hash->setkey = ahash_setkey;
+		}
 	} else {
 		hash->setkey = ahash_hmac_setkey;
 		hash->init = ahash_hmac_init;
-- 
2.20.1




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

* [PATCH 4.19 060/243] arm64: dts: zynqmp: Fix node names which contain "_"
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 059/243] crypto: bcm - fix normal/non key hash algorithm failure Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 061/243] pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues Greg Kroah-Hartman
                   ` (189 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michal Simek, Sasha Levin

From: Michal Simek <michal.simek@xilinx.com>

[ Upstream commit d1d4445abffb2b17e841d37b555b6f1364b571c1 ]

s/_/-/ for node names.

It fixes warnings like this:
... Warning (node_name_chars_strict): /cpu_opp_table:
Character '_' not recommended in node name ...

Issues reported by make dtbs W=12

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi        |  4 ++--
 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts |  4 ++--
 arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts | 10 +++++-----
 arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts |  2 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts |  2 +-
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi            |  4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi
index 9c09baca7dd78..306ad2157c988 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi
@@ -58,13 +58,13 @@
 		clock-accuracy = <100>;
 	};
 
-	dpdma_clk: dpdma_clk {
+	dpdma_clk: dpdma-clk {
 		compatible = "fixed-clock";
 		#clock-cells = <0x0>;
 		clock-frequency = <533000000>;
 	};
 
-	drm_clock: drm_clock {
+	drm_clock: drm-clock {
 		compatible = "fixed-clock";
 		#clock-cells = <0x0>;
 		clock-frequency = <262750000>;
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
index 8954c8c6f5475..14062b4535dd7 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
@@ -82,7 +82,7 @@
 			linux,default-trigger = "bluetooth-power";
 		};
 
-		vbus_det { /* U5 USB5744 VBUS detection via MIO25 */
+		vbus-det { /* U5 USB5744 VBUS detection via MIO25 */
 			label = "vbus_det";
 			gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
@@ -98,7 +98,7 @@
 		regulator-boot-on;
 	};
 
-	sdio_pwrseq: sdio_pwrseq {
+	sdio_pwrseq: sdio-pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */
 		post-power-on-delay-ms = <10>;
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
index 25dd574853235..d3b8e1a9c0761 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts
@@ -53,7 +53,7 @@
 
 	leds {
 		compatible = "gpio-leds";
-		heartbeat_led {
+		heartbeat-led {
 			label = "heartbeat";
 			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
@@ -139,25 +139,25 @@
 		 * 7, 10 - 17 - not connected
 		 */
 
-		gtr_sel0 {
+		gtr-sel0 {
 			gpio-hog;
 			gpios = <0 0>;
 			output-low; /* PCIE = 0, DP = 1 */
 			line-name = "sel0";
 		};
-		gtr_sel1 {
+		gtr-sel1 {
 			gpio-hog;
 			gpios = <1 0>;
 			output-high; /* PCIE = 0, DP = 1 */
 			line-name = "sel1";
 		};
-		gtr_sel2 {
+		gtr-sel2 {
 			gpio-hog;
 			gpios = <2 0>;
 			output-high; /* PCIE = 0, USB0 = 1 */
 			line-name = "sel2";
 		};
-		gtr_sel3 {
+		gtr-sel3 {
 			gpio-hog;
 			gpios = <3 0>;
 			output-high; /* PCIE = 0, SATA = 1 */
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
index 259f21b0c0014..28dee4dad82c2 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts
@@ -53,7 +53,7 @@
 
 	leds {
 		compatible = "gpio-leds";
-		heartbeat_led {
+		heartbeat-led {
 			label = "heartbeat";
 			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
index a61b3cc6f4c95..47b5989035e4e 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts
@@ -53,7 +53,7 @@
 
 	leds {
 		compatible = "gpio-leds";
-		heartbeat_led {
+		heartbeat-led {
 			label = "heartbeat";
 			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
index 29ce23422acf2..a516c0e01429a 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
@@ -71,7 +71,7 @@
 		};
 	};
 
-	cpu_opp_table: cpu_opp_table {
+	cpu_opp_table: cpu-opp-table {
 		compatible = "operating-points-v2";
 		opp-shared;
 		opp00 {
@@ -124,7 +124,7 @@
 			     <1 10 0xf08>;
 	};
 
-	amba_apu: amba_apu@0 {
+	amba_apu: amba-apu@0 {
 		compatible = "simple-bus";
 		#address-cells = <2>;
 		#size-cells = <1>;
-- 
2.20.1




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

* [PATCH 4.19 061/243] pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 060/243] arm64: dts: zynqmp: Fix node names which contain "_" Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 062/243] Staging: iio: adt7316: Fix i2c data reading, set the data field Greg Kroah-Hartman
                   ` (188 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Brian Masney, Bjorn Andersson,
	Linus Walleij, Sasha Levin

From: Brian Masney <masneyb@onstation.org>

[ Upstream commit 7ed07855773814337b9814f1c3e866df52ebce68 ]

When attempting to setup up a gpio hog, device probing will repeatedly
fail with -EPROBE_DEFERED errors. It is caused by a circular dependency
between the gpio and pinctrl frameworks. If the gpio-ranges property is
present in device tree, then the gpio framework will handle the gpio pin
registration and eliminate the circular dependency.

See Christian Lamparter's commit a86caa9ba5d7 ("pinctrl: msm: fix
gpio-hog related boot issues") for a detailed commit message that
explains the issue in much more detail. The code comment in this commit
came from Christian's commit.

I did not test this change against any hardware supported by this
particular driver, however I was able to validate this same fix works
for pinctrl-spmi-gpio.c using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index 0e153bae322ee..6bed433e54205 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -762,12 +762,23 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = gpiochip_add_pin_range(&pctrl->chip,
-				     dev_name(pctrl->dev),
-				     0, 0, pctrl->chip.ngpio);
-	if (ret) {
-		dev_err(pctrl->dev, "failed to add pin range\n");
-		goto unregister_gpiochip;
+	/*
+	 * For DeviceTree-supported systems, the gpio core checks the
+	 * pinctrl's device node for the "gpio-ranges" property.
+	 * If it is present, it takes care of adding the pin ranges
+	 * for the driver. In this case the driver can skip ahead.
+	 *
+	 * In order to remain compatible with older, existing DeviceTree
+	 * files which don't set the "gpio-ranges" property or systems that
+	 * utilize ACPI the driver has to call gpiochip_add_pin_range().
+	 */
+	if (!of_property_read_bool(pctrl->dev->of_node, "gpio-ranges")) {
+		ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev),
+					     0, 0, pctrl->chip.ngpio);
+		if (ret) {
+			dev_err(pctrl->dev, "failed to add pin range\n");
+			goto unregister_gpiochip;
+		}
 	}
 
 	platform_set_drvdata(pdev, pctrl);
-- 
2.20.1




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

* [PATCH 4.19 062/243] Staging: iio: adt7316: Fix i2c data reading, set the data field
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 061/243] pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 063/243] firmware: raspberrypi: Fix firmware calls with large buffers Greg Kroah-Hartman
                   ` (187 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shreeya Patel, Jonathan Cameron, Sasha Levin

From: Shreeya Patel <shreeya.patel23498@gmail.com>

[ Upstream commit 688cd642ba0c393344c802647848da5f0d925d0e ]

adt7316_i2c_read function nowhere sets the data field.
It is necessary to have an appropriate value for it.
Hence, assign the value stored in 'ret' variable to data field.

This is an ancient bug, and as no one seems to have noticed,
probably no sense in applying it to stable.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/staging/iio/addac/adt7316-i2c.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c
index f66dd3ebbab1f..856bcfa60c6c4 100644
--- a/drivers/staging/iio/addac/adt7316-i2c.c
+++ b/drivers/staging/iio/addac/adt7316-i2c.c
@@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)
 		return ret;
 	}
 
+	*data = ret;
+
 	return 0;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 063/243] firmware: raspberrypi: Fix firmware calls with large buffers
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 062/243] Staging: iio: adt7316: Fix i2c data reading, set the data field Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 064/243] mm/vmstat.c: fix NUMA statistics updates Greg Kroah-Hartman
                   ` (186 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Hughes, Eric Anholt,
	Stefan Wahren, Sasha Levin

From: James Hughes <james.hughes@raspberrypi.org>

[ Upstream commit 91c6ada69f396e663acb2b713e8acb8a9463557d ]

Commit a1547e0bca51 ("firmware: raspberrypi: Remove VLA usage")
moved away from VLA's to a fixed maximum size for mailbox data.
However, some mailbox calls use larger data buffers
than the maximum allowed in that change. This fix therefor
moves from using fixed buffers to kmalloc to ensure all sizes
are catered for.

There is some documentation, which is somewhat out of date,
on the mailbox calls here :
https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface

Fixes: a1547e0bca51 ("firmware: raspberrypi: Remove VLA usage")

Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/firmware/raspberrypi.c | 35 +++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
index a200a21746119..44eb99807e337 100644
--- a/drivers/firmware/raspberrypi.c
+++ b/drivers/firmware/raspberrypi.c
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
+#include <linux/slab.h>
 #include <soc/bcm2835/raspberrypi-firmware.h>
 
 #define MBOX_MSG(chan, data28)		(((data28) & ~0xf) | ((chan) & 0xf))
@@ -21,8 +22,6 @@
 #define MBOX_DATA28(msg)		((msg) & ~0xf)
 #define MBOX_CHAN_PROPERTY		8
 
-#define MAX_RPI_FW_PROP_BUF_SIZE	32
-
 static struct platform_device *rpi_hwmon;
 
 struct rpi_firmware {
@@ -144,28 +143,30 @@ EXPORT_SYMBOL_GPL(rpi_firmware_property_list);
 int rpi_firmware_property(struct rpi_firmware *fw,
 			  u32 tag, void *tag_data, size_t buf_size)
 {
-	/* Single tags are very small (generally 8 bytes), so the
-	 * stack should be safe.
-	 */
-	u8 data[sizeof(struct rpi_firmware_property_tag_header) +
-		MAX_RPI_FW_PROP_BUF_SIZE];
-	struct rpi_firmware_property_tag_header *header =
-		(struct rpi_firmware_property_tag_header *)data;
+	struct rpi_firmware_property_tag_header *header;
 	int ret;
 
-	if (WARN_ON(buf_size > sizeof(data) - sizeof(*header)))
-		return -EINVAL;
+	/* Some mailboxes can use over 1k bytes. Rather than checking
+	 * size and using stack or kmalloc depending on requirements,
+	 * just use kmalloc. Mailboxes don't get called enough to worry
+	 * too much about the time taken in the allocation.
+	 */
+	void *data = kmalloc(sizeof(*header) + buf_size, GFP_KERNEL);
 
+	if (!data)
+		return -ENOMEM;
+
+	header = data;
 	header->tag = tag;
 	header->buf_size = buf_size;
 	header->req_resp_size = 0;
-	memcpy(data + sizeof(struct rpi_firmware_property_tag_header),
-	       tag_data, buf_size);
+	memcpy(data + sizeof(*header), tag_data, buf_size);
+
+	ret = rpi_firmware_property_list(fw, data, buf_size + sizeof(*header));
+
+	memcpy(tag_data, data + sizeof(*header), buf_size);
 
-	ret = rpi_firmware_property_list(fw, &data, buf_size + sizeof(*header));
-	memcpy(tag_data,
-	       data + sizeof(struct rpi_firmware_property_tag_header),
-	       buf_size);
+	kfree(data);
 
 	return ret;
 }
-- 
2.20.1




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

* [PATCH 4.19 064/243] mm/vmstat.c: fix NUMA statistics updates
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 063/243] firmware: raspberrypi: Fix firmware calls with large buffers Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 065/243] clk: rockchip: fix I2S1 clock gate register for rk3328 Greg Kroah-Hartman
                   ` (185 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Janne Huttunen, Michal Hocko,
	Andrew Morton, Linus Torvalds, Sasha Levin

From: Janne Huttunen <janne.huttunen@nokia.com>

[ Upstream commit 13c9aaf7fa01cc7600c61981609feadeef3354ec ]

Scan through the whole array to see if an update is needed.  While we're
at it, use sizeof() to be safe against any possible type changes in the
future.

The bug here is that we wouldn't sync per-cpu counters into global ones
if there was an update of numa_stats for higher cpus.  Highly
theoretical one though because it is much more probable that zone_stats
are updated so we would refresh anyway.  So I wouldn't bother to mark
this for stable, yet something nice to fix.

[mhocko@suse.com: changelog enhancement]
Link: http://lkml.kernel.org/r/1541601517-17282-1-git-send-email-janne.huttunen@nokia.com
Fixes: 1d90ca897cb0 ("mm: update NUMA counter threshold size")
Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 mm/vmstat.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index a2b2ea786c9b2..ce81b0a7d0186 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1826,12 +1826,13 @@ static bool need_update(int cpu)
 
 		/*
 		 * The fast way of checking if there are any vmstat diffs.
-		 * This works because the diffs are byte sized items.
 		 */
-		if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS))
+		if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS *
+			       sizeof(p->vm_stat_diff[0])))
 			return true;
 #ifdef CONFIG_NUMA
-		if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS))
+		if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS *
+			       sizeof(p->vm_numa_stat_diff[0])))
 			return true;
 #endif
 	}
-- 
2.20.1




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

* [PATCH 4.19 065/243] clk: rockchip: fix I2S1 clock gate register for rk3328
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 064/243] mm/vmstat.c: fix NUMA statistics updates Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 066/243] clk: rockchip: fix ID of 8ch clock of I2S1 " Greg Kroah-Hartman
                   ` (184 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Katsuhiro Suzuki, Heiko Stuebner,
	Sasha Levin

From: Katsuhiro Suzuki <katsuhiro@katsuster.net>

[ Upstream commit 5c73ac2f8b70834a603eb2d92eb0bb464634420b ]

This patch fixes definition of I2S1 clock gate register for rk3328.
Current setting is not related I2S clocks.
  - bit6 of CRU_CLKGATE_CON0 means clk_ddrmon_en
  - bit6 of CRU_CLKGATE_CON1 means clk_i2s1_en

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/rockchip/clk-rk3328.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c
index ecbae8acd05b8..f2f13b603ae9b 100644
--- a/drivers/clk/rockchip/clk-rk3328.c
+++ b/drivers/clk/rockchip/clk-rk3328.c
@@ -392,7 +392,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
 			RK3328_CLKGATE_CON(1), 5, GFLAGS,
 			&rk3328_i2s1_fracmux),
 	GATE(SCLK_I2S1, "clk_i2s1", "i2s1_pre", CLK_SET_RATE_PARENT,
-			RK3328_CLKGATE_CON(0), 6, GFLAGS),
+			RK3328_CLKGATE_CON(1), 6, GFLAGS),
 	COMPOSITE_NODIV(SCLK_I2S1_OUT, "i2s1_out", mux_i2s1out_p, 0,
 			RK3328_CLKSEL_CON(8), 12, 1, MFLAGS,
 			RK3328_CLKGATE_CON(1), 7, GFLAGS),
-- 
2.20.1




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

* [PATCH 4.19 066/243] clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 065/243] clk: rockchip: fix I2S1 clock gate register for rk3328 Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 067/243] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit Greg Kroah-Hartman
                   ` (183 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Katsuhiro Suzuki, Heiko Stuebner,
	Sasha Levin

From: Katsuhiro Suzuki <katsuhiro@katsuster.net>

[ Upstream commit df7b1f2e0a4ae0fceff261e29cde63dafcf2360f ]

This patch fixes mistakes in HCLK_I2S1_8CH for running I2S1
successfully.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/dt-bindings/clock/rk3328-cru.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/dt-bindings/clock/rk3328-cru.h b/include/dt-bindings/clock/rk3328-cru.h
index a82a0109faffe..9d5f799469eee 100644
--- a/include/dt-bindings/clock/rk3328-cru.h
+++ b/include/dt-bindings/clock/rk3328-cru.h
@@ -178,7 +178,7 @@
 #define HCLK_TSP		309
 #define HCLK_GMAC		310
 #define HCLK_I2S0_8CH		311
-#define HCLK_I2S1_8CH		313
+#define HCLK_I2S1_8CH		312
 #define HCLK_I2S2_2CH		313
 #define HCLK_SPDIF_8CH		314
 #define HCLK_VOP		315
-- 
2.20.1




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

* [PATCH 4.19 067/243] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 066/243] clk: rockchip: fix ID of 8ch clock of I2S1 " Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 068/243] regulator: Fix return value of _set_load() stub Greg Kroah-Hartman
                   ` (182 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xiumei Mu, Xin Long, David S. Miller,
	Sasha Levin

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

[ Upstream commit 02968ccf0125d39b08ecef5946300a8a873c0942 ]

Now sctp increases sk_wmem_alloc by 1 when doing set_owner_w for the
skb allocked in sctp_packet_transmit and decreases by 1 when freeing
this skb.

But when this skb goes through networking stack, some subcomponents
might change skb->truesize and add the same amount on sk_wmem_alloc.
However sctp doesn't know the amount to decrease by, it would cause
a leak on sk->sk_wmem_alloc and the sock can never be freed.

Xiumei found this issue when it hit esp_output_head() by using sctp
over ipsec, where skb->truesize is added and so is sk->sk_wmem_alloc.

Since sctp has used sk_wmem_queued to count for writable space since
Commit cd305c74b0f8 ("sctp: use sk_wmem_queued to check for writable
space"), it's ok to fix it by counting sk_wmem_alloc by skb truesize
in sctp_packet_transmit.

Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
Reported-by: Xiumei Mu <xmu@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/sctp/output.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index 08601223b0bfa..b0e74a3e77ec5 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -399,25 +399,6 @@ finish:
 	return retval;
 }
 
-static void sctp_packet_release_owner(struct sk_buff *skb)
-{
-	sk_free(skb->sk);
-}
-
-static void sctp_packet_set_owner_w(struct sk_buff *skb, struct sock *sk)
-{
-	skb_orphan(skb);
-	skb->sk = sk;
-	skb->destructor = sctp_packet_release_owner;
-
-	/*
-	 * The data chunks have already been accounted for in sctp_sendmsg(),
-	 * therefore only reserve a single byte to keep socket around until
-	 * the packet has been transmitted.
-	 */
-	refcount_inc(&sk->sk_wmem_alloc);
-}
-
 static void sctp_packet_gso_append(struct sk_buff *head, struct sk_buff *skb)
 {
 	if (SCTP_OUTPUT_CB(head)->last == head)
@@ -604,7 +585,7 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
 	if (!head)
 		goto out;
 	skb_reserve(head, packet->overhead + MAX_HEADER);
-	sctp_packet_set_owner_w(head, sk);
+	skb_set_owner_w(head, sk);
 
 	/* set sctp header */
 	sh = skb_push(head, sizeof(struct sctphdr));
-- 
2.20.1




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

* [PATCH 4.19 068/243] regulator: Fix return value of _set_load() stub
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 067/243] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 069/243] USB: serial: f81534: fix reading old/new IC config Greg Kroah-Hartman
                   ` (181 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Cheng-Yi Chiang, Mark Brown,
	Douglas Anderson, Sasha Levin

From: Mark Brown <broonie@kernel.org>

[ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ]

The stub implementation of _set_load() returns a mode value which is
within the bounds of valid return codes for success (the documentation
just says that failures are negative error codes) but not sensible or
what the actual implementation does.  Fix it to just return 0.

Reported-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/regulator/consumer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 25602afd48447..f3f76051e8b00 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator,
 
 static inline int regulator_set_load(struct regulator *regulator, int load_uA)
 {
-	return REGULATOR_MODE_NORMAL;
+	return 0;
 }
 
 static inline int regulator_allow_bypass(struct regulator *regulator,
-- 
2.20.1




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

* [PATCH 4.19 069/243] USB: serial: f81534: fix reading old/new IC config
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 068/243] regulator: Fix return value of _set_load() stub Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache Greg Kroah-Hartman
                   ` (180 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ji-Ze Hong (Peter Hong),
	Johan Hovold, Sasha Levin

From: Ji-Ze Hong (Peter Hong) <hpeter@gmail.com>

[ Upstream commit ab60075f2a4eebca1abb04f712569963fb4d9d6c ]

The F81532/534 had a internal configuration space to save & control
IC state with address F81534_CUSTOM_ADDRESS_START (0x2f00). Layout
as following:
	+00h: to indicate the section is valid
	+01h~04h: UART Mode & port availability
	+05h~08h: Output pin control on IC power on
	+09h~12h: Output pin control on working <-- New added

Old driver will use +05~08h as default on working, but newer IC will
configed with shutdown mode(7) in 05h~08h and working mode with RS232(1)
in 09h~12h. It'll make mainstream driver not working.

This patch will make mainstream driver compatible older and newer IC.
If using a old IC, the +05h~08h will be 00h~06h, we'll direct apply it.
If using a new IC, the +05h~08h will be 07h or larger, we'll read +09h~12h
to apply newer configuration.

Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/serial/f81534.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index 4dfbff20bda4c..db6c93c04b3c8 100644
--- a/drivers/usb/serial/f81534.c
+++ b/drivers/usb/serial/f81534.c
@@ -45,14 +45,17 @@
 #define F81534_CONFIG1_REG		(0x09 + F81534_UART_BASE_ADDRESS)
 
 #define F81534_DEF_CONF_ADDRESS_START	0x3000
-#define F81534_DEF_CONF_SIZE		8
+#define F81534_DEF_CONF_SIZE		12
 
 #define F81534_CUSTOM_ADDRESS_START	0x2f00
 #define F81534_CUSTOM_DATA_SIZE		0x10
 #define F81534_CUSTOM_NO_CUSTOM_DATA	0xff
 #define F81534_CUSTOM_VALID_TOKEN	0xf0
 #define F81534_CONF_OFFSET		1
-#define F81534_CONF_GPIO_OFFSET		4
+#define F81534_CONF_INIT_GPIO_OFFSET	4
+#define F81534_CONF_WORK_GPIO_OFFSET	8
+#define F81534_CONF_GPIO_SHUTDOWN	7
+#define F81534_CONF_GPIO_RS232		1
 
 #define F81534_MAX_DATA_BLOCK		64
 #define F81534_MAX_BUS_RETRY		20
@@ -1359,8 +1362,19 @@ static int f81534_set_port_output_pin(struct usb_serial_port *port)
 	serial_priv = usb_get_serial_data(serial);
 	port_priv = usb_get_serial_port_data(port);
 
-	idx = F81534_CONF_GPIO_OFFSET + port_priv->phy_num;
+	idx = F81534_CONF_INIT_GPIO_OFFSET + port_priv->phy_num;
 	value = serial_priv->conf_data[idx];
+	if (value >= F81534_CONF_GPIO_SHUTDOWN) {
+		/*
+		 * Newer IC configure will make transceiver in shutdown mode on
+		 * initial power on. We need enable it before using UARTs.
+		 */
+		idx = F81534_CONF_WORK_GPIO_OFFSET + port_priv->phy_num;
+		value = serial_priv->conf_data[idx];
+		if (value >= F81534_CONF_GPIO_SHUTDOWN)
+			value = F81534_CONF_GPIO_RS232;
+	}
+
 	pins = &f81534_port_out_pins[port_priv->phy_num];
 
 	for (i = 0; i < ARRAY_SIZE(pins->pin); ++i) {
-- 
2.20.1




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

* [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 069/243] USB: serial: f81534: fix reading old/new IC config Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 23:26   ` Nobuhiro Iwamatsu
  2019-12-11 15:03 ` [PATCH 4.19 071/243] net-next/hinic:fix a bug in set mac address Greg Kroah-Hartman
                   ` (179 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

From: Dave Chinner <dchinner@redhat.com>

[ Upstream commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce ]

The extent shifting code uses a flush and invalidate mechainsm prior
to shifting extents around. This is similar to what
xfs_free_file_space() does, but it doesn't take into account things
like page cache vs block size differences, and it will fail if there
is a page that it currently busy.

xfs_flush_unmap_range() handles all of these cases, so just convert
xfs_prepare_shift() to us that mechanism rather than having it's own
special sauce.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/xfs/xfs_bmap_util.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 41ad9eaab6ce9..c045723678be9 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1244,13 +1244,7 @@ xfs_prepare_shift(
 	 * Writeback and invalidate cache for the remainder of the file as we're
 	 * about to shift down every extent from offset to EOF.
 	 */
-	error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, offset, -1);
-	if (error)
-		return error;
-	error = invalidate_inode_pages2_range(VFS_I(ip)->i_mapping,
-					offset >> PAGE_SHIFT, -1);
-	if (error)
-		return error;
+	error = xfs_flush_unmap_range(ip, offset, XFS_ISIZE(ip));
 
 	/*
 	 * Clean out anything hanging around in the cow fork now that
-- 
2.20.1




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

* [PATCH 4.19 071/243] net-next/hinic:fix a bug in set mac address
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 072/243] net-next/hinic: fix a bug in rx data flow Greg Kroah-Hartman
                   ` (178 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xue Chaojing, David S. Miller, Sasha Levin

From: Xue Chaojing <xuechaojing@huawei.com>

[ Upstream commit 9ea72dc9430306b77c73a8a21beb51437cde1d6d ]

In add_mac_addr(), if the MAC address is a muliticast address,
it will not be set, which causes the network card fail to receive
the multicast packet. This patch fixes this bug.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 4a8f82938ed5b..2352046971a4e 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -600,9 +600,6 @@ static int add_mac_addr(struct net_device *netdev, const u8 *addr)
 	u16 vid = 0;
 	int err;
 
-	if (!is_valid_ether_addr(addr))
-		return -EADDRNOTAVAIL;
-
 	netif_info(nic_dev, drv, netdev, "set mac addr = %02x %02x %02x %02x %02x %02x\n",
 		   addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
 
@@ -726,6 +723,7 @@ static void set_rx_mode(struct work_struct *work)
 {
 	struct hinic_rx_mode_work *rx_mode_work = work_to_rx_mode_work(work);
 	struct hinic_dev *nic_dev = rx_mode_work_to_nic_dev(rx_mode_work);
+	struct netdev_hw_addr *ha;
 
 	netif_info(nic_dev, drv, nic_dev->netdev, "set rx mode work\n");
 
@@ -733,6 +731,9 @@ static void set_rx_mode(struct work_struct *work)
 
 	__dev_uc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr);
 	__dev_mc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr);
+
+	netdev_for_each_mc_addr(ha, nic_dev->netdev)
+		add_mac_addr(nic_dev->netdev, ha->addr);
 }
 
 static void hinic_set_rx_mode(struct net_device *netdev)
-- 
2.20.1




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

* [PATCH 4.19 072/243] net-next/hinic: fix a bug in rx data flow
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 071/243] net-next/hinic:fix a bug in set mac address Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 073/243] ice: Fix return value from NAPI poll Greg Kroah-Hartman
                   ` (177 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xue Chaojing, David S. Miller, Sasha Levin

From: Xue Chaojing <xuechaojing@huawei.com>

[ Upstream commit b1a200484143a727ce293e0f200a543cc7584152 ]

In rx_alloc_pkts(), there is a loop call of tasklet, which causes
100% cpu utilization, even no packets are being received. This patch
fixes this bug.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/huawei/hinic/hinic_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
index 4c0f7eda1166c..06b24a92ed7d4 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
@@ -207,9 +207,9 @@ skb_out:
 		wmb();  /* write all the wqes before update PI */
 
 		hinic_rq_update(rxq->rq, prod_idx);
+		tasklet_schedule(&rxq->rx_task);
 	}
 
-	tasklet_schedule(&rxq->rx_task);
 	return i;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 073/243] ice: Fix return value from NAPI poll
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 072/243] net-next/hinic: fix a bug in rx data flow Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 074/243] ice: Fix possible NULL pointer de-reference Greg Kroah-Hartman
                   ` (176 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Ertman, Anirudh Venkataramanan,
	Andrew Bowers, Jeff Kirsher, Sasha Levin

From: Dave Ertman <david.m.ertman@intel.com>

[ Upstream commit e0c9fd9b77a7334032ec407d9e14d7c3cac1ac4f ]

ice_napi_poll is hard-coded to return zero when it's done. It should
instead return the work done (if any work was done). The only time it
should return zero is if an interrupt or poll is handled and no work
is performed. So change the return value to be the minimum of work
done or budget-1.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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/ice/ice_txrx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 0c95c8f83432c..1d84fedf1f649 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -1106,7 +1106,8 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
 	napi_complete_done(napi, work_done);
 	if (test_bit(ICE_FLAG_MSIX_ENA, pf->flags))
 		ice_irq_dynamic_ena(&vsi->back->hw, vsi, q_vector);
-	return 0;
+
+	return min(work_done, budget - 1);
 }
 
 /* helper function for building cmd/type/offset */
-- 
2.20.1




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

* [PATCH 4.19 074/243] ice: Fix possible NULL pointer de-reference
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 073/243] ice: Fix return value from NAPI poll Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 075/243] iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents Greg Kroah-Hartman
                   ` (175 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bruce Allan, Anirudh Venkataramanan,
	Andrew Bowers, Jeff Kirsher, Sasha Levin

From: Bruce Allan <bruce.w.allan@intel.com>

[ Upstream commit f25dad19ba70f7cc135da78ec013325042cd8c52 ]

A recent update to smatch is causing it to report the error "we previously
assumed 'm_entry->vsi_list_info' could be null". Fix that.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@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/ice/ice_switch.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 4012adbab0112..1bfc59dff51f7 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -1023,6 +1023,9 @@ ice_handle_vsi_list_mgmt(struct ice_hw *hw,
 		u16 vsi_id = new_fltr->fwd_id.vsi_id;
 		enum ice_adminq_opc opcode;
 
+		if (!m_entry->vsi_list_info)
+			return ICE_ERR_CFG;
+
 		/* A rule already exists with the new VSI being added */
 		if (test_bit(vsi_id, m_entry->vsi_list_info->vsi_map))
 			return 0;
-- 
2.20.1




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

* [PATCH 4.19 075/243] iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 074/243] ice: Fix possible NULL pointer de-reference Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 076/243] iomap: sub-block dio needs to zeroout beyond EOF Greg Kroah-Hartman
                   ` (174 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

From: Dave Chinner <dchinner@redhat.com>

[ Upstream commit 0929d8580071c6a1cec1a7916a8f674c243ceee1 ]

When we write into an unwritten extent via direct IO, we dirty
metadata on IO completion to convert the unwritten extent to
written. However, when we do the FUA optimisation checks, the inode
may be clean and so we issue a FUA write into the unwritten extent.
This means we then bypass the generic_write_sync() call after
unwritten extent conversion has ben done and we don't force the
modified metadata to stable storage.

This violates O_DSYNC semantics. The window of exposure is a single
IO, as the next DIO write will see the inode has dirty metadata and
hence will not use the FUA optimisation. Calling
generic_write_sync() after completion of the second IO will also
sync the first write and it's metadata.

Fix this by avoiding the FUA optimisation when writing to unwritten
extents.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/iomap.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index fac45206418a2..914c07c9e0d6f 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1619,12 +1619,13 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 
 	if (iomap->flags & IOMAP_F_NEW) {
 		need_zeroout = true;
-	} else {
+	} else if (iomap->type == IOMAP_MAPPED) {
 		/*
-		 * Use a FUA write if we need datasync semantics, this
-		 * is a pure data IO that doesn't require any metadata
-		 * updates and the underlying device supports FUA. This
-		 * allows us to avoid cache flushes on IO completion.
+		 * Use a FUA write if we need datasync semantics, this is a pure
+		 * data IO that doesn't require any metadata updates (including
+		 * after IO completion such as unwritten extent conversion) and
+		 * the underlying device supports FUA. This allows us to avoid
+		 * cache flushes on IO completion.
 		 */
 		if (!(iomap->flags & (IOMAP_F_SHARED|IOMAP_F_DIRTY)) &&
 		    (dio->flags & IOMAP_DIO_WRITE_FUA) &&
-- 
2.20.1




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

* [PATCH 4.19 076/243] iomap: sub-block dio needs to zeroout beyond EOF
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 075/243] iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 15:03 ` [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill Greg Kroah-Hartman
                   ` (173 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

From: Dave Chinner <dchinner@redhat.com>

[ Upstream commit b450672fb66b4a991a5b55ee24209ac7ae7690ce ]

If we are doing sub-block dio that extends EOF, we need to zero
the unused tail of the block to initialise the data in it it. If we
do not zero the tail of the block, then an immediate mmap read of
the EOF block will expose stale data beyond EOF to userspace. Found
with fsx running sub-block DIO sizes vs MAPREAD/MAPWRITE operations.

Fix this by detecting if the end of the DIO write is beyond EOF
and zeroing the tail if necessary.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/iomap.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index 914c07c9e0d6f..d3d227682f7d4 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1700,7 +1700,14 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 		dio->submit.cookie = submit_bio(bio);
 	} while (nr_pages);
 
-	if (need_zeroout) {
+	/*
+	 * We need to zeroout the tail of a sub-block write if the extent type
+	 * requires zeroing or the write extends beyond EOF. If we don't zero
+	 * the block tail in the latter case, we can expose stale data via mmap
+	 * reads of the EOF block.
+	 */
+	if (need_zeroout ||
+	    ((dio->flags & IOMAP_DIO_WRITE) && pos >= i_size_read(inode))) {
 		/* zero out from the end of the write to the end of the block */
 		pad = pos & (fs_block_size - 1);
 		if (pad)
-- 
2.20.1




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

* [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 076/243] iomap: sub-block dio needs to zeroout beyond EOF Greg Kroah-Hartman
@ 2019-12-11 15:03 ` Greg Kroah-Hartman
  2019-12-11 23:50   ` Nobuhiro Iwamatsu
  2019-12-11 15:04 ` [PATCH 4.19 078/243] iomap: readpages doesnt zero page tail beyond EOF Greg Kroah-Hartman
                   ` (172 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Chinner, Darrick J. Wong,
	Christoph Hellwig, Sasha Levin

From: Dave Chinner <dchinner@redhat.com>

[ Upstream commit 4721a6010990971440b4ffefbdf014976b8eda2f ]

When doing direct IO to a pipe for do_splice_direct(), then pipe is
trivial to fill up and overflow as it can only hold 16 pages. At
this point bio_iov_iter_get_pages() then returns -EFAULT, and we
abort the IO submission process. Unfortunately, iomap_dio_rw()
propagates the error back up the stack.

The error is converted from the EFAULT to EAGAIN in
generic_file_splice_read() to tell the splice layers that the pipe
is full. do_splice_direct() completely fails to handle EAGAIN errors
(it aborts on error) and returns EAGAIN to the caller.

copy_file_write() then completely fails to handle EAGAIN as well,
and so returns EAGAIN to userspace, having failed to copy the data
it was asked to.

Avoid this whole steaming pile of fail by having iomap_dio_rw()
silently swallow EFAULT errors and so do short reads.

To make matters worse, iomap_dio_actor() has a stale data exposure
bug bio_iov_iter_get_pages() fails - it does not zero the tail block
that it may have been left uncovered by partial IO. Fix the error
handling case to drop to the sub-block zeroing rather than
immmediately returning the -EFAULT error.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/iomap.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index d3d227682f7d4..0ff0f8ca3b197 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1603,7 +1603,7 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 	struct bio *bio;
 	bool need_zeroout = false;
 	bool use_fua = false;
-	int nr_pages, ret;
+	int nr_pages, ret = 0;
 	size_t copied = 0;
 
 	if ((pos | length | align) & ((1 << blkbits) - 1))
@@ -1668,8 +1668,14 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 
 		ret = bio_iov_iter_get_pages(bio, &iter);
 		if (unlikely(ret)) {
+			/*
+			 * We have to stop part way through an IO. We must fall
+			 * through to the sub-block tail zeroing here, otherwise
+			 * this short IO may expose stale data in the tail of
+			 * the block we haven't written data to.
+			 */
 			bio_put(bio);
-			return copied ? copied : ret;
+			goto zero_tail;
 		}
 
 		n = bio->bi_iter.bi_size;
@@ -1706,6 +1712,7 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 	 * the block tail in the latter case, we can expose stale data via mmap
 	 * reads of the EOF block.
 	 */
+zero_tail:
 	if (need_zeroout ||
 	    ((dio->flags & IOMAP_DIO_WRITE) && pos >= i_size_read(inode))) {
 		/* zero out from the end of the write to the end of the block */
@@ -1713,7 +1720,7 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
 		if (pad)
 			iomap_dio_zero(dio, iomap, pos, fs_block_size - pad);
 	}
-	return copied;
+	return copied ? copied : ret;
 }
 
 static loff_t
@@ -1888,6 +1895,15 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
 				wait_for_completion = true;
 				ret = 0;
 			}
+
+			/*
+			 * Splicing to pipes can fail on a full pipe. We have to
+			 * swallow this to make it look like a short IO
+			 * otherwise the higher splice layers will completely
+			 * mishandle the error and stop moving data.
+			 */
+			if (ret == -EFAULT)
+				ret = 0;
 			break;
 		}
 		pos += ret;
-- 
2.20.1




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

* [PATCH 4.19 078/243] iomap: readpages doesnt zero page tail beyond EOF
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2019-12-11 15:03 ` [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 079/243] iw_cxgb4: only reconnect with MPAv1 if the peer aborts Greg Kroah-Hartman
                   ` (171 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

From: Dave Chinner <dchinner@redhat.com>

[ Upstream commit 8c110d43c6bca4b24dd13272a9d4e0ba6f2ec957 ]

When we read the EOF page of the file via readpages, we need
to zero the region beyond EOF that we either do not read or
should not contain data so that mmap does not expose stale data to
user applications.

However, iomap_adjust_read_range() fails to detect EOF correctly,
and so fsx on 1k block size filesystems fails very quickly with
mapreads exposing data beyond EOF. There are two problems here.

Firstly, when calculating the end block of the EOF byte, we have
to round the size by one to avoid a block aligned EOF from reporting
a block too large. i.e. a size of 1024 bytes is 1 block, which in
index terms is block 0. Therefore we have to calculate the end block
from (isize - 1), not isize.

The second bug is determining if the current page spans EOF, and so
whether we need split it into two half, one for the IO, and the
other for zeroing. Unfortunately, the code that checks whether
we should split the block doesn't actually check if we span EOF, it
just checks if the read spans the /offset in the page/ that EOF
sits on. So it splits every read into two if EOF is not page
aligned, regardless of whether we are reading the EOF block or not.

Hence we need to restrict the "does the read span EOF" check to
just the page that spans EOF, not every page we read.

This patch results in correct EOF detection through readpages:

xfs_vm_readpages:     dev 259:0 ino 0x43 nr_pages 24
xfs_iomap_found:      dev 259:0 ino 0x43 size 0x66c00 offset 0x4f000 count 98304 type hole startoff 0x13c startblock 1368 blockcount 0x4
iomap_readpage_actor: orig pos 323584 pos 323584, length 4096, poff 0 plen 4096, isize 420864
xfs_iomap_found:      dev 259:0 ino 0x43 size 0x66c00 offset 0x50000 count 94208 type hole startoff 0x140 startblock 1497 blockcount 0x5c
iomap_readpage_actor: orig pos 327680 pos 327680, length 94208, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 331776 pos 331776, length 90112, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 335872 pos 335872, length 86016, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 339968 pos 339968, length 81920, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 344064 pos 344064, length 77824, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 348160 pos 348160, length 73728, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 352256 pos 352256, length 69632, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 356352 pos 356352, length 65536, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 360448 pos 360448, length 61440, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 364544 pos 364544, length 57344, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 368640 pos 368640, length 53248, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 372736 pos 372736, length 49152, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 376832 pos 376832, length 45056, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 380928 pos 380928, length 40960, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 385024 pos 385024, length 36864, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 389120 pos 389120, length 32768, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 393216 pos 393216, length 28672, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 397312 pos 397312, length 24576, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 401408 pos 401408, length 20480, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 405504 pos 405504, length 16384, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 409600 pos 409600, length 12288, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 413696 pos 413696, length 8192, poff 0 plen 4096, isize 420864
iomap_readpage_actor: orig pos 417792 pos 417792, length 4096, poff 0 plen 3072, isize 420864
iomap_readpage_actor: orig pos 420864 pos 420864, length 1024, poff 3072 plen 1024, isize 420864

As you can see, it now does full page reads until the last one which
is split correctly at the block aligned EOF, reading 3072 bytes and
zeroing the last 1024 bytes. The original version of the patch got
this right, but it got another case wrong.

The EOF detection crossing really needs to the the original length
as plen, while it starts at the end of the block, will be shortened
as up-to-date blocks are found on the page. This means "orig_pos +
plen" no longer points to the end of the page, and so will not
correctly detect EOF crossing. Hence we have to use the length
passed in to detect this partial page case:

xfs_filemap_fault:    dev 259:1 ino 0x43  write_fault 0
xfs_vm_readpage:      dev 259:1 ino 0x43 nr_pages 1
xfs_iomap_found:      dev 259:1 ino 0x43 size 0x2cc00 offset 0x2c000 count 4096 type hole startoff 0xb0 startblock 282 blockcount 0x4
iomap_readpage_actor: orig pos 180224 pos 181248, length 4096, poff 1024 plen 2048, isize 183296
xfs_iomap_found:      dev 259:1 ino 0x43 size 0x2cc00 offset 0x2cc00 count 1024 type hole startoff 0xb3 startblock 285 blockcount 0x1
iomap_readpage_actor: orig pos 183296 pos 183296, length 1024, poff 3072 plen 1024, isize 183296

Heere we see a trace where the first block on the EOF page is up to
date, hence poff = 1024 bytes. The offset into the page of EOF is
3072, so the range we want to read is 1024 - 3071, and the range we
want to zero is 3072 - 4095. You can see this is split correctly
now.

This fixes the stale data beyond EOF problem that fsx quickly
uncovers on 1k block size filesystems.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/iomap.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index 0ff0f8ca3b197..caa45f73967cf 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -150,13 +150,14 @@ static void
 iomap_adjust_read_range(struct inode *inode, struct iomap_page *iop,
 		loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp)
 {
+	loff_t orig_pos = *pos;
+	loff_t isize = i_size_read(inode);
 	unsigned block_bits = inode->i_blkbits;
 	unsigned block_size = (1 << block_bits);
 	unsigned poff = offset_in_page(*pos);
 	unsigned plen = min_t(loff_t, PAGE_SIZE - poff, length);
 	unsigned first = poff >> block_bits;
 	unsigned last = (poff + plen - 1) >> block_bits;
-	unsigned end = offset_in_page(i_size_read(inode)) >> block_bits;
 
 	/*
 	 * If the block size is smaller than the page size we need to check the
@@ -191,8 +192,12 @@ iomap_adjust_read_range(struct inode *inode, struct iomap_page *iop,
 	 * handle both halves separately so that we properly zero data in the
 	 * page cache for blocks that are entirely outside of i_size.
 	 */
-	if (first <= end && last > end)
-		plen -= (last - end) * block_size;
+	if (orig_pos <= isize && orig_pos + length > isize) {
+		unsigned end = offset_in_page(isize - 1) >> block_bits;
+
+		if (first <= end && last > end)
+			plen -= (last - end) * block_size;
+	}
 
 	*offp = poff;
 	*lenp = plen;
-- 
2.20.1




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

* [PATCH 4.19 079/243] iw_cxgb4: only reconnect with MPAv1 if the peer aborts
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 078/243] iomap: readpages doesnt zero page tail beyond EOF Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 080/243] MIPS: OCTEON: octeon-platform: fix typing Greg Kroah-Hartman
                   ` (170 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Steve Wise, Jason Gunthorpe, Sasha Levin

From: Steve Wise <swise@opengridcomputing.com>

[ Upstream commit 9828ca654b52848e7eb7dcc9b0994ff130dd4546 ]

Only retry connection setup with MPAv1 if the peer actually aborted the
connection upon receiving the MPAv2 start message.  This avoids retrying
with MPAv1 in the case where the connection was aborted due to retransmit
timeouts.

Fixes: d2fe99e86bb2 ("RDMA/cxgb4: Add support for MPAv2 Enhanced RDMA Negotiation")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/cxgb4/cm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index a5ff1f0f2073e..4dcc92d116097 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2798,7 +2798,8 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
 		break;
 	case MPA_REQ_SENT:
 		(void)stop_ep_timer(ep);
-		if (mpa_rev == 1 || (mpa_rev == 2 && ep->tried_with_mpa_v1))
+		if (status != CPL_ERR_CONN_RESET || mpa_rev == 1 ||
+		    (mpa_rev == 2 && ep->tried_with_mpa_v1))
 			connect_reply_upcall(ep, -ECONNRESET);
 		else {
 			/*
-- 
2.20.1




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

* [PATCH 4.19 080/243] MIPS: OCTEON: octeon-platform: fix typing
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 079/243] iw_cxgb4: only reconnect with MPAv1 if the peer aborts Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 081/243] net/smc: use after free fix in smc_wr_tx_put_slot() Greg Kroah-Hartman
                   ` (169 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aaro Koskinen, Paul Burton,
	Ralf Baechle, James Hogan, linux-mips, Sasha Levin

From: Aaro Koskinen <aaro.koskinen@iki.fi>

[ Upstream commit 2cf1c8933dd93088cfb5f8f58b3bb9bbdf1781b9 ]

Use correct type for fdt_property nameoff field.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21204/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/cavium-octeon/octeon-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 807cadaf554e2..5ba181e87d2c1 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -501,7 +501,7 @@ static void __init octeon_fdt_set_phy(int eth, int phy_addr)
 	if (phy_addr >= 256 && alt_phy > 0) {
 		const struct fdt_property *phy_prop;
 		struct fdt_property *alt_prop;
-		u32 phy_handle_name;
+		fdt32_t phy_handle_name;
 
 		/* Use the alt phy node instead.*/
 		phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL);
-- 
2.20.1




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

* [PATCH 4.19 081/243] net/smc: use after free fix in smc_wr_tx_put_slot()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 080/243] MIPS: OCTEON: octeon-platform: fix typing Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 082/243] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning Greg Kroah-Hartman
                   ` (168 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ursula Braun, David S. Miller, Sasha Levin

From: Ursula Braun <ursula.braun@linux.ibm.com>

[ Upstream commit e438bae43c1e08e688c09c410407b59fc1c173b4 ]

In smc_wr_tx_put_slot() field pend->idx is used after being
cleared. That means always idx 0 is cleared in the wr_tx_mask.
This results in a broken administration of available WR send
payload buffers.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/smc/smc_wr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c
index 3c458d2798557..c2694750a6a8a 100644
--- a/net/smc/smc_wr.c
+++ b/net/smc/smc_wr.c
@@ -215,12 +215,14 @@ int smc_wr_tx_put_slot(struct smc_link *link,
 
 	pend = container_of(wr_pend_priv, struct smc_wr_tx_pend, priv);
 	if (pend->idx < link->wr_tx_cnt) {
+		u32 idx = pend->idx;
+
 		/* clear the full struct smc_wr_tx_pend including .priv */
 		memset(&link->wr_tx_pends[pend->idx], 0,
 		       sizeof(link->wr_tx_pends[pend->idx]));
 		memset(&link->wr_tx_bufs[pend->idx], 0,
 		       sizeof(link->wr_tx_bufs[pend->idx]));
-		test_and_clear_bit(pend->idx, link->wr_tx_mask);
+		test_and_clear_bit(idx, link->wr_tx_mask);
 		return 1;
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 082/243] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (80 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 081/243] net/smc: use after free fix in smc_wr_tx_put_slot() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 083/243] nds32: Fix the items of hwcap_str ordering issue Greg Kroah-Hartman
                   ` (167 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vincent Chen, Greentime Hu, Sasha Levin

From: Vincent Chen <vincentc@andestech.com>

[ Upstream commit 83312f1b7ae205dca647bf52bbe2d51303cdedfb ]

_FP_ROUND_ZERO is defined as 0 and used as a statemente in macro
_FP_ROUND. This generates "error: statement with no effect
[-Werror=unused-value]" from gcc. Defining _FP_ROUND_ZERO as (void)0 to
fix it.

This modification is quoted from glibc 'commit <In libc/:>
(8ed1e7d5894000c155acbd06f)'

Signed-off-by: Vincent Chen <vincentc@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/math-emu/soft-fp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h
index 3f284bc031809..5650c16283830 100644
--- a/include/math-emu/soft-fp.h
+++ b/include/math-emu/soft-fp.h
@@ -138,7 +138,7 @@ do {							\
       _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND);		\
 } while (0)
 
-#define _FP_ROUND_ZERO(wc, X)		0
+#define _FP_ROUND_ZERO(wc, X)		(void)0
 
 #define _FP_ROUND_PINF(wc, X)				\
 do {							\
-- 
2.20.1




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

* [PATCH 4.19 083/243] nds32: Fix the items of hwcap_str ordering issue.
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (81 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 082/243] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 084/243] rtc: max8997: Fix the returned value in case of error in max8997_rtc_read_alarm() Greg Kroah-Hartman
                   ` (166 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nylon Chen, Greentime Hu, Sasha Levin

From: Nylon Chen <nylon7@andestech.com>

[ Upstream commit a5234068e6dc18ae5300d678fbf3e129d9b93f78 ]

The hwcap_str should be set in a correct order according to HWCAP_xx.
We also add the missing "fpu_dp" to it.

Signed-off-by: Nylon Chen <nylon7@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/nds32/kernel/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/nds32/kernel/setup.c b/arch/nds32/kernel/setup.c
index 63a1a5ef5219f..87683583f2064 100644
--- a/arch/nds32/kernel/setup.c
+++ b/arch/nds32/kernel/setup.c
@@ -71,8 +71,9 @@ static const char *hwcap_str[] = {
 	"div",
 	"mac",
 	"l2c",
-	"dx_regs",
+	"fpu_dp",
 	"v2",
+	"dx_regs",
 	NULL,
 };
 
-- 
2.20.1




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

* [PATCH 4.19 084/243] rtc: max8997: Fix the returned value in case of error in max8997_rtc_read_alarm()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (82 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 083/243] nds32: Fix the items of hwcap_str ordering issue Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 085/243] rtc: dt-binding: abx80x: fix resistance scale Greg Kroah-Hartman
                   ` (165 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christophe JAILLET,
	Alexandre Belloni, Sasha Levin

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

[ Upstream commit 41ef3878203cd9218d92eaa07df4b85a2cb128fb ]

In case of error, we return 0.
This is spurious and not consistent with the other functions of the driver.
Propagate the error code instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/rtc/rtc-max8997.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index 08c661a332ec0..20e50d9fdf882 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -215,7 +215,7 @@ static int max8997_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 
 out:
 	mutex_unlock(&info->lock);
-	return 0;
+	return ret;
 }
 
 static int max8997_rtc_stop_alarm(struct max8997_rtc_info *info)
-- 
2.20.1




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

* [PATCH 4.19 085/243] rtc: dt-binding: abx80x: fix resistance scale
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (83 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 084/243] rtc: max8997: Fix the returned value in case of error in max8997_rtc_read_alarm() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 086/243] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module Greg Kroah-Hartman
                   ` (164 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Baruch Siach, Alexandre Belloni, Sasha Levin

From: Baruch Siach <baruch@tkos.co.il>

[ Upstream commit 73852e56827f5cb5db9d6e8dd8191fc2f2e8f424 ]

The abracon,tc-resistor property value is in kOhm.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Documentation/devicetree/bindings/rtc/abracon,abx80x.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
index be789685a1c24..18b892d010d87 100644
--- a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
+++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
@@ -27,4 +27,4 @@ and valid to enable charging:
 
  - "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
  - "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
-                          resistor, the other values are in ohm.
+                          resistor, the other values are in kOhm.
-- 
2.20.1




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

* [PATCH 4.19 086/243] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (84 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 085/243] rtc: dt-binding: abx80x: fix resistance scale Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 087/243] media: coda: fix memory corruption in case more than 32 instances are opened Greg Kroah-Hartman
                   ` (163 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 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 6035cbcceb069f87296b3cd0bc4736ad5618bf47 ]

DWC2 hardware module integrated in Samsung SoCs requires some quirks to
operate properly, so use Samsung SoC specific compatible to notify driver
to apply respective fixes.

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/exynos3250.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 94efca78c42ff..5892a9f7622fa 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -360,7 +360,7 @@
 		};
 
 		hsotg: hsotg@12480000 {
-			compatible = "snps,dwc2";
+			compatible = "samsung,s3c6400-hsotg", "snps,dwc2";
 			reg = <0x12480000 0x20000>;
 			interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cmu CLK_USBOTG>;
-- 
2.20.1




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

* [PATCH 4.19 087/243] media: coda: fix memory corruption in case more than 32 instances are opened
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (85 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 086/243] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 088/243] media: pulse8-cec: return 0 when invalidating the logical address Greg Kroah-Hartman
                   ` (162 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Philipp Zabel, Hans Verkuil,
	Mauro Carvalho Chehab, Sasha Levin

From: Philipp Zabel <p.zabel@pengutronix.de>

[ Upstream commit 649cfc2bdfeeb98ff7d8fdff0af3f8fb9c8da50f ]

The ffz() return value is undefined if the instance mask does not
contain any zeros. If it returned 32, the following set_bit would
corrupt the debugfs_root pointer.
Switch to IDA for context index allocation. This also removes the
artificial 32 instance limit for all except CodaDx6.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/coda/coda-common.c | 26 +++++++++--------------
 drivers/media/platform/coda/coda.h        |  3 ++-
 2 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 4b0220f40b425..fccc771d23a51 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -17,6 +17,7 @@
 #include <linux/firmware.h>
 #include <linux/gcd.h>
 #include <linux/genalloc.h>
+#include <linux/idr.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/irq.h>
@@ -2101,17 +2102,6 @@ int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq,
 	return coda_queue_init(priv, dst_vq);
 }
 
-static int coda_next_free_instance(struct coda_dev *dev)
-{
-	int idx = ffz(dev->instance_mask);
-
-	if ((idx < 0) ||
-	    (dev->devtype->product == CODA_DX6 && idx > CODADX6_MAX_INSTANCES))
-		return -EBUSY;
-
-	return idx;
-}
-
 /*
  * File operations
  */
@@ -2120,7 +2110,8 @@ static int coda_open(struct file *file)
 {
 	struct video_device *vdev = video_devdata(file);
 	struct coda_dev *dev = video_get_drvdata(vdev);
-	struct coda_ctx *ctx = NULL;
+	struct coda_ctx *ctx;
+	unsigned int max = ~0;
 	char *name;
 	int ret;
 	int idx;
@@ -2129,12 +2120,13 @@ static int coda_open(struct file *file)
 	if (!ctx)
 		return -ENOMEM;
 
-	idx = coda_next_free_instance(dev);
+	if (dev->devtype->product == CODA_DX6)
+		max = CODADX6_MAX_INSTANCES - 1;
+	idx = ida_alloc_max(&dev->ida, max, GFP_KERNEL);
 	if (idx < 0) {
 		ret = idx;
 		goto err_coda_max;
 	}
-	set_bit(idx, &dev->instance_mask);
 
 	name = kasprintf(GFP_KERNEL, "context%d", idx);
 	if (!name) {
@@ -2243,8 +2235,8 @@ err_clk_per:
 err_pm_get:
 	v4l2_fh_del(&ctx->fh);
 	v4l2_fh_exit(&ctx->fh);
-	clear_bit(ctx->idx, &dev->instance_mask);
 err_coda_name_init:
+	ida_free(&dev->ida, ctx->idx);
 err_coda_max:
 	kfree(ctx);
 	return ret;
@@ -2286,7 +2278,7 @@ static int coda_release(struct file *file)
 	pm_runtime_put_sync(&dev->plat_dev->dev);
 	v4l2_fh_del(&ctx->fh);
 	v4l2_fh_exit(&ctx->fh);
-	clear_bit(ctx->idx, &dev->instance_mask);
+	ida_free(&dev->ida, ctx->idx);
 	if (ctx->ops->release)
 		ctx->ops->release(ctx);
 	debugfs_remove_recursive(ctx->debugfs_entry);
@@ -2747,6 +2739,7 @@ static int coda_probe(struct platform_device *pdev)
 
 	mutex_init(&dev->dev_mutex);
 	mutex_init(&dev->coda_mutex);
+	ida_init(&dev->ida);
 
 	dev->debugfs_root = debugfs_create_dir("coda", NULL);
 	if (!dev->debugfs_root)
@@ -2834,6 +2827,7 @@ static int coda_remove(struct platform_device *pdev)
 	coda_free_aux_buf(dev, &dev->tempbuf);
 	coda_free_aux_buf(dev, &dev->workbuf);
 	debugfs_remove_recursive(dev->debugfs_root);
+	ida_destroy(&dev->ida);
 	return 0;
 }
 
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
index 2469ca1dc5985..8df02c32781ee 100644
--- a/drivers/media/platform/coda/coda.h
+++ b/drivers/media/platform/coda/coda.h
@@ -16,6 +16,7 @@
 #define __CODA_H__
 
 #include <linux/debugfs.h>
+#include <linux/idr.h>
 #include <linux/irqreturn.h>
 #include <linux/mutex.h>
 #include <linux/kfifo.h>
@@ -95,7 +96,7 @@ struct coda_dev {
 	struct workqueue_struct	*workqueue;
 	struct v4l2_m2m_dev	*m2m_dev;
 	struct list_head	instances;
-	unsigned long		instance_mask;
+	struct ida		ida;
 	struct dentry		*debugfs_root;
 };
 
-- 
2.20.1




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

* [PATCH 4.19 088/243] media: pulse8-cec: return 0 when invalidating the logical address
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (86 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 087/243] media: coda: fix memory corruption in case more than 32 instances are opened Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 089/243] media: cec: report Vendor ID after initialization Greg Kroah-Hartman
                   ` (161 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hans Verkuil, Torbjorn Jansson,
	Hans Verkuil, Mauro Carvalho Chehab, Sasha Levin

From: Hans Verkuil <hverkuil@xs4all.nl>

[ Upstream commit 2e84eb9affac43eeaf834992888b72426a8cd442 ]

Return 0 when invalidating the logical address. The cec core produces
a warning for drivers that do this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Torbjorn Jansson <torbjorn.jansson@mbox200.swipnet.se>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/usb/pulse8-cec/pulse8-cec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c
index 350635826aaed..6e3bdd71e273b 100644
--- a/drivers/media/usb/pulse8-cec/pulse8-cec.c
+++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c
@@ -585,7 +585,7 @@ unlock:
 	else
 		pulse8->config_pending = true;
 	mutex_unlock(&pulse8->config_lock);
-	return err;
+	return log_addr == CEC_LOG_ADDR_INVALID ? 0 : err;
 }
 
 static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
-- 
2.20.1




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

* [PATCH 4.19 089/243] media: cec: report Vendor ID after initialization
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (87 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 088/243] media: pulse8-cec: return 0 when invalidating the logical address Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 090/243] iwlwifi: fix cfg structs for 22000 with different RF modules Greg Kroah-Hartman
                   ` (160 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hans Verkuil, Mauro Carvalho Chehab,
	Sasha Levin

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

[ Upstream commit 7f02ac77c768ba2bcdd0ce719c1fca0870ffe2fb ]

The CEC specification requires that the Vendor ID (if any) is reported
after a logical address was claimed.

This was never done, so add support for this.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/cec/cec-adap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index 4a15d53f659ec..dd6f3e6ce0062 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -1437,6 +1437,13 @@ configured:
 			las->log_addr[i],
 			cec_phys_addr_exp(adap->phys_addr));
 		cec_transmit_msg_fh(adap, &msg, NULL, false);
+
+		/* Report Vendor ID */
+		if (adap->log_addrs.vendor_id != CEC_VENDOR_ID_NONE) {
+			cec_msg_device_vendor_id(&msg,
+						 adap->log_addrs.vendor_id);
+			cec_transmit_msg_fh(adap, &msg, NULL, false);
+		}
 	}
 	adap->kthread_config = NULL;
 	complete(&adap->config_completion);
-- 
2.20.1




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

* [PATCH 4.19 090/243] iwlwifi: fix cfg structs for 22000 with different RF modules
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (88 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 089/243] media: cec: report Vendor ID after initialization Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 091/243] ravb: Clean up duplex handling Greg Kroah-Hartman
                   ` (159 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Luca Coelho, Sasha Levin

From: Luca Coelho <luciano.coelho@intel.com>

[ Upstream commit b1bbc1a636505ebdd6336ff781e417123226d4f7 ]

We have to choose different configuration and different firmwares
depending on the external RF module that is installed.  Since the
external module is not represented in the PCI IDs, we need to change
the configuration at runtime, after checking the RF ID of the module
installed.  We have a bit of a mess in the code that does this,
because it applies cfg's according to the RF ID only, ignoring the
integrated module that is in use.

Fix that for some devices by adding correct configurations for them
and not ignoring the integrated module's type when making the
decision.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../net/wireless/intel/iwlwifi/cfg/22000.c    |  1 -
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c |  2 +-
 .../net/wireless/intel/iwlwifi/pcie/trans.c   | 22 +++++++++++++++++--
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
index a0de61aa0feff..d7335fabd9294 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -321,7 +321,6 @@ MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
-MODULE_FIRMWARE(IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_JF_B0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 0982bd99b1c3c..844a1009484f6 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -888,7 +888,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
 	{IWL_PCI_DEVICE(0x34F0, 0x0040, iwl22000_2ax_cfg_hr)},
 	{IWL_PCI_DEVICE(0x34F0, 0x0070, iwl22000_2ax_cfg_hr)},
 	{IWL_PCI_DEVICE(0x34F0, 0x0078, iwl22000_2ax_cfg_hr)},
-	{IWL_PCI_DEVICE(0x34F0, 0x0310, iwl22000_2ac_cfg_jf)},
+	{IWL_PCI_DEVICE(0x34F0, 0x0310, iwl22000_2ax_cfg_hr)},
 	{IWL_PCI_DEVICE(0x40C0, 0x0000, iwl22560_2ax_cfg_su_cdb)},
 	{IWL_PCI_DEVICE(0x40C0, 0x0010, iwl22560_2ax_cfg_su_cdb)},
 	{IWL_PCI_DEVICE(0x40c0, 0x0090, iwl22560_2ax_cfg_su_cdb)},
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index f89d43bc7d4bd..4f5571123f70a 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -3415,8 +3415,26 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
 #if IS_ENABLED(CONFIG_IWLMVM)
 	trans->hw_rf_id = iwl_read32(trans, CSR_HW_RF_ID);
 
-	if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
-	    CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR)) {
+	if (cfg == &iwl22000_2ax_cfg_hr) {
+		if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
+		    CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR)) {
+			trans->cfg = &iwl22000_2ax_cfg_hr;
+		} else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
+			   CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_JF)) {
+			trans->cfg = &iwl22000_2ax_cfg_jf;
+		} else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
+			   CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HRCDB)) {
+			IWL_ERR(trans, "RF ID HRCDB is not supported\n");
+			ret = -EINVAL;
+			goto out_no_pci;
+		} else {
+			IWL_ERR(trans, "Unrecognized RF ID 0x%08x\n",
+				CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id));
+			ret = -EINVAL;
+			goto out_no_pci;
+		}
+	} else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
+		   CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR)) {
 		u32 hw_status;
 
 		hw_status = iwl_read_prph(trans, UMAG_GEN_HW_STATUS);
-- 
2.20.1




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

* [PATCH 4.19 091/243] ravb: Clean up duplex handling
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (89 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 090/243] iwlwifi: fix cfg structs for 22000 with different RF modules Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 092/243] net/ipv6: re-do dad when interface has IFF_NOARP flag change Greg Kroah-Hartman
                   ` (158 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Magnus Damm, Sergei Shtylyov,
	David S. Miller, Sasha Levin

From: Magnus Damm <damm+renesas@opensource.se>

[ Upstream commit 08b43857804dd0eca48f5c5a84885cf0079586e0 ]

Since only full-duplex operation is supported by the
hardware, remove duplex handling code and keep the
register setting of ECMR.DM fixed at 1.

This updates the driver implementation to follow the
data sheet text "This bit should always be set to 1."

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/renesas/ravb.h      |  1 -
 drivers/net/ethernet/renesas/ravb_main.c | 19 +------------------
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index 9b6bf557a2f5f..e04af9546e526 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -1029,7 +1029,6 @@ struct ravb_private {
 	phy_interface_t phy_interface;
 	int msg_enable;
 	int speed;
-	int duplex;
 	int emac_irq;
 	enum ravb_chip_id chip_id;
 	int rx_irqs[NUM_RX_QUEUE];
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 5462d2e8a1b71..faaf74073a120 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -82,13 +82,6 @@ static int ravb_config(struct net_device *ndev)
 	return error;
 }
 
-static void ravb_set_duplex(struct net_device *ndev)
-{
-	struct ravb_private *priv = netdev_priv(ndev);
-
-	ravb_modify(ndev, ECMR, ECMR_DM, priv->duplex ? ECMR_DM : 0);
-}
-
 static void ravb_set_rate(struct net_device *ndev)
 {
 	struct ravb_private *priv = netdev_priv(ndev);
@@ -398,13 +391,11 @@ error:
 /* E-MAC init function */
 static void ravb_emac_init(struct net_device *ndev)
 {
-	struct ravb_private *priv = netdev_priv(ndev);
-
 	/* Receive frame limit set register */
 	ravb_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN, RFLR);
 
 	/* EMAC Mode: PAUSE prohibition; Duplex; RX Checksum; TX; RX */
-	ravb_write(ndev, ECMR_ZPF | (priv->duplex ? ECMR_DM : 0) |
+	ravb_write(ndev, ECMR_ZPF | ECMR_DM |
 		   (ndev->features & NETIF_F_RXCSUM ? ECMR_RCSC : 0) |
 		   ECMR_TE | ECMR_RE, ECMR);
 
@@ -992,12 +983,6 @@ static void ravb_adjust_link(struct net_device *ndev)
 		ravb_rcv_snd_disable(ndev);
 
 	if (phydev->link) {
-		if (phydev->duplex != priv->duplex) {
-			new_state = true;
-			priv->duplex = phydev->duplex;
-			ravb_set_duplex(ndev);
-		}
-
 		if (phydev->speed != priv->speed) {
 			new_state = true;
 			priv->speed = phydev->speed;
@@ -1012,7 +997,6 @@ static void ravb_adjust_link(struct net_device *ndev)
 		new_state = true;
 		priv->link = 0;
 		priv->speed = 0;
-		priv->duplex = -1;
 	}
 
 	/* Enable TX and RX right over here, if E-MAC change is ignored */
@@ -1042,7 +1026,6 @@ static int ravb_phy_init(struct net_device *ndev)
 
 	priv->link = 0;
 	priv->speed = 0;
-	priv->duplex = -1;
 
 	/* Try connecting to PHY */
 	pn = of_parse_phandle(np, "phy-handle", 0);
-- 
2.20.1




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

* [PATCH 4.19 092/243] net/ipv6: re-do dad when interface has IFF_NOARP flag change
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (90 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 091/243] ravb: Clean up duplex handling Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 093/243] dmaengine: coh901318: Fix a double-lock bug Greg Kroah-Hartman
                   ` (157 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jianlin Shi, Stefano Brivio,
	Hangbin Liu, David S. Miller, Sasha Levin

From: Hangbin Liu <liuhangbin@gmail.com>

[ Upstream commit 896585d48e8e9ba44cd1754fbce8537feffcc1a5 ]

When we add a new IPv6 address, we should also join corresponding solicited-node
multicast address, unless the interface has IFF_NOARP flag, as function
addrconf_join_solict() did. But if we remove IFF_NOARP flag later, we do
not do dad and add the mcast address. So we will drop corresponding neighbour
discovery message that came from other nodes.

A typical example is after creating a ipvlan with mode l3, setting up an ipv6
address and changing the mode to l2. Then we will not be able to ping this
address as the interface doesn't join related solicited-node mcast address.

Fix it by re-doing dad when interface changed IFF_NOARP flag. Then we will add
corresponding mcast group and check if there is a duplicate address on the
network.

Reported-by: Jianlin Shi <jishi@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv6/addrconf.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d2968a79abea8..ef309a26aba0f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -179,7 +179,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp);
 static void addrconf_dad_work(struct work_struct *w);
 static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
 				   bool send_na);
-static void addrconf_dad_run(struct inet6_dev *idev);
+static void addrconf_dad_run(struct inet6_dev *idev, bool restart);
 static void addrconf_rs_timer(struct timer_list *t);
 static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
@@ -3424,6 +3424,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 			   void *ptr)
 {
 	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+	struct netdev_notifier_change_info *change_info;
 	struct netdev_notifier_changeupper_info *info;
 	struct inet6_dev *idev = __in6_dev_get(dev);
 	struct net *net = dev_net(dev);
@@ -3498,7 +3499,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 				break;
 			}
 
-			if (idev) {
+			if (!IS_ERR_OR_NULL(idev)) {
 				if (idev->if_flags & IF_READY) {
 					/* device is already configured -
 					 * but resend MLD reports, we might
@@ -3506,6 +3507,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 					 * multicast snooping switches
 					 */
 					ipv6_mc_up(idev);
+					change_info = ptr;
+					if (change_info->flags_changed & IFF_NOARP)
+						addrconf_dad_run(idev, true);
 					rt6_sync_up(dev, RTNH_F_LINKDOWN);
 					break;
 				}
@@ -3540,7 +3544,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 
 		if (!IS_ERR_OR_NULL(idev)) {
 			if (run_pending)
-				addrconf_dad_run(idev);
+				addrconf_dad_run(idev, false);
 
 			/* Device has an address by now */
 			rt6_sync_up(dev, RTNH_F_DEAD);
@@ -4158,16 +4162,19 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
 		addrconf_verify_rtnl();
 }
 
-static void addrconf_dad_run(struct inet6_dev *idev)
+static void addrconf_dad_run(struct inet6_dev *idev, bool restart)
 {
 	struct inet6_ifaddr *ifp;
 
 	read_lock_bh(&idev->lock);
 	list_for_each_entry(ifp, &idev->addr_list, if_list) {
 		spin_lock(&ifp->lock);
-		if (ifp->flags & IFA_F_TENTATIVE &&
-		    ifp->state == INET6_IFADDR_STATE_DAD)
+		if ((ifp->flags & IFA_F_TENTATIVE &&
+		     ifp->state == INET6_IFADDR_STATE_DAD) || restart) {
+			if (restart)
+				ifp->state = INET6_IFADDR_STATE_PREDAD;
 			addrconf_dad_kick(ifp);
+		}
 		spin_unlock(&ifp->lock);
 	}
 	read_unlock_bh(&idev->lock);
-- 
2.20.1




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

* [PATCH 4.19 093/243] dmaengine: coh901318: Fix a double-lock bug
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (91 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 092/243] net/ipv6: re-do dad when interface has IFF_NOARP flag change Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 094/243] dmaengine: coh901318: Remove unused variable Greg Kroah-Hartman
                   ` (156 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jia-Ju Bai, Linus Walleij,
	Vinod Koul, Sasha Levin

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

[ Upstream commit 627469e4445b9b12e0229b3bdf8564d5ce384dd7 ]

The function coh901318_alloc_chan_resources() calls spin_lock_irqsave()
before calling coh901318_config().
But coh901318_config() calls spin_lock_irqsave() again in its
definition, which may cause a double-lock bug.

Because coh901318_config() is only called by
coh901318_alloc_chan_resources(), the bug fix is to remove the
calls to spin-lock and -unlock functions in coh901318_config().

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/dma/coh901318.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/dma/coh901318.c
+++ b/drivers/dma/coh901318.c
@@ -1802,8 +1802,6 @@ static int coh901318_config(struct coh90
 	int channel = cohc->id;
 	void __iomem *virtbase = cohc->base->virtbase;
 
-	spin_lock_irqsave(&cohc->lock, flags);
-
 	if (param)
 		p = param;
 	else
@@ -1823,8 +1821,6 @@ static int coh901318_config(struct coh90
 	coh901318_set_conf(cohc, p->config);
 	coh901318_set_ctrl(cohc, p->ctrl_lli_last);
 
-	spin_unlock_irqrestore(&cohc->lock, flags);
-
 	return 0;
 }
 



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

* [PATCH 4.19 094/243] dmaengine: coh901318: Remove unused variable
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (92 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 093/243] dmaengine: coh901318: Fix a double-lock bug Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 095/243] dmaengine: dw-dmac: implement dma protection control setting Greg Kroah-Hartman
                   ` (155 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Stephen Rothwell, Vinod Koul

From: Vinod Koul <vkoul@kernel.org>

commit 35faaf0df42d285b40f8a6310afbe096720f7758 upstream.

Commit 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") left
flags variable unused, so remove it to fix the warning.

drivers/dma/coh901318.c: In function 'coh901318_config':
drivers/dma/coh901318.c:1805:16: warning: unused variable 'flags' [-Wunused-variable]
  unsigned long flags;
                ^~~~~

Fixes: 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug")
Reported-By: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/dma/coh901318.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/dma/coh901318.c
+++ b/drivers/dma/coh901318.c
@@ -1797,7 +1797,6 @@ static struct dma_chan *coh901318_xlate(
 static int coh901318_config(struct coh901318_chan *cohc,
 			    struct coh901318_params *param)
 {
-	unsigned long flags;
 	const struct coh901318_params *p;
 	int channel = cohc->id;
 	void __iomem *virtbase = cohc->base->virtbase;



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

* [PATCH 4.19 095/243] dmaengine: dw-dmac: implement dma protection control setting
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (93 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 094/243] dmaengine: coh901318: Remove unused variable Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 096/243] net: qualcomm: rmnet: move null check on dev before dereferecing it Greg Kroah-Hartman
                   ` (154 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andy Shevchenko, Christian Lamparter,
	Vinod Koul, Sasha Levin

From: Christian Lamparter <chunkeey@gmail.com>

[ Upstream commit 7b0c03ecc42fb223baf015877fee9d517c2c8af1 ]

This patch adds a new device-tree property that allows to
specify the dma protection control bits for the all of the
DMA controller's channel uniformly.

Setting the "correct" bits can have a huge impact on the
PPC460EX and APM82181 that use this DMA engine in combination
with a DesignWare' SATA-II core (sata_dwc_460ex driver).

In the OpenWrt Forum, the user takimata reported that:
|It seems your patch unleashed the full power of the SATA port.
|Where I was previously hitting a really hard limit at around
|82 MB/s for reading and 27 MB/s for writing, I am now getting this:
|
|root@OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 13.65s
|user    0m 0.01s
|sys     0m 11.89s
|
|root@OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024
|1024+0 records in
|1024+0 records out
|real    0m 8.41s
|user    0m 0.01s
|sys     0m 4.70s
|
|This means: 121 MB/s reading and 75 MB/s writing!
|
|The drive is a WD Green WD10EARX taken from an older MBL Single.
|I repeated the test a few times with even larger files to rule out
|any caching, I'm still seeing the same great performance. OpenWrt is
|now completely on par with the original MBL firmware's performance.

Another user And.short reported:
|I can report that your fix worked! Boots up fine with two
|drives even with more partitions, and no more reboot on
|concurrent disk access!

A closer look into the sata_dwc_460ex code revealed that
the driver did initally set the correct protection control
bits. However, this feature was lost when the sata_dwc_460ex
driver was converted to the generic DMA driver framework.

BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/55
BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/50
Fixes: 8b3444852a2b ("sata_dwc_460ex: move to generic DMA driver")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/dw/core.c                | 2 ++
 drivers/dma/dw/platform.c            | 6 ++++++
 drivers/dma/dw/regs.h                | 4 ++++
 include/linux/platform_data/dma-dw.h | 6 ++++++
 4 files changed, 18 insertions(+)

diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 0f389e008ce64..055d83b6cb68a 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -160,12 +160,14 @@ static void dwc_initialize_chan_idma32(struct dw_dma_chan *dwc)
 
 static void dwc_initialize_chan_dw(struct dw_dma_chan *dwc)
 {
+	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
 	u32 cfghi = DWC_CFGH_FIFO_MODE;
 	u32 cfglo = DWC_CFGL_CH_PRIOR(dwc->priority);
 	bool hs_polarity = dwc->dws.hs_polarity;
 
 	cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
 	cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
+	cfghi |= DWC_CFGH_PROTCTL(dw->pdata->protctl);
 
 	/* Set polarity of handshake interface */
 	cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index f62dd0944908d..c299ff181bb68 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -162,6 +162,12 @@ dw_dma_parse_dt(struct platform_device *pdev)
 			pdata->multi_block[tmp] = 1;
 	}
 
+	if (!of_property_read_u32(np, "snps,dma-protection-control", &tmp)) {
+		if (tmp > CHAN_PROTCTL_MASK)
+			return NULL;
+		pdata->protctl = tmp;
+	}
+
 	return pdata;
 }
 #else
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h
index 09e7dfdbb7907..646c9c960c071 100644
--- a/drivers/dma/dw/regs.h
+++ b/drivers/dma/dw/regs.h
@@ -200,6 +200,10 @@ enum dw_dma_msize {
 #define DWC_CFGH_FCMODE		(1 << 0)
 #define DWC_CFGH_FIFO_MODE	(1 << 1)
 #define DWC_CFGH_PROTCTL(x)	((x) << 2)
+#define DWC_CFGH_PROTCTL_DATA	(0 << 2)	/* data access - always set */
+#define DWC_CFGH_PROTCTL_PRIV	(1 << 2)	/* privileged -> AHB HPROT[1] */
+#define DWC_CFGH_PROTCTL_BUFFER	(2 << 2)	/* bufferable -> AHB HPROT[2] */
+#define DWC_CFGH_PROTCTL_CACHE	(4 << 2)	/* cacheable  -> AHB HPROT[3] */
 #define DWC_CFGH_DS_UPD_EN	(1 << 5)
 #define DWC_CFGH_SS_UPD_EN	(1 << 6)
 #define DWC_CFGH_SRC_PER(x)	((x) << 7)
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h
index 896cb71a382cb..1a1d58ebffbf1 100644
--- a/include/linux/platform_data/dma-dw.h
+++ b/include/linux/platform_data/dma-dw.h
@@ -49,6 +49,7 @@ struct dw_dma_slave {
  * @data_width: Maximum data width supported by hardware per AHB master
  *		(in bytes, power of 2)
  * @multi_block: Multi block transfers supported by hardware per channel.
+ * @protctl: Protection control signals setting per channel.
  */
 struct dw_dma_platform_data {
 	unsigned int	nr_channels;
@@ -65,6 +66,11 @@ struct dw_dma_platform_data {
 	unsigned char	nr_masters;
 	unsigned char	data_width[DW_DMA_MAX_NR_MASTERS];
 	unsigned char	multi_block[DW_DMA_MAX_NR_CHANNELS];
+#define CHAN_PROTCTL_PRIVILEGED		BIT(0)
+#define CHAN_PROTCTL_BUFFERABLE		BIT(1)
+#define CHAN_PROTCTL_CACHEABLE		BIT(2)
+#define CHAN_PROTCTL_MASK		GENMASK(2, 0)
+	unsigned char	protctl;
 };
 
 #endif /* _PLATFORM_DATA_DMA_DW_H */
-- 
2.20.1




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

* [PATCH 4.19 096/243] net: qualcomm: rmnet: move null check on dev before dereferecing it
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (94 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 095/243] dmaengine: dw-dmac: implement dma protection control setting Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 097/243] selftests/powerpc: Allocate base registers Greg Kroah-Hartman
                   ` (153 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Colin Ian King, David S. Miller, Sasha Levin

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

[ Upstream commit 3c18aa1464f9232d6abac8d7b4540f61b0658d62 ]

Currently dev is dereferenced by the call dev_net(dev) before dev is null
checked.  Fix this by null checking dev before the potential null
pointer dereference.

Detected by CoverityScan, CID#1462955 ("Dereference before null check")

Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
index f66d1255e36a2..4c476fac78358 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
@@ -301,10 +301,13 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[],
 	struct rmnet_port *port;
 	u16 mux_id;
 
+	if (!dev)
+		return -ENODEV;
+
 	real_dev = __dev_get_by_index(dev_net(dev),
 				      nla_get_u32(tb[IFLA_LINK]));
 
-	if (!real_dev || !dev || !rmnet_is_real_dev_registered(real_dev))
+	if (!real_dev || !rmnet_is_real_dev_registered(real_dev))
 		return -ENODEV;
 
 	port = rmnet_get_port_rtnl(real_dev);
-- 
2.20.1




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

* [PATCH 4.19 097/243] selftests/powerpc: Allocate base registers
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (95 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 096/243] net: qualcomm: rmnet: move null check on dev before dereferecing it Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 098/243] selftests/powerpc: Skip test instead of failing Greg Kroah-Hartman
                   ` (152 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Breno Leitao, Segher Boessenkool,
	Michael Ellerman, Sasha Levin

From: Breno Leitao <leitao@debian.org>

[ Upstream commit 5249497a7bb6334fcc128588d6a7e1e21786515a ]

Some ptrace selftests are passing input operands using a constraint that
can allocate any register for the operand, and using these registers on
load/store operations.

If the register allocated by the compiler happens to be zero (r0), it might
cause an invalid memory address access, since load and store operations
consider the content of 0x0 address if the base register is r0, instead of
the content of the r0 register. For example:

	r1 := 0xdeadbeef
	r0 := 0xdeadbeef

	ld r2, 0(1) /* will load into r2 the content of r1 address */
	ld r2, 0(0) /* will load into r2 the content of 0x0 */

In order to avoid this possible problem, the inline assembly constraint
should be aware that these registers will be used as a base register, thus,
r0 should not be allocated.

Other than that, this patch removes inline assembly operands that are not
used by the tests.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c        | 2 +-
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c     | 4 ++--
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c | 2 +-
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c | 3 +--
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c     | 2 +-
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c     | 2 +-
 tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c     | 3 +--
 7 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c b/tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c
index 0b4ebcc2f485a..ca29fafeed5d9 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c
@@ -31,7 +31,7 @@ void gpr(void)
 		ASM_LOAD_GPR_IMMED(gpr_1)
 		ASM_LOAD_FPR_SINGLE_PRECISION(flt_1)
 		:
-		: [gpr_1]"i"(GPR_1), [flt_1] "r" (&a)
+		: [gpr_1]"i"(GPR_1), [flt_1] "b" (&a)
 		: "memory", "r6", "r7", "r8", "r9", "r10",
 		"r11", "r12", "r13", "r14", "r15", "r16", "r17",
 		"r18", "r19", "r20", "r21", "r22", "r23", "r24",
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c
index 59206b96e98a5..a08a91594dbe5 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-gpr.c
@@ -59,8 +59,8 @@ trans:
 		"3: ;"
 		: [res] "=r" (result), [texasr] "=r" (texasr)
 		: [gpr_1]"i"(GPR_1), [gpr_2]"i"(GPR_2),
-		[sprn_texasr] "i" (SPRN_TEXASR), [flt_1] "r" (&a),
-		[flt_2] "r" (&b), [cptr1] "r" (&cptr[1])
+		[sprn_texasr] "i" (SPRN_TEXASR), [flt_1] "b" (&a),
+		[flt_2] "b" (&b), [cptr1] "b" (&cptr[1])
 		: "memory", "r7", "r8", "r9", "r10",
 		"r11", "r12", "r13", "r14", "r15", "r16",
 		"r17", "r18", "r19", "r20", "r21", "r22",
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c
index b3c061dc95122..f471747462312 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-tar.c
@@ -72,7 +72,7 @@ trans:
 		"3: ;"
 
 		: [res] "=r" (result), [texasr] "=r" (texasr)
-		: [val] "r" (cptr[1]), [sprn_dscr]"i"(SPRN_DSCR),
+		: [sprn_dscr]"i"(SPRN_DSCR),
 		[sprn_tar]"i"(SPRN_TAR), [sprn_ppr]"i"(SPRN_PPR),
 		[sprn_texasr]"i"(SPRN_TEXASR), [tar_1]"i"(TAR_1),
 		[dscr_1]"i"(DSCR_1), [tar_2]"i"(TAR_2), [dscr_2]"i"(DSCR_2),
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c
index 277dade1b382f..18a685bf6a097 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c
@@ -77,8 +77,7 @@ trans:
 
 		"3: ;"
 		: [res] "=r" (result), [texasr] "=r" (texasr)
-		: [fp_load] "r" (fp_load), [fp_load_ckpt] "r" (fp_load_ckpt),
-		[sprn_texasr] "i"  (SPRN_TEXASR)
+		: [sprn_texasr] "i"  (SPRN_TEXASR)
 		: "memory", "r0", "r1", "r3", "r4",
 		"r7", "r8", "r9", "r10", "r11"
 		);
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c
index 51427a2465f69..ba04999254e38 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c
@@ -74,7 +74,7 @@ trans:
 
 		"3: ;"
 		: [tfhar] "=r" (tfhar), [res] "=r" (result),
-		[texasr] "=r" (texasr), [cptr1] "=r" (cptr1)
+		[texasr] "=r" (texasr), [cptr1] "=b" (cptr1)
 		: [sprn_texasr] "i"  (SPRN_TEXASR)
 		: "memory", "r0", "r8", "r31"
 		);
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c
index 48b462f750230..f70023b25e6e8 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-tar.c
@@ -65,7 +65,7 @@ trans:
 		: [sprn_dscr]"i"(SPRN_DSCR), [sprn_tar]"i"(SPRN_TAR),
 		[sprn_ppr]"i"(SPRN_PPR), [sprn_texasr]"i"(SPRN_TEXASR),
 		[tar_1]"i"(TAR_1), [dscr_1]"i"(DSCR_1), [tar_2]"i"(TAR_2),
-		[dscr_2]"i"(DSCR_2), [cptr1] "r" (&cptr[1])
+		[dscr_2]"i"(DSCR_2), [cptr1] "b" (&cptr[1])
 		: "memory", "r0", "r1", "r3", "r4", "r5", "r6"
 		);
 
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c
index 17c23cabac3ea..dfba800589776 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-vsx.c
@@ -65,8 +65,7 @@ trans:
 
 		"3: ;"
 		: [res] "=r" (result), [texasr] "=r" (texasr)
-		: [fp_load] "r" (fp_load), [fp_load_ckpt] "r" (fp_load_ckpt),
-		[sprn_texasr] "i"  (SPRN_TEXASR), [cptr1] "r" (&cptr[1])
+		: [sprn_texasr] "i"  (SPRN_TEXASR), [cptr1] "b" (&cptr[1])
 		: "memory", "r0", "r1", "r3", "r4",
 		"r7", "r8", "r9", "r10", "r11"
 		);
-- 
2.20.1




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

* [PATCH 4.19 098/243] selftests/powerpc: Skip test instead of failing
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (96 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 097/243] selftests/powerpc: Allocate base registers Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS Greg Kroah-Hartman
                   ` (151 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tyrel Datwyler,
	Thiago Jung Bauermann, Breno Leitao, Michael Ellerman,
	Sasha Levin

From: Breno Leitao <leitao@debian.org>

[ Upstream commit eafcd8e3fbad4f426a40ed2b6a8c697c3a4ef36a ]

Current core-pkey selftest fails if the test runs without privileges to
write into the core pattern file (/proc/sys/kernel/core_pattern). This
causes the test to fail and give the impression that the subsystem being
tested is broken, when, in fact, the test is being executed without the
proper privileges. This is the current error:

	test: core_pkey
	tags: git_version:v4.19-3-g9e3363be9bce-dirty
	Error writing to core_pattern file: Permission denied
	failure: core_pkey

This patch simply skips this test if it runs without the proper privileges,
avoiding this undesired failure.

CC: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
CC: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/testing/selftests/powerpc/ptrace/core-pkey.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/testing/selftests/powerpc/ptrace/core-pkey.c b/tools/testing/selftests/powerpc/ptrace/core-pkey.c
index e23e2e199eb4e..d5c64fee032dc 100644
--- a/tools/testing/selftests/powerpc/ptrace/core-pkey.c
+++ b/tools/testing/selftests/powerpc/ptrace/core-pkey.c
@@ -352,10 +352,7 @@ static int write_core_pattern(const char *core_pattern)
 	FILE *f;
 
 	f = fopen(core_pattern_file, "w");
-	if (!f) {
-		perror("Error writing to core_pattern file");
-		return TEST_FAIL;
-	}
+	SKIP_IF_MSG(!f, "Try with root privileges");
 
 	ret = fwrite(core_pattern, 1, len, f);
 	fclose(f);
-- 
2.20.1




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

* [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (97 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 098/243] selftests/powerpc: Skip test instead of failing Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-13  9:35   ` Pavel Machek
  2019-12-13  9:40   ` Pavel Machek
  2019-12-11 15:04 ` [PATCH 4.19 100/243] usb: dwc3: dont log probe deferrals; but do log other error codes Greg Kroah-Hartman
                   ` (150 subsequent siblings)
  249 siblings, 2 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thinh Nguyen, Felipe Balbi, Sasha Levin

From: Thinh Nguyen <thinh.nguyen@synopsys.com>

[ Upstream commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 ]

Highspeed device and below has different state names than superspeed and
higher. Add proper checks and printouts of link states for highspeed and
below.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/dwc3/debug.h   | 29 +++++++++++++++++++++++++++++
 drivers/usb/dwc3/debugfs.c | 19 +++++++++++++++++--
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h
index c66d216dcc304..4f75ab3505b77 100644
--- a/drivers/usb/dwc3/debug.h
+++ b/drivers/usb/dwc3/debug.h
@@ -116,6 +116,35 @@ dwc3_gadget_link_string(enum dwc3_link_state link_state)
 	}
 }
 
+/**
+ * dwc3_gadget_hs_link_string - returns highspeed and below link name
+ * @link_state: link state code
+ */
+static inline const char *
+dwc3_gadget_hs_link_string(enum dwc3_link_state link_state)
+{
+	switch (link_state) {
+	case DWC3_LINK_STATE_U0:
+		return "On";
+	case DWC3_LINK_STATE_U2:
+		return "Sleep";
+	case DWC3_LINK_STATE_U3:
+		return "Suspend";
+	case DWC3_LINK_STATE_SS_DIS:
+		return "Disconnected";
+	case DWC3_LINK_STATE_RX_DET:
+		return "Early Suspend";
+	case DWC3_LINK_STATE_RECOV:
+		return "Recovery";
+	case DWC3_LINK_STATE_RESET:
+		return "Reset";
+	case DWC3_LINK_STATE_RESUME:
+		return "Resume";
+	default:
+		return "UNKNOWN link state\n";
+	}
+}
+
 /**
  * dwc3_trb_type_string - returns TRB type as a string
  * @type: the type of the TRB
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index df8e73ec3342e..04ce7c01a09e6 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -433,13 +433,17 @@ static int dwc3_link_state_show(struct seq_file *s, void *unused)
 	unsigned long		flags;
 	enum dwc3_link_state	state;
 	u32			reg;
+	u8			speed;
 
 	spin_lock_irqsave(&dwc->lock, flags);
 	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
 	state = DWC3_DSTS_USBLNKST(reg);
-	spin_unlock_irqrestore(&dwc->lock, flags);
+	speed = reg & DWC3_DSTS_CONNECTSPD;
 
-	seq_printf(s, "%s\n", dwc3_gadget_link_string(state));
+	seq_printf(s, "%s\n", (speed >= DWC3_DSTS_SUPERSPEED) ?
+		   dwc3_gadget_link_string(state) :
+		   dwc3_gadget_hs_link_string(state));
+	spin_unlock_irqrestore(&dwc->lock, flags);
 
 	return 0;
 }
@@ -457,6 +461,8 @@ static ssize_t dwc3_link_state_write(struct file *file,
 	unsigned long		flags;
 	enum dwc3_link_state	state = 0;
 	char			buf[32];
+	u32			reg;
+	u8			speed;
 
 	if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
 		return -EFAULT;
@@ -477,6 +483,15 @@ static ssize_t dwc3_link_state_write(struct file *file,
 		return -EINVAL;
 
 	spin_lock_irqsave(&dwc->lock, flags);
+	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
+	speed = reg & DWC3_DSTS_CONNECTSPD;
+
+	if (speed < DWC3_DSTS_SUPERSPEED &&
+	    state != DWC3_LINK_STATE_RECOV) {
+		spin_unlock_irqrestore(&dwc->lock, flags);
+		return -EINVAL;
+	}
+
 	dwc3_gadget_set_link_state(dwc, state);
 	spin_unlock_irqrestore(&dwc->lock, flags);
 
-- 
2.20.1




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

* [PATCH 4.19 100/243] usb: dwc3: dont log probe deferrals; but do log other error codes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (98 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 101/243] ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion() Greg Kroah-Hartman
                   ` (149 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Brian Norris, Felipe Balbi, Sasha Levin

From: Brian Norris <briannorris@chromium.org>

[ Upstream commit 408d3ba006af57380fa48858b39f72fde6405031 ]

It's not very useful to repeat a bunch of probe deferral errors. And
it's also not very useful to log "failed" without telling the error
code.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/dwc3/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index aca7e7fa5e47d..f52fcbc5c9718 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1481,7 +1481,8 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	ret = dwc3_core_init(dwc);
 	if (ret) {
-		dev_err(dev, "failed to initialize core\n");
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "failed to initialize core: %d\n", ret);
 		goto err4;
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 101/243] ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (99 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 100/243] usb: dwc3: dont log probe deferrals; but do log other error codes Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 102/243] f2fs: fix to account preflush command for noflush_merge mode Greg Kroah-Hartman
                   ` (148 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexey Dobriyan, Rafael J. Wysocki,
	Sasha Levin

From: Alexey Dobriyan <adobriyan@gmail.com>

[ Upstream commit f8c6d1402b89f22a3647705d63cbd171aa19a77e ]

acpi_find_child_device() accepts boolean not pointer as last argument.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/acpi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 59a416dfcaaa2..df1252e22dcfd 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -101,7 +101,7 @@ static inline bool has_acpi_companion(struct device *dev)
 static inline void acpi_preset_companion(struct device *dev,
 					 struct acpi_device *parent, u64 addr)
 {
-	ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL));
+	ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, false));
 }
 
 static inline const char *acpi_dev_name(struct acpi_device *adev)
-- 
2.20.1




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

* [PATCH 4.19 102/243] f2fs: fix to account preflush command for noflush_merge mode
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (100 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 101/243] ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 103/243] f2fs: fix count of seg_freed to make sec_freed correct Greg Kroah-Hartman
                   ` (147 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chao Yu, Jaegeuk Kim, Sasha Levin

From: Chao Yu <yuchao0@huawei.com>

[ Upstream commit a8075dc484cf10ebdb07bee2b17322fb0a846309 ]

Previously, we only account preflush command for flush_merge mode,
so for noflush_merge mode, we can not know in-flight preflush
command count, fix it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a807a8d5e38f0..0e3e590a250f7 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -637,7 +637,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
 		return 0;
 
 	if (!test_opt(sbi, FLUSH_MERGE)) {
+		atomic_inc(&fcc->issing_flush);
 		ret = submit_flush_wait(sbi, ino);
+		atomic_dec(&fcc->issing_flush);
 		atomic_inc(&fcc->issued_flush);
 		return ret;
 	}
-- 
2.20.1




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

* [PATCH 4.19 103/243] f2fs: fix count of seg_freed to make sec_freed correct
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (101 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 102/243] f2fs: fix to account preflush command for noflush_merge mode Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 104/243] f2fs: change segment to section in f2fs_ioc_gc_range Greg Kroah-Hartman
                   ` (146 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yunlong Song, Chao Yu, Jaegeuk Kim,
	Sasha Levin

From: Yunlong Song <yunlong.song@huawei.com>

[ Upstream commit d6c66cd19ef322fe0d51ba09ce1b7f386acab04a ]

When sbi->segs_per_sec > 1, and if some segno has 0 valid blocks before
gc starts, do_garbage_collect will skip counting seg_freed++, and this
will cause seg_freed < sbi->segs_per_sec and finally skip sec_freed++.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 8c4cb1eee10a6..3d98e909201d9 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1081,9 +1081,9 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
 					GET_SUM_BLOCK(sbi, segno));
 		f2fs_put_page(sum_page, 0);
 
-		if (get_valid_blocks(sbi, segno, false) == 0 ||
-				!PageUptodate(sum_page) ||
-				unlikely(f2fs_cp_error(sbi)))
+		if (get_valid_blocks(sbi, segno, false) == 0)
+			goto freed;
+		if (!PageUptodate(sum_page) || unlikely(f2fs_cp_error(sbi)))
 			goto next;
 
 		sum = page_address(sum_page);
@@ -1110,6 +1110,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
 
 		stat_inc_seg_count(sbi, type, gc_type);
 
+freed:
 		if (gc_type == FG_GC &&
 				get_valid_blocks(sbi, segno, false) == 0)
 			seg_freed++;
-- 
2.20.1




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

* [PATCH 4.19 104/243] f2fs: change segment to section in f2fs_ioc_gc_range
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (102 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 103/243] f2fs: fix count of seg_freed to make sec_freed correct Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 105/243] ARM: dts: rockchip: Fix the PMU interrupt number for rv1108 Greg Kroah-Hartman
                   ` (145 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yunlong Song, Chao Yu, Jaegeuk Kim,
	Sasha Levin

From: Yunlong Song <yunlong.song@huawei.com>

[ Upstream commit 67b0e42b768c9ddc3fd5ca1aee3db815cfaa635c ]

f2fs_ioc_gc_range skips blocks_per_seg each time, however, f2fs_gc moves
blocks of section each time, so fix it from segment to section.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
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/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 187bf7e260c99..5eef2a8b29ab6 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2143,7 +2143,7 @@ do_more:
 	}
 
 	ret = f2fs_gc(sbi, range.sync, true, GET_SEGNO(sbi, range.start));
-	range.start += sbi->blocks_per_seg;
+	range.start += BLKS_PER_SEC(sbi);
 	if (range.start <= end)
 		goto do_more;
 out:
-- 
2.20.1




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

* [PATCH 4.19 105/243] ARM: dts: rockchip: Fix the PMU interrupt number for rv1108
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (103 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 104/243] f2fs: change segment to section in f2fs_ioc_gc_range Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 106/243] ARM: dts: rockchip: Assign the proper GPIO clocks " Greg Kroah-Hartman
                   ` (144 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Otavio Salvador, Fabio Berton,
	Heiko Stuebner, Sasha Levin

From: Otavio Salvador <otavio@ossystems.com.br>

[ Upstream commit c955b7aec510145129ca7aaea6ecbf6d748f5ebf ]

According to the Rockchip vendor tree the PMU interrupt number is
76, so fix it accordingly.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/rv1108.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index ed8f6ca52c5bc..4090ad2619ffb 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -66,7 +66,7 @@
 
 	arm-pmu {
 		compatible = "arm,cortex-a7-pmu";
-		interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+		interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
 	};
 
 	timer {
-- 
2.20.1




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

* [PATCH 4.19 106/243] ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (104 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 105/243] ARM: dts: rockchip: Fix the PMU interrupt number for rv1108 Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 107/243] f2fs: fix to allow node segment for GC by ioctl path Greg Kroah-Hartman
                   ` (143 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Otavio Salvador, Fabio Berton,
	Heiko Stuebner, Sasha Levin

From: Otavio Salvador <otavio@ossystems.com.br>

[ Upstream commit efc2e0bd9594060915696a418564aefd0270b1d6 ]

It is not correct to assign the 24MHz clock oscillator to the GPIO
ports.

Fix it by assigning the proper GPIO clocks instead.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/rv1108.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index 4090ad2619ffb..a9f053dfdc068 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -541,7 +541,7 @@
 			compatible = "rockchip,gpio-bank";
 			reg = <0x20030000 0x100>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&xin24m>;
+			clocks = <&cru PCLK_GPIO0_PMU>;
 
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -554,7 +554,7 @@
 			compatible = "rockchip,gpio-bank";
 			reg = <0x10310000 0x100>;
 			interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&xin24m>;
+			clocks = <&cru PCLK_GPIO1>;
 
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -567,7 +567,7 @@
 			compatible = "rockchip,gpio-bank";
 			reg = <0x10320000 0x100>;
 			interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&xin24m>;
+			clocks = <&cru PCLK_GPIO2>;
 
 			gpio-controller;
 			#gpio-cells = <2>;
@@ -580,7 +580,7 @@
 			compatible = "rockchip,gpio-bank";
 			reg = <0x10330000 0x100>;
 			interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&xin24m>;
+			clocks = <&cru PCLK_GPIO3>;
 
 			gpio-controller;
 			#gpio-cells = <2>;
-- 
2.20.1




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

* [PATCH 4.19 107/243] f2fs: fix to allow node segment for GC by ioctl path
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (105 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 106/243] ARM: dts: rockchip: Assign the proper GPIO clocks " Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 108/243] sparc: Fix JIT fused branch convergance Greg Kroah-Hartman
                   ` (142 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sahitya Tummala, Chao Yu,
	Jaegeuk Kim, Sasha Levin

From: Sahitya Tummala <stummala@codeaurora.org>

[ Upstream commit 08ac9a3870f6babb2b1fff46118536ca8a71ef19 ]

Allow node type segments also to be GC'd via f2fs ioctl
F2FS_IOC_GARBAGE_COLLECT_RANGE.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 3d98e909201d9..700c39ec99f5a 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -318,8 +318,7 @@ static int get_victim_by_default(struct f2fs_sb_info *sbi,
 	p.min_cost = get_max_cost(sbi, &p);
 
 	if (*result != NULL_SEGNO) {
-		if (IS_DATASEG(get_seg_entry(sbi, *result)->type) &&
-			get_valid_blocks(sbi, *result, false) &&
+		if (get_valid_blocks(sbi, *result, false) &&
 			!sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result)))
 			p.min_segno = *result;
 		goto out;
-- 
2.20.1




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

* [PATCH 4.19 108/243] sparc: Fix JIT fused branch convergance.
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (106 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 107/243] f2fs: fix to allow node segment for GC by ioctl path Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 109/243] sparc: Correct ctx->saw_frame_pointer logic Greg Kroah-Hartman
                   ` (141 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David S. Miller, Alexei Starovoitov,
	Sasha Levin

From: David Miller <davem@davemloft.net>

[ Upstream commit c44768a33da81b4a0986e79bbf0588f1a0651dec ]

On T4 and later sparc64 cpus we can use the fused compare and branch
instruction.

However, it can only be used if the branch destination is in the range
of a signed 10-bit immediate offset.  This amounts to 1024
instructions forwards or backwards.

After the commit referenced in the Fixes: tag, the largest possible
size program seen by the JIT explodes by a significant factor.

As a result of this convergance takes many more passes since the
expanded "BPF_LDX | BPF_MSH | BPF_B" code sequence, for example,
contains several embedded branch on condition instructions.

On each pass, as suddenly new fused compare and branch instances
become valid, this makes thousands more in range for the next pass.
And so on and so forth.

This is most greatly exemplified by "BPF_MAXINSNS: exec all MSH" which
takes 35 passes to converge, and shrinks the image by about 64K.

To decrease the cost of this number of convergance passes, do the
convergance pass before we have the program image allocated, just like
other JITs (such as x86) do.

Fixes: e0cea7ce988c ("bpf: implement ld_abs/ld_ind in native bpf")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/sparc/net/bpf_jit_comp_64.c | 77 ++++++++++++++++++++------------
 1 file changed, 49 insertions(+), 28 deletions(-)

diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c
index 222785af550b4..7217d63596431 100644
--- a/arch/sparc/net/bpf_jit_comp_64.c
+++ b/arch/sparc/net/bpf_jit_comp_64.c
@@ -1425,12 +1425,12 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
 	struct bpf_prog *tmp, *orig_prog = prog;
 	struct sparc64_jit_data *jit_data;
 	struct bpf_binary_header *header;
+	u32 prev_image_size, image_size;
 	bool tmp_blinded = false;
 	bool extra_pass = false;
 	struct jit_ctx ctx;
-	u32 image_size;
 	u8 *image_ptr;
-	int pass;
+	int pass, i;
 
 	if (!prog->jit_requested)
 		return orig_prog;
@@ -1461,61 +1461,82 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
 		header = jit_data->header;
 		extra_pass = true;
 		image_size = sizeof(u32) * ctx.idx;
+		prev_image_size = image_size;
+		pass = 1;
 		goto skip_init_ctx;
 	}
 
 	memset(&ctx, 0, sizeof(ctx));
 	ctx.prog = prog;
 
-	ctx.offset = kcalloc(prog->len, sizeof(unsigned int), GFP_KERNEL);
+	ctx.offset = kmalloc_array(prog->len, sizeof(unsigned int), GFP_KERNEL);
 	if (ctx.offset == NULL) {
 		prog = orig_prog;
 		goto out_off;
 	}
 
-	/* Fake pass to detect features used, and get an accurate assessment
-	 * of what the final image size will be.
+	/* Longest sequence emitted is for bswap32, 12 instructions.  Pre-cook
+	 * the offset array so that we converge faster.
 	 */
-	if (build_body(&ctx)) {
-		prog = orig_prog;
-		goto out_off;
-	}
-	build_prologue(&ctx);
-	build_epilogue(&ctx);
+	for (i = 0; i < prog->len; i++)
+		ctx.offset[i] = i * (12 * 4);
 
-	/* Now we know the actual image size. */
-	image_size = sizeof(u32) * ctx.idx;
-	header = bpf_jit_binary_alloc(image_size, &image_ptr,
-				      sizeof(u32), jit_fill_hole);
-	if (header == NULL) {
-		prog = orig_prog;
-		goto out_off;
-	}
-
-	ctx.image = (u32 *)image_ptr;
-skip_init_ctx:
-	for (pass = 1; pass < 3; pass++) {
+	prev_image_size = ~0U;
+	for (pass = 1; pass < 40; pass++) {
 		ctx.idx = 0;
 
 		build_prologue(&ctx);
-
 		if (build_body(&ctx)) {
-			bpf_jit_binary_free(header);
 			prog = orig_prog;
 			goto out_off;
 		}
-
 		build_epilogue(&ctx);
 
 		if (bpf_jit_enable > 1)
-			pr_info("Pass %d: shrink = %d, seen = [%c%c%c%c%c%c]\n", pass,
-				image_size - (ctx.idx * 4),
+			pr_info("Pass %d: size = %u, seen = [%c%c%c%c%c%c]\n", pass,
+				ctx.idx * 4,
 				ctx.tmp_1_used ? '1' : ' ',
 				ctx.tmp_2_used ? '2' : ' ',
 				ctx.tmp_3_used ? '3' : ' ',
 				ctx.saw_frame_pointer ? 'F' : ' ',
 				ctx.saw_call ? 'C' : ' ',
 				ctx.saw_tail_call ? 'T' : ' ');
+
+		if (ctx.idx * 4 == prev_image_size)
+			break;
+		prev_image_size = ctx.idx * 4;
+		cond_resched();
+	}
+
+	/* Now we know the actual image size. */
+	image_size = sizeof(u32) * ctx.idx;
+	header = bpf_jit_binary_alloc(image_size, &image_ptr,
+				      sizeof(u32), jit_fill_hole);
+	if (header == NULL) {
+		prog = orig_prog;
+		goto out_off;
+	}
+
+	ctx.image = (u32 *)image_ptr;
+skip_init_ctx:
+	ctx.idx = 0;
+
+	build_prologue(&ctx);
+
+	if (build_body(&ctx)) {
+		bpf_jit_binary_free(header);
+		prog = orig_prog;
+		goto out_off;
+	}
+
+	build_epilogue(&ctx);
+
+	if (ctx.idx * 4 != prev_image_size) {
+		pr_err("bpf_jit: Failed to converge, prev_size=%u size=%d\n",
+		       prev_image_size, ctx.idx * 4);
+		bpf_jit_binary_free(header);
+		prog = orig_prog;
+		goto out_off;
 	}
 
 	if (bpf_jit_enable > 1)
-- 
2.20.1




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

* [PATCH 4.19 109/243] sparc: Correct ctx->saw_frame_pointer logic.
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (107 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 108/243] sparc: Fix JIT fused branch convergance Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 110/243] nvme: Free ctrl device name on init failure Greg Kroah-Hartman
                   ` (140 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David S. Miller, Alexei Starovoitov,
	Sasha Levin

From: David Miller <davem@davemloft.net>

[ Upstream commit e2ac579a7a18bcd9e8cf14cf42eac0b8a2ba6c4b ]

We need to initialize the frame pointer register not just if it is
seen as a source operand, but also if it is seen as the destination
operand of a store or an atomic instruction (which effectively is a
source operand).

This is exercised by test_verifier's "non-invalid fp arithmetic"

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/sparc/net/bpf_jit_comp_64.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c
index 7217d63596431..ec4da4dc98f12 100644
--- a/arch/sparc/net/bpf_jit_comp_64.c
+++ b/arch/sparc/net/bpf_jit_comp_64.c
@@ -1270,6 +1270,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
 		const u8 tmp2 = bpf2sparc[TMP_REG_2];
 		u32 opcode = 0, rs2;
 
+		if (insn->dst_reg == BPF_REG_FP)
+			ctx->saw_frame_pointer = true;
+
 		ctx->tmp_2_used = true;
 		emit_loadimm(imm, tmp2, ctx);
 
@@ -1308,6 +1311,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
 		const u8 tmp = bpf2sparc[TMP_REG_1];
 		u32 opcode = 0, rs2;
 
+		if (insn->dst_reg == BPF_REG_FP)
+			ctx->saw_frame_pointer = true;
+
 		switch (BPF_SIZE(code)) {
 		case BPF_W:
 			opcode = ST32;
@@ -1340,6 +1346,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
 		const u8 tmp2 = bpf2sparc[TMP_REG_2];
 		const u8 tmp3 = bpf2sparc[TMP_REG_3];
 
+		if (insn->dst_reg == BPF_REG_FP)
+			ctx->saw_frame_pointer = true;
+
 		ctx->tmp_1_used = true;
 		ctx->tmp_2_used = true;
 		ctx->tmp_3_used = true;
@@ -1360,6 +1369,9 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
 		const u8 tmp2 = bpf2sparc[TMP_REG_2];
 		const u8 tmp3 = bpf2sparc[TMP_REG_3];
 
+		if (insn->dst_reg == BPF_REG_FP)
+			ctx->saw_frame_pointer = true;
+
 		ctx->tmp_1_used = true;
 		ctx->tmp_2_used = true;
 		ctx->tmp_3_used = true;
-- 
2.20.1




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

* [PATCH 4.19 110/243] nvme: Free ctrl device name on init failure
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (108 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 109/243] sparc: Correct ctx->saw_frame_pointer logic Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 111/243] dma-mapping: fix return type of dma_set_max_seg_size() Greg Kroah-Hartman
                   ` (139 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Keith Busch, Christoph Hellwig, Sasha Levin

From: Keith Busch <keith.busch@intel.com>

[ Upstream commit d6a2b9535d1e52bea269c138614c4801469d10e1 ]

Free the kobject name that was allocated for the controller device on
failure rather than its parent.

Fixes: d22524a4782a9 ("nvme: switch controller refcounting to use struct device")
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c4ff4f079448e..b2d9bd564960a 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3652,7 +3652,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
 
 	return 0;
 out_free_name:
-	kfree_const(dev->kobj.name);
+	kfree_const(ctrl->device->kobj.name);
 out_release_instance:
 	ida_simple_remove(&nvme_instance_ida, ctrl->instance);
 out:
-- 
2.20.1




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

* [PATCH 4.19 111/243] dma-mapping: fix return type of dma_set_max_seg_size()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (109 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 110/243] nvme: Free ctrl device name on init failure Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 112/243] slimbus: ngd: Fix build error on x86 Greg Kroah-Hartman
                   ` (138 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Niklas Söderlund,
	Geert Uytterhoeven, Christoph Hellwig, Sasha Levin

From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

[ Upstream commit c9d76d0655c06b8c1f944e46c4fd9e9cf4b331c0 ]

The function dma_set_max_seg_size() can return either 0 on success or
-EIO on error. Change its return type from unsigned int to int to
capture this.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/dma-mapping.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 1db6a6b46d0d3..669cde2fa8723 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -674,8 +674,7 @@ static inline unsigned int dma_get_max_seg_size(struct device *dev)
 	return SZ_64K;
 }
 
-static inline unsigned int dma_set_max_seg_size(struct device *dev,
-						unsigned int size)
+static inline int dma_set_max_seg_size(struct device *dev, unsigned int size)
 {
 	if (dev->dma_parms) {
 		dev->dma_parms->max_segment_size = size;
-- 
2.20.1




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

* [PATCH 4.19 112/243] slimbus: ngd: Fix build error on x86
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (110 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 111/243] dma-mapping: fix return type of dma_set_max_seg_size() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 113/243] altera-stapl: check for a null key before strcasecmping it Greg Kroah-Hartman
                   ` (137 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Sasha Levin

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

[ Upstream commit 458a445deb9c9fb13cec46fe9b179a84d2ff514f ]

on non DT platforms like x86 of_match_node is set to NULL, dereferencing
directly would throw an error.
Fix this by doing this in two steps, get the match then the data.

Reported-by: Greg KH <gregkh@linuxfoundation.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/slimbus/qcom-ngd-ctrl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index d72f8eed2e8b7..9221ba7b78637 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1326,11 +1326,12 @@ static int of_qcom_slim_ngd_register(struct device *parent,
 {
 	const struct ngd_reg_offset_data *data;
 	struct qcom_slim_ngd *ngd;
+	const struct of_device_id *match;
 	struct device_node *node;
 	u32 id;
 
-	data = of_match_node(qcom_slim_ngd_dt_match, parent->of_node)->data;
-
+	match = of_match_node(qcom_slim_ngd_dt_match, parent->of_node);
+	data = match->data;
 	for_each_available_child_of_node(parent->of_node, node) {
 		if (of_property_read_u32(node, "reg", &id))
 			continue;
-- 
2.20.1




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

* [PATCH 4.19 113/243] altera-stapl: check for a null key before strcasecmping it
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (111 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 112/243] slimbus: ngd: Fix build error on x86 Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 114/243] serial: imx: fix error handling in console_setup Greg Kroah-Hartman
                   ` (136 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Colin Ian King, Sasha Levin

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

[ Upstream commit 9ccb645683ef46e3c52c12c088a368baa58447d4 ]

Currently the null check on key is occurring after the strcasecmp on
the key, hence there is a potential null pointer dereference on key.
Fix this by checking if key is null first. Also replace the == 0
check on strcasecmp with just the ! operator.

Detected by CoverityScan, CID#1248787 ("Dereference before null check")

Fixes: fa766c9be58b ("[media] Altera FPGA firmware download module")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/misc/altera-stapl/altera.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c
index ef83a9078646f..d2ed3b9728b7c 100644
--- a/drivers/misc/altera-stapl/altera.c
+++ b/drivers/misc/altera-stapl/altera.c
@@ -2176,8 +2176,7 @@ static int altera_get_note(u8 *p, s32 program_size,
 			key_ptr = &p[note_strings +
 					get_unaligned_be32(
 					&p[note_table + (8 * i)])];
-			if ((strncasecmp(key, key_ptr, strlen(key_ptr)) == 0) &&
-						(key != NULL)) {
+			if (key && !strncasecmp(key, key_ptr, strlen(key_ptr))) {
 				status = 0;
 
 				value_ptr = &p[note_strings +
-- 
2.20.1




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

* [PATCH 4.19 114/243] serial: imx: fix error handling in console_setup
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (112 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 113/243] altera-stapl: check for a null key before strcasecmping it Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 115/243] i2c: imx: dont print error message on probe defer Greg Kroah-Hartman
                   ` (135 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Agner, Uwe Kleine-König,
	Sasha Levin

From: Stefan Agner <stefan@agner.ch>

[ Upstream commit 63fd4b94b948c14eeb27a3bbf50ea0f7f0593bad ]

The ipg clock only needs to be unprepared in case preparing
per clock fails. The ipg clock has already disabled at the point.

Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-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/imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 105de92b0b3bf..989ca7d662f3f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2071,7 +2071,7 @@ imx_uart_console_setup(struct console *co, char *options)
 
 	retval = clk_prepare(sport->clk_per);
 	if (retval)
-		clk_disable_unprepare(sport->clk_ipg);
+		clk_unprepare(sport->clk_ipg);
 
 error_console:
 	return retval;
-- 
2.20.1




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

* [PATCH 4.19 115/243] i2c: imx: dont print error message on probe defer
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (113 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 114/243] serial: imx: fix error handling in console_setup Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 116/243] clk: meson: Fix GXL HDMI PLL fractional bits width Greg Kroah-Hartman
                   ` (134 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lucas Stach, Uwe Kleine-König,
	Wolfram Sang, Sasha Levin

From: Lucas Stach <l.stach@pengutronix.de>

[ Upstream commit fece4978510e43f09c8cd386fee15210e8c68493 ]

Probe deferral is a normal operating condition in the probe function,
so don't spam the log with an error in this case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/i2c/busses/i2c-imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 7bd409eaf0acd..d4b72e4ffd71f 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1090,7 +1090,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
 	/* Get I2C clock */
 	i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(i2c_imx->clk)) {
-		dev_err(&pdev->dev, "can't get I2C clock\n");
+		if (PTR_ERR(i2c_imx->clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "can't get I2C clock\n");
 		return PTR_ERR(i2c_imx->clk);
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 116/243] clk: meson: Fix GXL HDMI PLL fractional bits width
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (114 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 115/243] i2c: imx: dont print error message on probe defer Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 117/243] gpu: host1x: Fix syncpoint ID field size on Tegra186 Greg Kroah-Hartman
                   ` (133 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Martin Blumenstingl,
	Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit 21310c39ec01e82ef3ef9bf8ac385b53ccdc158c ]

The GXL Documentation specifies 12 bits for the Fractional bit field,
bit the last bits have a different purpose that we cannot handle right
now, so update the bitwidth to have correct fractional calculations.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: added comment on GXL HHI_HDMI_PLL_CNTL register shift]
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lkml.kernel.org/r/20181121111922.1277-1-narmstrong@baylibre.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/meson/gxbb.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index d94b65061b9f1..b039909e03cf8 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -295,6 +295,12 @@ static struct clk_regmap gxl_hdmi_pll = {
 			.shift   = 9,
 			.width   = 5,
 		},
+		/*
+		 * On gxl, there is a register shift due to
+		 * HHI_HDMI_PLL_CNTL1 which does not exist on gxbb,
+		 * so we use the HHI_HDMI_PLL_CNTL2 define from GXBB
+		 * instead which is defined at the same offset.
+		 */
 		.frac = {
 			/*
 			 * On gxl, there is a register shift due to
@@ -304,7 +310,7 @@ static struct clk_regmap gxl_hdmi_pll = {
 			 */
 			.reg_off = HHI_HDMI_PLL_CNTL + 4,
 			.shift   = 0,
-			.width   = 12,
+			.width   = 10,
 		},
 		.od = {
 			.reg_off = HHI_HDMI_PLL_CNTL + 8,
-- 
2.20.1




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

* [PATCH 4.19 117/243] gpu: host1x: Fix syncpoint ID field size on Tegra186
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (115 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 116/243] clk: meson: Fix GXL HDMI PLL fractional bits width Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 118/243] lockd: fix decoding of TEST results Greg Kroah-Hartman
                   ` (132 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mikko Perttunen, Thierry Reding, Sasha Levin

From: Thierry Reding <treding@nvidia.com>

[ Upstream commit 2fc777ba8422e4a38cae61537ad6a26435a86fb8 ]

The number of syncpoints on Tegra186 is 576 and therefore no longer fits
into 8 bits. Increase the size of the syncpoint ID field to 10 in order
to accomodate all syncpoints.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/hw/hw_host1x06_uclass.h b/drivers/gpu/host1x/hw/hw_host1x06_uclass.h
index 4457486c72b05..e599e15bf999a 100644
--- a/drivers/gpu/host1x/hw/hw_host1x06_uclass.h
+++ b/drivers/gpu/host1x/hw/hw_host1x06_uclass.h
@@ -59,7 +59,7 @@ static inline u32 host1x_uclass_incr_syncpt_r(void)
 	host1x_uclass_incr_syncpt_r()
 static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v)
 {
-	return (v & 0xff) << 8;
+	return (v & 0xff) << 10;
 }
 #define HOST1X_UCLASS_INCR_SYNCPT_COND_F(v) \
 	host1x_uclass_incr_syncpt_cond_f(v)
-- 
2.20.1




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

* [PATCH 4.19 118/243] lockd: fix decoding of TEST results
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (116 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 117/243] gpu: host1x: Fix syncpoint ID field size on Tegra186 Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 119/243] sctp: increase sk_wmem_alloc when head->truesize is increased Greg Kroah-Hartman
                   ` (131 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, J. Bruce Fields, Sasha Levin

From: J. Bruce Fields <bfields@redhat.com>

[ Upstream commit b8db159239b3f51e2b909859935cc25cb3ff3eed ]

We fail to advance the read pointer when reading the stat.oh field that
identifies the lock-holder in a TEST result.

This turns out not to matter if the server is knfsd, which always
returns a zero-length field.  But other servers (Ganesha is an example)
may not do this.  The result is bad values in fcntl F_GETLK results.

Fix this.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/lockd/clnt4xdr.c | 22 ++++++----------------
 fs/lockd/clntxdr.c  | 22 ++++++----------------
 2 files changed, 12 insertions(+), 32 deletions(-)

diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
index 00d5ef5f99f73..214a2fa1f1e39 100644
--- a/fs/lockd/clnt4xdr.c
+++ b/fs/lockd/clnt4xdr.c
@@ -128,24 +128,14 @@ static void encode_netobj(struct xdr_stream *xdr,
 static int decode_netobj(struct xdr_stream *xdr,
 			 struct xdr_netobj *obj)
 {
-	u32 length;
-	__be32 *p;
+	ssize_t ret;
 
-	p = xdr_inline_decode(xdr, 4);
-	if (unlikely(p == NULL))
-		goto out_overflow;
-	length = be32_to_cpup(p++);
-	if (unlikely(length > XDR_MAX_NETOBJ))
-		goto out_size;
-	obj->len = length;
-	obj->data = (u8 *)p;
+	ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data,
+						XDR_MAX_NETOBJ);
+	if (unlikely(ret < 0))
+		return -EIO;
+	obj->len = ret;
 	return 0;
-out_size:
-	dprintk("NFS: returned netobj was too long: %u\n", length);
-	return -EIO;
-out_overflow:
-	print_overflow_msg(__func__, xdr);
-	return -EIO;
 }
 
 /*
diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
index 2c6176387143c..747b9c8c940ac 100644
--- a/fs/lockd/clntxdr.c
+++ b/fs/lockd/clntxdr.c
@@ -125,24 +125,14 @@ static void encode_netobj(struct xdr_stream *xdr,
 static int decode_netobj(struct xdr_stream *xdr,
 			 struct xdr_netobj *obj)
 {
-	u32 length;
-	__be32 *p;
+	ssize_t ret;
 
-	p = xdr_inline_decode(xdr, 4);
-	if (unlikely(p == NULL))
-		goto out_overflow;
-	length = be32_to_cpup(p++);
-	if (unlikely(length > XDR_MAX_NETOBJ))
-		goto out_size;
-	obj->len = length;
-	obj->data = (u8 *)p;
+	ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data,
+			XDR_MAX_NETOBJ);
+	if (unlikely(ret < 0))
+		return -EIO;
+	obj->len = ret;
 	return 0;
-out_size:
-	dprintk("NFS: returned netobj was too long: %u\n", length);
-	return -EIO;
-out_overflow:
-	print_overflow_msg(__func__, xdr);
-	return -EIO;
 }
 
 /*
-- 
2.20.1




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

* [PATCH 4.19 119/243] sctp: increase sk_wmem_alloc when head->truesize is increased
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (117 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 118/243] lockd: fix decoding of TEST results Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 120/243] iommu/amd: Fix line-break in error log reporting Greg Kroah-Hartman
                   ` (130 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xin Long, Marcelo Ricardo Leitner,
	David S. Miller, Sasha Levin

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

[ Upstream commit 0d32f17717e65e76cbdb248374dd162acdfe2fff ]

I changed to count sk_wmem_alloc by skb truesize instead of 1 to
fix the sk_wmem_alloc leak caused by later truesize's change in
xfrm in Commit 02968ccf0125 ("sctp: count sk_wmem_alloc by skb
truesize in sctp_packet_transmit").

But I should have also increased sk_wmem_alloc when head->truesize
is increased in sctp_packet_gso_append() as xfrm does. Otherwise,
sctp gso packet will cause sk_wmem_alloc underflow.

Fixes: 02968ccf0125 ("sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/sctp/output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index b0e74a3e77ec5..025f48e14a91f 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -410,6 +410,7 @@ static void sctp_packet_gso_append(struct sk_buff *head, struct sk_buff *skb)
 	head->truesize += skb->truesize;
 	head->data_len += skb->len;
 	head->len += skb->len;
+	refcount_add(skb->truesize, &head->sk->sk_wmem_alloc);
 
 	__skb_header_release(skb);
 }
-- 
2.20.1




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

* [PATCH 4.19 120/243] iommu/amd: Fix line-break in error log reporting
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (118 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 119/243] sctp: increase sk_wmem_alloc when head->truesize is increased Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new() Greg Kroah-Hartman
                   ` (129 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Joerg Roedel, Sasha Levin

From: Joerg Roedel <jroedel@suse.de>

[ Upstream commit 1a21ee1aabf7ff9484f2eb122476d80c7f60a620 ]

With the switch to dev_err for reporting errors from the
iommu log there was an unwanted newline introduced. The
reason was that the reporting was done in multiple dev_err()
calls, and dev_err adds a newline after every call.

Fix it by printing the log messages with only one dev_err()
call.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iommu/amd_iommu.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fe18804a50083..9991386fb7000 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -549,7 +549,7 @@ static void amd_iommu_report_page_fault(u16 devid, u16 domain_id,
 		dev_data = get_dev_data(&pdev->dev);
 
 	if (dev_data && __ratelimit(&dev_data->rs)) {
-		dev_err(&pdev->dev, "AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x%04x address=0x%016llx flags=0x%04x]\n",
+		dev_err(&pdev->dev, "Event logged [IO_PAGE_FAULT domain=0x%04x address=0x%016llx flags=0x%04x]\n",
 			domain_id, address, flags);
 	} else if (printk_ratelimit()) {
 		pr_err("AMD-Vi: Event logged [IO_PAGE_FAULT device=%02x:%02x.%x domain=0x%04x address=0x%016llx flags=0x%04x]\n",
@@ -589,43 +589,41 @@ retry:
 	if (type == EVENT_TYPE_IO_FAULT) {
 		amd_iommu_report_page_fault(devid, pasid, address, flags);
 		return;
-	} else {
-		dev_err(dev, "AMD-Vi: Event logged [");
 	}
 
 	switch (type) {
 	case EVENT_TYPE_ILL_DEV:
-		dev_err(dev, "ILLEGAL_DEV_TABLE_ENTRY device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
+		dev_err(dev, "Event logged [ILLEGAL_DEV_TABLE_ENTRY device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			pasid, address, flags);
 		dump_dte_entry(devid);
 		break;
 	case EVENT_TYPE_DEV_TAB_ERR:
-		dev_err(dev, "DEV_TAB_HARDWARE_ERROR device=%02x:%02x.%x "
+		dev_err(dev, "Event logged [DEV_TAB_HARDWARE_ERROR device=%02x:%02x.%x "
 			"address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			address, flags);
 		break;
 	case EVENT_TYPE_PAGE_TAB_ERR:
-		dev_err(dev, "PAGE_TAB_HARDWARE_ERROR device=%02x:%02x.%x domain=0x%04x address=0x%016llx flags=0x%04x]\n",
+		dev_err(dev, "Event logged [PAGE_TAB_HARDWARE_ERROR device=%02x:%02x.%x domain=0x%04x address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			pasid, address, flags);
 		break;
 	case EVENT_TYPE_ILL_CMD:
-		dev_err(dev, "ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address);
+		dev_err(dev, "Event logged [ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address);
 		dump_command(address);
 		break;
 	case EVENT_TYPE_CMD_HARD_ERR:
-		dev_err(dev, "COMMAND_HARDWARE_ERROR address=0x%016llx flags=0x%04x]\n",
+		dev_err(dev, "Event logged [COMMAND_HARDWARE_ERROR address=0x%016llx flags=0x%04x]\n",
 			address, flags);
 		break;
 	case EVENT_TYPE_IOTLB_INV_TO:
-		dev_err(dev, "IOTLB_INV_TIMEOUT device=%02x:%02x.%x address=0x%016llx]\n",
+		dev_err(dev, "Event logged [IOTLB_INV_TIMEOUT device=%02x:%02x.%x address=0x%016llx]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			address);
 		break;
 	case EVENT_TYPE_INV_DEV_REQ:
-		dev_err(dev, "INVALID_DEVICE_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
+		dev_err(dev, "Event logged [INVALID_DEVICE_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			pasid, address, flags);
 		break;
@@ -633,12 +631,12 @@ retry:
 		pasid = ((event[0] >> 16) & 0xFFFF)
 			| ((event[1] << 6) & 0xF0000);
 		tag = event[1] & 0x03FF;
-		dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
+		dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
 			pasid, address, flags);
 		break;
 	default:
-		dev_err(dev, "UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",
+		dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",
 			event[0], event[1], event[2], event[3]);
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (119 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 120/243] iommu/amd: Fix line-break in error log reporting Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 22:59   ` Nobuhiro Iwamatsu
  2019-12-11 15:04 ` [PATCH 4.19 122/243] ARM: dts: sun4i: Fix gpio-keys warning Greg Kroah-Hartman
                   ` (128 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nguyen Viet Dung, Kuninori Morimoto,
	Hiroyuki Yokoyama, Mark Brown, Sasha Levin

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

[ Upstream commit 9c698e8481a15237a5b1db5f8391dd66d59e42a4 ]

Current rsnd dvc.c is using flags to avoid duplicating register for
MIXer case. OTOH, commit e894efef9ac7 ("ASoC: core: add support to card
rebind") allows to rebind sound card without rebinding all drivers.

Because of above patch and dvc.c flags, it can't re-register kctrl if
only sound card was rebinded, because dvc is keeping old flags.
(Of course it will be no problem if rsnd driver also be rebinded,
but it is not purpose of above patch).

This patch checks current card registered kctrl when registering.
In MIXer case, it can avoid duplicate register if card already has same
kctrl. In rebind case, it can re-register kctrl because card registered
kctl had been removed when unbinding.

This patch is updated version of commit b918f1bc7f1ce ("ASoC: rsnd: DVC
kctrl sets once")

Reported-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/sh/rcar/core.c | 12 ++++++++++++
 sound/soc/sh/rcar/dvc.c  |  8 --------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 15a31820df169..99cd52b9ff228 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1344,6 +1344,18 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
 	};
 	int ret;
 
+	/*
+	 * 1) Avoid duplicate register (ex. MIXer case)
+	 * 2) re-register if card was rebinded
+	 */
+	list_for_each_entry(kctrl, &card->controls, list) {
+		struct rsnd_kctrl_cfg *c = kctrl->private_data;
+
+		if (strcmp(kctrl->id.name, name) == 0 &&
+		    c->mod == mod)
+			return 0;
+	}
+
 	if (size > RSND_MAX_CHANNELS)
 		return -EINVAL;
 
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 2b16e0ce6bc53..024ece46bf685 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -40,11 +40,8 @@ struct rsnd_dvc {
 	struct rsnd_kctrl_cfg_s ren;	/* Ramp Enable */
 	struct rsnd_kctrl_cfg_s rup;	/* Ramp Rate Up */
 	struct rsnd_kctrl_cfg_s rdown;	/* Ramp Rate Down */
-	u32 flags;
 };
 
-#define KCTRL_INITIALIZED	(1 << 0)
-
 #define rsnd_dvc_get(priv, id) ((struct rsnd_dvc *)(priv->dvc) + id)
 #define rsnd_dvc_nr(priv) ((priv)->dvc_nr)
 
@@ -227,9 +224,6 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
 	int channels = rsnd_rdai_channels_get(rdai);
 	int ret;
 
-	if (rsnd_flags_has(dvc, KCTRL_INITIALIZED))
-		return 0;
-
 	/* Volume */
 	ret = rsnd_kctrl_new_m(mod, io, rtd,
 			is_play ?
@@ -285,8 +279,6 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
 	if (ret < 0)
 		return ret;
 
-	rsnd_flags_set(dvc, KCTRL_INITIALIZED);
-
 	return 0;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 122/243] ARM: dts: sun4i: Fix gpio-keys warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (120 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 123/243] ARM: dts: sun4i: Fix HDMI output DTC warning Greg Kroah-Hartman
                   ` (127 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit c9b543404c5e1fd51a7ac375294519be5064bf80 ]

Fix the 'unnecessary #address-cells/#size-cells without "ranges" or child
"reg" property' DTC warning for the gpio-keys DT node on A10 boards.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 2 --
 arch/arm/boot/dts/sun4i-a10-pcduino.dts      | 2 --
 2 files changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts b/arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts
index 221acd10f6c84..2f0d966f39ad8 100644
--- a/arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts
+++ b/arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts
@@ -63,8 +63,6 @@
 		compatible = "gpio-keys-polled";
 		pinctrl-names = "default";
 		pinctrl-0 = <&key_pins_inet9f>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		poll-interval = <20>;
 
 		left-joystick-left {
diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts
index b97a0f2f20b97..d82a604f3d9c7 100644
--- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts
+++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts
@@ -76,8 +76,6 @@
 
 	gpio-keys {
 		compatible = "gpio-keys";
-		#address-cells = <1>;
-		#size-cells = <0>;
 
 		back {
 			label = "Key Back";
-- 
2.20.1




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

* [PATCH 4.19 123/243] ARM: dts: sun4i: Fix HDMI output DTC warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (121 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 122/243] ARM: dts: sun4i: Fix gpio-keys warning Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 124/243] ARM: dts: sun5i: a10s: " Greg Kroah-Hartman
                   ` (126 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit 123b796d3fac60d69a3737d81901ab483c4efd6e ]

Our HDMI output endpoint on the A10 DTSI has a warning under DTC: "graph
node has single child node 'endpoint', #address-cells/#size-cells are not
necessary". Fix this by removing those properties.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun4i-a10.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 3d62a89507207..5d46bb0139fad 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -530,8 +530,6 @@
 				};
 
 				hdmi_out: port@1 {
-					#address-cells = <1>;
-					#size-cells = <0>;
 					reg = <1>;
 				};
 			};
-- 
2.20.1




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

* [PATCH 4.19 124/243] ARM: dts: sun5i: a10s: Fix HDMI output DTC warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (122 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 123/243] ARM: dts: sun4i: Fix HDMI output DTC warning Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 125/243] ARM: dts: r8a779[01]: Disable unconnected LVDS encoders Greg Kroah-Hartman
                   ` (125 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit ed5fc60b909427be6ca93d3e07a0a5f296d7000a ]

Our HDMI output endpoint on the A10s DTSI has a warning under DTC: "graph
node has single child node 'endpoint', #address-cells/#size-cells are not
necessary". Fix this by removing those properties.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun5i-a10s.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 316cb8b2945b1..a66d9f92f58f5 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -104,8 +104,6 @@
 				};
 
 				hdmi_out: port@1 {
-					#address-cells = <1>;
-					#size-cells = <0>;
 					reg = <1>;
 				};
 			};
-- 
2.20.1




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

* [PATCH 4.19 125/243] ARM: dts: r8a779[01]: Disable unconnected LVDS encoders
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (123 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 124/243] ARM: dts: sun5i: a10s: " Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 126/243] ARM: dts: sun7i: Fix HDMI output DTC warning Greg Kroah-Hartman
                   ` (124 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Laurent Pinchart,
	Simon Horman, Sasha Levin

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

[ Upstream commit 89862542fab10fed8a3c2f9c167622ef4287351d ]

The LVDS0 encoder on Koelsh and Porter, and the LVDS1 encoder on Lager,
are enabled in DT but have no device connected to their output. This
result in spurious messages being printed to the kernel log such as

rcar-du feb00000.display: no connector for encoder /soc/lvds@feb90000, skipping

Fix it by disabling the encoders.

Fixes: 15a1ff30d8f9 ("ARM: dts: r8a7790: Convert to new LVDS DT bindings")
Fixes: e5c3f4707f39 ("ARM: dts: r8a7791: Convert to new LVDS DT bindings")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/r8a7790-lager.dts   | 2 --
 arch/arm/boot/dts/r8a7791-koelsch.dts | 2 --
 arch/arm/boot/dts/r8a7791-porter.dts  | 2 --
 3 files changed, 6 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 50312e752e2fa..7b9508e83d46c 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -489,8 +489,6 @@
 };
 
 &lvds1 {
-	status = "okay";
-
 	ports {
 		port@1 {
 			lvds_connector: endpoint {
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index ce22db01fbbaa..e6580aa0cea35 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -479,8 +479,6 @@
 };
 
 &lvds0 {
-	status = "okay";
-
 	ports {
 		port@1 {
 			lvds_connector: endpoint {
diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts
index f02036e5de015..fefdf8238bbe9 100644
--- a/arch/arm/boot/dts/r8a7791-porter.dts
+++ b/arch/arm/boot/dts/r8a7791-porter.dts
@@ -482,8 +482,6 @@
 };
 
 &lvds0 {
-	status = "okay";
-
 	ports {
 		port@1 {
 			lvds_connector: endpoint {
-- 
2.20.1




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

* [PATCH 4.19 126/243] ARM: dts: sun7i: Fix HDMI output DTC warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (124 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 125/243] ARM: dts: r8a779[01]: Disable unconnected LVDS encoders Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 127/243] ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings Greg Kroah-Hartman
                   ` (123 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit 4d9a06979b1ae0c802440cb4433dfcd85fc7bdd3 ]

Our HDMI output endpoint on the A10s DTSI has a warning under DTC: "graph
node has single child node 'endpoint', #address-cells/#size-cells are not
necessary". Fix this by removing those properties.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 9c52712af2411..73e789a133de1 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -639,8 +639,6 @@
 				};
 
 				hdmi_out: port@1 {
-					#address-cells = <1>;
-					#size-cells = <0>;
 					reg = <1>;
 				};
 			};
-- 
2.20.1




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

* [PATCH 4.19 127/243] ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (125 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 126/243] ARM: dts: sun7i: Fix HDMI output DTC warning Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 128/243] ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning Greg Kroah-Hartman
                   ` (122 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit a858f569b80a69076c521532a289097af905cf1e ]

DTC will emit a warning on our OPPs nodes for the common DTSI between the
A23 and A33 since those nodes use the frequency as unit addresses, but
don't have a matching reg property.

Fix this by moving the frequency to the node name instead.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun8i-h3.dtsi              | 6 +++---
 arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index f0096074a4678..97de6ad133dc2 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -47,19 +47,19 @@
 		compatible = "operating-points-v2";
 		opp-shared;
 
-		opp@648000000 {
+		opp-648000000 {
 			opp-hz = /bits/ 64 <648000000>;
 			opp-microvolt = <1040000 1040000 1300000>;
 			clock-latency-ns = <244144>; /* 8 32k periods */
 		};
 
-		opp@816000000 {
+		opp-816000000 {
 			opp-hz = /bits/ 64 <816000000>;
 			opp-microvolt = <1100000 1100000 1300000>;
 			clock-latency-ns = <244144>; /* 8 32k periods */
 		};
 
-		opp@1008000000 {
+		opp-1008000000 {
 			opp-hz = /bits/ 64 <1008000000>;
 			opp-microvolt = <1200000 1200000 1300000>;
 			clock-latency-ns = <244144>; /* 8 32k periods */
diff --git a/arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts b/arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts
index 0dbdb29a8fff9..ee7ce3752581b 100644
--- a/arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts
+++ b/arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts
@@ -103,13 +103,13 @@
 };
 
 &cpu0_opp_table {
-	opp@1104000000 {
+	opp-1104000000 {
 		opp-hz = /bits/ 64 <1104000000>;
 		opp-microvolt = <1320000>;
 		clock-latency-ns = <244144>; /* 8 32k periods */
 	};
 
-	opp@1200000000 {
+	opp-1200000000 {
 		opp-hz = /bits/ 64 <1200000000>;
 		opp-microvolt = <1320000>;
 		clock-latency-ns = <244144>; /* 8 32k periods */
-- 
2.20.1




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

* [PATCH 4.19 128/243] ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (126 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 127/243] ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 129/243] dlm: NULL check before kmem_cache_destroy is not needed Greg Kroah-Hartman
                   ` (121 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Maxime Ripard <maxime.ripard@bootlin.com>

[ Upstream commit 438a44ce7e51ce571f942433c6c7cb87c4c0effd ]

All our pinctrl nodes were using a node name convention with a unit-address
to differentiate the different muxing options. However, since those nodes
didn't have a reg property, they were generating warnings in DTC.

In order to accomodate for this, convert the old nodes to the syntax we've
been using for the new SoCs, including removing the letter suffix of the
node labels to the bank of those pins to make things more readable.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts |  4 ++--
 arch/arm/boot/dts/sun8i-v3s.dtsi              | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
index 387fc2aa546d6..333df90e8037c 100644
--- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
@@ -78,7 +78,7 @@
 };
 
 &mmc0 {
-	pinctrl-0 = <&mmc0_pins_a>;
+	pinctrl-0 = <&mmc0_pins>;
 	pinctrl-names = "default";
 	broken-cd;
 	bus-width = <4>;
@@ -87,7 +87,7 @@
 };
 
 &uart0 {
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	pinctrl-names = "default";
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 443b083c6adc9..92fcb756a08a9 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -292,17 +292,17 @@
 			interrupt-controller;
 			#interrupt-cells = <3>;
 
-			i2c0_pins: i2c0 {
+			i2c0_pins: i2c0-pins {
 				pins = "PB6", "PB7";
 				function = "i2c0";
 			};
 
-			uart0_pins_a: uart0@0 {
+			uart0_pb_pins: uart0-pb-pins {
 				pins = "PB8", "PB9";
 				function = "uart0";
 			};
 
-			mmc0_pins_a: mmc0@0 {
+			mmc0_pins: mmc0-pins {
 				pins = "PF0", "PF1", "PF2", "PF3",
 				       "PF4", "PF5";
 				function = "mmc0";
@@ -310,7 +310,7 @@
 				bias-pull-up;
 			};
 
-			mmc1_pins: mmc1 {
+			mmc1_pins: mmc1-pins {
 				pins = "PG0", "PG1", "PG2", "PG3",
 				       "PG4", "PG5";
 				function = "mmc1";
@@ -318,7 +318,7 @@
 				bias-pull-up;
 			};
 
-			spi0_pins: spi0 {
+			spi0_pins: spi0-pins {
 				pins = "PC0", "PC1", "PC2", "PC3";
 				function = "spi0";
 			};
-- 
2.20.1




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

* [PATCH 4.19 129/243] dlm: NULL check before kmem_cache_destroy is not needed
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (127 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 128/243] ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 130/243] ARM: debug: enable UART1 for socfpga Cyclone5 Greg Kroah-Hartman
                   ` (120 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wen Yang, David Teigland, Sasha Levin

From: Wen Yang <wen.yang99@zte.com.cn>

[ Upstream commit f31a89692830061bceba8469607e4e4b0f900159 ]

kmem_cache_destroy(NULL) is safe, so removes NULL check before
freeing the mem. This patch also fix ifnullfree.cocci warnings.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/dlm/memory.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c
index 7cd24bccd4fe5..37be29f21d04d 100644
--- a/fs/dlm/memory.c
+++ b/fs/dlm/memory.c
@@ -38,10 +38,8 @@ int __init dlm_memory_init(void)
 
 void dlm_memory_exit(void)
 {
-	if (lkb_cache)
-		kmem_cache_destroy(lkb_cache);
-	if (rsb_cache)
-		kmem_cache_destroy(rsb_cache);
+	kmem_cache_destroy(lkb_cache);
+	kmem_cache_destroy(rsb_cache);
 }
 
 char *dlm_allocate_lvb(struct dlm_ls *ls)
@@ -86,8 +84,7 @@ void dlm_free_lkb(struct dlm_lkb *lkb)
 		struct dlm_user_args *ua;
 		ua = lkb->lkb_ua;
 		if (ua) {
-			if (ua->lksb.sb_lvbptr)
-				kfree(ua->lksb.sb_lvbptr);
+			kfree(ua->lksb.sb_lvbptr);
 			kfree(ua);
 		}
 	}
-- 
2.20.1




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

* [PATCH 4.19 130/243] ARM: debug: enable UART1 for socfpga Cyclone5
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (128 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 129/243] dlm: NULL check before kmem_cache_destroy is not needed Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 131/243] can: xilinx: fix return type of ndo_start_xmit function Greg Kroah-Hartman
                   ` (119 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Clément Péron, Dinh Nguyen,
	Sasha Levin

From: Clément Péron <peron.clem@gmail.com>

[ Upstream commit f6628486c8489e91c513b62608f89ccdb745600d ]

Cyclone5 and Arria10 doesn't have the same memory map for UART1.

Split the SOCFPGA_UART1 into 2 options to allow debugging on UART1 for Cyclone5.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/Kconfig.debug | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index f95a90dfc282a..bee0ba1d1cfb7 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1079,14 +1079,21 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
 
-	config DEBUG_SOCFPGA_UART1
+	config DEBUG_SOCFPGA_ARRIA10_UART1
 		depends on ARCH_SOCFPGA
-		bool "Use SOCFPGA UART1 for low-level debug"
+		bool "Use SOCFPGA Arria10 UART1 for low-level debug"
 		select DEBUG_UART_8250
 		help
 		  Say Y here if you want kernel low-level debugging support
 		  on SOCFPGA(Arria 10) based platforms.
 
+	config DEBUG_SOCFPGA_CYCLONE5_UART1
+		depends on ARCH_SOCFPGA
+		bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
+		select DEBUG_UART_8250
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
 
 	config DEBUG_SUN9I_UART0
 		bool "Kernel low-level debugging messages via sun9i UART0"
@@ -1647,7 +1654,8 @@ config DEBUG_UART_PHYS
 	default 0xfe800000 if ARCH_IOP32X
 	default 0xff690000 if DEBUG_RK32_UART2
 	default 0xffc02000 if DEBUG_SOCFPGA_UART0
-	default 0xffc02100 if DEBUG_SOCFPGA_UART1
+	default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
+	default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
 	default 0xffd82340 if ARCH_IOP13XX
 	default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
 	default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
@@ -1754,7 +1762,8 @@ config DEBUG_UART_VIRT
 	default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
 	default 0xfeb31000 if DEBUG_KEYSTONE_UART1
 	default 0xfec02000 if DEBUG_SOCFPGA_UART0
-	default 0xfec02100 if DEBUG_SOCFPGA_UART1
+	default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
+	default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
 	default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
 	default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
 	default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
@@ -1803,9 +1812,9 @@ config DEBUG_UART_8250_WORD
 	depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
 	depends on DEBUG_UART_8250_SHIFT >= 2
 	default y if DEBUG_PICOXCELL_UART || \
-		DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
-		DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
-		DEBUG_ALPINE_UART0 || \
+		DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
+		DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
+		DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
 		DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
 		DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_BCM_IPROC_UART3 || \
 		DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
-- 
2.20.1




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

* [PATCH 4.19 131/243] can: xilinx: fix return type of ndo_start_xmit function
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (129 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 130/243] ARM: debug: enable UART1 for socfpga Cyclone5 Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 132/243] nfsd: fix a warning in __cld_pipe_upcall() Greg Kroah-Hartman
                   ` (118 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, YueHaibing, Marc Kleine-Budde, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit 81de0cd60fd492575b24d97667f38b8b833fb058 ]

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: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/can/xilinx_can.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 3df23487487f7..b01c6da4dd814 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -612,7 +612,7 @@ static int xcan_start_xmit_mailbox(struct sk_buff *skb, struct net_device *ndev)
  *
  * Return: NETDEV_TX_OK on success and NETDEV_TX_BUSY when the tx queue is full
  */
-static int xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct xcan_priv *priv = netdev_priv(ndev);
 	int ret;
-- 
2.20.1




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

* [PATCH 4.19 132/243] nfsd: fix a warning in __cld_pipe_upcall()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (130 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 131/243] can: xilinx: fix return type of ndo_start_xmit function Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 133/243] bpf: btf: implement btf_name_valid_identifier() Greg Kroah-Hartman
                   ` (117 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Scott Mayhew, J. Bruce Fields, Sasha Levin

From: Scott Mayhew <smayhew@redhat.com>

[ Upstream commit b493fd31c0b89d9453917e977002de58bebc3802 ]

__cld_pipe_upcall() emits a "do not call blocking ops when
!TASK_RUNNING" warning due to the dput() call in rpc_queue_upcall().
Fix it by using a completion instead of hand coding the wait.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfsd/nfs4recover.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 9c247fa1e9594..5188f9f70c78c 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -662,7 +662,7 @@ struct cld_net {
 struct cld_upcall {
 	struct list_head	 cu_list;
 	struct cld_net		*cu_net;
-	struct task_struct	*cu_task;
+	struct completion	 cu_done;
 	struct cld_msg		 cu_msg;
 };
 
@@ -671,23 +671,18 @@ __cld_pipe_upcall(struct rpc_pipe *pipe, struct cld_msg *cmsg)
 {
 	int ret;
 	struct rpc_pipe_msg msg;
+	struct cld_upcall *cup = container_of(cmsg, struct cld_upcall, cu_msg);
 
 	memset(&msg, 0, sizeof(msg));
 	msg.data = cmsg;
 	msg.len = sizeof(*cmsg);
 
-	/*
-	 * Set task state before we queue the upcall. That prevents
-	 * wake_up_process in the downcall from racing with schedule.
-	 */
-	set_current_state(TASK_UNINTERRUPTIBLE);
 	ret = rpc_queue_upcall(pipe, &msg);
 	if (ret < 0) {
-		set_current_state(TASK_RUNNING);
 		goto out;
 	}
 
-	schedule();
+	wait_for_completion(&cup->cu_done);
 
 	if (msg.errno < 0)
 		ret = msg.errno;
@@ -754,7 +749,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 	if (copy_from_user(&cup->cu_msg, src, mlen) != 0)
 		return -EFAULT;
 
-	wake_up_process(cup->cu_task);
+	complete(&cup->cu_done);
 	return mlen;
 }
 
@@ -769,7 +764,7 @@ cld_pipe_destroy_msg(struct rpc_pipe_msg *msg)
 	if (msg->errno >= 0)
 		return;
 
-	wake_up_process(cup->cu_task);
+	complete(&cup->cu_done);
 }
 
 static const struct rpc_pipe_ops cld_upcall_ops = {
@@ -900,7 +895,7 @@ restart_search:
 			goto restart_search;
 		}
 	}
-	new->cu_task = current;
+	init_completion(&new->cu_done);
 	new->cu_msg.cm_vers = CLD_UPCALL_VERSION;
 	put_unaligned(cn->cn_xid++, &new->cu_msg.cm_xid);
 	new->cu_net = cn;
-- 
2.20.1




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

* [PATCH 4.19 133/243] bpf: btf: implement btf_name_valid_identifier()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (131 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 132/243] nfsd: fix a warning in __cld_pipe_upcall() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 134/243] bpf: btf: check name validity for various types Greg Kroah-Hartman
                   ` (116 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yonghong Song, Alexei Starovoitov,
	Sasha Levin

From: Yonghong Song <yhs@fb.com>

[ Upstream commit cdbb096adddb3f42584cecb5ec2e07c26815b71f ]

Function btf_name_valid_identifier() have been implemented in
bpf-next commit 2667a2626f4d ("bpf: btf: Add BTF_KIND_FUNC and
BTF_KIND_FUNC_PROTO"). Backport this function so later patch
can use it.

Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/bpf/btf.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index cfa27b7d1168c..f0f9109f59bac 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -5,6 +5,7 @@
 #include <uapi/linux/types.h>
 #include <linux/seq_file.h>
 #include <linux/compiler.h>
+#include <linux/ctype.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/anon_inodes.h>
@@ -426,6 +427,30 @@ static bool btf_name_offset_valid(const struct btf *btf, u32 offset)
 		offset < btf->hdr.str_len;
 }
 
+/* Only C-style identifier is permitted. This can be relaxed if
+ * necessary.
+ */
+static bool btf_name_valid_identifier(const struct btf *btf, u32 offset)
+{
+	/* offset must be valid */
+	const char *src = &btf->strings[offset];
+	const char *src_limit;
+
+	if (!isalpha(*src) && *src != '_')
+		return false;
+
+	/* set a limit on identifier length */
+	src_limit = src + KSYM_NAME_LEN;
+	src++;
+	while (*src && src < src_limit) {
+		if (!isalnum(*src) && *src != '_')
+			return false;
+		src++;
+	}
+
+	return !*src;
+}
+
 static const char *btf_name_by_offset(const struct btf *btf, u32 offset)
 {
 	if (!offset)
-- 
2.20.1




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

* [PATCH 4.19 134/243] bpf: btf: check name validity for various types
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (132 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 133/243] bpf: btf: implement btf_name_valid_identifier() Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-12 12:06   ` Pavel Machek
  2019-12-11 15:04 ` [PATCH 4.19 135/243] tools: bpftool: fix a bitfield pretty print issue Greg Kroah-Hartman
                   ` (115 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin KaFai Lau, Yonghong Song,
	Alexei Starovoitov, Sasha Levin

From: Yonghong Song <yhs@fb.com>

[ Upstream commit eb04bbb608e683f8fd3ef7f716e2fa32dd90861f ]

This patch added name checking for the following types:
 . BTF_KIND_PTR, BTF_KIND_ARRAY, BTF_KIND_VOLATILE,
   BTF_KIND_CONST, BTF_KIND_RESTRICT:
     the name must be null
 . BTF_KIND_STRUCT, BTF_KIND_UNION: the struct/member name
     is either null or a valid identifier
 . BTF_KIND_ENUM: the enum type name is either null or a valid
     identifier; the enumerator name must be a valid identifier.
 . BTF_KIND_FWD: the name must be a valid identifier
 . BTF_KIND_TYPEDEF: the name must be a valid identifier

For those places a valid name is required, the name must be
a valid C identifier. This can be relaxed later if we found
use cases for a different (non-C) frontend.

Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/bpf/btf.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index f0f9109f59bac..3e2413345e718 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -1168,6 +1168,22 @@ static int btf_ref_type_check_meta(struct btf_verifier_env *env,
 		return -EINVAL;
 	}
 
+	/* typedef type must have a valid name, and other ref types,
+	 * volatile, const, restrict, should have a null name.
+	 */
+	if (BTF_INFO_KIND(t->info) == BTF_KIND_TYPEDEF) {
+		if (!t->name_off ||
+		    !btf_name_valid_identifier(env->btf, t->name_off)) {
+			btf_verifier_log_type(env, t, "Invalid name");
+			return -EINVAL;
+		}
+	} else {
+		if (t->name_off) {
+			btf_verifier_log_type(env, t, "Invalid name");
+			return -EINVAL;
+		}
+	}
+
 	btf_verifier_log_type(env, t, NULL);
 
 	return 0;
@@ -1325,6 +1341,13 @@ static s32 btf_fwd_check_meta(struct btf_verifier_env *env,
 		return -EINVAL;
 	}
 
+	/* fwd type must have a valid name */
+	if (!t->name_off ||
+	    !btf_name_valid_identifier(env->btf, t->name_off)) {
+		btf_verifier_log_type(env, t, "Invalid name");
+		return -EINVAL;
+	}
+
 	btf_verifier_log_type(env, t, NULL);
 
 	return 0;
@@ -1381,6 +1404,12 @@ static s32 btf_array_check_meta(struct btf_verifier_env *env,
 		return -EINVAL;
 	}
 
+	/* array type should not have a name */
+	if (t->name_off) {
+		btf_verifier_log_type(env, t, "Invalid name");
+		return -EINVAL;
+	}
+
 	if (btf_type_vlen(t)) {
 		btf_verifier_log_type(env, t, "vlen != 0");
 		return -EINVAL;
@@ -1557,6 +1586,13 @@ static s32 btf_struct_check_meta(struct btf_verifier_env *env,
 		return -EINVAL;
 	}
 
+	/* struct type either no name or a valid one */
+	if (t->name_off &&
+	    !btf_name_valid_identifier(env->btf, t->name_off)) {
+		btf_verifier_log_type(env, t, "Invalid name");
+		return -EINVAL;
+	}
+
 	btf_verifier_log_type(env, t, NULL);
 
 	last_offset = 0;
@@ -1568,6 +1604,12 @@ static s32 btf_struct_check_meta(struct btf_verifier_env *env,
 			return -EINVAL;
 		}
 
+		/* struct member either no name or a valid one */
+		if (member->name_off &&
+		    !btf_name_valid_identifier(btf, member->name_off)) {
+			btf_verifier_log_member(env, t, member, "Invalid name");
+			return -EINVAL;
+		}
 		/* A member cannot be in type void */
 		if (!member->type || !BTF_TYPE_ID_VALID(member->type)) {
 			btf_verifier_log_member(env, t, member,
@@ -1755,6 +1797,13 @@ static s32 btf_enum_check_meta(struct btf_verifier_env *env,
 		return -EINVAL;
 	}
 
+	/* enum type either no name or a valid one */
+	if (t->name_off &&
+	    !btf_name_valid_identifier(env->btf, t->name_off)) {
+		btf_verifier_log_type(env, t, "Invalid name");
+		return -EINVAL;
+	}
+
 	btf_verifier_log_type(env, t, NULL);
 
 	for (i = 0; i < nr_enums; i++) {
@@ -1764,6 +1813,14 @@ static s32 btf_enum_check_meta(struct btf_verifier_env *env,
 			return -EINVAL;
 		}
 
+		/* enum member must have a valid name */
+		if (!enums[i].name_off ||
+		    !btf_name_valid_identifier(btf, enums[i].name_off)) {
+			btf_verifier_log_type(env, t, "Invalid name");
+			return -EINVAL;
+		}
+
+
 		btf_verifier_log(env, "\t%s val=%d\n",
 				 btf_name_by_offset(btf, enums[i].name_off),
 				 enums[i].val);
-- 
2.20.1




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

* [PATCH 4.19 135/243] tools: bpftool: fix a bitfield pretty print issue
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (133 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 134/243] bpf: btf: check name validity for various types Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 136/243] ASoC: au8540: use 64-bit arithmetic instead of 32-bit Greg Kroah-Hartman
                   ` (114 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yonghong Song, Song Liu,
	Alexei Starovoitov, Sasha Levin

From: Yonghong Song <yhs@fb.com>

[ Upstream commit 528bff0cdb6649f97f2c4802e4ac7a4b50645f2f ]

Commit b12d6ec09730 ("bpf: btf: add btf print functionality")
added btf pretty print functionality to bpftool.
There is a problem though in printing a bitfield whose type
has modifiers.

For example, for a type like
  typedef int ___int;
  struct tmp_t {
          int a:3;
          ___int b:3;
  };
Suppose we have a map
  struct bpf_map_def SEC("maps") tmpmap = {
          .type = BPF_MAP_TYPE_HASH,
          .key_size = sizeof(__u32),
          .value_size = sizeof(struct tmp_t),
          .max_entries = 1,
  };
and the hash table is populated with one element with
key 0 and value (.a = 1 and .b = 2).

In BTF, the struct member "b" will have a type "typedef" which
points to an int type. The current implementation does not
pass the bit offset during transition from typedef to int type,
hence incorrectly print the value as
  $ bpftool m d id 79
  [{
          "key": 0,
          "value": {
              "a": 0x1,
              "b": 0x1
          }
      }
  ]

This patch fixed the issue by carrying bit_offset along the type
chain during bit_field print. The correct result can be printed as
  $ bpftool m d id 76
  [{
          "key": 0,
          "value": {
              "a": 0x1,
              "b": 0x2
          }
      }
  ]

The kernel pretty print is implemented correctly and does not
have this issue.

Fixes: b12d6ec09730 ("bpf: btf: add btf print functionality")
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/bpf/bpftool/btf_dumper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/bpf/bpftool/btf_dumper.c b/tools/bpf/bpftool/btf_dumper.c
index 55bc512a18318..e4e6e2b3fd847 100644
--- a/tools/bpf/bpftool/btf_dumper.c
+++ b/tools/bpf/bpftool/btf_dumper.c
@@ -32,7 +32,7 @@ static void btf_dumper_ptr(const void *data, json_writer_t *jw,
 }
 
 static int btf_dumper_modifier(const struct btf_dumper *d, __u32 type_id,
-			       const void *data)
+			       __u8 bit_offset, const void *data)
 {
 	int actual_type_id;
 
@@ -40,7 +40,7 @@ static int btf_dumper_modifier(const struct btf_dumper *d, __u32 type_id,
 	if (actual_type_id < 0)
 		return actual_type_id;
 
-	return btf_dumper_do_type(d, actual_type_id, 0, data);
+	return btf_dumper_do_type(d, actual_type_id, bit_offset, data);
 }
 
 static void btf_dumper_enum(const void *data, json_writer_t *jw)
@@ -237,7 +237,7 @@ static int btf_dumper_do_type(const struct btf_dumper *d, __u32 type_id,
 	case BTF_KIND_VOLATILE:
 	case BTF_KIND_CONST:
 	case BTF_KIND_RESTRICT:
-		return btf_dumper_modifier(d, type_id, data);
+		return btf_dumper_modifier(d, type_id, bit_offset, data);
 	default:
 		jsonw_printf(d->jw, "(unsupported-kind");
 		return -EINVAL;
-- 
2.20.1




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

* [PATCH 4.19 136/243] ASoC: au8540: use 64-bit arithmetic instead of 32-bit
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (134 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 135/243] tools: bpftool: fix a bitfield pretty print issue Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:04 ` [PATCH 4.19 137/243] gpio: OF: Parse MMC-specific CD and WP properties Greg Kroah-Hartman
                   ` (113 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Young_X, Mark Brown, Sasha Levin

From: Young_X <YangX92@hotmail.com>

[ Upstream commit cd7fdc45bc69a62b4e22c6e875f1f1aea566256d ]

Add suffix ULL to constant 256 in order to give the compiler complete
information about the proper arithmetic to use.

Notice that such constant is used in a context that expects an
expression of type u64 (64 bits, unsigned) and the following
expression is currently being evaluated using 32-bit arithmetic:

    256 * fs * 2 * mclk_src_scaling[i].param

Signed-off-by: Young_X <YangX92@hotmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/nau8540.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index e3c8cd17daf2d..4dd1a609756be 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -585,7 +585,7 @@ static int nau8540_calc_fll_param(unsigned int fll_in,
 	fvco_max = 0;
 	fvco_sel = ARRAY_SIZE(mclk_src_scaling);
 	for (i = 0; i < ARRAY_SIZE(mclk_src_scaling); i++) {
-		fvco = 256 * fs * 2 * mclk_src_scaling[i].param;
+		fvco = 256ULL * fs * 2 * mclk_src_scaling[i].param;
 		if (fvco > NAU_FVCO_MIN && fvco < NAU_FVCO_MAX &&
 			fvco_max < fvco) {
 			fvco_max = fvco;
-- 
2.20.1




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

* [PATCH 4.19 137/243] gpio: OF: Parse MMC-specific CD and WP properties
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (135 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 136/243] ASoC: au8540: use 64-bit arithmetic instead of 32-bit Greg Kroah-Hartman
@ 2019-12-11 15:04 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 138/243] ARM: OMAP1/2: fix SoC name printing Greg Kroah-Hartman
                   ` (112 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, linux-mmc, linux-gpio,
	Bartosz Golaszewski, Linus Walleij, Sasha Levin

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

[ Upstream commit 81c85ec15a1946f2e347ec0bf66936121eb97ce7 ]

When retrieveing CD (card detect) and WP (write protect)
GPIO handles from the device tree, make sure to assign
them active low by default unless the "cd-inverted" or
"wp-inverted" properties are set. These properties mean
that respective signal is active HIGH since the SDHCI
specification stipulates that this kind of signals
should be treated as active LOW.

If the twocell GPIO flag is also specified as active
low, well that's nice and we will silently ignore the
tautological specification.

If however the GPIO line is specified as active low
in the GPIO flasg cell and "cd-inverted" or "wp-inverted"
is also specified, the latter takes precedence and we
print a warning.

The current effect on the MMC slot-gpio core are as
follows:

For CD GPIOs: no effect. The current code in
mmc/core/host.c calls mmc_gpiod_request_cd() with
the "override_active_level" argument set to true,
which means that whatever the GPIO descriptor
thinks about active low/high will be ignored, the
core will use the MMC_CAP2_CD_ACTIVE_HIGH to keep
track of this and reads the raw value from the
GPIO descriptor, totally bypassing gpiolibs inversion
semantics. I plan to clean this up at a later point
passing the handling of inversion semantics over
to gpiolib, so this patch prepares the ground for
that.

Fow WP GPIOs: this is probably fixing a bug, because
the code in mmc/core/host.c calls mmc_gpiod_request_ro()
with the "override_active_level" argument set to false,
which means it will respect the inversion semantics of
the gpiolib and ignore the MMC_CAP2_RO_ACTIVE_HIGH
flag for everyone using this through device tree.
However the code in host.c confusingly goes to great
lengths setting up the MMC_CAP2_RO_ACTIVE_HIGH flag
from the GPIO descriptor and by reading the "wp-inverted"
property of the node. As far as I can tell this is all
in vain and the inversion is broken: device trees that
use "wp-inverted" do not work as intended, instead the
only way to actually get inversion on a line is by
setting the second cell flag to GPIO_ACTIVE_HIGH (which
will be the default) or GPIO_ACTIVE_LOW if they want
the proper MMC semantics. Presumably all device trees do
this right but we need to parse and handle this properly.

Cc: linux-mmc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpio/gpiolib-of.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index e0f149bdf98ff..1147ad968fd75 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -60,6 +60,45 @@ static struct gpio_desc *of_xlate_and_get_gpiod_flags(struct gpio_chip *chip,
 static void of_gpio_flags_quirks(struct device_node *np,
 				 enum of_gpio_flags *flags)
 {
+	/*
+	 * Handle MMC "cd-inverted" and "wp-inverted" semantics.
+	 */
+	if (IS_ENABLED(CONFIG_MMC)) {
+		if (of_property_read_bool(np, "cd-gpios")) {
+			if (of_property_read_bool(np, "cd-inverted")) {
+				if (*flags & OF_GPIO_ACTIVE_LOW) {
+					/* "cd-inverted" takes precedence */
+					*flags &= ~OF_GPIO_ACTIVE_LOW;
+					pr_warn("%s GPIO handle specifies CD active low - ignored\n",
+						of_node_full_name(np));
+				}
+			} else {
+				/*
+				 * Active low is the default according to the
+				 * SDHCI specification. If the GPIO handle
+				 * specifies the same thing - good.
+				 */
+				*flags |= OF_GPIO_ACTIVE_LOW;
+			}
+		}
+		if (of_property_read_bool(np, "wp-gpios")) {
+			if (of_property_read_bool(np, "wp-inverted")) {
+				/* "wp-inverted" takes precedence */
+				if (*flags & OF_GPIO_ACTIVE_LOW) {
+					*flags &= ~OF_GPIO_ACTIVE_LOW;
+					pr_warn("%s GPIO handle specifies WP active low - ignored\n",
+						of_node_full_name(np));
+				}
+			} else {
+				/*
+				 * Active low is the default according to the
+				 * SDHCI specification. If the GPIO handle
+				 * specifies the same thing - good.
+				 */
+				*flags |= OF_GPIO_ACTIVE_LOW;
+			}
+		}
+	}
 	/*
 	 * Some GPIO fixed regulator quirks.
 	 * Note that active low is the default.
-- 
2.20.1




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

* [PATCH 4.19 138/243] ARM: OMAP1/2: fix SoC name printing
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (136 preceding siblings ...)
  2019-12-11 15:04 ` [PATCH 4.19 137/243] gpio: OF: Parse MMC-specific CD and WP properties Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 139/243] arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names Greg Kroah-Hartman
                   ` (111 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aaro Koskinen, Tony Lindgren, Sasha Levin

From: Aaro Koskinen <aaro.koskinen@iki.fi>

[ Upstream commit 04a92358b3964988c78dfe370a559ae550383886 ]

Currently we get extra newlines on OMAP1/2 when the SoC name is printed:

[    0.000000] OMAP1510
[    0.000000]  revision 2 handled as 15xx id: bc058c9b93111a16

[    0.000000] OMAP2420
[    0.000000]

Fix by using pr_cont.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/mach-omap1/id.c | 6 +++---
 arch/arm/mach-omap2/id.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 52de382fc8047..7e49dfda3d2f4 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -200,10 +200,10 @@ void __init omap_check_revision(void)
 		printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type);
 	}
 
-	printk(KERN_INFO "OMAP%04x", omap_revision >> 16);
+	pr_info("OMAP%04x", omap_revision >> 16);
 	if ((omap_revision >> 8) & 0xff)
-		printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff);
-	printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
+		pr_cont("%x", (omap_revision >> 8) & 0xff);
+	pr_cont(" revision %i handled as %02xxx id: %08x%08x\n",
 	       die_rev, omap_revision & 0xff, system_serial_low,
 	       system_serial_high);
 }
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 68ba5f472f6ba..859c71c4e9324 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -199,8 +199,8 @@ void __init omap2xxx_check_revision(void)
 
 	pr_info("%s", soc_name);
 	if ((omap_rev() >> 8) & 0x0f)
-		pr_info("%s", soc_rev);
-	pr_info("\n");
+		pr_cont("%s", soc_rev);
+	pr_cont("\n");
 }
 
 #define OMAP3_SHOW_FEATURE(feat)		\
-- 
2.20.1




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

* [PATCH 4.19 139/243] arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (137 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 138/243] ARM: OMAP1/2: fix SoC name printing Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 140/243] arm64: dts: meson-gxbb-nanopi-k2: " Greg Kroah-Hartman
                   ` (110 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Kevin Hilman, Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit 11fa9774612decea87144d7f950a9c53a4fe3050 ]

The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 47884c5c746e ("ARM64: dts: meson-gxl-libretech-cc: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index 90a56af967a7f..b4dfb9afdef86 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -163,7 +163,7 @@
 	};
 };
 
-&pinctrl_aobus {
+&gpio_ao {
 	gpio-line-names = "UART TX",
 			  "UART RX",
 			  "Blue LED",
@@ -178,7 +178,7 @@
 			  "7J1 Header Pin15";
 };
 
-&pinctrl_periphs {
+&gpio {
 	gpio-line-names = /* Bank GPIOZ */
 			  "", "", "", "", "", "", "",
 			  "", "", "", "", "", "", "",
-- 
2.20.1




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

* [PATCH 4.19 140/243] arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (138 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 139/243] arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 141/243] arm64: dts: meson-gxbb-odroidc2: " Greg Kroah-Hartman
                   ` (109 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Kevin Hilman, Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit f0783f5edb52af14ecaae6c5ce4f38e0a358f5d8 ]

The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 12ada0513d7a ("ARM64: dts: meson-gxbb-nanopi-k2: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
index cbe99bd4e06d2..8cd50b75171de 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -191,7 +191,7 @@
 	pinctrl-names = "default";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
 	gpio-line-names = "UART TX", "UART RX", "Power Control", "Power Key In",
 			  "VCCK En", "CON1 Header Pin31",
 			  "I2S Header Pin6", "IR In", "I2S Header Pin7",
@@ -201,7 +201,7 @@
 			  "";
 };
 
-&pinctrl_periphs {
+&gpio {
 	gpio-line-names = /* Bank GPIOZ */
 			  "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
 			  "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
-- 
2.20.1




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

* [PATCH 4.19 141/243] arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (139 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 140/243] arm64: dts: meson-gxbb-nanopi-k2: " Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 142/243] arm64: dts: meson-gxl-khadas-vim: " Greg Kroah-Hartman
                   ` (108 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Kevin Hilman, Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit 2165b006b65d609140dafafcb14cce5a4aaacbab ]

The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: b03c7d6438bb ("ARM64: dts: meson-gxbb-odroidc2: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 54954b314a452..00f7be6d83f7c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -187,7 +187,7 @@
 	pinctrl-names = "default";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
 	gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En",
 			  "USB HUB nRESET", "USB OTG Power En",
 			  "J7 Header Pin2", "IR In", "J7 Header Pin4",
@@ -197,7 +197,7 @@
 			  "";
 };
 
-&pinctrl_periphs {
+&gpio {
 	gpio-line-names = /* Bank GPIOZ */
 			  "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
 			  "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
-- 
2.20.1




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

* [PATCH 4.19 142/243] arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (140 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 141/243] arm64: dts: meson-gxbb-odroidc2: " Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 143/243] net/x25: fix called/calling length calculation in x25_parse_address_block Greg Kroah-Hartman
                   ` (107 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Kevin Hilman, Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit 5b78012636f537344bd551934387f5772c38ba80 ]

The gpio line names were set in the pinctrl node instead of the gpio node,
at the time it was merged, it worked, but was obviously wrong.
This patch moves the properties to the gpio nodes.

Fixes: 60795933b709 ("ARM64: dts: meson-gxl-khadas-vim: Add GPIO lines names")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index d32cf38463702..864ef0111b01a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -112,7 +112,7 @@
 	linux,rc-map-name = "rc-geekbox";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
 	gpio-line-names = "UART TX",
 			  "UART RX",
 			  "Power Key In",
@@ -127,7 +127,7 @@
 			  "";
 };
 
-&pinctrl_periphs {
+&gpio {
 	gpio-line-names = /* Bank GPIOZ */
 			  "", "", "", "", "", "", "",
 			  "", "", "", "", "", "", "",
-- 
2.20.1




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

* [PATCH 4.19 143/243] net/x25: fix called/calling length calculation in x25_parse_address_block
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (141 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 142/243] arm64: dts: meson-gxl-khadas-vim: " Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 144/243] net/x25: fix null_x25_address handling Greg Kroah-Hartman
                   ` (106 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin Schiller, David S. Miller,
	Sasha Levin

From: Martin Schiller <ms@dev.tdt.de>

[ Upstream commit d449ba3d581ed29f751a59792fdc775572c66904 ]

The length of the called and calling address was not calculated
correctly (BCD encoding).

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/x25/af_x25.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index f7f53f9ae7efb..3150648206b68 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -100,7 +100,7 @@ int x25_parse_address_block(struct sk_buff *skb,
 	}
 
 	len = *skb->data;
-	needed = 1 + (len >> 4) + (len & 0x0f);
+	needed = 1 + ((len >> 4) + (len & 0x0f) + 1) / 2;
 
 	if (!pskb_may_pull(skb, needed)) {
 		/* packet is too short to hold the addresses it claims
-- 
2.20.1




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

* [PATCH 4.19 144/243] net/x25: fix null_x25_address handling
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (142 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 143/243] net/x25: fix called/calling length calculation in x25_parse_address_block Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 145/243] tools/bpf: make libbpf _GNU_SOURCE friendly Greg Kroah-Hartman
                   ` (105 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin Schiller, David S. Miller,
	Sasha Levin

From: Martin Schiller <ms@dev.tdt.de>

[ Upstream commit 06137619f061f498c2924f6543fa45b7d39f0501 ]

o x25_find_listener(): the compare for the null_x25_address was wrong.
   We have to check the x25_addr of the listener socket instead of the
   x25_addr of the incomming call.

 o x25_bind(): it was not possible to bind a socket to null_x25_address

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/x25/af_x25.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 3150648206b68..20a511398389d 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -288,7 +288,7 @@ static struct sock *x25_find_listener(struct x25_address *addr,
 	sk_for_each(s, &x25_list)
 		if ((!strcmp(addr->x25_addr,
 			x25_sk(s)->source_addr.x25_addr) ||
-				!strcmp(addr->x25_addr,
+				!strcmp(x25_sk(s)->source_addr.x25_addr,
 					null_x25_address.x25_addr)) &&
 					s->sk_state == TCP_LISTEN) {
 			/*
@@ -685,11 +685,15 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 		goto out;
 	}
 
-	len = strlen(addr->sx25_addr.x25_addr);
-	for (i = 0; i < len; i++) {
-		if (!isdigit(addr->sx25_addr.x25_addr[i])) {
-			rc = -EINVAL;
-			goto out;
+	/* check for the null_x25_address */
+	if (strcmp(addr->sx25_addr.x25_addr, null_x25_address.x25_addr)) {
+
+		len = strlen(addr->sx25_addr.x25_addr);
+		for (i = 0; i < len; i++) {
+			if (!isdigit(addr->sx25_addr.x25_addr[i])) {
+				rc = -EINVAL;
+				goto out;
+			}
 		}
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 145/243] tools/bpf: make libbpf _GNU_SOURCE friendly
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (143 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 144/243] net/x25: fix null_x25_address handling Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 146/243] clk: mediatek: Drop __init from mtk_clk_register_cpumuxes() Greg Kroah-Hartman
                   ` (104 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yonghong Song, Jakub Kicinski,
	Daniel Borkmann, Sasha Levin

From: Yonghong Song <yhs@fb.com>

[ Upstream commit b42699547fc9fb1057795bccc21a6445743a7fde ]

During porting libbpf to bcc, I got some warnings like below:
  ...
  [  2%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf.c.o
  /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf.c:12:0:
  warning: "_GNU_SOURCE" redefined [enabled by default]
   #define _GNU_SOURCE
  ...
  [  3%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf_errno.c.o
  /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c: In function ‘libbpf_strerror’:
  /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c:45:7:
  warning: assignment makes integer from pointer without a cast [enabled by default]
     ret = strerror_r(err, buf, size);
  ...

bcc is built with _GNU_SOURCE defined and this caused the above warning.
This patch intends to make libpf _GNU_SOURCE friendly by
  . define _GNU_SOURCE in libbpf.c unless it is not defined
  . undefine _GNU_SOURCE as non-gnu version of strerror_r is expected.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 tools/lib/bpf/libbpf.c       | 2 ++
 tools/lib/bpf/libbpf_errno.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index a350f97e3a1a4..a62be78fc07b1 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -22,7 +22,9 @@
  * License along with this program; if not,  see <http://www.gnu.org/licenses>
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/tools/lib/bpf/libbpf_errno.c b/tools/lib/bpf/libbpf_errno.c
index d9ba851bd7f9f..d2d17226d9d6b 100644
--- a/tools/lib/bpf/libbpf_errno.c
+++ b/tools/lib/bpf/libbpf_errno.c
@@ -20,6 +20,7 @@
  * License along with this program; if not,  see <http://www.gnu.org/licenses>
  */
 
+#undef _GNU_SOURCE
 #include <stdio.h>
 #include <string.h>
 
-- 
2.20.1




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

* [PATCH 4.19 146/243] clk: mediatek: Drop __init from mtk_clk_register_cpumuxes()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (144 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 145/243] tools/bpf: make libbpf _GNU_SOURCE friendly Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 147/243] clk: mediatek: Drop more __init markings for driver probe Greg Kroah-Hartman
                   ` (103 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sean Wang, Ryder Lee, Rob Herring,
	Wenzhen Yu, Weiyi Lu, Stephen Boyd

From: Stephen Boyd <sboyd@kernel.org>

commit 28f1186a26f7e4e5df7be454710da26c810effb6 upstream.

This function is used from more places than just __init code. Removing
__init silences a section mismatch warning here.

Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Wenzhen Yu <wenzhen.yu@mediatek.com>
Cc: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/mediatek/clk-cpumux.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/clk/mediatek/clk-cpumux.c
+++ b/drivers/clk/mediatek/clk-cpumux.c
@@ -53,7 +53,7 @@ static const struct clk_ops clk_cpumux_o
 	.set_parent = clk_cpumux_set_parent,
 };
 
-static struct clk __init *
+static struct clk *
 mtk_clk_register_cpumux(const struct mtk_composite *mux,
 			struct regmap *regmap)
 {
@@ -84,9 +84,9 @@ mtk_clk_register_cpumux(const struct mtk
 	return clk;
 }
 
-int __init mtk_clk_register_cpumuxes(struct device_node *node,
-				     const struct mtk_composite *clks, int num,
-				     struct clk_onecell_data *clk_data)
+int mtk_clk_register_cpumuxes(struct device_node *node,
+			      const struct mtk_composite *clks, int num,
+			      struct clk_onecell_data *clk_data)
 {
 	int i;
 	struct clk *clk;



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

* [PATCH 4.19 147/243] clk: mediatek: Drop more __init markings for driver probe
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (145 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 146/243] clk: mediatek: Drop __init from mtk_clk_register_cpumuxes() Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 148/243] soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains Greg Kroah-Hartman
                   ` (102 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sean Wang, Ryder Lee, Rob Herring,
	Wenzhen Yu, Weiyi Lu, Stephen Boyd, Sasha Levin

From: Stephen Boyd <sboyd@kernel.org>

[ Upstream commit 553604c041b8c18cd6a8e1d785a77f3e4be61cdb ]

This function is called from driver probe, which isn't the same as
__init code because driver probe can happen later. Drop the __init
marking here to fix this potential problem.

Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Wenzhen Yu <wenzhen.yu@mediatek.com>
Cc: Weiyi Lu <weiyi.lu@mediatek.com>
Fixes: 2fc0a509e4ee ("clk: mediatek: add clock support for MT7622 SoC")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/clk/mediatek/clk-mt7622.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -513,7 +513,7 @@ static const struct mtk_gate peri_clks[]
 	GATE_PERI1(CLK_PERI_IRTX_PD, "peri_irtx_pd", "irtx_sel", 2),
 };
 
-static struct mtk_composite infra_muxes[] __initdata = {
+static struct mtk_composite infra_muxes[] = {
 	MUX(CLK_INFRA_MUX1_SEL, "infra_mux1_sel", infra_mux1_parents,
 	    0x000, 2, 2),
 };
@@ -652,7 +652,7 @@ static int mtk_topckgen_init(struct plat
 	return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
 }
 
-static int __init mtk_infrasys_init(struct platform_device *pdev)
+static int mtk_infrasys_init(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
 	struct clk_onecell_data *clk_data;



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

* [PATCH 4.19 148/243] soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (146 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 147/243] clk: mediatek: Drop more __init markings for driver probe Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 149/243] soc: renesas: r8a77980-sysc: Correct names of A2DP[01] " Greg Kroah-Hartman
                   ` (101 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Simon Horman,
	Sasha Levin

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

[ Upstream commit b5eb730e031acaba2d25e8f522ac5966a70885ae ]

The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018)
renamed the A2IR2 and A2IR3 power domains on R-Car V3M to A2DP resp.
A2CN.

As these definitions are not yet used from DT, they can just be renamed.

While at it, fix the indentation of the A3IR definition.

Fixes: 833bdb47c826a1a6 ("dt-bindings: power: add R8A77970 SYSC power domain definitions")
Fixes: bab9b2a74fe9da96 ("soc: renesas: rcar-sysc: add R8A77970 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/renesas/r8a77970-sysc.c       | 4 ++--
 include/dt-bindings/power/r8a77970-sysc.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/soc/renesas/r8a77970-sysc.c b/drivers/soc/renesas/r8a77970-sysc.c
index caf894f193edc..77422baa7a56a 100644
--- a/drivers/soc/renesas/r8a77970-sysc.c
+++ b/drivers/soc/renesas/r8a77970-sysc.c
@@ -27,8 +27,8 @@ static const struct rcar_sysc_area r8a77970_areas[] __initconst = {
 	{ "a3ir",	0x180, 0, R8A77970_PD_A3IR,	R8A77970_PD_ALWAYS_ON },
 	{ "a2ir0",	0x400, 0, R8A77970_PD_A2IR0,	R8A77970_PD_A3IR },
 	{ "a2ir1",	0x400, 1, R8A77970_PD_A2IR1,	R8A77970_PD_A3IR },
-	{ "a2ir2",	0x400, 2, R8A77970_PD_A2IR2,	R8A77970_PD_A3IR },
-	{ "a2ir3",	0x400, 3, R8A77970_PD_A2IR3,	R8A77970_PD_A3IR },
+	{ "a2dp",	0x400, 2, R8A77970_PD_A2DP,	R8A77970_PD_A3IR },
+	{ "a2cn",	0x400, 3, R8A77970_PD_A2CN,	R8A77970_PD_A3IR },
 	{ "a2sc0",	0x400, 4, R8A77970_PD_A2SC0,	R8A77970_PD_A3IR },
 	{ "a2sc1",	0x400, 5, R8A77970_PD_A2SC1,	R8A77970_PD_A3IR },
 };
diff --git a/include/dt-bindings/power/r8a77970-sysc.h b/include/dt-bindings/power/r8a77970-sysc.h
index bf54779d16252..9eaf824b15826 100644
--- a/include/dt-bindings/power/r8a77970-sysc.h
+++ b/include/dt-bindings/power/r8a77970-sysc.h
@@ -19,10 +19,10 @@
 #define R8A77970_PD_CR7			13
 #define R8A77970_PD_CA53_SCU		21
 #define R8A77970_PD_A2IR0		23
-#define R8A77970_PD_A3IR			24
+#define R8A77970_PD_A3IR		24
 #define R8A77970_PD_A2IR1		27
-#define R8A77970_PD_A2IR2		28
-#define R8A77970_PD_A2IR3		29
+#define R8A77970_PD_A2DP		28
+#define R8A77970_PD_A2CN		29
 #define R8A77970_PD_A2SC0		30
 #define R8A77970_PD_A2SC1		31
 
-- 
2.20.1




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

* [PATCH 4.19 149/243] soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (147 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 148/243] soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 150/243] soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy Greg Kroah-Hartman
                   ` (100 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Simon Horman,
	Sasha Levin

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

[ Upstream commit 97473bc85b22ac610b1810b6a9a4669a6cb0b7b0 ]

The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018)
renamed the A2PD0 and A2DP0 power domains on R-Car V3H to A2DP0 resp.
A2DP1.

As these definitions are not yet used from DT, they can just be renamed.

Fixes: 7755b40d07a8dba7 ("dt-bindings: power: add R8A77980 SYSC power domain definitions")
Fixes: 41d6d8bd8ae94ca9 ("soc: renesas: rcar-sysc: add R8A77980 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/renesas/r8a77980-sysc.c       | 4 ++--
 include/dt-bindings/power/r8a77980-sysc.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/renesas/r8a77980-sysc.c b/drivers/soc/renesas/r8a77980-sysc.c
index 9265fb525ef34..dbb2621ce4e3e 100644
--- a/drivers/soc/renesas/r8a77980-sysc.c
+++ b/drivers/soc/renesas/r8a77980-sysc.c
@@ -38,8 +38,8 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = {
 	{ "a2sc2",	0x400, 8, R8A77980_PD_A2SC2,	R8A77980_PD_A3IR },
 	{ "a2sc3",	0x400, 9, R8A77980_PD_A2SC3,	R8A77980_PD_A3IR },
 	{ "a2sc4",	0x400, 10, R8A77980_PD_A2SC4,	R8A77980_PD_A3IR },
-	{ "a2pd0",	0x400, 11, R8A77980_PD_A2PD0,	R8A77980_PD_A3IR },
-	{ "a2pd1",	0x400, 12, R8A77980_PD_A2PD1,	R8A77980_PD_A3IR },
+	{ "a2dp0",	0x400, 11, R8A77980_PD_A2DP0,	R8A77980_PD_A3IR },
+	{ "a2dp1",	0x400, 12, R8A77980_PD_A2DP1,	R8A77980_PD_A3IR },
 	{ "a2cn",	0x400, 13, R8A77980_PD_A2CN,	R8A77980_PD_A3IR },
 	{ "a3vip",	0x2c0, 0, R8A77980_PD_A3VIP,	R8A77980_PD_ALWAYS_ON },
 	{ "a3vip1",	0x300, 0, R8A77980_PD_A3VIP1,	R8A77980_PD_A3VIP },
diff --git a/include/dt-bindings/power/r8a77980-sysc.h b/include/dt-bindings/power/r8a77980-sysc.h
index 2c90c12377253..7bebe7e8dbdbb 100644
--- a/include/dt-bindings/power/r8a77980-sysc.h
+++ b/include/dt-bindings/power/r8a77980-sysc.h
@@ -15,8 +15,8 @@
 #define R8A77980_PD_A2SC2		0
 #define R8A77980_PD_A2SC3		1
 #define R8A77980_PD_A2SC4		2
-#define R8A77980_PD_A2PD0		3
-#define R8A77980_PD_A2PD1		4
+#define R8A77980_PD_A2DP0		3
+#define R8A77980_PD_A2DP1		4
 #define R8A77980_PD_CA53_CPU0		5
 #define R8A77980_PD_CA53_CPU1		6
 #define R8A77980_PD_CA53_CPU2		7
-- 
2.20.1




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

* [PATCH 4.19 150/243] soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (148 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 149/243] soc: renesas: r8a77980-sysc: Correct names of A2DP[01] " Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 151/243] kbuild: disable dtc simple_bus_reg warnings by default Greg Kroah-Hartman
                   ` (99 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Simon Horman,
	Sasha Levin

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

[ Upstream commit 160bfa7c724b348a90a12dd9694f351927a15b8e ]

The R-Car Gen3 HardWare Manual Errata for Rev. 0.80 (Feb 28, 2018)
renamed the A3VIP power domain on R-Car V3H to A3VIP0, and clarified the
power domain hierarchy for the A3VIP[012] power domains.

As the definition for the A3VIP0 domain is not yet used from DT, it can
just be renamed.

Fixes: 7755b40d07a8dba7 ("dt-bindings: power: add R8A77980 SYSC power domain definitions")
Fixes: 41d6d8bd8ae94ca9 ("soc: renesas: rcar-sysc: add R8A77980 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/renesas/r8a77980-sysc.c       | 6 +++---
 include/dt-bindings/power/r8a77980-sysc.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/renesas/r8a77980-sysc.c b/drivers/soc/renesas/r8a77980-sysc.c
index dbb2621ce4e3e..a8dbe55e8ba82 100644
--- a/drivers/soc/renesas/r8a77980-sysc.c
+++ b/drivers/soc/renesas/r8a77980-sysc.c
@@ -41,9 +41,9 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = {
 	{ "a2dp0",	0x400, 11, R8A77980_PD_A2DP0,	R8A77980_PD_A3IR },
 	{ "a2dp1",	0x400, 12, R8A77980_PD_A2DP1,	R8A77980_PD_A3IR },
 	{ "a2cn",	0x400, 13, R8A77980_PD_A2CN,	R8A77980_PD_A3IR },
-	{ "a3vip",	0x2c0, 0, R8A77980_PD_A3VIP,	R8A77980_PD_ALWAYS_ON },
-	{ "a3vip1",	0x300, 0, R8A77980_PD_A3VIP1,	R8A77980_PD_A3VIP },
-	{ "a3vip2",	0x280, 0, R8A77980_PD_A3VIP2,	R8A77980_PD_A3VIP },
+	{ "a3vip0",	0x2c0, 0, R8A77980_PD_A3VIP0,	R8A77980_PD_ALWAYS_ON },
+	{ "a3vip1",	0x300, 0, R8A77980_PD_A3VIP1,	R8A77980_PD_ALWAYS_ON },
+	{ "a3vip2",	0x280, 0, R8A77980_PD_A3VIP2,	R8A77980_PD_ALWAYS_ON },
 };
 
 const struct rcar_sysc_info r8a77980_sysc_info __initconst = {
diff --git a/include/dt-bindings/power/r8a77980-sysc.h b/include/dt-bindings/power/r8a77980-sysc.h
index 7bebe7e8dbdbb..e12c8587b87ec 100644
--- a/include/dt-bindings/power/r8a77980-sysc.h
+++ b/include/dt-bindings/power/r8a77980-sysc.h
@@ -22,7 +22,7 @@
 #define R8A77980_PD_CA53_CPU2		7
 #define R8A77980_PD_CA53_CPU3		8
 #define R8A77980_PD_A2CN		10
-#define R8A77980_PD_A3VIP		11
+#define R8A77980_PD_A3VIP0		11
 #define R8A77980_PD_A2IR5		12
 #define R8A77980_PD_CR7			13
 #define R8A77980_PD_A2IR4		15
-- 
2.20.1




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

* [PATCH 4.19 151/243] kbuild: disable dtc simple_bus_reg warnings by default
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (149 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 150/243] soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 152/243] tcp: make tcp_space() aware of socket backlog Greg Kroah-Hartman
                   ` (98 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Rob Herring, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit 70523a3ce5ff928faa43bb2cad554dc63438e3e7 ]

The updated version of dtc has a bug fix for simple_bus_reg warnings
and lots of warnings are generated now. So disable this warning by
default.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 scripts/Makefile.lib | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 61e596650ed31..a232741e3fd3b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -252,6 +252,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
 	-Wno-alias_paths \
 	-Wno-graph_child_address \
 	-Wno-graph_port \
+	-Wno-simple_bus_reg \
 	-Wno-unique_unit_address \
 	-Wno-pci_device_reg
 endif
-- 
2.20.1




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

* [PATCH 4.19 152/243] tcp: make tcp_space() aware of socket backlog
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (150 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 151/243] kbuild: disable dtc simple_bus_reg warnings by default Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 153/243] ARM: dts: mmp2: fix the gpio interrupt cell number Greg Kroah-Hartman
                   ` (97 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jean-Louis Dupond, Eric Dumazet,
	Neal Cardwell, Yuchung Cheng, David S. Miller, Sasha Levin

From: Eric Dumazet <edumazet@google.com>

[ Upstream commit 85bdf7db5b53cdcc7a901db12bcb3d0063e3866d ]

Jean-Louis Dupond reported poor iscsi TCP receive performance
that we tracked to backlog drops.

Apparently we fail to send window updates reflecting the
fact that we are under stress.

Note that we might lack a proper window increase when
backlog is fully processed, since __release_sock() clears
sk->sk_backlog.len _after_ all skbs have been processed.

This should not matter in practice. If we had a significant
load through socket backlog, we are in a dangerous
situation.

Reported-by: Jean-Louis Dupond <jean-louis@dupond.be>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Tested-by: Jean-Louis Dupond<jean-louis@dupond.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/net/tcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index abcf53a6db045..3f4223a550d92 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1353,7 +1353,7 @@ static inline int tcp_win_from_space(const struct sock *sk, int space)
 /* Note: caller must be prepared to deal with negative returns */
 static inline int tcp_space(const struct sock *sk)
 {
-	return tcp_win_from_space(sk, sk->sk_rcvbuf -
+	return tcp_win_from_space(sk, sk->sk_rcvbuf - sk->sk_backlog.len -
 				  atomic_read(&sk->sk_rmem_alloc));
 }
 
-- 
2.20.1




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

* [PATCH 4.19 153/243] ARM: dts: mmp2: fix the gpio interrupt cell number
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (151 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 152/243] tcp: make tcp_space() aware of socket backlog Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 154/243] ARM: dts: realview-pbx: Fix duplicate regulator nodes Greg Kroah-Hartman
                   ` (96 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lubomir Rintel, Pavel Machek,
	Olof Johansson, Sasha Levin

From: Lubomir Rintel <lkundrak@v3.sk>

[ Upstream commit 400583983f8a8e95ec02c9c9e2b50188753a87fb ]

gpio-pxa uses two cell to encode the interrupt source: the pin number
and the trigger type. Adjust the device node accordingly.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/mmp2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi
index 47e5b63339d18..e95deed6a7973 100644
--- a/arch/arm/boot/dts/mmp2.dtsi
+++ b/arch/arm/boot/dts/mmp2.dtsi
@@ -180,7 +180,7 @@
 				clocks = <&soc_clocks MMP2_CLK_GPIO>;
 				resets = <&soc_clocks MMP2_CLK_GPIO>;
 				interrupt-controller;
-				#interrupt-cells = <1>;
+				#interrupt-cells = <2>;
 				ranges;
 
 				gcb0: gpio@d4019000 {
-- 
2.20.1




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

* [PATCH 4.19 154/243] ARM: dts: realview-pbx: Fix duplicate regulator nodes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (152 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 153/243] ARM: dts: mmp2: fix the gpio interrupt cell number Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 155/243] tcp: fix off-by-one bug on aborting window-probing socket Greg Kroah-Hartman
                   ` (95 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Linus Walleij, Rob Herring,
	Olof Johansson, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit 7f4b001b7f6e0480b5bdab9cd8ce1711e43e5cb5 ]

There's a bug in dtc in checking for duplicate node names when there's
another section (e.g. "/ { };"). In this case, skeleton.dtsi provides
another section. Upon removal of skeleton.dtsi, the dtb fails to build
due to a duplicate node 'fixedregulator@0'. As both nodes were pretty
much the same 3.3V fixed regulator, it hasn't really mattered. Fix this
by renaming the nodes to something unique. In the process, drop the
unit-address which shouldn't be present wtihout reg property.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/arm-realview-pbx.dtsi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index a5676697ff3b7..916a97734f84c 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -44,7 +44,7 @@
 	};
 
 	/* The voltage to the MMC card is hardwired at 3.3V */
-	vmmc: fixedregulator@0 {
+	vmmc: regulator-vmmc {
 		compatible = "regulator-fixed";
 		regulator-name = "vmmc";
 		regulator-min-microvolt = <3300000>;
@@ -52,7 +52,7 @@
 		regulator-boot-on;
         };
 
-	veth: fixedregulator@0 {
+	veth: regulator-veth {
 		compatible = "regulator-fixed";
 		regulator-name = "veth";
 		regulator-min-microvolt = <3300000>;
@@ -567,4 +567,3 @@
 		};
 	};
 };
-
-- 
2.20.1




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

* [PATCH 4.19 155/243] tcp: fix off-by-one bug on aborting window-probing socket
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (153 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 154/243] ARM: dts: realview-pbx: Fix duplicate regulator nodes Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 156/243] tcp: fix SNMP under-estimation on failed retransmission Greg Kroah-Hartman
                   ` (94 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yuchung Cheng, Eric Dumazet,
	Neal Cardwell, David S. Miller, Sasha Levin

From: Yuchung Cheng <ycheng@google.com>

[ Upstream commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 ]

Previously there is an off-by-one bug on determining when to abort
a stalled window-probing socket. This patch fixes that so it is
consistent with tcp_write_timeout().

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv4/tcp_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index c719a41d2eba2..50b15e1c633b4 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -378,7 +378,7 @@ static void tcp_probe_timer(struct sock *sk)
 			return;
 	}
 
-	if (icsk->icsk_probes_out > max_probes) {
+	if (icsk->icsk_probes_out >= max_probes) {
 abort:		tcp_write_err(sk);
 	} else {
 		/* Only send another probe if we didn't close things up. */
-- 
2.20.1




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

* [PATCH 4.19 156/243] tcp: fix SNMP under-estimation on failed retransmission
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (154 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 155/243] tcp: fix off-by-one bug on aborting window-probing socket Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 157/243] tcp: fix SNMP TCP timeout under-estimation Greg Kroah-Hartman
                   ` (93 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yuchung Cheng, Eric Dumazet,
	Neal Cardwell, David S. Miller, Sasha Levin

From: Yuchung Cheng <ycheng@google.com>

[ Upstream commit ec641b39457e17774313b66697a8a1dc070257bd ]

Previously the SNMP counter LINUX_MIB_TCPRETRANSFAIL is not counting
the TSO/GSO properly on failed retransmission. This patch fixes that.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv4/tcp_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 53f910bb55087..8971cc15d278b 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2919,7 +2919,7 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
 		TCP_SKB_CB(skb)->sacked |= TCPCB_EVER_RETRANS;
 		trace_tcp_retransmit_skb(sk, skb);
 	} else if (err != -EBUSY) {
-		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL);
+		NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPRETRANSFAIL, segs);
 	}
 	return err;
 }
-- 
2.20.1




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

* [PATCH 4.19 157/243] tcp: fix SNMP TCP timeout under-estimation
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (155 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 156/243] tcp: fix SNMP under-estimation on failed retransmission Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 158/243] modpost: skip ELF local symbols during section mismatch check Greg Kroah-Hartman
                   ` (92 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yuchung Cheng, Eric Dumazet,
	Neal Cardwell, David S. Miller, Sasha Levin

From: Yuchung Cheng <ycheng@google.com>

[ Upstream commit e1561fe2dd69dc5dddd69bd73aa65355bdfb048b ]

Previously the SNMP TCPTIMEOUTS counter has inconsistent accounting:
1. It counts all SYN and SYN-ACK timeouts
2. It counts timeouts in other states except recurring timeouts and
   timeouts after fast recovery or disorder state.

Such selective accounting makes analysis difficult and complicated. For
example the monitoring system needs to collect many other SNMP counters
to infer the total amount of timeout events. This patch makes TCPTIMEOUTS
counter simply counts all the retransmit timeout (SYN or data or FIN).

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/ipv4/tcp_timer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 50b15e1c633b4..681882a409686 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -482,11 +482,12 @@ void tcp_retransmit_timer(struct sock *sk)
 		goto out_reset_timer;
 	}
 
+	__NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPTIMEOUTS);
 	if (tcp_write_timeout(sk))
 		goto out;
 
 	if (icsk->icsk_retransmits == 0) {
-		int mib_idx;
+		int mib_idx = 0;
 
 		if (icsk->icsk_ca_state == TCP_CA_Recovery) {
 			if (tcp_is_sack(tp))
@@ -501,10 +502,9 @@ void tcp_retransmit_timer(struct sock *sk)
 				mib_idx = LINUX_MIB_TCPSACKFAILURES;
 			else
 				mib_idx = LINUX_MIB_TCPRENOFAILURES;
-		} else {
-			mib_idx = LINUX_MIB_TCPTIMEOUTS;
 		}
-		__NET_INC_STATS(sock_net(sk), mib_idx);
+		if (mib_idx)
+			__NET_INC_STATS(sock_net(sk), mib_idx);
 	}
 
 	tcp_enter_loss(sk);
-- 
2.20.1




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

* [PATCH 4.19 158/243] modpost: skip ELF local symbols during section mismatch check
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (156 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 157/243] tcp: fix SNMP TCP timeout under-estimation Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 159/243] kbuild: fix single target build for external module Greg Kroah-Hartman
                   ` (91 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Walmsley, Paul Walmsley,
	Sam Ravnborg, Masahiro Yamada, Sasha Levin

From: Paul Walmsley <paul.walmsley@sifive.com>

[ Upstream commit a4d26f1a0958bb1c2b60c6f1e67c6f5d43e2647b ]

During development of a serial console driver with a gcc 8.2.0
toolchain for RISC-V, the following modpost warning appeared:

----
WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
The variable .LANCHOR1 references
the function __init sifive_serial_console_setup()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
----

".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
anchor generation code:

https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473

This was verified by compiling the kernel with -fno-section-anchors
and observing that the ".LANCHOR1" ELF local symbol disappeared, and
modpost no longer warned about the section mismatch.  The serial
driver code idiom triggering the warning is standard Linux serial
driver practice that has a specific whitelist inclusion in modpost.c.

I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
useful for modpost to report section mismatch warnings caused by ELF
local symbols by default.  Local symbols have compiler-generated
names, and thus bypass modpost's whitelisting algorithm, which relies
on the presence of a non-autogenerated symbol name.  This increases
the likelihood that false positive warnings will be generated (as in
the above case).

Thus, disable section mismatch reporting on ELF local symbols.  The
rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
ARM binutils leaking ELF local symbols") and of similar code already
present in modpost.c:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256

This third version of the patch implements a suggestion from Masahiro
Yamada <yamada.masahiro@socionext.com> to restructure the code as an
additional pattern matching step inside secref_whitelist(), and
further improves the patch description.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 scripts/mod/modpost.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 858cbe56b1006..91a80036c05d5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1163,6 +1163,14 @@ static const struct sectioncheck *section_mismatch(
  *   fromsec = text section
  *   refsymname = *.constprop.*
  *
+ * Pattern 6:
+ *   Hide section mismatch warnings for ELF local symbols.  The goal
+ *   is to eliminate false positive modpost warnings caused by
+ *   compiler-generated ELF local symbol names such as ".LANCHOR1".
+ *   Autogenerated symbol names bypass modpost's "Pattern 2"
+ *   whitelisting, which relies on pattern-matching against symbol
+ *   names to work.  (One situation where gcc can autogenerate ELF
+ *   local symbols is when "-fsection-anchors" is used.)
  **/
 static int secref_whitelist(const struct sectioncheck *mismatch,
 			    const char *fromsec, const char *fromsym,
@@ -1201,6 +1209,10 @@ static int secref_whitelist(const struct sectioncheck *mismatch,
 	    match(fromsym, optim_symbols))
 		return 0;
 
+	/* Check for pattern 6 */
+	if (strstarts(fromsym, ".L"))
+		return 0;
+
 	return 1;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 159/243] kbuild: fix single target build for external module
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (157 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 158/243] modpost: skip ELF local symbols during section mismatch check Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 160/243] mtd: fix mtd_oobavail() incoherent returned value Greg Kroah-Hartman
                   ` (90 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Masahiro Yamada, Sasha Levin

From: Masahiro Yamada <yamada.masahiro@socionext.com>

[ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ]

Building a single target in an external module fails due to missing
.tmp_versions directory.

For example,

  $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o

will fail in the following way:

  CC [M]  /home/masahiro/foo/foo.o
/bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent

This is because $(cmd_crmodverdir) is executed only before building
/, %/, %.ko single targets of external modules. Create .tmp_versions
in the 'prepare' target.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Makefile | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index f9ebb74e8e43f..471acfc74998b 100644
--- a/Makefile
+++ b/Makefile
@@ -1507,9 +1507,6 @@ else # KBUILD_EXTMOD
 
 # We are always building modules
 KBUILD_MODULES := 1
-PHONY += crmodverdir
-crmodverdir:
-	$(cmd_crmodverdir)
 
 PHONY += $(objtree)/Module.symvers
 $(objtree)/Module.symvers:
@@ -1521,7 +1518,7 @@ $(objtree)/Module.symvers:
 
 module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
 PHONY += $(module-dirs) modules
-$(module-dirs): crmodverdir $(objtree)/Module.symvers
+$(module-dirs): prepare $(objtree)/Module.symvers
 	$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
 
 modules: $(module-dirs)
@@ -1562,7 +1559,8 @@ help:
 
 # Dummies...
 PHONY += prepare scripts
-prepare: ;
+prepare:
+	$(cmd_crmodverdir)
 scripts: ;
 endif # KBUILD_EXTMOD
 
@@ -1689,17 +1687,14 @@ endif
 
 # Modules
 /: prepare scripts FORCE
-	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
 	$(build)=$(build-dir)
 # Make sure the latest headers are built for Documentation
 Documentation/ samples/: headers_install
 %/: prepare scripts FORCE
-	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
 	$(build)=$(build-dir)
 %.ko: prepare scripts FORCE
-	$(cmd_crmodverdir)
 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
 	$(build)=$(build-dir) $(@:.ko=.o)
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-- 
2.20.1




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

* [PATCH 4.19 160/243] mtd: fix mtd_oobavail() incoherent returned value
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (158 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 159/243] kbuild: fix single target build for external module Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 161/243] ARM: dts: pxa: clean up USB controller nodes Greg Kroah-Hartman
                   ` (89 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Miquel Raynal, Boris Brezillon, Sasha Levin

From: Miquel Raynal <miquel.raynal@bootlin.com>

[ Upstream commit 4348433d8c0234f44adb6e12112e69343f50f0c5 ]

mtd_oobavail() returns either mtd->oovabail or mtd->oobsize. Both
values are unsigned 32-bit entities, so there is no reason to pretend
returning a signed one.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/mtd/mtd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index cd0be91bdefa5..035d641e8847c 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -386,7 +386,7 @@ static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd)
 	return dev_of_node(&mtd->dev);
 }
 
-static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
+static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
 {
 	return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize;
 }
-- 
2.20.1




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

* [PATCH 4.19 161/243] ARM: dts: pxa: clean up USB controller nodes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (159 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 160/243] mtd: fix mtd_oobavail() incoherent returned value Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 162/243] clk: meson: meson8b: fix the offset of vid_pll_dcos N value Greg Kroah-Hartman
                   ` (88 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daniel Mack, Sergey Yanovich,
	Robert Jarzmik, Sasha Levin

From: Daniel Mack <daniel@zonque.org>

[ Upstream commit c40ad24254f1dbd54f2df5f5f524130dc1862122 ]

PXA25xx SoCs don't have a USB controller, so drop the node from the
common pxa2xx.dtsi base file. Both pxa27x and pxa3xx have a dedicated
node already anyway.

While at it, unify the names for the nodes across all pxa platforms.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reported-by: Sergey Yanovich <ynvich@gmail.com>
Link: https://patchwork.kernel.org/patch/8375421/
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/pxa27x.dtsi | 2 +-
 arch/arm/boot/dts/pxa2xx.dtsi | 7 -------
 arch/arm/boot/dts/pxa3xx.dtsi | 2 +-
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 3228ad5fb725f..ccbecad9c5c7c 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -35,7 +35,7 @@
 			clocks = <&clks CLK_NONE>;
 		};
 
-		pxa27x_ohci: usb@4c000000 {
+		usb0: usb@4c000000 {
 			compatible = "marvell,pxa-ohci";
 			reg = <0x4c000000 0x10000>;
 			interrupts = <3>;
diff --git a/arch/arm/boot/dts/pxa2xx.dtsi b/arch/arm/boot/dts/pxa2xx.dtsi
index a520b4c14ea9f..0a0e837dc79cb 100644
--- a/arch/arm/boot/dts/pxa2xx.dtsi
+++ b/arch/arm/boot/dts/pxa2xx.dtsi
@@ -117,13 +117,6 @@
 			status = "disabled";
 		};
 
-		usb0: ohci@4c000000 {
-			compatible = "marvell,pxa-ohci";
-			reg = <0x4c000000 0x10000>;
-			interrupts = <3>;
-			status = "disabled";
-		};
-
 		mmc0: mmc@41100000 {
 			compatible = "marvell,pxa-mmc";
 			reg = <0x41100000 0x1000>;
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index 3a8f0edc3af99..53009dbd36158 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -204,7 +204,7 @@
 			status = "disabled";
 		};
 
-		pxa3xx_ohci: usb@4c000000 {
+		usb0: usb@4c000000 {
 			compatible = "marvell,pxa-ohci";
 			reg = <0x4c000000 0x10000>;
 			interrupts = <3>;
-- 
2.20.1




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

* [PATCH 4.19 162/243] clk: meson: meson8b: fix the offset of vid_pll_dcos N value
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (160 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 161/243] ARM: dts: pxa: clean up USB controller nodes Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 163/243] clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent Greg Kroah-Hartman
                   ` (87 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jianxin Pan, Martin Blumenstingl,
	Neil Armstrong, Sasha Levin

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

[ Upstream commit 376d8c45bd6ac79f02ecf9ca1606dc5d1b271bc0 ]

Unlike the other PLLs on Meson8b the N value "vid_pll_dco" (a better
name would be hdmi_pll_dco or - as the datasheet calls it - HPLL) is
located at HHI_VID_PLL_CNTL[14:10] instead of [13:9].
This results in an incorrect calculation of the rate of this PLL because
the value seen by the kernel is double the actual N (divider) value.
Update the offset of the N value to fix the calculation of the PLL rate.

Fixes: 28b9fcd016126e ("clk: meson8b: Add support for Meson8b clocks")
Reported-by: Jianxin Pan <jianxin.pan@amlogic.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lkml.kernel.org/r/20181202214220.7715-2-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/meson/meson8b.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 9d79ff857d83e..e90af556ff90f 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -144,7 +144,7 @@ static struct clk_regmap meson8b_vid_pll = {
 		},
 		.n = {
 			.reg_off = HHI_VID_PLL_CNTL,
-			.shift   = 9,
+			.shift   = 10,
 			.width   = 5,
 		},
 		.od = {
-- 
2.20.1




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

* [PATCH 4.19 163/243] clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (161 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 162/243] clk: meson: meson8b: fix the offset of vid_pll_dcos N value Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 164/243] clk: qcom: Fix MSM8998 resets Greg Kroah-Hartman
                   ` (86 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stephen Boyd, Chen-Yu Tsai, Sasha Levin

From: Chen-Yu Tsai <wens@csie.org>

[ Upstream commit 7bb7d29cffdd24bf419516d14b6768591e74069e ]

The third parent of CSI_MCLK is PLL_PERIPH1, not PLL_PERIPH0.
Fix it.

Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks")
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
index 77ed0b0ba6819..61e3ba12773ea 100644
--- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
@@ -475,7 +475,7 @@ static const char * const csi_sclk_parents[] = { "pll-periph0", "pll-periph1" };
 static SUNXI_CCU_M_WITH_MUX_GATE(csi_sclk_clk, "csi-sclk", csi_sclk_parents,
 				 0x134, 16, 4, 24, 3, BIT(31), 0);
 
-static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph0" };
+static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph1" };
 static SUNXI_CCU_M_WITH_MUX_GATE(csi_mclk_clk, "csi-mclk", csi_mclk_parents,
 				 0x134, 0, 5, 8, 3, BIT(15), 0);
 
-- 
2.20.1




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

* [PATCH 4.19 164/243] clk: qcom: Fix MSM8998 resets
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (162 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 163/243] clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 165/243] media: cxd2880-spi: fix probe when dvb_attach fails Greg Kroah-Hartman
                   ` (85 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jeffrey Hugo, Bjorn Andersson,
	Stephen Boyd, Sasha Levin

From: Jeffrey Hugo <jhugo@codeaurora.org>

[ Upstream commit 4f89f7b59a6ea17e81cff212c18a0b580ff5ff27 ]

The offsets for the defined BCR reset registers does not match the hardware
documentation.  Update the values to match the hardware documentation.

Fixes: b5f5f525c547 (clk: qcom: Add MSM8998 Global Clock Control (GCC) driver)
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/qcom/gcc-msm8998.c | 38 +++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
index cd937ce6aaaf6..5fd6662a1beac 100644
--- a/drivers/clk/qcom/gcc-msm8998.c
+++ b/drivers/clk/qcom/gcc-msm8998.c
@@ -2743,25 +2743,25 @@ static struct gdsc *gcc_msm8998_gdscs[] = {
 };
 
 static const struct qcom_reset_map gcc_msm8998_resets[] = {
-	[GCC_BLSP1_QUP1_BCR] = { 0x102400 },
-	[GCC_BLSP1_QUP2_BCR] = { 0x110592 },
-	[GCC_BLSP1_QUP3_BCR] = { 0x118784 },
-	[GCC_BLSP1_QUP4_BCR] = { 0x126976 },
-	[GCC_BLSP1_QUP5_BCR] = { 0x135168 },
-	[GCC_BLSP1_QUP6_BCR] = { 0x143360 },
-	[GCC_BLSP2_QUP1_BCR] = { 0x155648 },
-	[GCC_BLSP2_QUP2_BCR] = { 0x163840 },
-	[GCC_BLSP2_QUP3_BCR] = { 0x172032 },
-	[GCC_BLSP2_QUP4_BCR] = { 0x180224 },
-	[GCC_BLSP2_QUP5_BCR] = { 0x188416 },
-	[GCC_BLSP2_QUP6_BCR] = { 0x196608 },
-	[GCC_PCIE_0_BCR] = { 0x438272 },
-	[GCC_PDM_BCR] = { 0x208896 },
-	[GCC_SDCC2_BCR] = { 0x81920 },
-	[GCC_SDCC4_BCR] = { 0x90112 },
-	[GCC_TSIF_BCR] = { 0x221184 },
-	[GCC_UFS_BCR] = { 0x479232 },
-	[GCC_USB_30_BCR] = { 0x61440 },
+	[GCC_BLSP1_QUP1_BCR] = { 0x19000 },
+	[GCC_BLSP1_QUP2_BCR] = { 0x1b000 },
+	[GCC_BLSP1_QUP3_BCR] = { 0x1d000 },
+	[GCC_BLSP1_QUP4_BCR] = { 0x1f000 },
+	[GCC_BLSP1_QUP5_BCR] = { 0x21000 },
+	[GCC_BLSP1_QUP6_BCR] = { 0x23000 },
+	[GCC_BLSP2_QUP1_BCR] = { 0x26000 },
+	[GCC_BLSP2_QUP2_BCR] = { 0x28000 },
+	[GCC_BLSP2_QUP3_BCR] = { 0x2a000 },
+	[GCC_BLSP2_QUP4_BCR] = { 0x2c000 },
+	[GCC_BLSP2_QUP5_BCR] = { 0x2e000 },
+	[GCC_BLSP2_QUP6_BCR] = { 0x30000 },
+	[GCC_PCIE_0_BCR] = { 0x6b000 },
+	[GCC_PDM_BCR] = { 0x33000 },
+	[GCC_SDCC2_BCR] = { 0x14000 },
+	[GCC_SDCC4_BCR] = { 0x16000 },
+	[GCC_TSIF_BCR] = { 0x36000 },
+	[GCC_UFS_BCR] = { 0x75000 },
+	[GCC_USB_30_BCR] = { 0xf000 },
 };
 
 static const struct regmap_config gcc_msm8998_regmap_config = {
-- 
2.20.1




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

* [PATCH 4.19 165/243] media: cxd2880-spi: fix probe when dvb_attach fails
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (163 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 164/243] clk: qcom: Fix MSM8998 resets Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 166/243] ARM: dts: realview: Fix some more duplicate regulator nodes Greg Kroah-Hartman
                   ` (84 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Neil Armstrong, Yasunari Takiguchi,
	Sean Young, Mauro Carvalho Chehab, Sasha Levin

From: Neil Armstrong <narmstrong@baylibre.com>

[ Upstream commit 458ffce1cb46e46e3cec48b625ed142250475708 ]

When dvb_attach fails, probe returns 0, and remove crashes afterwards.
This patch sets the return value to -ENODEV when attach fails.

Fixes: bd24fcddf6b8 ("media: cxd2880-spi: Add support for CXD2880 SPI interface")

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Yasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/spi/cxd2880-spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/spi/cxd2880-spi.c b/drivers/media/spi/cxd2880-spi.c
index 11ce5101e19f6..c43730977f53c 100644
--- a/drivers/media/spi/cxd2880-spi.c
+++ b/drivers/media/spi/cxd2880-spi.c
@@ -536,6 +536,7 @@ cxd2880_spi_probe(struct spi_device *spi)
 
 	if (!dvb_attach(cxd2880_attach, &dvb_spi->dvb_fe, &config)) {
 		pr_err("cxd2880_attach failed\n");
+		ret = -ENODEV;
 		goto fail_attach;
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 166/243] ARM: dts: realview: Fix some more duplicate regulator nodes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (164 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 165/243] media: cxd2880-spi: fix probe when dvb_attach fails Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 167/243] dlm: fix invalid cluster name warning Greg Kroah-Hartman
                   ` (83 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Herring, Linus Walleij,
	Olof Johansson, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit f3b2f758ec1e6cdb13c925647cbd8ad4938b78fb ]

There's a bug in dtc in checking for duplicate node names when there's
another section (e.g. "/ { };"). In this case, skeleton.dtsi provides
another section. Upon removal of skeleton.dtsi, the dtb fails to build
due to a duplicate node 'fixedregulator@0'. As both nodes were pretty
much the same 3.3V fixed regulator, it hasn't really mattered. Fix this
by renaming the nodes to something unique. In the process, drop the
unit-address which shouldn't be present wtihout reg property.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/arm-realview-pb1176.dts | 4 ++--
 arch/arm/boot/dts/arm-realview-pb11mp.dts | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts
index f2a1d25eb6cf3..83e0fbc4a1a10 100644
--- a/arch/arm/boot/dts/arm-realview-pb1176.dts
+++ b/arch/arm/boot/dts/arm-realview-pb1176.dts
@@ -45,7 +45,7 @@
 	};
 
 	/* The voltage to the MMC card is hardwired at 3.3V */
-	vmmc: fixedregulator@0 {
+	vmmc: regulator-vmmc {
 		compatible = "regulator-fixed";
 		regulator-name = "vmmc";
 		regulator-min-microvolt = <3300000>;
@@ -53,7 +53,7 @@
 		regulator-boot-on;
         };
 
-	veth: fixedregulator@0 {
+	veth: regulator-veth {
 		compatible = "regulator-fixed";
 		regulator-name = "veth";
 		regulator-min-microvolt = <3300000>;
diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
index 7f9cbdf33a510..2f6aa24a0b67c 100644
--- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
+++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
@@ -145,7 +145,7 @@
 	};
 
 	/* The voltage to the MMC card is hardwired at 3.3V */
-	vmmc: fixedregulator@0 {
+	vmmc: regulator-vmmc {
 		compatible = "regulator-fixed";
 		regulator-name = "vmmc";
 		regulator-min-microvolt = <3300000>;
@@ -153,7 +153,7 @@
 		regulator-boot-on;
         };
 
-	veth: fixedregulator@0 {
+	veth: regulator-veth {
 		compatible = "regulator-fixed";
 		regulator-name = "veth";
 		regulator-min-microvolt = <3300000>;
-- 
2.20.1




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

* [PATCH 4.19 167/243] dlm: fix invalid cluster name warning
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (165 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 166/243] ARM: dts: realview: Fix some more duplicate regulator nodes Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 168/243] net/mlx4_core: Fix return codes of unsupported operations Greg Kroah-Hartman
                   ` (82 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Teigland, Sasha Levin

From: David Teigland <teigland@redhat.com>

[ Upstream commit 3595c559326d0b660bb088a88e22e0ca630a0e35 ]

The warning added in commit 3b0e761ba83
  "dlm: print log message when cluster name is not set"

did not account for the fact that lockspaces created
from userland do not supply a cluster name, so bogus
warnings are printed every time a userland lockspace
is created.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/dlm/user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 13f29409600bb..3c84c62dadb7b 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -25,6 +25,7 @@
 #include "lvb_table.h"
 #include "user.h"
 #include "ast.h"
+#include "config.h"
 
 static const char name_prefix[] = "dlm";
 static const struct file_operations device_fops;
@@ -404,7 +405,7 @@ static int device_create_lockspace(struct dlm_lspace_params *params)
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	error = dlm_new_lockspace(params->name, NULL, params->flags,
+	error = dlm_new_lockspace(params->name, dlm_config.ci_cluster_name, params->flags,
 				  DLM_USER_LVB_LEN, NULL, NULL, NULL,
 				  &lockspace);
 	if (error)
-- 
2.20.1




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

* [PATCH 4.19 168/243] net/mlx4_core: Fix return codes of unsupported operations
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (166 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 167/243] dlm: fix invalid cluster name warning Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 169/243] pstore/ram: Avoid NULL deref in ftrace merging failure path Greg Kroah-Hartman
                   ` (81 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Erez Alfasi, Tariq Toukan,
	David S. Miller, Sasha Levin

From: Erez Alfasi <ereza@mellanox.com>

[ Upstream commit 95aac2cdafd8c8298c9b2589c52f44db0d824e0e ]

Functions __set_port_type and mlx4_check_port_params returned
-EINVAL while the proper return code is -EOPNOTSUPP as a
result of an unsupported operation. All drivers should generate
this and all users should check for it when detecting an
unsupported functionality.

Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mellanox/mlx4/main.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 6a046030e8734..4afe56a6eedfb 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -313,7 +313,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
 		for (i = 0; i < dev->caps.num_ports - 1; i++) {
 			if (port_type[i] != port_type[i + 1]) {
 				mlx4_err(dev, "Only same port types supported on this HCA, aborting\n");
-				return -EINVAL;
+				return -EOPNOTSUPP;
 			}
 		}
 	}
@@ -322,7 +322,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
 		if (!(port_type[i] & dev->caps.supported_type[i+1])) {
 			mlx4_err(dev, "Requested port type for port %d is not supported on this HCA\n",
 				 i + 1);
-			return -EINVAL;
+			return -EOPNOTSUPP;
 		}
 	}
 	return 0;
@@ -1188,8 +1188,7 @@ static int __set_port_type(struct mlx4_port_info *info,
 		mlx4_err(mdev,
 			 "Requested port type for port %d is not supported on this HCA\n",
 			 info->port);
-		err = -EINVAL;
-		goto err_sup;
+		return -EOPNOTSUPP;
 	}
 
 	mlx4_stop_sense(mdev);
@@ -1211,7 +1210,7 @@ static int __set_port_type(struct mlx4_port_info *info,
 		for (i = 1; i <= mdev->caps.num_ports; i++) {
 			if (mdev->caps.possible_type[i] == MLX4_PORT_TYPE_AUTO) {
 				mdev->caps.possible_type[i] = mdev->caps.port_type[i];
-				err = -EINVAL;
+				err = -EOPNOTSUPP;
 			}
 		}
 	}
@@ -1237,7 +1236,7 @@ static int __set_port_type(struct mlx4_port_info *info,
 out:
 	mlx4_start_sense(mdev);
 	mutex_unlock(&priv->port_mutex);
-err_sup:
+
 	return err;
 }
 
-- 
2.20.1




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

* [PATCH 4.19 169/243] pstore/ram: Avoid NULL deref in ftrace merging failure path
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (167 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 168/243] net/mlx4_core: Fix return codes of unsupported operations Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 170/243] powerpc/math-emu: Update macros from GCC Greg Kroah-Hartman
                   ` (80 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter,
	Joel Fernandes (Google),
	Kees Cook, Sasha Levin

From: Kees Cook <keescook@chromium.org>

[ Upstream commit 8665569e97dd52920713b95675409648986b5b0d ]

Given corruption in the ftrace records, it might be possible to allocate
tmp_prz without assigning prz to it, but still marking it as needing to
be freed, which would cause at least a NULL dereference.

smatch warnings:
fs/pstore/ram.c:340 ramoops_pstore_read() error: we previously assumed 'prz' could be null (see line 255)

https://lists.01.org/pipermail/kbuild-all/2018-December/055528.html

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 2fbea82bbb89 ("pstore: Merge per-CPU ftrace records into one")
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/pstore/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 015d74ee31a03..631ae057ab537 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -301,6 +301,7 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record)
 					  GFP_KERNEL);
 			if (!tmp_prz)
 				return -ENOMEM;
+			prz = tmp_prz;
 			free_prz = true;
 
 			while (cxt->ftrace_read_cnt < cxt->max_ftrace_cnt) {
@@ -323,7 +324,6 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record)
 					goto out;
 			}
 			record->id = 0;
-			prz = tmp_prz;
 		}
 	}
 
-- 
2.20.1




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

* [PATCH 4.19 170/243] powerpc/math-emu: Update macros from GCC
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (168 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 169/243] pstore/ram: Avoid NULL deref in ftrace merging failure path Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 171/243] clk: renesas: r8a77990: Correct parent clock of DU Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Joel Stanley, Nick Desaulniers,
	Segher Boessenkool, Michael Ellerman, Sasha Levin

From: Joel Stanley <joel@jms.id.au>

[ Upstream commit b682c8692442711684befe413cf93cf01c5324ea ]

The add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros originate
from GCC's longlong.h which in turn was copied from GMP's longlong.h a
few decades ago.

This was found when compiling with clang:

   arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
   inline asm context requiring an l-value: remove the cast or build with
   -fheinous-gnu-extensions
           FP_ADD_D(R, T, B);
           ^~~~~~~~~~~~~~~~~
   ...

   ./arch/powerpc/include/asm/sfp-machine.h:283:27: note: expanded from
   macro 'sub_ddmmss'
                  : "=r" ((USItype)(sh)),                                  \
                          ~~~~~~~~~~^~~

Segher points out: this was fixed in GCC over 16 years ago
( https://gcc.gnu.org/r56600 ), and in GMP (where it comes from)
presumably before that.

Update the add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros to
the latest GCC version in order to git rid of the invalid casts. These
were taken as-is from GCC's longlong in order to make future syncs
obvious. Other parts of sfp-machine.h were left as-is as the file
contains more features than present in longlong.h.

Link: https://github.com/ClangBuiltLinux/linux/issues/260
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/powerpc/include/asm/sfp-machine.h | 92 ++++++++------------------
 1 file changed, 29 insertions(+), 63 deletions(-)

diff --git a/arch/powerpc/include/asm/sfp-machine.h b/arch/powerpc/include/asm/sfp-machine.h
index d89beaba26ff9..8b957aabb826d 100644
--- a/arch/powerpc/include/asm/sfp-machine.h
+++ b/arch/powerpc/include/asm/sfp-machine.h
@@ -213,30 +213,18 @@
  * respectively.  The result is placed in HIGH_SUM and LOW_SUM.  Overflow
  * (i.e. carry out) is not stored anywhere, and is lost.
  */
-#define add_ssaaaa(sh, sl, ah, al, bh, bl)				\
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   do {									\
     if (__builtin_constant_p (bh) && (bh) == 0)				\
-      __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2"		\
-	     : "=r" ((USItype)(sh)),					\
-	       "=&r" ((USItype)(sl))					\
-	     : "%r" ((USItype)(ah)),					\
-	       "%r" ((USItype)(al)),					\
-	       "rI" ((USItype)(bl)));					\
-    else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0)		\
-      __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2"		\
-	     : "=r" ((USItype)(sh)),					\
-	       "=&r" ((USItype)(sl))					\
-	     : "%r" ((USItype)(ah)),					\
-	       "%r" ((USItype)(al)),					\
-	       "rI" ((USItype)(bl)));					\
+      __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2"		\
+	     : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+    else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0)		\
+      __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2"		\
+	     : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
     else								\
-      __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3"		\
-	     : "=r" ((USItype)(sh)),					\
-	       "=&r" ((USItype)(sl))					\
-	     : "%r" ((USItype)(ah)),					\
-	       "r" ((USItype)(bh)),					\
-	       "%r" ((USItype)(al)),					\
-	       "rI" ((USItype)(bl)));					\
+      __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3"		\
+	     : "=r" (sh), "=&r" (sl)					\
+	     : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl));		\
   } while (0)
 
 /* sub_ddmmss is used in op-2.h and udivmodti4.c and should be equivalent to
@@ -248,44 +236,24 @@
  * and LOW_DIFFERENCE.  Overflow (i.e. carry out) is not stored anywhere,
  * and is lost.
  */
-#define sub_ddmmss(sh, sl, ah, al, bh, bl)				\
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
   do {									\
     if (__builtin_constant_p (ah) && (ah) == 0)				\
-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2"	\
-	       : "=r" ((USItype)(sh)),					\
-		 "=&r" ((USItype)(sl))					\
-	       : "r" ((USItype)(bh)),					\
-		 "rI" ((USItype)(al)),					\
-		 "r" ((USItype)(bl)));					\
-    else if (__builtin_constant_p (ah) && (ah) ==~(USItype) 0)		\
-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2"	\
-	       : "=r" ((USItype)(sh)),					\
-		 "=&r" ((USItype)(sl))					\
-	       : "r" ((USItype)(bh)),					\
-		 "rI" ((USItype)(al)),					\
-		 "r" ((USItype)(bl)));					\
+      __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2"	\
+	       : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+    else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0)		\
+      __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2"	\
+	       : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
     else if (__builtin_constant_p (bh) && (bh) == 0)			\
-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2"		\
-	       : "=r" ((USItype)(sh)),					\
-		 "=&r" ((USItype)(sl))					\
-	       : "r" ((USItype)(ah)),					\
-		 "rI" ((USItype)(al)),					\
-		 "r" ((USItype)(bl)));					\
-    else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0)		\
-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2"		\
-	       : "=r" ((USItype)(sh)),					\
-		 "=&r" ((USItype)(sl))					\
-	       : "r" ((USItype)(ah)),					\
-		 "rI" ((USItype)(al)),					\
-		 "r" ((USItype)(bl)));					\
+      __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2"		\
+	       : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+    else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0)		\
+      __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2"		\
+	       : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
     else								\
-      __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2"	\
-	       : "=r" ((USItype)(sh)),					\
-		 "=&r" ((USItype)(sl))					\
-	       : "r" ((USItype)(ah)),					\
-		 "r" ((USItype)(bh)),					\
-		 "rI" ((USItype)(al)),					\
-		 "r" ((USItype)(bl)));					\
+      __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2"	\
+	       : "=r" (sh), "=&r" (sl)					\
+	       : "r" (ah), "r" (bh), "rI" (al), "r" (bl));		\
   } while (0)
 
 /* asm fragments for mul and div */
@@ -294,13 +262,10 @@
  * UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype
  * word product in HIGH_PROD and LOW_PROD.
  */
-#define umul_ppmm(ph, pl, m0, m1)					\
+#define umul_ppmm(ph, pl, m0, m1) \
   do {									\
     USItype __m0 = (m0), __m1 = (m1);					\
-    __asm__ ("mulhwu %0,%1,%2"						\
-	     : "=r" ((USItype)(ph))					\
-	     : "%r" (__m0),						\
-               "r" (__m1));						\
+    __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1));	\
     (pl) = __m0 * __m1;							\
   } while (0)
 
@@ -312,9 +277,10 @@
  * significant bit of DENOMINATOR must be 1, then the pre-processor symbol
  * UDIV_NEEDS_NORMALIZATION is defined to 1.
  */
-#define udiv_qrnnd(q, r, n1, n0, d)					\
+#define udiv_qrnnd(q, r, n1, n0, d) \
   do {									\
-    UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m;			\
+    UWtype __d1, __d0, __q1, __q0;					\
+    UWtype __r1, __r0, __m;						\
     __d1 = __ll_highpart (d);						\
     __d0 = __ll_lowpart (d);						\
 									\
@@ -325,7 +291,7 @@
     if (__r1 < __m)							\
       {									\
 	__q1--, __r1 += (d);						\
-	if (__r1 >= (d)) /* we didn't get carry when adding to __r1 */	\
+	if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
 	  if (__r1 < __m)						\
 	    __q1--, __r1 += (d);					\
       }									\
-- 
2.20.1




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

* [PATCH 4.19 171/243] clk: renesas: r8a77990: Correct parent clock of DU
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (169 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 170/243] powerpc/math-emu: Update macros from GCC Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 172/243] clk: renesas: r8a77995: " Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Takeshi Kihara, Geert Uytterhoeven,
	Stephen Boyd, Laurent Pinchart, Sasha Levin

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

[ Upstream commit 7cf3a216a2b3a672cad3e498c186c9333bdff90a ]

According to the R-Car Gen3 Hardware Manual Rev 1.00, the parent clock
of the DU module clocks on R-Car E3 is S1D1.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Fixes: 3570a2af473789c5 ("clk: renesas: cpg-mssr: Add support for R-Car E3")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/renesas/r8a77990-cpg-mssr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/r8a77990-cpg-mssr.c b/drivers/clk/renesas/r8a77990-cpg-mssr.c
index 9e14f1486fbb9..81569767025cc 100644
--- a/drivers/clk/renesas/r8a77990-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77990-cpg-mssr.c
@@ -175,8 +175,8 @@ static const struct mssr_mod_clk r8a77990_mod_clks[] __initconst = {
 	DEF_MOD("ehci0",		 703,	R8A77990_CLK_S3D4),
 	DEF_MOD("hsusb",		 704,	R8A77990_CLK_S3D4),
 	DEF_MOD("csi40",		 716,	R8A77990_CLK_CSI0),
-	DEF_MOD("du1",			 723,	R8A77990_CLK_S2D1),
-	DEF_MOD("du0",			 724,	R8A77990_CLK_S2D1),
+	DEF_MOD("du1",			 723,	R8A77990_CLK_S1D1),
+	DEF_MOD("du0",			 724,	R8A77990_CLK_S1D1),
 	DEF_MOD("lvds",			 727,	R8A77990_CLK_S2D1),
 
 	DEF_MOD("vin5",			 806,	R8A77990_CLK_S1D2),
-- 
2.20.1




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

* [PATCH 4.19 172/243] clk: renesas: r8a77995: Correct parent clock of DU
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (170 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 171/243] clk: renesas: r8a77990: Correct parent clock of DU Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 173/243] MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Stephen Boyd,
	Laurent Pinchart, Sasha Levin

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

[ Upstream commit 515b2915ee08060ad4f6a3b3de38c5c2c5258e8b ]

According to the R-Car Gen3 Hardware Manual Rev 1.00, the parent clock
of the DU module clocks on R-Car D3 is S1D1.

Fixes: d71e851d82c6cfe5 ("clk: renesas: cpg-mssr: Add R8A77995 support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/renesas/r8a77995-cpg-mssr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
index ea4cafbe6e851..9e16931e6f28a 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -141,8 +141,8 @@ static const struct mssr_mod_clk r8a77995_mod_clks[] __initconst = {
 	DEF_MOD("vspbs",		 627,	R8A77995_CLK_S0D1),
 	DEF_MOD("ehci0",		 703,	R8A77995_CLK_S3D2),
 	DEF_MOD("hsusb",		 704,	R8A77995_CLK_S3D2),
-	DEF_MOD("du1",			 723,	R8A77995_CLK_S2D1),
-	DEF_MOD("du0",			 724,	R8A77995_CLK_S2D1),
+	DEF_MOD("du1",			 723,	R8A77995_CLK_S1D1),
+	DEF_MOD("du0",			 724,	R8A77995_CLK_S1D1),
 	DEF_MOD("lvds",			 727,	R8A77995_CLK_S2D1),
 	DEF_MOD("vin7",			 804,	R8A77995_CLK_S1D2),
 	DEF_MOD("vin6",			 805,	R8A77995_CLK_S1D2),
-- 
2.20.1




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

* [PATCH 4.19 173/243] MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (171 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 172/243] clk: renesas: r8a77995: " Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 174/243] nfsd: Return EPERM, not EACCES, in some SETATTR cases Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aaro Koskinen, Paul Burton,
	Ralf Baechle, James Hogan, linux-mips, Sasha Levin

From: Aaro Koskinen <aaro.koskinen@iki.fi>

[ Upstream commit 1c6121c39677175bd372076020948e184bad4b6b ]

cn58xx is compatible with cn50xx, so use the latter.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
[paul.burton@mips.com: s/cn52xx/cn50xx/ in commit message.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 2 +-
 arch/mips/include/asm/octeon/cvmx-pko.h            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
index 8241fc6aa17d8..3839feba68f20 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
@@ -266,7 +266,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id)
 		} else {
 			union cvmx_pko_mem_debug8 debug8;
 			debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
-			return debug8.cn58xx.doorbell;
+			return debug8.cn50xx.doorbell;
 		}
 	case CVMX_CMD_QUEUE_ZIP:
 	case CVMX_CMD_QUEUE_DFA:
diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h
index 5f47f76ed510a..20eb9c46a75ab 100644
--- a/arch/mips/include/asm/octeon/cvmx-pko.h
+++ b/arch/mips/include/asm/octeon/cvmx-pko.h
@@ -611,7 +611,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
 		pko_reg_read_idx.s.index = cvmx_pko_get_base_queue(port_num);
 		cvmx_write_csr(CVMX_PKO_REG_READ_IDX, pko_reg_read_idx.u64);
 		debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
-		status->doorbell = debug8.cn58xx.doorbell;
+		status->doorbell = debug8.cn50xx.doorbell;
 	}
 }
 
-- 
2.20.1




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

* [PATCH 4.19 174/243] nfsd: Return EPERM, not EACCES, in some SETATTR cases
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (172 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 173/243] MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 175/243] media: uvcvideo: Abstract streaming object lifetime Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, zhengbin, J. Bruce Fields, Sasha Levin

From: zhengbin <zhengbin13@huawei.com>

[ Upstream commit 255fbca65137e25b12bced18ec9a014dc77ecda0 ]

As the man(2) page for utime/utimes states, EPERM is returned when the
second parameter of utime or utimes is not NULL, the caller's effective UID
does not match the owner of the file, and the caller is not privileged.

However, in a NFS directory mounted from knfsd, it will return EACCES
(from nfsd_setattr-> fh_verify->nfsd_permission).  This patch fixes
that.

Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfsd/vfs.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index b53e76391e525..4fe8db3149506 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -396,10 +396,23 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
 	bool		get_write_count;
 	bool		size_change = (iap->ia_valid & ATTR_SIZE);
 
-	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE))
+	if (iap->ia_valid & ATTR_SIZE) {
 		accmode |= NFSD_MAY_WRITE|NFSD_MAY_OWNER_OVERRIDE;
-	if (iap->ia_valid & ATTR_SIZE)
 		ftype = S_IFREG;
+	}
+
+	/*
+	 * If utimes(2) and friends are called with times not NULL, we should
+	 * not set NFSD_MAY_WRITE bit. Otherwise fh_verify->nfsd_permission
+	 * will return EACCESS, when the caller's effective UID does not match
+	 * the owner of the file, and the caller is not privileged. In this
+	 * situation, we should return EPERM(notify_change will return this).
+	 */
+	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME)) {
+		accmode |= NFSD_MAY_OWNER_OVERRIDE;
+		if (!(iap->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET)))
+			accmode |= NFSD_MAY_WRITE;
+	}
 
 	/* Callers that do fh_verify should do the fh_want_write: */
 	get_write_count = !fhp->fh_dentry;
-- 
2.20.1




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

* [PATCH 4.19 175/243] media: uvcvideo: Abstract streaming object lifetime
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (173 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 174/243] nfsd: Return EPERM, not EACCES, in some SETATTR cases Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 176/243] tty: serial: qcom_geni_serial: Fix softlock Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kieran Bingham, Laurent Pinchart,
	Mauro Carvalho Chehab, Sasha Levin

From: Kieran Bingham <kieran.bingham@ideasonboard.com>

[ Upstream commit ece41454c6a5ed8f301ef1c37710ab222e577823 ]

The streaming object is a key part of handling the UVC device. Although
not critical, we are currently missing a call to destroy the mutex on
clean up paths, and we are due to extend the objects complexity in the
near future.

Facilitate easy management of a stream object by creating a pair of
functions to handle creating and destroying the allocation. The new
uvc_stream_delete() function also performs the missing mutex_destroy()
operation.

Previously a failed streaming object allocation would cause
uvc_parse_streaming() to return -EINVAL, which is inappropriate. If the
constructor failes, we will instead return -ENOMEM.

While we're here, fix the trivial spelling error in the function banner
of uvc_delete().

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/usb/uvc/uvc_driver.c | 54 +++++++++++++++++++++---------
 1 file changed, 38 insertions(+), 16 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index cf4feff2a48c1..063e229ead5ef 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -390,6 +390,39 @@ static struct uvc_streaming *uvc_stream_by_id(struct uvc_device *dev, int id)
 	return NULL;
 }
 
+/* ------------------------------------------------------------------------
+ * Streaming Object Management
+ */
+
+static void uvc_stream_delete(struct uvc_streaming *stream)
+{
+	mutex_destroy(&stream->mutex);
+
+	usb_put_intf(stream->intf);
+
+	kfree(stream->format);
+	kfree(stream->header.bmaControls);
+	kfree(stream);
+}
+
+static struct uvc_streaming *uvc_stream_new(struct uvc_device *dev,
+					    struct usb_interface *intf)
+{
+	struct uvc_streaming *stream;
+
+	stream = kzalloc(sizeof(*stream), GFP_KERNEL);
+	if (stream == NULL)
+		return NULL;
+
+	mutex_init(&stream->mutex);
+
+	stream->dev = dev;
+	stream->intf = usb_get_intf(intf);
+	stream->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
+
+	return stream;
+}
+
 /* ------------------------------------------------------------------------
  * Descriptors parsing
  */
@@ -682,17 +715,12 @@ static int uvc_parse_streaming(struct uvc_device *dev,
 		return -EINVAL;
 	}
 
-	streaming = kzalloc(sizeof(*streaming), GFP_KERNEL);
+	streaming = uvc_stream_new(dev, intf);
 	if (streaming == NULL) {
 		usb_driver_release_interface(&uvc_driver.driver, intf);
-		return -EINVAL;
+		return -ENOMEM;
 	}
 
-	mutex_init(&streaming->mutex);
-	streaming->dev = dev;
-	streaming->intf = usb_get_intf(intf);
-	streaming->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
-
 	/* The Pico iMage webcam has its class-specific interface descriptors
 	 * after the endpoint descriptors.
 	 */
@@ -899,10 +927,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
 
 error:
 	usb_driver_release_interface(&uvc_driver.driver, intf);
-	usb_put_intf(intf);
-	kfree(streaming->format);
-	kfree(streaming->header.bmaControls);
-	kfree(streaming);
+	uvc_stream_delete(streaming);
 	return ret;
 }
 
@@ -1818,7 +1843,7 @@ static int uvc_scan_device(struct uvc_device *dev)
  * is released.
  *
  * As this function is called after or during disconnect(), all URBs have
- * already been canceled by the USB core. There is no need to kill the
+ * already been cancelled by the USB core. There is no need to kill the
  * interrupt URB manually.
  */
 static void uvc_delete(struct kref *kref)
@@ -1856,10 +1881,7 @@ static void uvc_delete(struct kref *kref)
 		streaming = list_entry(p, struct uvc_streaming, list);
 		usb_driver_release_interface(&uvc_driver.driver,
 			streaming->intf);
-		usb_put_intf(streaming->intf);
-		kfree(streaming->format);
-		kfree(streaming->header.bmaControls);
-		kfree(streaming);
+		uvc_stream_delete(streaming);
 	}
 
 	kfree(dev);
-- 
2.20.1




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

* [PATCH 4.19 176/243] tty: serial: qcom_geni_serial: Fix softlock
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (174 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 175/243] media: uvcvideo: Abstract streaming object lifetime Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 177/243] ARM: dts: sun8i: h3: Fix the system-control register range Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ryan Case, Stephen Boyd,
	Douglas Anderson, Sasha Levin

From: Ryan Case <ryandcase@chromium.org>

[ Upstream commit a1fee899e5bed457afc20a6a2ff3915a95cc5942 ]

Transfers were being divided into device FIFO sized (64 byte max)
operations which would poll for completion within a spin_lock_irqsave /
spin_unlock_irqrestore block. This both made things slow by waiting for
the FIFO to completely drain before adding further data and would also
result in softlocks on large transmissions.

This patch allows larger transfers with continuous FIFO additions as
space becomes available and removes polling from the interrupt handler.

Signed-off-by: Ryan Case <ryandcase@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/tty/serial/qcom_geni_serial.c | 56 +++++++++++++++++++--------
 1 file changed, 39 insertions(+), 17 deletions(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 69b980bb8ac29..b3f7d1a1e97f8 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -113,6 +113,8 @@ struct qcom_geni_serial_port {
 	u32 *rx_fifo;
 	u32 loopback;
 	bool brk;
+
+	unsigned int tx_remaining;
 };
 
 static const struct uart_ops qcom_geni_console_pops;
@@ -435,6 +437,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 	struct qcom_geni_serial_port *port;
 	bool locked = true;
 	unsigned long flags;
+	u32 geni_status;
 
 	WARN_ON(co->index < 0 || co->index >= GENI_UART_CONS_PORTS);
 
@@ -448,6 +451,8 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 	else
 		spin_lock_irqsave(&uport->lock, flags);
 
+	geni_status = readl_relaxed(uport->membase + SE_GENI_STATUS);
+
 	/* Cancel the current write to log the fault */
 	if (!locked) {
 		geni_se_cancel_m_cmd(&port->se);
@@ -461,9 +466,19 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 		}
 		writel_relaxed(M_CMD_CANCEL_EN, uport->membase +
 							SE_GENI_M_IRQ_CLEAR);
+	} else if ((geni_status & M_GENI_CMD_ACTIVE) && !port->tx_remaining) {
+		/*
+		 * It seems we can't interrupt existing transfers if all data
+		 * has been sent, in which case we need to look for done first.
+		 */
+		qcom_geni_serial_poll_tx_done(uport);
 	}
 
 	__qcom_geni_serial_console_write(uport, s, count);
+
+	if (port->tx_remaining)
+		qcom_geni_serial_setup_tx(uport, port->tx_remaining);
+
 	if (locked)
 		spin_unlock_irqrestore(&uport->lock, flags);
 }
@@ -694,40 +709,45 @@ static void qcom_geni_serial_handle_rx(struct uart_port *uport, bool drop)
 	port->handle_rx(uport, total_bytes, drop);
 }
 
-static void qcom_geni_serial_handle_tx(struct uart_port *uport)
+static void qcom_geni_serial_handle_tx(struct uart_port *uport, bool done,
+		bool active)
 {
 	struct qcom_geni_serial_port *port = to_dev_port(uport, uport);
 	struct circ_buf *xmit = &uport->state->xmit;
 	size_t avail;
 	size_t remaining;
+	size_t pending;
 	int i;
 	u32 status;
 	unsigned int chunk;
 	int tail;
-	u32 irq_en;
 
-	chunk = uart_circ_chars_pending(xmit);
 	status = readl_relaxed(uport->membase + SE_GENI_TX_FIFO_STATUS);
-	/* Both FIFO and framework buffer are drained */
-	if (!chunk && !status) {
+
+	/* Complete the current tx command before taking newly added data */
+	if (active)
+		pending = port->tx_remaining;
+	else
+		pending = uart_circ_chars_pending(xmit);
+
+	/* All data has been transmitted and acknowledged as received */
+	if (!pending && !status && done) {
 		qcom_geni_serial_stop_tx(uport);
 		goto out_write_wakeup;
 	}
 
-	if (!uart_console(uport)) {
-		irq_en = readl_relaxed(uport->membase + SE_GENI_M_IRQ_EN);
-		irq_en &= ~(M_TX_FIFO_WATERMARK_EN);
-		writel_relaxed(0, uport->membase + SE_GENI_TX_WATERMARK_REG);
-		writel_relaxed(irq_en, uport->membase + SE_GENI_M_IRQ_EN);
-	}
+	avail = port->tx_fifo_depth - (status & TX_FIFO_WC);
+	avail *= port->tx_bytes_pw;
 
-	avail = (port->tx_fifo_depth - port->tx_wm) * port->tx_bytes_pw;
 	tail = xmit->tail;
-	chunk = min3((size_t)chunk, (size_t)(UART_XMIT_SIZE - tail), avail);
+	chunk = min3(avail, pending, (size_t)(UART_XMIT_SIZE - tail));
 	if (!chunk)
 		goto out_write_wakeup;
 
-	qcom_geni_serial_setup_tx(uport, chunk);
+	if (!port->tx_remaining) {
+		qcom_geni_serial_setup_tx(uport, pending);
+		port->tx_remaining = pending;
+	}
 
 	remaining = chunk;
 	for (i = 0; i < chunk; ) {
@@ -746,11 +766,10 @@ static void qcom_geni_serial_handle_tx(struct uart_port *uport)
 		tail += tx_bytes;
 		uport->icount.tx += tx_bytes;
 		remaining -= tx_bytes;
+		port->tx_remaining -= tx_bytes;
 	}
 
 	xmit->tail = tail & (UART_XMIT_SIZE - 1);
-	if (uart_console(uport))
-		qcom_geni_serial_poll_tx_done(uport);
 out_write_wakeup:
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(uport);
@@ -760,6 +779,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 {
 	unsigned int m_irq_status;
 	unsigned int s_irq_status;
+	unsigned int geni_status;
 	struct uart_port *uport = dev;
 	unsigned long flags;
 	unsigned int m_irq_en;
@@ -773,6 +793,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 	spin_lock_irqsave(&uport->lock, flags);
 	m_irq_status = readl_relaxed(uport->membase + SE_GENI_M_IRQ_STATUS);
 	s_irq_status = readl_relaxed(uport->membase + SE_GENI_S_IRQ_STATUS);
+	geni_status = readl_relaxed(uport->membase + SE_GENI_STATUS);
 	m_irq_en = readl_relaxed(uport->membase + SE_GENI_M_IRQ_EN);
 	writel_relaxed(m_irq_status, uport->membase + SE_GENI_M_IRQ_CLEAR);
 	writel_relaxed(s_irq_status, uport->membase + SE_GENI_S_IRQ_CLEAR);
@@ -787,7 +808,8 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 
 	if (m_irq_status & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN) &&
 	    m_irq_en & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN))
-		qcom_geni_serial_handle_tx(uport);
+		qcom_geni_serial_handle_tx(uport, m_irq_status & M_CMD_DONE_EN,
+					geni_status & M_GENI_CMD_ACTIVE);
 
 	if (s_irq_status & S_GP_IRQ_0_EN || s_irq_status & S_GP_IRQ_1_EN) {
 		if (s_irq_status & S_GP_IRQ_0_EN)
-- 
2.20.1




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

* [PATCH 4.19 177/243] ARM: dts: sun8i: h3: Fix the system-control register range
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (175 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 176/243] tty: serial: qcom_geni_serial: Fix softlock Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 178/243] tty: Dont block on IO when ldisc change is pending Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Kocialkowski, Chen-Yu Tsai,
	Maxime Ripard, Sasha Levin

From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

[ Upstream commit 925c5afd78c40169c7e0e6adec52d5119ff43751 ]

Unlike in previous generations, the system-control register range is not
limited to a size of 0x30 on the H3. In particular, the EMAC clock
configuration register (accessed through syscon) is at offset 0x30 in
that range.

Extend the register size to its full range (0x1000) as a result.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun8i-h3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 97de6ad133dc2..9233ba30a857c 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -122,7 +122,7 @@
 	soc {
 		system-control@1c00000 {
 			compatible = "allwinner,sun8i-h3-system-control";
-			reg = <0x01c00000 0x30>;
+			reg = <0x01c00000 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
-- 
2.20.1




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

* [PATCH 4.19 178/243] tty: Dont block on IO when ldisc change is pending
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (176 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 177/243] ARM: dts: sun8i: h3: Fix the system-control register range Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 179/243] media: stkwebcam: Bugfix for wrong return values Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jiri Slaby, Mikulas Patocka,
	Dmitry Safonov, Sasha Levin

From: Dmitry Safonov <dima@arista.com>

[ Upstream commit c96cf923a98d1b094df9f0cf97a83e118817e31b ]

There might be situations where tty_ldisc_lock() has blocked, but there
is already IO on tty and it prevents line discipline changes.
It might theoretically turn into dead-lock.

Basically, provide more priority to pending tty_ldisc_lock() than to
servicing reads/writes over tty.

User-visible issue was reported by Mikulas where on pa-risc with
Debian 5 reboot took either 80 seconds, 3 minutes or 3:25 after proper
locking in tty_reopen().

Cc: Jiri Slaby <jslaby@suse.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/tty/n_hdlc.c    | 4 ++--
 drivers/tty/n_r3964.c   | 2 +-
 drivers/tty/n_tty.c     | 8 ++++----
 drivers/tty/tty_ldisc.c | 7 +++++++
 include/linux/tty.h     | 7 +++++++
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index c943716c019e4..0636e10c76c7f 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -613,7 +613,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 		}
 			
 		/* no data */
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			ret = -EAGAIN;
 			break;
 		}
@@ -680,7 +680,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 		if (tbuf)
 			break;
 
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			error = -EAGAIN;
 			break;
 		}
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c
index dbf1ab36758eb..a3969b773cbe4 100644
--- a/drivers/tty/n_r3964.c
+++ b/drivers/tty/n_r3964.c
@@ -1078,7 +1078,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
 		pMsg = remove_msg(pInfo, pClient);
 		if (pMsg == NULL) {
 			/* no messages available. */
-			if (file->f_flags & O_NONBLOCK) {
+			if (tty_io_nonblock(tty, file)) {
 				ret = -EAGAIN;
 				goto unlock;
 			}
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 3ad460219fd62..5dc9686697cfa 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1702,7 +1702,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
 
 	down_read(&tty->termios_rwsem);
 
-	while (1) {
+	do {
 		/*
 		 * When PARMRK is set, each input char may take up to 3 chars
 		 * in the read buf; reduce the buffer space avail by 3x
@@ -1744,7 +1744,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
 			fp += n;
 		count -= n;
 		rcvd += n;
-	}
+	} while (!test_bit(TTY_LDISC_CHANGING, &tty->flags));
 
 	tty->receive_room = room;
 
@@ -2211,7 +2211,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 					break;
 				if (!timeout)
 					break;
-				if (file->f_flags & O_NONBLOCK) {
+				if (tty_io_nonblock(tty, file)) {
 					retval = -EAGAIN;
 					break;
 				}
@@ -2365,7 +2365,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 		}
 		if (!nr)
 			break;
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			retval = -EAGAIN;
 			break;
 		}
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 53bb6d4e9e8d9..245c9a51c2de2 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -336,6 +336,11 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
 {
 	int ret;
 
+	/* Kindly asking blocked readers to release the read side */
+	set_bit(TTY_LDISC_CHANGING, &tty->flags);
+	wake_up_interruptible_all(&tty->read_wait);
+	wake_up_interruptible_all(&tty->write_wait);
+
 	ret = __tty_ldisc_lock(tty, timeout);
 	if (!ret)
 		return -EBUSY;
@@ -346,6 +351,8 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
 void tty_ldisc_unlock(struct tty_struct *tty)
 {
 	clear_bit(TTY_LDISC_HALTED, &tty->flags);
+	/* Can be cleared here - ldisc_unlock will wake up writers firstly */
+	clear_bit(TTY_LDISC_CHANGING, &tty->flags);
 	__tty_ldisc_unlock(tty);
 }
 
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 808fbfe86f858..76db046f09ab6 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -366,6 +366,7 @@ struct tty_file_private {
 #define TTY_NO_WRITE_SPLIT 	17	/* Preserve write boundaries to driver */
 #define TTY_HUPPED 		18	/* Post driver->hangup() */
 #define TTY_HUPPING		19	/* Hangup in progress */
+#define TTY_LDISC_CHANGING	20	/* Change pending - non-block IO */
 #define TTY_LDISC_HALTED	22	/* Line discipline is halted */
 
 /* Values for tty->flow_change */
@@ -383,6 +384,12 @@ static inline void tty_set_flow_change(struct tty_struct *tty, int val)
 	smp_mb();
 }
 
+static inline bool tty_io_nonblock(struct tty_struct *tty, struct file *file)
+{
+	return file->f_flags & O_NONBLOCK ||
+		test_bit(TTY_LDISC_CHANGING, &tty->flags);
+}
+
 static inline bool tty_io_error(struct tty_struct *tty)
 {
 	return test_bit(TTY_IO_ERROR, &tty->flags);
-- 
2.20.1




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

* [PATCH 4.19 179/243] media: stkwebcam: Bugfix for wrong return values
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (177 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 178/243] tty: Dont block on IO when ldisc change is pending Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 180/243] firmware: qcom: scm: fix compilation error when disabled Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andreas Pape, Kieran Bingham,
	Mauro Carvalho Chehab, Sasha Levin

From: Andreas Pape <ap@ca-pape.de>

[ Upstream commit 3c28b91380dd1183347d32d87d820818031ebecf ]

usb_control_msg returns in case of a successfully sent message the number
of sent bytes as a positive number. Don't use this value as a return value
for stk_camera_read_reg, as a non-zero return value is used as an error
condition in some cases when stk_camera_read_reg is called.

Signed-off-by: Andreas Pape <ap@ca-pape.de>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/usb/stkwebcam/stk-webcam.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index 6e3f234e790b8..e33fa78ef98dd 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -164,7 +164,11 @@ int stk_camera_read_reg(struct stk_camera *dev, u16 index, u8 *value)
 		*value = *buf;
 
 	kfree(buf);
-	return ret;
+
+	if (ret < 0)
+		return ret;
+	else
+		return 0;
 }
 
 static int stk_start_stream(struct stk_camera *dev)
-- 
2.20.1




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

* [PATCH 4.19 180/243] firmware: qcom: scm: fix compilation error when disabled
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (178 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 179/243] media: stkwebcam: Bugfix for wrong return values Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 181/243] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jonathan Marek, Bjorn Andersson,
	Andy Gross, Sasha Levin

From: Jonathan Marek <jonathan@marek.ca>

[ Upstream commit 16ad9501b1f2edebe24f8cf3c09da0695871986b ]

This fixes the case when CONFIG_QCOM_SCM is not enabled, and linux/errno.h
has not been included previously.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/qcom_scm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h
index 5d65521260b3d..116b81ac442ad 100644
--- a/include/linux/qcom_scm.h
+++ b/include/linux/qcom_scm.h
@@ -65,6 +65,9 @@ extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare);
 extern int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val);
 extern int qcom_scm_io_writel(phys_addr_t addr, unsigned int val);
 #else
+
+#include <linux/errno.h>
+
 static inline
 int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
 {
-- 
2.20.1




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

* [PATCH 4.19 181/243] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (179 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 180/243] firmware: qcom: scm: fix compilation error when disabled Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 182/243] sctp: frag_point sanity check Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bjorn Andersson, Stephen Boyd, Sasha Levin

From: Bjorn Andersson <bjorn.andersson@linaro.org>

[ Upstream commit 2abf856202fd3e4883e4c518acaa9a023b0dbe54 ]

Drop the halt check of the UFS symbol clocks, in accordance with other
platforms. This makes clk_disable_unused() happy and makes it possible
to turn the clocks on again without an error.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/qcom/gcc-msm8998.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
index 5fd6662a1beac..4e23973b6cd16 100644
--- a/drivers/clk/qcom/gcc-msm8998.c
+++ b/drivers/clk/qcom/gcc-msm8998.c
@@ -2402,7 +2402,7 @@ static struct clk_branch gcc_ufs_phy_aux_clk = {
 
 static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
 	.halt_reg = 0x75014,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x75014,
 		.enable_mask = BIT(0),
@@ -2415,7 +2415,7 @@ static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
 
 static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
 	.halt_reg = 0x7605c,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x7605c,
 		.enable_mask = BIT(0),
@@ -2428,7 +2428,7 @@ static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
 
 static struct clk_branch gcc_ufs_tx_symbol_0_clk = {
 	.halt_reg = 0x75010,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x75010,
 		.enable_mask = BIT(0),
-- 
2.20.1




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

* [PATCH 4.19 182/243] sctp: frag_point sanity check
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (180 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 181/243] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 183/243] soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jakub Audykowicz, Neil Horman,
	Marcelo Ricardo Leitner, David S. Miller, Sasha Levin

From: Jakub Audykowicz <jakub.audykowicz@gmail.com>

[ Upstream commit afd0a8006e98b1890908f81746c94ca5dae29d7c ]

If for some reason an association's fragmentation point is zero,
sctp_datamsg_from_user will try to endlessly try to divide a message
into zero-sized chunks. This eventually causes kernel panic due to
running out of memory.

Although this situation is quite unlikely, it has occurred before as
reported. I propose to add this simple last-ditch sanity check due to
the severity of the potential consequences.

Signed-off-by: Jakub Audykowicz <jakub.audykowicz@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/net/sctp/sctp.h | 5 +++++
 net/sctp/chunk.c        | 6 ++++++
 net/sctp/socket.c       | 3 +--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index ab9242e51d9e0..2abbc15824af9 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -620,4 +620,9 @@ static inline bool sctp_transport_pmtu_check(struct sctp_transport *t)
 	return false;
 }
 
+static inline __u32 sctp_min_frag_point(struct sctp_sock *sp, __u16 datasize)
+{
+	return sctp_mtu_payload(sp, SCTP_DEFAULT_MINSEGMENT, datasize);
+}
+
 #endif /* __net_sctp_h__ */
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index ce8087846f059..d2048de86e7c2 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -191,6 +191,12 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
 	 * the packet
 	 */
 	max_data = asoc->frag_point;
+	if (unlikely(!max_data)) {
+		max_data = sctp_min_frag_point(sctp_sk(asoc->base.sk),
+					       sctp_datachk_len(&asoc->stream));
+		pr_warn_ratelimited("%s: asoc:%p frag_point is zero, forcing max_data to default minimum (%Zu)",
+				    __func__, asoc, max_data);
+	}
 
 	/* If the the peer requested that we authenticate DATA chunks
 	 * we need to account for bundling of the AUTH chunks along with
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e7a11cd7633f5..95f9068b85497 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3328,8 +3328,7 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
 		__u16 datasize = asoc ? sctp_datachk_len(&asoc->stream) :
 				 sizeof(struct sctp_data_chunk);
 
-		min_len = sctp_mtu_payload(sp, SCTP_DEFAULT_MINSEGMENT,
-					   datasize);
+		min_len = sctp_min_frag_point(sp, datasize);
 		max_len = SCTP_MAX_CHUNK_LEN - datasize;
 
 		if (val < min_len || val > max_len)
-- 
2.20.1




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

* [PATCH 4.19 183/243] soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B}
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (181 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 182/243] sctp: frag_point sanity check Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 184/243] mlxsw: spectrum_router: Relax GRE decap matching check Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven, Simon Horman,
	Sasha Levin

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

[ Upstream commit b0d7fbf8b174168c580bb310964c3c809e5569a9 ]

The workaround for the wrong hierarchy of the 3DG-{A,B} power
domains on R-Car E3 ES1.0 corrected the parent domains.
However, the 3DG-{A,B} power domains were still initialized and powered
in the wrong order, causing 3DG operation to fail.

Fix this by changing the order in the table at runtime, when running on
an affected SoC.

Fixes: 086b399965a7ee7e ("soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B}")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/renesas/r8a77990-sysc.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/soc/renesas/r8a77990-sysc.c b/drivers/soc/renesas/r8a77990-sysc.c
index 15579ebc5ed20..664b244eb1dd9 100644
--- a/drivers/soc/renesas/r8a77990-sysc.c
+++ b/drivers/soc/renesas/r8a77990-sysc.c
@@ -28,19 +28,6 @@ static struct rcar_sysc_area r8a77990_areas[] __initdata = {
 	{ "3dg-b",	0x100, 1, R8A77990_PD_3DG_B,	R8A77990_PD_3DG_A },
 };
 
-static void __init rcar_sysc_fix_parent(struct rcar_sysc_area *areas,
-					unsigned int num_areas, u8 id,
-					int new_parent)
-{
-	unsigned int i;
-
-	for (i = 0; i < num_areas; i++)
-		if (areas[i].isr_bit == id) {
-			areas[i].parent = new_parent;
-			return;
-		}
-}
-
 /* Fixups for R-Car E3 ES1.0 revision */
 static const struct soc_device_attribute r8a77990[] __initconst = {
 	{ .soc_id = "r8a77990", .revision = "ES1.0" },
@@ -50,12 +37,10 @@ static const struct soc_device_attribute r8a77990[] __initconst = {
 static int __init r8a77990_sysc_init(void)
 {
 	if (soc_device_match(r8a77990)) {
-		rcar_sysc_fix_parent(r8a77990_areas,
-				     ARRAY_SIZE(r8a77990_areas),
-				     R8A77990_PD_3DG_A, R8A77990_PD_3DG_B);
-		rcar_sysc_fix_parent(r8a77990_areas,
-				     ARRAY_SIZE(r8a77990_areas),
-				     R8A77990_PD_3DG_B, R8A77990_PD_ALWAYS_ON);
+		/* Fix incorrect 3DG hierarchy */
+		swap(r8a77990_areas[7], r8a77990_areas[8]);
+		r8a77990_areas[7].parent = R8A77990_PD_ALWAYS_ON;
+		r8a77990_areas[8].parent = R8A77990_PD_3DG_B;
 	}
 
 	return 0;
-- 
2.20.1




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

* [PATCH 4.19 184/243] mlxsw: spectrum_router: Relax GRE decap matching check
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (182 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 183/243] soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nir Dotan, Ido Schimmel,
	David S. Miller, Sasha Levin

From: Nir Dotan <nird@mellanox.com>

[ Upstream commit da93d2913fdf43d5cde3c5a53ac9cc29684d5c7c ]

GRE decap offload is configured when local routes prefix correspond to the
local address of one of the offloaded GRE tunnels. The matching check was
found to be too strict, such that for a flat GRE configuration, in which
the overlay and underlay traffic share the same non-default VRF, decap flow
was not offloaded.

Relax the check for decap flow offloading. A match occurs if the local
address of the tunnel matches the local route address while both share the
same VRF table.

Fixes: 4607f6d26950 ("mlxsw: spectrum_router: Support IPv4 underlay decap")
Signed-off-by: Nir Dotan <nird@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 3f54b3ca38bad..44b6c2ac5961d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -1215,15 +1215,12 @@ mlxsw_sp_ipip_entry_matches_decap(struct mlxsw_sp *mlxsw_sp,
 {
 	u32 ul_tb_id = l3mdev_fib_table(ul_dev) ? : RT_TABLE_MAIN;
 	enum mlxsw_sp_ipip_type ipipt = ipip_entry->ipipt;
-	struct net_device *ipip_ul_dev;
 
 	if (mlxsw_sp->router->ipip_ops_arr[ipipt]->ul_proto != ul_proto)
 		return false;
 
-	ipip_ul_dev = __mlxsw_sp_ipip_netdev_ul_dev_get(ipip_entry->ol_dev);
 	return mlxsw_sp_ipip_entry_saddr_matches(mlxsw_sp, ul_proto, ul_dip,
-						 ul_tb_id, ipip_entry) &&
-	       (!ipip_ul_dev || ipip_ul_dev == ul_dev);
+						 ul_tb_id, ipip_entry);
 }
 
 /* Given decap parameters, find the corresponding IPIP entry. */
-- 
2.20.1




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

* [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (183 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 184/243] mlxsw: spectrum_router: Relax GRE decap matching check Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-12 13:31   ` Pavel Machek
  2019-12-11 15:05 ` [PATCH 4.19 186/243] IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

From: Chen-Yu Tsai <wens@csie.org>

[ Upstream commit f6f4422532ad9ec9380a9936ed16b30922066a50 ]

The RTC module on the A23 was claimed to be the same as on the A31, when
in fact it is not. The A31 does not have an RTC external clock output,
and its internal RC oscillator's average clock rate is not in the same
range. The A33's RTC is the same as the A23.

This patch fixes the compatible string and clock properties to conform
to the updated bindings. The register range is also fixed.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index c16ffcc4db7da..5616333c0e0e3 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -565,11 +565,11 @@
 		};
 
 		rtc: rtc@1f00000 {
-			compatible = "allwinner,sun6i-a31-rtc";
-			reg = <0x01f00000 0x54>;
+			compatible = "allwinner,sun8i-a23-rtc";
+			reg = <0x01f00000 0x400>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-			clock-output-names = "osc32k";
+			clock-output-names = "osc32k", "osc32k-out";
 			clocks = <&ext_osc32k>;
 			#clock-cells = <1>;
 		};
-- 
2.20.1




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

* [PATCH 4.19 186/243] IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (184 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 187/243] IB/hfi1: Close VNIC sdma_progress sleep window Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mike Marciniszyn, Krzysztof Goreczny,
	Kaike Wan, Dennis Dalessandro, Jason Gunthorpe, Sasha Levin

From: Kaike Wan <kaike.wan@intel.com>

[ Upstream commit c1a797c0818e0122c7ec8422edd971cfec9b15ea ]

When it is requested to change its physical state back to Offline while in
the process to go up, DC8051 will set the ERROR field in the
DC8051_DBG_ERR_INFO_SET_BY_8051 register. This ERROR field will remain
until the next time when DC8051 transitions from Offline to Polling.
Subsequently, when the host requests DC8051 to change its physical state
to Polling again, it may receive a DC8051 interrupt with the stale ERROR
field still in DC8051_DBG_ERR_INFO_SET_BY_8051. If the host link state has
been changed to Polling, this stale ERROR will force the host to
transition to Offline state, resulting in a vicious cycle of Polling
->Offline->Polling->Offline. On the other hand, if the host link state is
still Offline when the stale ERROR is received, the stale ERROR will be
ignored, and the link will come up correctly.  This patch implements the
correct behavior by changing host link state to Polling only after DC8051
changes its physical state to Polling.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Krzysztof Goreczny <krzysztof.goreczny@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/hfi1/chip.c | 47 ++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 6aa5a8a242ffd..6b89353611333 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -1074,6 +1074,8 @@ static void log_state_transition(struct hfi1_pportdata *ppd, u32 state);
 static void log_physical_state(struct hfi1_pportdata *ppd, u32 state);
 static int wait_physical_linkstate(struct hfi1_pportdata *ppd, u32 state,
 				   int msecs);
+static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd,
+					 int msecs);
 static void read_planned_down_reason_code(struct hfi1_devdata *dd, u8 *pdrrc);
 static void read_link_down_reason(struct hfi1_devdata *dd, u8 *ldr);
 static void handle_temp_err(struct hfi1_devdata *dd);
@@ -10769,13 +10771,15 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
 			break;
 
 		ppd->port_error_action = 0;
-		ppd->host_link_state = HLS_DN_POLL;
 
 		if (quick_linkup) {
 			/* quick linkup does not go into polling */
 			ret = do_quick_linkup(dd);
 		} else {
 			ret1 = set_physical_link_state(dd, PLS_POLLING);
+			if (!ret1)
+				ret1 = wait_phys_link_out_of_offline(ppd,
+								     3000);
 			if (ret1 != HCMD_SUCCESS) {
 				dd_dev_err(dd,
 					   "Failed to transition to Polling link state, return 0x%x\n",
@@ -10783,6 +10787,14 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
 				ret = -EINVAL;
 			}
 		}
+
+		/*
+		 * Change the host link state after requesting DC8051 to
+		 * change its physical state so that we can ignore any
+		 * interrupt with stale LNI(XX) error, which will not be
+		 * cleared until DC8051 transitions to Polling state.
+		 */
+		ppd->host_link_state = HLS_DN_POLL;
 		ppd->offline_disabled_reason =
 			HFI1_ODR_MASK(OPA_LINKDOWN_REASON_NONE);
 		/*
@@ -12914,6 +12926,39 @@ static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd,
 	return read_state;
 }
 
+/*
+ * wait_phys_link_out_of_offline - wait for any out of offline state
+ * @ppd: port device
+ * @msecs: the number of milliseconds to wait
+ *
+ * Wait up to msecs milliseconds for any out of offline physical link
+ * state change to occur.
+ * Returns 0 if at least one state is reached, otherwise -ETIMEDOUT.
+ */
+static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd,
+					 int msecs)
+{
+	u32 read_state;
+	unsigned long timeout;
+
+	timeout = jiffies + msecs_to_jiffies(msecs);
+	while (1) {
+		read_state = read_physical_state(ppd->dd);
+		if ((read_state & 0xF0) != PLS_OFFLINE)
+			break;
+		if (time_after(jiffies, timeout)) {
+			dd_dev_err(ppd->dd,
+				   "timeout waiting for phy link out of offline. Read state 0x%x, %dms\n",
+				   read_state, msecs);
+			return -ETIMEDOUT;
+		}
+		usleep_range(1950, 2050); /* sleep 2ms-ish */
+	}
+
+	log_state_transition(ppd, read_state);
+	return read_state;
+}
+
 #define CLEAR_STATIC_RATE_CONTROL_SMASK(r) \
 (r &= ~SEND_CTXT_CHECK_ENABLE_DISALLOW_PBC_STATIC_RATE_CONTROL_SMASK)
 
-- 
2.20.1




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

* [PATCH 4.19 187/243] IB/hfi1: Close VNIC sdma_progress sleep window
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (185 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 186/243] IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 188/243] mlx4: Use snprintf instead of complicated strcpy Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Gary Leshner, Mike Marciniszyn,
	Dennis Dalessandro, Jason Gunthorpe, Sasha Levin

From: Mike Marciniszyn <mike.marciniszyn@intel.com>

[ Upstream commit 18912c4524385dd6532c682cb9d4f6aa39ba8d47 ]

The call to sdma_progress() is called outside the wait lock.

In this case, there is a race condition where sdma_progress() can return
false and the sdma_engine can idle.  If that happens, there will be no
more sdma interrupts to cause the wakeup and the vnic_sdma xmit will hang.

Fix by moving the lock to enclose the sdma_progress() call.

Also, delete the tx_retry. The need for this was removed by:
commit bcad29137a97 ("IB/hfi1: Serve the most starved iowait entry first")

Fixes: 64551ede6cd1 ("IB/hfi1: VNIC SDMA support")
Reviewed-by: Gary Leshner <Gary.S.Leshner@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/hfi1/vnic_sdma.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/vnic_sdma.c b/drivers/infiniband/hw/hfi1/vnic_sdma.c
index c3c96c5869ed4..718dcdef946ee 100644
--- a/drivers/infiniband/hw/hfi1/vnic_sdma.c
+++ b/drivers/infiniband/hw/hfi1/vnic_sdma.c
@@ -57,7 +57,6 @@
 
 #define HFI1_VNIC_TXREQ_NAME_LEN   32
 #define HFI1_VNIC_SDMA_DESC_WTRMRK 64
-#define HFI1_VNIC_SDMA_RETRY_COUNT 1
 
 /*
  * struct vnic_txreq - VNIC transmit descriptor
@@ -67,7 +66,6 @@
  * @pad: pad buffer
  * @plen: pad length
  * @pbc_val: pbc value
- * @retry_count: tx retry count
  */
 struct vnic_txreq {
 	struct sdma_txreq       txreq;
@@ -77,8 +75,6 @@ struct vnic_txreq {
 	unsigned char           pad[HFI1_VNIC_MAX_PAD];
 	u16                     plen;
 	__le64                  pbc_val;
-
-	u32                     retry_count;
 };
 
 static void vnic_sdma_complete(struct sdma_txreq *txreq,
@@ -196,7 +192,6 @@ int hfi1_vnic_send_dma(struct hfi1_devdata *dd, u8 q_idx,
 	ret = build_vnic_tx_desc(sde, tx, pbc);
 	if (unlikely(ret))
 		goto free_desc;
-	tx->retry_count = 0;
 
 	ret = sdma_send_txreq(sde, &vnic_sdma->wait, &tx->txreq,
 			      vnic_sdma->pkts_sent);
@@ -238,14 +233,14 @@ static int hfi1_vnic_sdma_sleep(struct sdma_engine *sde,
 	struct hfi1_vnic_sdma *vnic_sdma =
 		container_of(wait, struct hfi1_vnic_sdma, wait);
 	struct hfi1_ibdev *dev = &vnic_sdma->dd->verbs_dev;
-	struct vnic_txreq *tx = container_of(txreq, struct vnic_txreq, txreq);
 
-	if (sdma_progress(sde, seq, txreq))
-		if (tx->retry_count++ < HFI1_VNIC_SDMA_RETRY_COUNT)
-			return -EAGAIN;
+	write_seqlock(&dev->iowait_lock);
+	if (sdma_progress(sde, seq, txreq)) {
+		write_sequnlock(&dev->iowait_lock);
+		return -EAGAIN;
+	}
 
 	vnic_sdma->state = HFI1_VNIC_SDMA_Q_DEFERRED;
-	write_seqlock(&dev->iowait_lock);
 	if (list_empty(&vnic_sdma->wait.list))
 		iowait_queue(pkts_sent, wait, &sde->dmawait);
 	write_sequnlock(&dev->iowait_lock);
-- 
2.20.1




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

* [PATCH 4.19 188/243] mlx4: Use snprintf instead of complicated strcpy
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (186 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 187/243] IB/hfi1: Close VNIC sdma_progress sleep window Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 189/243] usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Qian Cai, Leon Romanovsky,
	Jason Gunthorpe, Sasha Levin

From: Qian Cai <cai@gmx.us>

[ Upstream commit 0fbc9b8b4ea3f688a5da141a64f97aa33ad02ae9 ]

This fixes a compilation warning in sysfs.c

drivers/infiniband/hw/mlx4/sysfs.c:360:2: warning: 'strncpy' output may be
truncated copying 8 bytes from a string of length 31
[-Wstringop-truncation]

By eliminating the temporary stack buffer.

Signed-off-by: Qian Cai <cai@gmx.us>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/infiniband/hw/mlx4/sysfs.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/sysfs.c b/drivers/infiniband/hw/mlx4/sysfs.c
index e219093d27645..d2da28d613f2c 100644
--- a/drivers/infiniband/hw/mlx4/sysfs.c
+++ b/drivers/infiniband/hw/mlx4/sysfs.c
@@ -353,16 +353,12 @@ err:
 
 static void get_name(struct mlx4_ib_dev *dev, char *name, int i, int max)
 {
-	char base_name[9];
-
-	/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n */
-	strlcpy(name, pci_name(dev->dev->persist->pdev), max);
-	strncpy(base_name, name, 8); /*till xxxx:yy:*/
-	base_name[8] = '\0';
-	/* with no ARI only 3 last bits are used so when the fn is higher than 8
+	/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n
+	 * with no ARI only 3 last bits are used so when the fn is higher than 8
 	 * need to add it to the dev num, so count in the last number will be
 	 * modulo 8 */
-	sprintf(name, "%s%.2d.%d", base_name, (i/8), (i%8));
+	snprintf(name, max, "%.8s%.2d.%d", pci_name(dev->dev->persist->pdev),
+		 i / 8, i % 8);
 }
 
 struct mlx4_port {
-- 
2.20.1




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

* [PATCH 4.19 189/243] usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (187 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 188/243] mlx4: Use snprintf instead of complicated strcpy Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 190/243] clk: renesas: rcar-gen3: Set state when registering SD clocks Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chunfeng Yun, YueHaibing,
	Felipe Balbi, Sasha Levin

From: YueHaibing <yuehaibing@huawei.com>

[ Upstream commit f770e3bc236ee954a3b4052bdf55739e26ee25db ]

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/mtu3/mtu3_qmu.c: In function 'qmu_tx_zlp_error_handler':
drivers/usb/mtu3/mtu3_qmu.c:385:22: warning:
 variable 'req' set but not used [-Wunused-but-set-variable]

It seems dbginfo original intention is print 'req' other than 'mreq'

Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/mtu3/mtu3_qmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
index ff62ba2321779..326b40747128c 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -427,7 +427,7 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
 		return;
 	}
 
-	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, mreq);
+	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, req);
 
 	mtu3_clrbits(mbase, MU3D_EP_TXCR0(mep->epnum), TX_DMAREQEN);
 
-- 
2.20.1




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

* [PATCH 4.19 190/243] clk: renesas: rcar-gen3: Set state when registering SD clocks
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (188 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 189/243] usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 191/243] ASoC: max9867: Fix power management Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Niklas Söderlund, Wolfram Sang,
	Geert Uytterhoeven, Sasha Levin

From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

[ Upstream commit ecda0a09fa9933bcd67e33c952f778f0872392ed ]

The driver tries to figure out which state a SD clock is in when the
clock is registered, instead of setting a known state. This can be
problematic for two reasons.

1. If the clock driver can't figure out the state of the clock,
   registration of the clock fails, and setting of a known state by a
   clock user is not possible.

2. The state of the clock depends on if and how the bootloader
   configured it. The driver only checks that the rate is known, not if
   the clock is stopped or not for example.

Fix this by setting a known state and making sure the clock is stopped.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/renesas/rcar-gen3-cpg.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 628b63b85d3f0..9ace7d39cd1b5 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -361,7 +361,7 @@ static struct clk * __init cpg_sd_clk_register(const struct cpg_core_clk *core,
 	struct sd_clock *clock;
 	struct clk *clk;
 	unsigned int i;
-	u32 sd_fc;
+	u32 val;
 
 	clock = kzalloc(sizeof(*clock), GFP_KERNEL);
 	if (!clock)
@@ -378,17 +378,9 @@ static struct clk * __init cpg_sd_clk_register(const struct cpg_core_clk *core,
 	clock->div_table = cpg_sd_div_table;
 	clock->div_num = ARRAY_SIZE(cpg_sd_div_table);
 
-	sd_fc = readl(clock->csn.reg) & CPG_SD_FC_MASK;
-	for (i = 0; i < clock->div_num; i++)
-		if (sd_fc == (clock->div_table[i].val & CPG_SD_FC_MASK))
-			break;
-
-	if (WARN_ON(i >= clock->div_num)) {
-		kfree(clock);
-		return ERR_PTR(-EINVAL);
-	}
-
-	clock->cur_div_idx = i;
+	val = readl(clock->csn.reg) & ~CPG_SD_FC_MASK;
+	val |= CPG_SD_STP_MASK | (clock->div_table[0].val & CPG_SD_FC_MASK);
+	writel(val, clock->csn.reg);
 
 	clock->div_max = clock->div_table[0].div;
 	clock->div_min = clock->div_max;
-- 
2.20.1




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

* [PATCH 4.19 191/243] ASoC: max9867: Fix power management
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (189 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 190/243] clk: renesas: rcar-gen3: Set state when registering SD clocks Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 192/243] ARM: dts: sunxi: Fix PMU compatible strings Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ladislav Michl, Mark Brown, Sasha Levin

From: Ladislav Michl <ladis@linux-mips.org>

[ Upstream commit 29f58ff06795a923407d011d4721eaf3e8d39acc ]

Implement set_bias_level to drive shutdown bit, so device is
put to sleep when unused.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/max9867.c | 72 ++++++++++++++++++++++++--------------
 sound/soc/codecs/max9867.h |  2 +-
 2 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 4ea3287162ad2..e51143df4702a 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -248,17 +248,6 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static int max9867_prepare(struct snd_pcm_substream *substream,
-			 struct snd_soc_dai *dai)
-{
-	struct snd_soc_component *component = dai->component;
-	struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
-
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, MAX9867_SHTDOWN_MASK);
-	return 0;
-}
-
 static int max9867_mute(struct snd_soc_dai *dai, int mute)
 {
 	struct snd_soc_component *component = dai->component;
@@ -361,7 +350,6 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
 static const struct snd_soc_dai_ops max9867_dai_ops = {
 	.set_fmt = max9867_dai_set_fmt,
 	.set_sysclk	= max9867_set_dai_sysclk,
-	.prepare	= max9867_prepare,
 	.digital_mute	= max9867_mute,
 	.hw_params = max9867_dai_hw_params,
 };
@@ -392,27 +380,59 @@ static struct snd_soc_dai_driver max9867_dai[] = {
 	}
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int max9867_suspend(struct device *dev)
+#ifdef CONFIG_PM
+static int max9867_suspend(struct snd_soc_component *component)
 {
-	struct max9867_priv *max9867 = dev_get_drvdata(dev);
+	snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
 
-	/* Drop down to power saving mode when system is suspended */
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, ~MAX9867_SHTDOWN_MASK);
 	return 0;
 }
 
-static int max9867_resume(struct device *dev)
+static int max9867_resume(struct snd_soc_component *component)
 {
-	struct max9867_priv *max9867 = dev_get_drvdata(dev);
+	snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
 
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, MAX9867_SHTDOWN_MASK);
 	return 0;
 }
+#else
+#define max9867_suspend	NULL
+#define max9867_resume	NULL
 #endif
 
+static int max9867_set_bias_level(struct snd_soc_component *component,
+				  enum snd_soc_bias_level level)
+{
+	int err;
+	struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
+
+	switch (level) {
+	case SND_SOC_BIAS_STANDBY:
+		if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) {
+			err = regcache_sync(max9867->regmap);
+			if (err)
+				return err;
+
+			err = regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
+						 MAX9867_SHTDOWN, MAX9867_SHTDOWN);
+			if (err)
+				return err;
+		}
+		break;
+	case SND_SOC_BIAS_OFF:
+		err = regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
+					 MAX9867_SHTDOWN, 0);
+		if (err)
+			return err;
+
+		regcache_mark_dirty(max9867->regmap);
+		break;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
 static const struct snd_soc_component_driver max9867_component = {
 	.controls		= max9867_snd_controls,
 	.num_controls		= ARRAY_SIZE(max9867_snd_controls),
@@ -420,6 +440,9 @@ static const struct snd_soc_component_driver max9867_component = {
 	.num_dapm_routes	= ARRAY_SIZE(max9867_audio_map),
 	.dapm_widgets		= max9867_dapm_widgets,
 	.num_dapm_widgets	= ARRAY_SIZE(max9867_dapm_widgets),
+	.suspend		= max9867_suspend,
+	.resume			= max9867_resume,
+	.set_bias_level		= max9867_set_bias_level,
 	.idle_bias_on		= 1,
 	.use_pmdown_time	= 1,
 	.endianness		= 1,
@@ -518,15 +541,10 @@ static const struct of_device_id max9867_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, max9867_of_match);
 
-static const struct dev_pm_ops max9867_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(max9867_suspend, max9867_resume)
-};
-
 static struct i2c_driver max9867_i2c_driver = {
 	.driver = {
 		.name = "max9867",
 		.of_match_table = of_match_ptr(max9867_of_match),
-		.pm = &max9867_pm_ops,
 	},
 	.probe  = max9867_i2c_probe,
 	.id_table = max9867_i2c_id,
diff --git a/sound/soc/codecs/max9867.h b/sound/soc/codecs/max9867.h
index 55cd9976ff47d..d9170850c96ea 100644
--- a/sound/soc/codecs/max9867.h
+++ b/sound/soc/codecs/max9867.h
@@ -67,7 +67,7 @@
 #define MAX9867_MICCONFIG    0x15
 #define MAX9867_MODECONFIG   0x16
 #define MAX9867_PWRMAN       0x17
-#define MAX9867_SHTDOWN_MASK (1<<7)
+#define MAX9867_SHTDOWN      0x80
 #define MAX9867_REVISION     0xff
 
 #define MAX9867_CACHEREGNUM 10
-- 
2.20.1




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

* [PATCH 4.19 192/243] ARM: dts: sunxi: Fix PMU compatible strings
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (190 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 191/243] ASoC: max9867: Fix power management Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 193/243] ARM: dts: am335x-pdu001: Fix polarity of card detection input Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, Will Deacon, Sasha Levin

From: Rob Herring <robh@kernel.org>

[ Upstream commit 5719ac19fc32d892434939c1756c2f9a8322e6ef ]

"arm,cortex-a15-pmu" is not a valid fallback compatible string for an
Cortex-A7 PMU, so drop it.

Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
 arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index debc0bf22ea3b..76924fa42bbc3 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -201,7 +201,7 @@
 	};
 
 	pmu {
-		compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
+		compatible = "arm,cortex-a7-pmu";
 		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 73e789a133de1..355619dce7994 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -183,7 +183,7 @@
 	};
 
 	pmu {
-		compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
+		compatible = "arm,cortex-a7-pmu";
 		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
 	};
-- 
2.20.1




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

* [PATCH 4.19 193/243] ARM: dts: am335x-pdu001: Fix polarity of card detection input
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (191 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 192/243] ARM: dts: sunxi: Fix PMU compatible strings Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 194/243] media: vimc: fix start stream when link is disabled Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Felix Brack, Tony Lindgren, Sasha Levin

From: Felix Brack <fb@ltec.ch>

[ Upstream commit 5760367298a37c459ef0b1364463d70fd9a1f972 ]

When a micro SD card is inserted in the PDU001 card cage, the card
detection switch is opened and the corresponding GPIO input is driven
by a pull-up. Hence change the active level of the card detection
input from low to high.

Signed-off-by: Felix Brack <fb@ltec.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/am335x-pdu001.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am335x-pdu001.dts b/arch/arm/boot/dts/am335x-pdu001.dts
index 34fb63ef420f5..f56798efddff3 100644
--- a/arch/arm/boot/dts/am335x-pdu001.dts
+++ b/arch/arm/boot/dts/am335x-pdu001.dts
@@ -577,7 +577,7 @@
 	bus-width = <4>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins>;
-	cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+	cd-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 };
 
 &sham {
-- 
2.20.1




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

* [PATCH 4.19 194/243] media: vimc: fix start stream when link is disabled
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (192 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 193/243] ARM: dts: am335x-pdu001: Fix polarity of card detection input Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 195/243] net: aquantia: fix RSS table and key sizes Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Helen Koike, Mauro Carvalho Chehab,
	Sasha Levin

From: Helen Fornazier <helen.koike@collabora.com>

[ Upstream commit e159b6074c82fe31b79aad672e02fa204dbbc6d8 ]

If link is disabled, media_entity_remote_pad returns NULL, causing a
NULL pointer deference.
Ignore links that are not enabled instead.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/vimc/vimc-common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/vimc/vimc-common.c b/drivers/media/platform/vimc/vimc-common.c
index 204aa6f554e4d..fa8435ac2b1ae 100644
--- a/drivers/media/platform/vimc/vimc-common.c
+++ b/drivers/media/platform/vimc/vimc-common.c
@@ -241,6 +241,8 @@ int vimc_pipeline_s_stream(struct media_entity *ent, int enable)
 
 		/* Start the stream in the subdevice direct connected */
 		pad = media_entity_remote_pad(&ent->pads[i]);
+		if (!pad)
+			continue;
 
 		if (!is_media_entity_v4l2_subdev(pad->entity))
 			return -EINVAL;
-- 
2.20.1




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

* [PATCH 4.19 195/243] net: aquantia: fix RSS table and key sizes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (193 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 194/243] media: vimc: fix start stream when link is disabled Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 196/243] sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dmitry Bogdanov, Igor Russkikh,
	David S. Miller, Sasha Levin

From: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>

[ Upstream commit 474fb1150d40780e71f0b569aeac4f375df3af3d ]

Set RSS indirection table and RSS hash key sizes to their real size.

Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 4 ++--
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
index 91eb8910b1c99..90a0e1d0d6221 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
@@ -42,8 +42,8 @@
 #define AQ_CFG_IS_LRO_DEF           1U
 
 /* RSS */
-#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  128U
-#define AQ_CFG_RSS_HASHKEY_SIZE           320U
+#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  64U
+#define AQ_CFG_RSS_HASHKEY_SIZE           40U
 
 #define AQ_CFG_IS_RSS_DEF           1U
 #define AQ_CFG_NUM_RSS_QUEUES_DEF   AQ_CFG_VECS_DEF
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 4f34808f1e064..8cc34b0bedc3a 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -44,7 +44,7 @@ static void aq_nic_rss_init(struct aq_nic_s *self, unsigned int num_rss_queues)
 	struct aq_rss_parameters *rss_params = &cfg->aq_rss;
 	int i = 0;
 
-	static u8 rss_key[40] = {
+	static u8 rss_key[AQ_CFG_RSS_HASHKEY_SIZE] = {
 		0x1e, 0xad, 0x71, 0x87, 0x65, 0xfc, 0x26, 0x7d,
 		0x0d, 0x45, 0x67, 0x74, 0xcd, 0x06, 0x1a, 0x18,
 		0xb6, 0xc1, 0xf0, 0xc7, 0xbb, 0x18, 0xbe, 0xf8,
-- 
2.20.1




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

* [PATCH 4.19 196/243] sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (194 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 195/243] net: aquantia: fix RSS table and key sizes Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:05 ` [PATCH 4.19 197/243] fuse: verify nlink Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Phil Auld, Xuewei Zhang,
	Peter Zijlstra (Intel),
	Anton Blanchard, Ben Segall, Dietmar Eggemann, Juri Lelli,
	Linus Torvalds, Mel Gorman, Steven Rostedt, Thomas Gleixner,
	Vincent Guittot, Ingo Molnar

From: Xuewei Zhang <xueweiz@google.com>

commit 4929a4e6faa0f13289a67cae98139e727f0d4a97 upstream.

The quota/period ratio is used to ensure a child task group won't get
more bandwidth than the parent task group, and is calculated as:

  normalized_cfs_quota() = [(quota_us << 20) / period_us]

If the quota/period ratio was changed during this scaling due to
precision loss, it will cause inconsistency between parent and child
task groups.

See below example:

A userspace container manager (kubelet) does three operations:

 1) Create a parent cgroup, set quota to 1,000us and period to 10,000us.
 2) Create a few children cgroups.
 3) Set quota to 1,000us and period to 10,000us on a child cgroup.

These operations are expected to succeed. However, if the scaling of
147/128 happens before step 3, quota and period of the parent cgroup
will be changed:

  new_quota: 1148437ns,   1148us
 new_period: 11484375ns, 11484us

And when step 3 comes in, the ratio of the child cgroup will be
104857, which will be larger than the parent cgroup ratio (104821),
and will fail.

Scaling them by a factor of 2 will fix the problem.

Tested-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Xuewei Zhang <xueweiz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Phil Auld <pauld@redhat.com>
Cc: Anton Blanchard <anton@ozlabs.org>
Cc: Ben Segall <bsegall@google.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Fixes: 2e8e19226398 ("sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup")
Link: https://lkml.kernel.org/r/20191004001243.140897-1-xueweiz@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 kernel/sched/fair.c |   34 +++++++++++++++++++++-------------
 1 file changed, 21 insertions(+), 13 deletions(-)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4868,20 +4868,28 @@ static enum hrtimer_restart sched_cfs_pe
 		if (++count > 3) {
 			u64 new, old = ktime_to_ns(cfs_b->period);
 
-			new = (old * 147) / 128; /* ~115% */
-			new = min(new, max_cfs_quota_period);
+			/*
+			 * Grow period by a factor of 2 to avoid losing precision.
+			 * Precision loss in the quota/period ratio can cause __cfs_schedulable
+			 * to fail.
+			 */
+			new = old * 2;
+			if (new < max_cfs_quota_period) {
+				cfs_b->period = ns_to_ktime(new);
+				cfs_b->quota *= 2;
 
-			cfs_b->period = ns_to_ktime(new);
-
-			/* since max is 1s, this is limited to 1e9^2, which fits in u64 */
-			cfs_b->quota *= new;
-			cfs_b->quota = div64_u64(cfs_b->quota, old);
-
-			pr_warn_ratelimited(
-        "cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us %lld, cfs_quota_us = %lld)\n",
-	                        smp_processor_id(),
-	                        div_u64(new, NSEC_PER_USEC),
-                                div_u64(cfs_b->quota, NSEC_PER_USEC));
+				pr_warn_ratelimited(
+	"cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us = %lld, cfs_quota_us = %lld)\n",
+					smp_processor_id(),
+					div_u64(new, NSEC_PER_USEC),
+					div_u64(cfs_b->quota, NSEC_PER_USEC));
+			} else {
+				pr_warn_ratelimited(
+	"cfs_period_timer[cpu%d]: period too short, but cannot scale up without losing precision (cfs_period_us = %lld, cfs_quota_us = %lld)\n",
+					smp_processor_id(),
+					div_u64(old, NSEC_PER_USEC),
+					div_u64(cfs_b->quota, NSEC_PER_USEC));
+			}
 
 			/* reset count so we don't come right back in here */
 			count = 0;



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

* [PATCH 4.19 197/243] fuse: verify nlink
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (195 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 196/243] sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision Greg Kroah-Hartman
@ 2019-12-11 15:05 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 198/243] fuse: verify attributes Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Miklos Szeredi

From: Miklos Szeredi <mszeredi@redhat.com>

commit c634da718db9b2fac201df2ae1b1b095344ce5eb upstream.

When adding a new hard link, make sure that i_nlink doesn't overflow.

Fixes: ac45d61357e8 ("fuse: fix nlink after unlink")
Cc: <stable@vger.kernel.org> # v3.4
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/fuse/dir.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -837,7 +837,8 @@ static int fuse_link(struct dentry *entr
 
 		spin_lock(&fc->lock);
 		fi->attr_version = ++fc->attr_version;
-		inc_nlink(inode);
+		if (likely(inode->i_nlink < UINT_MAX))
+			inc_nlink(inode);
 		spin_unlock(&fc->lock);
 		fuse_invalidate_attr(inode);
 		fuse_update_ctime(inode);



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

* [PATCH 4.19 198/243] fuse: verify attributes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (196 preceding siblings ...)
  2019-12-11 15:05 ` [PATCH 4.19 197/243] fuse: verify nlink Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 199/243] ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Arijit Banerjee, Miklos Szeredi

From: Miklos Szeredi <mszeredi@redhat.com>

commit eb59bd17d2fa6e5e84fba61a5ebdea984222e6d5 upstream.

If a filesystem returns negative inode sizes, future reads on the file were
causing the cpu to spin on truncate_pagecache.

Create a helper to validate the attributes.  This now does two things:

 - check the file mode
 - check if the file size fits in i_size without overflowing

Reported-by: Arijit Banerjee <arijit@rubrik.com>
Fixes: d8a5ba45457e ("[PATCH] FUSE - core")
Cc: <stable@vger.kernel.org> # v2.6.14
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/fuse/dir.c    |   24 +++++++++++++++++-------
 fs/fuse/fuse_i.h |    2 ++
 2 files changed, 19 insertions(+), 7 deletions(-)

--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -234,7 +234,8 @@ static int fuse_dentry_revalidate(struct
 		kfree(forget);
 		if (ret == -ENOMEM)
 			goto out;
-		if (ret || (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
+		if (ret || fuse_invalid_attr(&outarg.attr) ||
+		    (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
 			goto invalid;
 
 		forget_all_cached_acls(inode);
@@ -297,6 +298,12 @@ int fuse_valid_type(int m)
 		S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
 }
 
+bool fuse_invalid_attr(struct fuse_attr *attr)
+{
+	return !fuse_valid_type(attr->mode) ||
+		attr->size > LLONG_MAX;
+}
+
 int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name,
 		     struct fuse_entry_out *outarg, struct inode **inode)
 {
@@ -328,7 +335,7 @@ int fuse_lookup_name(struct super_block
 	err = -EIO;
 	if (!outarg->nodeid)
 		goto out_put_forget;
-	if (!fuse_valid_type(outarg->attr.mode))
+	if (fuse_invalid_attr(&outarg->attr))
 		goto out_put_forget;
 
 	*inode = fuse_iget(sb, outarg->nodeid, outarg->generation,
@@ -451,7 +458,8 @@ static int fuse_create_open(struct inode
 		goto out_free_ff;
 
 	err = -EIO;
-	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid))
+	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid) ||
+	    fuse_invalid_attr(&outentry.attr))
 		goto out_free_ff;
 
 	ff->fh = outopen.fh;
@@ -558,7 +566,7 @@ static int create_new_entry(struct fuse_
 		goto out_put_forget_req;
 
 	err = -EIO;
-	if (invalid_nodeid(outarg.nodeid))
+	if (invalid_nodeid(outarg.nodeid) || fuse_invalid_attr(&outarg.attr))
 		goto out_put_forget_req;
 
 	if ((outarg.attr.mode ^ mode) & S_IFMT)
@@ -918,7 +926,8 @@ static int fuse_do_getattr(struct inode
 	args.out.args[0].value = &outarg;
 	err = fuse_simple_request(fc, &args);
 	if (!err) {
-		if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+		if (fuse_invalid_attr(&outarg.attr) ||
+		    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 			make_bad_inode(inode);
 			err = -EIO;
 		} else {
@@ -1230,7 +1239,7 @@ static int fuse_direntplus_link(struct f
 
 	if (invalid_nodeid(o->nodeid))
 		return -EIO;
-	if (!fuse_valid_type(o->attr.mode))
+	if (fuse_invalid_attr(&o->attr))
 		return -EIO;
 
 	fc = get_fuse_conn(dir);
@@ -1707,7 +1716,8 @@ int fuse_do_setattr(struct dentry *dentr
 		goto error;
 	}
 
-	if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+	if (fuse_invalid_attr(&outarg.attr) ||
+	    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 		make_bad_inode(inode);
 		err = -EIO;
 		goto error;
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -909,6 +909,8 @@ void fuse_ctl_remove_conn(struct fuse_co
  */
 int fuse_valid_type(int m);
 
+bool fuse_invalid_attr(struct fuse_attr *attr);
+
 /**
  * Is current process allowed to perform filesystem operation?
  */



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

* [PATCH 4.19 199/243] ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (197 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 198/243] fuse: verify attributes Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 200/243] ALSA: hda/realtek - Enable the headset-mic on a Xiaomis laptop Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jian-Hong Pan, Takashi Iwai

From: Jian-Hong Pan <jian-hong@endlessm.com>

commit 436e25505f3458cc92c7f3c985e9cbc198a98209 upstream.

Laptops like ASUS UX431FLC and UX431FL can share the same audio quirks.
But UX431FLC needs one more step to enable the internal speaker: Pull
the GPIO from CODEC to initialize the AMP.

Fixes: 60083f9e94b2 ("ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL")
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191125093405.5702-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5701,6 +5701,7 @@ enum {
 	ALC299_FIXUP_PREDATOR_SPK,
 	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
 	ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
+	ALC294_FIXUP_ASUS_INTSPK_GPIO,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6764,6 +6765,13 @@ static const struct hda_fixup alc269_fix
 		.chained = true,
 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
 	},
+	[ALC294_FIXUP_ASUS_INTSPK_GPIO] = {
+		.type = HDA_FIXUP_FUNC,
+		/* The GPIO must be pulled to initialize the AMP */
+		.v.func = alc_fixup_gpio4,
+		.chained = true,
+		.chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6923,7 +6931,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
 	SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
 	SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
-	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
 	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),



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

* [PATCH 4.19 200/243] ALSA: hda/realtek - Enable the headset-mic on a Xiaomis laptop
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (198 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 199/243] ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 201/243] ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hui Wang, Takashi Iwai

From: Hui Wang <hui.wang@canonical.com>

commit 695d1ec3994f9de2cefae80ee2087c95d2e5a2f3 upstream.

The headset on this machine is not defined, after applying the quirk
ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well

BugLink: https://bugs.launchpad.net/bugs/1846148
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20191121025427.8856-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7038,6 +7038,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
 	SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS),
 	SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
+	SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
 
 #if 0



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

* [PATCH 4.19 201/243] ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (199 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 200/243] ALSA: hda/realtek - Enable the headset-mic on a Xiaomis laptop Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 202/243] ALSA: pcm: oss: Avoid potential buffer overflows Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kailang Yang, Takashi Iwai

From: Kailang Yang <kailang@realtek.com>

commit e1e8c1fdce8b00fce08784d9d738c60ebf598ebc upstream.

headphone have noise even the volume is very small.
Let it fill up pcbeep hidden register to default value.
The issue was gone.

Fixes: 4344aec84bd8 ("ALSA: hda/realtek - New codec support for ALC256")
Fixes: 736f20a70608 ("ALSA: hda/realtek - Add support for ALC236/ALC3204")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/9ae47f23a64d4e41a9c81e263cd8a250@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -379,9 +379,7 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0215:
 	case 0x10ec0233:
 	case 0x10ec0235:
-	case 0x10ec0236:
 	case 0x10ec0255:
-	case 0x10ec0256:
 	case 0x10ec0257:
 	case 0x10ec0282:
 	case 0x10ec0283:
@@ -393,6 +391,11 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0300:
 		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
 		break;
+	case 0x10ec0236:
+	case 0x10ec0256:
+		alc_write_coef_idx(codec, 0x36, 0x5757);
+		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+		break;
 	case 0x10ec0275:
 		alc_update_coef_idx(codec, 0xe, 0, 1<<0);
 		break;



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

* [PATCH 4.19 202/243] ALSA: pcm: oss: Avoid potential buffer overflows
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (200 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 201/243] ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 203/243] ALSA: hda - Add mute led support for HP ProBook 645 G4 Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+f153bde47a62e0b05f83, Takashi Iwai

From: Takashi Iwai <tiwai@suse.de>

commit 4cc8d6505ab82db3357613d36e6c58a297f57f7c upstream.

syzkaller reported an invalid access in PCM OSS read, and this seems
to be an overflow of the internal buffer allocated for a plugin.
Since the rate plugin adjusts its transfer size dynamically, the
calculation for the chained plugin might be bigger than the given
buffer size in some extreme cases, which lead to such an buffer
overflow as caught by KASAN.

Fix it by limiting the max transfer size properly by checking against
the destination size in each plugin transfer callback.

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

---
 sound/core/oss/linear.c |    2 ++
 sound/core/oss/mulaw.c  |    2 ++
 sound/core/oss/route.c  |    2 ++
 3 files changed, 6 insertions(+)

--- a/sound/core/oss/linear.c
+++ b/sound/core/oss/linear.c
@@ -107,6 +107,8 @@ static snd_pcm_sframes_t linear_transfer
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	convert(plugin, src_channels, dst_channels, frames);
 	return frames;
 }
--- a/sound/core/oss/mulaw.c
+++ b/sound/core/oss/mulaw.c
@@ -269,6 +269,8 @@ static snd_pcm_sframes_t mulaw_transfer(
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	data = (struct mulaw_priv *)plugin->extra_data;
 	data->func(plugin, src_channels, dst_channels, frames);
 	return frames;
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -57,6 +57,8 @@ static snd_pcm_sframes_t route_transfer(
 		return -ENXIO;
 	if (frames == 0)
 		return 0;
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 
 	nsrcs = plugin->src_format.channels;
 	ndsts = plugin->dst_format.channels;



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

* [PATCH 4.19 203/243] ALSA: hda - Add mute led support for HP ProBook 645 G4
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (201 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 202/243] ALSA: pcm: oss: Avoid potential buffer overflows Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 204/243] Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kai-Heng Feng, Takashi Iwai

From: Kai-Heng Feng <kai.heng.feng@canonical.com>

commit e190de6941db14813032af87873f5550ad5764fe upstream.

Mic mute led does not work on HP ProBook 645 G4.
We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191120082035.18937-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_conexant.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -923,6 +923,7 @@ static const struct snd_pci_quirk cxt506
 	SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),



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

* [PATCH 4.19 204/243] Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (202 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 203/243] ALSA: hda - Add mute led support for HP ProBook 645 G4 Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 205/243] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans Verkuil, Dmitry Torokhov

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

commit fc1156f373e3927e0dcf06678906c367588bfdd6 upstream.

Some Lenovo X1 Carbon Gen 6 laptops report LEN0091. Add this
to the smbus_pnp_ids list.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191119105118.54285-2-hverkuil-cisco@xs4all.nl
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/mouse/synaptics.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -175,6 +175,7 @@ static const char * const smbus_pnp_ids[
 	"LEN0071", /* T480 */
 	"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
 	"LEN0073", /* X1 Carbon G5 (Elantech) */
+	"LEN0091", /* X1 Carbon 6 */
 	"LEN0092", /* X1 Carbon 6 */
 	"LEN0093", /* T480 */
 	"LEN0096", /* X280 */



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

* [PATCH 4.19 205/243] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (203 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 204/243] Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 206/243] Input: synaptics-rmi4 - dont increment rmiaddr for SMBus transfers Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lucas Stach, Dmitry Torokhov

From: Lucas Stach <l.stach@pengutronix.de>

commit 86bcd3a12999447faad60ec59c2d64d18d8e61ac upstream.

F34 is a bit special as it reinitializes the device and related driver
structs during the firmware update. This clears the fn_irq_mask which
will then prevent F34 from receiving further interrupts, leading to
timeouts during the firmware update. Make sure to reinitialize the
IRQ enables at the appropriate times.

The issue is in F34 code, but the commit in the fixes tag exposed the
issue, as before this commit things would work by accident.

Fixes: 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://lore.kernel.org/r/20191129133514.23224-1-l.stach@pengutronix.de
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/rmi4/rmi_f34v7.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/input/rmi4/rmi_f34v7.c
+++ b/drivers/input/rmi4/rmi_f34v7.c
@@ -1192,6 +1192,9 @@ int rmi_f34v7_do_reflash(struct f34_data
 {
 	int ret;
 
+	f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
+					       f34->fn->irq_mask);
+
 	rmi_f34v7_read_queries_bl_version(f34);
 
 	f34->v7.image = fw->data;



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

* [PATCH 4.19 206/243] Input: synaptics-rmi4 - dont increment rmiaddr for SMBus transfers
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (204 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 205/243] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 207/243] Input: goodix - add upside-down quirk for Teclast X89 tablet Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans Verkuil, Dmitry Torokhov

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

commit a284e11c371e446371675668d8c8120a27227339 upstream.

This increment of rmi_smbus in rmi_smb_read/write_block() causes
garbage to be read/written.

The first read of SMB_MAX_COUNT bytes is fine, but after that
it is nonsense. Trial-and-error showed that by dropping the
increment of rmiaddr everything is fine and the F54 function
properly works.

I tried a hack with rmi_smb_write_block() as well (writing to the
same F54 touchpad data area, then reading it back), and that
suggests that there too the rmiaddr increment has to be dropped.
It makes sense that if it has to be dropped for read, then it has
to be dropped for write as well.

It looks like the initial work with F54 was done using i2c, not smbus,
and it seems nobody ever tested F54 with smbus. The other functions
all read/write less than SMB_MAX_COUNT as far as I can tell, so this
issue was never noticed with non-F54 functions.

With this change I can read out the touchpad data correctly on my
Lenovo X1 Carbon 6th Gen laptop.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://lore.kernel.org/r/8dd22e21-4933-8e9c-a696-d281872c8de7@xs4all.nl
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/rmi4/rmi_smbus.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/input/rmi4/rmi_smbus.c
+++ b/drivers/input/rmi4/rmi_smbus.c
@@ -166,7 +166,6 @@ static int rmi_smb_write_block(struct rm
 		/* prepare to write next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 exit:
 	mutex_unlock(&rmi_smb->page_mutex);
@@ -218,7 +217,6 @@ static int rmi_smb_read_block(struct rmi
 		/* prepare to read next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 
 	retval = 0;



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

* [PATCH 4.19 207/243] Input: goodix - add upside-down quirk for Teclast X89 tablet
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (205 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 206/243] Input: synaptics-rmi4 - dont increment rmiaddr for SMBus transfers Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 208/243] coresight: etm4x: Fix input validation for sysfs Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hans de Goede, Bastien Nocera,
	Dmitry Torokhov

From: Hans de Goede <hdegoede@redhat.com>

commit df5b5e555b356662a5e4a23c6774fdfce8547d54 upstream.

The touchscreen on the Teclast X89 is mounted upside down in relation to
the display orientation (the touchscreen itself is mounted upright, but the
display is mounted upside-down). Add a quirk for this so that we send
coordinates which match the display orientation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -128,6 +128,15 @@ static const unsigned long goodix_irq_fl
 static const struct dmi_system_id rotated_screen[] = {
 #if defined(CONFIG_DMI) && defined(CONFIG_X86)
 	{
+		.ident = "Teclast X89",
+		.matches = {
+			/* tPAD is too generic, also match on bios date */
+			DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
+			DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
+			DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
+		},
+	},
+	{
 		.ident = "WinBook TW100",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),



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

* [PATCH 4.19 208/243] coresight: etm4x: Fix input validation for sysfs.
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (206 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 207/243] Input: goodix - add upside-down quirk for Teclast X89 tablet Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 209/243] Input: Fix memory leak in psxpad_spi_probe Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Leo Yan, Mathieu Poirier, Mike Leach

From: Mike Leach <mike.leach@linaro.org>

commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a upstream.

A number of issues are fixed relating to sysfs input validation:-

1) bb_ctrl_store() - incorrect compare of bit select field to absolute
value. Reworked per ETMv4 specification.
2) seq_event_store() - incorrect mask value - register has two
event values.
3) cyc_threshold_store() - must mask with max before checking min
otherwise wrapped values can set illegal value below min.
4) res_ctrl_store() - update to mask off all res0 bits.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Fixes: a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file")
Cc: stable <stable@vger.kernel.org> # 4.9+
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20191104181251.26732-6-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c |   21 ++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

--- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
@@ -655,10 +655,13 @@ static ssize_t cyc_threshold_store(struc
 
 	if (kstrtoul(buf, 16, &val))
 		return -EINVAL;
+
+	/* mask off max threshold before checking min value */
+	val &= ETM_CYC_THRESHOLD_MASK;
 	if (val < drvdata->ccitmin)
 		return -EINVAL;
 
-	config->ccctlr = val & ETM_CYC_THRESHOLD_MASK;
+	config->ccctlr = val;
 	return size;
 }
 static DEVICE_ATTR_RW(cyc_threshold);
@@ -689,14 +692,16 @@ static ssize_t bb_ctrl_store(struct devi
 		return -EINVAL;
 	if (!drvdata->nr_addr_cmp)
 		return -EINVAL;
+
 	/*
-	 * Bit[7:0] selects which address range comparator is used for
-	 * branch broadcast control.
+	 * Bit[8] controls include(1) / exclude(0), bits[0-7] select
+	 * individual range comparators. If include then at least 1
+	 * range must be selected.
 	 */
-	if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp)
+	if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0))
 		return -EINVAL;
 
-	config->bb_ctrl = val;
+	config->bb_ctrl = val & GENMASK(8, 0);
 	return size;
 }
 static DEVICE_ATTR_RW(bb_ctrl);
@@ -1329,8 +1334,8 @@ static ssize_t seq_event_store(struct de
 
 	spin_lock(&drvdata->spinlock);
 	idx = config->seq_idx;
-	/* RST, bits[7:0] */
-	config->seq_ctrl[idx] = val & 0xFF;
+	/* Seq control has two masks B[15:8] F[7:0] */
+	config->seq_ctrl[idx] = val & 0xFFFF;
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }
@@ -1585,7 +1590,7 @@ static ssize_t res_ctrl_store(struct dev
 	if (idx % 2 != 0)
 		/* PAIRINV, bit[21] */
 		val &= ~BIT(21);
-	config->res_ctrl[idx] = val;
+	config->res_ctrl[idx] = val & GENMASK(21, 0);
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }



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

* [PATCH 4.19 209/243] Input: Fix memory leak in psxpad_spi_probe
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (207 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 208/243] coresight: etm4x: Fix input validation for sysfs Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 210/243] x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, emamd001, Navid Emamdoost, Dmitry Torokhov

From: Navid Emamdoost <navid.emamdoost@gmail.com>

In the implementation of psxpad_spi_probe() the allocated memory for
pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device()
fail. The solution is using device managed allocation, like the one used
for pad. Perform the allocation using
devm_input_allocate_polled_device().

Fixes: 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/joystick/psxpad-spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/joystick/psxpad-spi.c
+++ b/drivers/input/joystick/psxpad-spi.c
@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_d
 	if (!pad)
 		return -ENOMEM;
 
-	pdev = input_allocate_polled_device();
+	pdev = devm_input_allocate_polled_device(&spi->dev);
 	if (!pdev) {
 		dev_err(&spi->dev, "failed to allocate input device\n");
 		return -ENOMEM;



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

* [PATCH 4.19 210/243] x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (208 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 209/243] Input: Fix memory leak in psxpad_spi_probe Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 211/243] x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Borislav Petkov, Joerg Roedel,
	Andy Lutomirski, Borislav Petkov, Dave Hansen, Joerg Roedel,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, hpa,
	Ingo Molnar

From: Joerg Roedel <jroedel@suse.de>

commit 9a62d20027da3164a22244d9f022c0c987261687 upstream.

The job of vmalloc_sync_all() is to help the lazy freeing of vmalloc()
ranges: before such vmap ranges are reused we make sure that they are
unmapped from every task's page tables.

This is really easy on pagetable setups where the kernel page tables
are shared between all tasks - this is the case on 32-bit kernels
with SHARED_KERNEL_PMD = 1.

But on !SHARED_KERNEL_PMD 32-bit kernels this involves iterating
over the pgd_list and clearing all pmd entries in the pgds that
are cleared in the init_mm.pgd, which is the reference pagetable
that the vmalloc() code uses.

In that context the current practice of vmalloc_sync_all() iterating
until FIX_ADDR_TOP is buggy:

        for (address = VMALLOC_START & PMD_MASK;
             address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
             address += PMD_SIZE) {
                struct page *page;

Because iterating up to FIXADDR_TOP will involve a lot of non-vmalloc
address ranges:

	VMALLOC -> PKMAP -> LDT -> CPU_ENTRY_AREA -> FIX_ADDR

This is mostly harmless for the FIX_ADDR and CPU_ENTRY_AREA ranges
that don't clear their pmds, but it's lethal for the LDT range,
which relies on having different mappings in different processes,
and 'synchronizing' them in the vmalloc sense corrupts those
pagetable entries (clearing them).

This got particularly prominent with PTI, which turns SHARED_KERNEL_PMD
off and makes this the dominant mapping mode on 32-bit.

To make LDT working again vmalloc_sync_all() must only iterate over
the volatile parts of the kernel address range that are identical
between all processes.

So the correct check in vmalloc_sync_all() is "address < VMALLOC_END"
to make sure the VMALLOC areas are synchronized and the LDT
mapping is not falsely overwritten.

The CPU_ENTRY_AREA and the FIXMAP area are no longer synced either,
but this is not really a proplem since their PMDs get established
during bootup and never change.

This change fixes the ldt_gdt selftest in my setup.

[ mingo: Fixed up the changelog to explain the logic and modified the
         copying to only happen up until VMALLOC_END. ]

Reported-by: Borislav Petkov <bp@suse.de>
Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: hpa@zytor.com
Fixes: 7757d607c6b3: ("x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32")
Link: https://lkml.kernel.org/r/20191126111119.GA110513@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -281,7 +281,7 @@ void vmalloc_sync_all(void)
 		return;
 
 	for (address = VMALLOC_START & PMD_MASK;
-	     address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
+	     address >= TASK_SIZE_MAX && address < VMALLOC_END;
 	     address += PMD_SIZE) {
 		struct page *page;
 



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

* [PATCH 4.19 211/243] x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (209 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 210/243] x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 212/243] xfrm interface: fix memory leak on creation Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kai-Heng Feng, Bjorn Helgaas

From: Kai-Heng Feng <kai.heng.feng@canonical.com>

commit 7e8ce0e2b036dbc6617184317983aea4f2c52099 upstream.

The AMD FCH USB XHCI Controller advertises support for generating PME#
while in D0.  When in D0, it does signal PME# for USB 3.0 connect events,
but not for USB 2.0 or USB 1.1 connect events, which means the controller
doesn't wake correctly for those events.

  00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7914] (rev 20) (prog-if 30 [XHCI])
        Subsystem: Dell FCH USB XHCI Controller [1028:087e]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)

Clear PCI_PM_CAP_PME_D0 in dev->pme_support to indicate the device will not
assert PME# from D0 so we don't rely on it.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203673
Link: https://lore.kernel.org/r/20190902145252.32111-1-kai.heng.feng@canonical.com
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/pci/fixup.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -589,6 +589,17 @@ static void pci_fixup_amd_ehci_pme(struc
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7808, pci_fixup_amd_ehci_pme);
 
 /*
+ * Device [1022:7914]
+ * When in D0, PME# doesn't get asserted when plugging USB 2.0 device.
+ */
+static void pci_fixup_amd_fch_xhci_pme(struct pci_dev *dev)
+{
+	dev_info(&dev->dev, "PME# does not work under D0, disabling it\n");
+	dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >> PCI_PM_CAP_PME_SHIFT);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7914, pci_fixup_amd_fch_xhci_pme);
+
+/*
  * Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff]
  *
  * Using the [mem 0x7fa00000-0x7fbfffff] region, e.g., by assigning it to



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

* [PATCH 4.19 212/243] xfrm interface: fix memory leak on creation
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (210 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 211/243] x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 213/243] xfrm interface: avoid corruption on changelink Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Lorenzo Colitti, Benedict Wong,
	Steffen Klassert, Shannon Nelson, Antony Antony, Eyal Birger,
	Julien Floret, Nicolas Dichtel

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

commit 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 upstream.

The following commands produce a backtrace and return an error but the xfrm
interface is created (in the wrong netns):
$ ip netns add foo
$ ip netns add bar
$ ip -n foo netns set bar 0
$ ip -n foo link add xfrmi0 link-netnsid 0 type xfrm dev lo if_id 23
RTNETLINK answers: Invalid argument
$ ip -n bar link ls xfrmi0
2: xfrmi0@lo: <NOARP,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00

Here is the backtrace:
[   79.879174] WARNING: CPU: 0 PID: 1178 at net/core/dev.c:8172 rollback_registered_many+0x86/0x3c1
[   79.880260] Modules linked in: xfrm_interface nfsv3 nfs_acl auth_rpcgss nfsv4 nfs lockd grace sunrpc fscache button parport_pc parport serio_raw evdev pcspkr loop ext4 crc16 mbcache jbd2 crc32c_generic ide_cd_mod ide_gd_mod cdrom ata_$
eneric ata_piix libata scsi_mod 8139too piix psmouse i2c_piix4 ide_core 8139cp mii i2c_core floppy
[   79.883698] CPU: 0 PID: 1178 Comm: ip Not tainted 5.2.0-rc6+ #106
[   79.884462] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   79.885447] RIP: 0010:rollback_registered_many+0x86/0x3c1
[   79.886120] Code: 01 e8 d7 7d c6 ff 0f 0b 48 8b 45 00 4c 8b 20 48 8d 58 90 49 83 ec 70 48 8d 7b 70 48 39 ef 74 44 8a 83 d0 04 00 00 84 c0 75 1f <0f> 0b e8 61 cd ff ff 48 b8 00 01 00 00 00 00 ad de 48 89 43 70 66
[   79.888667] RSP: 0018:ffffc900015ab740 EFLAGS: 00010246
[   79.889339] RAX: ffff8882353e5700 RBX: ffff8882353e56a0 RCX: ffff8882353e5710
[   79.890174] RDX: ffffc900015ab7e0 RSI: ffffc900015ab7e0 RDI: ffff8882353e5710
[   79.891029] RBP: ffffc900015ab7e0 R08: ffffc900015ab7e0 R09: ffffc900015ab7e0
[   79.891866] R10: ffffc900015ab7a0 R11: ffffffff82233fec R12: ffffc900015ab770
[   79.892728] R13: ffffffff81eb7ec0 R14: ffff88822ed6cf00 R15: 00000000ffffffea
[   79.893557] FS:  00007ff350f31740(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000
[   79.894581] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   79.895317] CR2: 00000000006c8580 CR3: 000000022c272000 CR4: 00000000000006f0
[   79.896137] Call Trace:
[   79.896464]  unregister_netdevice_many+0x12/0x6c
[   79.896998]  __rtnl_newlink+0x6e2/0x73b
[   79.897446]  ? __kmalloc_node_track_caller+0x15e/0x185
[   79.898039]  ? pskb_expand_head+0x5f/0x1fe
[   79.898556]  ? stack_access_ok+0xd/0x2c
[   79.899009]  ? deref_stack_reg+0x12/0x20
[   79.899462]  ? stack_access_ok+0xd/0x2c
[   79.899927]  ? stack_access_ok+0xd/0x2c
[   79.900404]  ? __module_text_address+0x9/0x4f
[   79.900910]  ? is_bpf_text_address+0x5/0xc
[   79.901390]  ? kernel_text_address+0x67/0x7b
[   79.901884]  ? __kernel_text_address+0x1a/0x25
[   79.902397]  ? unwind_get_return_address+0x12/0x23
[   79.903122]  ? __cmpxchg_double_slab.isra.37+0x46/0x77
[   79.903772]  rtnl_newlink+0x43/0x56
[   79.904217]  rtnetlink_rcv_msg+0x200/0x24c

In fact, each time a xfrm interface was created, a netdev was allocated
by __rtnl_newlink()/rtnl_create_link() and then another one by
xfrmi_newlink()/xfrmi_create(). Only the second one was registered, it's
why the previous commands produce a backtrace: dev_change_net_namespace()
was called on a netdev with reg_state set to NETREG_UNINITIALIZED (the
first one).

CC: Lorenzo Colitti <lorenzo@google.com>
CC: Benedict Wong <benedictwong@google.com>
CC: Steffen Klassert <steffen.klassert@secunet.com>
CC: Shannon Nelson <shannon.nelson@oracle.com>
CC: Antony Antony <antony@phenome.org>
CC: Eyal Birger <eyal.birger@gmail.com>
Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Reported-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/xfrm/xfrm_interface.c |   98 +++++++++++++---------------------------------
 1 file changed, 28 insertions(+), 70 deletions(-)

--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -133,7 +133,7 @@ static void xfrmi_dev_free(struct net_de
 	free_percpu(dev->tstats);
 }
 
-static int xfrmi_create2(struct net_device *dev)
+static int xfrmi_create(struct net_device *dev)
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 	struct net *net = dev_net(dev);
@@ -156,54 +156,7 @@ out:
 	return err;
 }
 
-static struct xfrm_if *xfrmi_create(struct net *net, struct xfrm_if_parms *p)
-{
-	struct net_device *dev;
-	struct xfrm_if *xi;
-	char name[IFNAMSIZ];
-	int err;
-
-	if (p->name[0]) {
-		strlcpy(name, p->name, IFNAMSIZ);
-	} else {
-		err = -EINVAL;
-		goto failed;
-	}
-
-	dev = alloc_netdev(sizeof(*xi), name, NET_NAME_UNKNOWN, xfrmi_dev_setup);
-	if (!dev) {
-		err = -EAGAIN;
-		goto failed;
-	}
-
-	dev_net_set(dev, net);
-
-	xi = netdev_priv(dev);
-	xi->p = *p;
-	xi->net = net;
-	xi->dev = dev;
-	xi->phydev = dev_get_by_index(net, p->link);
-	if (!xi->phydev) {
-		err = -ENODEV;
-		goto failed_free;
-	}
-
-	err = xfrmi_create2(dev);
-	if (err < 0)
-		goto failed_dev_put;
-
-	return xi;
-
-failed_dev_put:
-	dev_put(xi->phydev);
-failed_free:
-	free_netdev(dev);
-failed:
-	return ERR_PTR(err);
-}
-
-static struct xfrm_if *xfrmi_locate(struct net *net, struct xfrm_if_parms *p,
-				   int create)
+static struct xfrm_if *xfrmi_locate(struct net *net, struct xfrm_if_parms *p)
 {
 	struct xfrm_if __rcu **xip;
 	struct xfrm_if *xi;
@@ -211,17 +164,11 @@ static struct xfrm_if *xfrmi_locate(stru
 
 	for (xip = &xfrmn->xfrmi[0];
 	     (xi = rtnl_dereference(*xip)) != NULL;
-	     xip = &xi->next) {
-		if (xi->p.if_id == p->if_id) {
-			if (create)
-				return ERR_PTR(-EEXIST);
-
+	     xip = &xi->next)
+		if (xi->p.if_id == p->if_id)
 			return xi;
-		}
-	}
-	if (!create)
-		return ERR_PTR(-ENODEV);
-	return xfrmi_create(net, p);
+
+	return NULL;
 }
 
 static void xfrmi_dev_uninit(struct net_device *dev)
@@ -689,21 +636,33 @@ static int xfrmi_newlink(struct net *src
 			struct netlink_ext_ack *extack)
 {
 	struct net *net = dev_net(dev);
-	struct xfrm_if_parms *p;
+	struct xfrm_if_parms p;
 	struct xfrm_if *xi;
+	int err;
 
-	xi = netdev_priv(dev);
-	p = &xi->p;
-
-	xfrmi_netlink_parms(data, p);
+	xfrmi_netlink_parms(data, &p);
 
 	if (!tb[IFLA_IFNAME])
 		return -EINVAL;
 
-	nla_strlcpy(p->name, tb[IFLA_IFNAME], IFNAMSIZ);
+	nla_strlcpy(p.name, tb[IFLA_IFNAME], IFNAMSIZ);
 
-	xi = xfrmi_locate(net, p, 1);
-	return PTR_ERR_OR_ZERO(xi);
+	xi = xfrmi_locate(net, &p);
+	if (xi)
+		return -EEXIST;
+
+	xi = netdev_priv(dev);
+	xi->p = p;
+	xi->net = net;
+	xi->dev = dev;
+	xi->phydev = dev_get_by_index(net, p.link);
+	if (!xi->phydev)
+		return -ENODEV;
+
+	err = xfrmi_create(dev);
+	if (err < 0)
+		dev_put(xi->phydev);
+	return err;
 }
 
 static void xfrmi_dellink(struct net_device *dev, struct list_head *head)
@@ -720,9 +679,8 @@ static int xfrmi_changelink(struct net_d
 
 	xfrmi_netlink_parms(data, &xi->p);
 
-	xi = xfrmi_locate(net, &xi->p, 0);
-
-	if (IS_ERR_OR_NULL(xi)) {
+	xi = xfrmi_locate(net, &xi->p);
+	if (!xi) {
 		xi = netdev_priv(dev);
 	} else {
 		if (xi->dev != dev)



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

* [PATCH 4.19 213/243] xfrm interface: avoid corruption on changelink
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (211 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 212/243] xfrm interface: fix memory leak on creation Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 214/243] xfrm interface: fix list corruption for x-netns Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nicolas Dichtel, Julien Floret,
	Steffen Klassert

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

commit e9e7e85d75f3731079ffd77c1a66f037aef04fe7 upstream.

The new parameters must not be stored in the netdev_priv() before
validation, it may corrupt the interface. Note also that if data is NULL,
only a memset() is done.

$ ip link add xfrm1 type xfrm dev lo if_id 1
$ ip link add xfrm2 type xfrm dev lo if_id 2
$ ip link set xfrm1 type xfrm dev lo if_id 2
RTNETLINK answers: File exists
$ ip -d link list dev xfrm1
5: xfrm1@lo: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 minmtu 68 maxmtu 1500
    xfrm if_id 0x2 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

=> "if_id 0x2"

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/xfrm/xfrm_interface.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -674,12 +674,12 @@ static int xfrmi_changelink(struct net_d
 			   struct nlattr *data[],
 			   struct netlink_ext_ack *extack)
 {
-	struct xfrm_if *xi = netdev_priv(dev);
 	struct net *net = dev_net(dev);
+	struct xfrm_if_parms p;
+	struct xfrm_if *xi;
 
-	xfrmi_netlink_parms(data, &xi->p);
-
-	xi = xfrmi_locate(net, &xi->p);
+	xfrmi_netlink_parms(data, &p);
+	xi = xfrmi_locate(net, &p);
 	if (!xi) {
 		xi = netdev_priv(dev);
 	} else {
@@ -687,7 +687,7 @@ static int xfrmi_changelink(struct net_d
 			return -EEXIST;
 	}
 
-	return xfrmi_update(xi, &xi->p);
+	return xfrmi_update(xi, &p);
 }
 
 static size_t xfrmi_get_size(const struct net_device *dev)



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

* [PATCH 4.19 214/243] xfrm interface: fix list corruption for x-netns
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (212 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 213/243] xfrm interface: avoid corruption on changelink Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 215/243] xfrm interface: fix management of phydev Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julien Floret, Nicolas Dichtel,
	Steffen Klassert

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

commit c5d1030f23002430c2a336b2b629b9d6f72b3564 upstream.

dev_net(dev) is the netns of the device and xi->net is the link netns,
where the device has been linked.
changelink() must operate in the link netns to avoid a corruption of
the xfrm lists.

Note that xi->net and dev_net(xi->physdev) are always the same.

Before the patch, the xfrmi lists may be corrupted and can later trigger a
kernel panic.

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Reported-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/xfrm/xfrm_interface.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -505,7 +505,7 @@ static int xfrmi_change(struct xfrm_if *
 
 static int xfrmi_update(struct xfrm_if *xi, struct xfrm_if_parms *p)
 {
-	struct net *net = dev_net(xi->dev);
+	struct net *net = xi->net;
 	struct xfrmi_net *xfrmn = net_generic(net, xfrmi_net_id);
 	int err;
 
@@ -674,9 +674,9 @@ static int xfrmi_changelink(struct net_d
 			   struct nlattr *data[],
 			   struct netlink_ext_ack *extack)
 {
-	struct net *net = dev_net(dev);
+	struct xfrm_if *xi = netdev_priv(dev);
+	struct net *net = xi->net;
 	struct xfrm_if_parms p;
-	struct xfrm_if *xi;
 
 	xfrmi_netlink_parms(data, &p);
 	xi = xfrmi_locate(net, &p);
@@ -718,7 +718,7 @@ struct net *xfrmi_get_link_net(const str
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 
-	return dev_net(xi->phydev);
+	return xi->net;
 }
 
 static const struct nla_policy xfrmi_policy[IFLA_XFRM_MAX + 1] = {



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

* [PATCH 4.19 215/243] xfrm interface: fix management of phydev
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (213 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 214/243] xfrm interface: fix list corruption for x-netns Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 216/243] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nicolas Dichtel, Julien Floret,
	Steffen Klassert

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>

commit 22d6552f827ef76ade3edf6bbb3f05048a0a7d8b upstream.

With the current implementation, phydev cannot be removed:

$ ip link add dummy type dummy
$ ip link add xfrm1 type xfrm dev dummy if_id 1
$ ip l d dummy
 kernel:[77938.465445] unregister_netdevice: waiting for dummy to become free. Usage count = 1

Manage it like in ip tunnels, ie just keep the ifindex. Not that the side
effect, is that the phydev is now optional.

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/net/xfrm.h        |    1 -
 net/xfrm/xfrm_interface.c |   34 ++++++++++++++++++----------------
 2 files changed, 18 insertions(+), 17 deletions(-)

--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1062,7 +1062,6 @@ struct xfrm_if_parms {
 struct xfrm_if {
 	struct xfrm_if __rcu *next;	/* next interface in list */
 	struct net_device *dev;		/* virtual device associated with interface */
-	struct net_device *phydev;	/* physical device */
 	struct net *net;		/* netns for packet i/o */
 	struct xfrm_if_parms p;		/* interface parms */
 
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -177,7 +177,6 @@ static void xfrmi_dev_uninit(struct net_
 	struct xfrmi_net *xfrmn = net_generic(xi->net, xfrmi_net_id);
 
 	xfrmi_unlink(xfrmn, xi);
-	dev_put(xi->phydev);
 	dev_put(dev);
 }
 
@@ -364,7 +363,7 @@ static netdev_tx_t xfrmi_xmit(struct sk_
 		goto tx_err;
 	}
 
-	fl.flowi_oif = xi->phydev->ifindex;
+	fl.flowi_oif = xi->p.link;
 
 	ret = xfrmi_xmit2(skb, dev, &fl);
 	if (ret < 0)
@@ -553,7 +552,7 @@ static int xfrmi_get_iflink(const struct
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 
-	return xi->phydev->ifindex;
+	return xi->p.link;
 }
 
 
@@ -579,12 +578,14 @@ static void xfrmi_dev_setup(struct net_d
 	dev->needs_free_netdev	= true;
 	dev->priv_destructor	= xfrmi_dev_free;
 	netif_keep_dst(dev);
+
+	eth_broadcast_addr(dev->broadcast);
 }
 
 static int xfrmi_dev_init(struct net_device *dev)
 {
 	struct xfrm_if *xi = netdev_priv(dev);
-	struct net_device *phydev = xi->phydev;
+	struct net_device *phydev = __dev_get_by_index(xi->net, xi->p.link);
 	int err;
 
 	dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
@@ -599,13 +600,19 @@ static int xfrmi_dev_init(struct net_dev
 
 	dev->features |= NETIF_F_LLTX;
 
-	dev->needed_headroom = phydev->needed_headroom;
-	dev->needed_tailroom = phydev->needed_tailroom;
-
-	if (is_zero_ether_addr(dev->dev_addr))
-		eth_hw_addr_inherit(dev, phydev);
-	if (is_zero_ether_addr(dev->broadcast))
-		memcpy(dev->broadcast, phydev->broadcast, dev->addr_len);
+	if (phydev) {
+		dev->needed_headroom = phydev->needed_headroom;
+		dev->needed_tailroom = phydev->needed_tailroom;
+
+		if (is_zero_ether_addr(dev->dev_addr))
+			eth_hw_addr_inherit(dev, phydev);
+		if (is_zero_ether_addr(dev->broadcast))
+			memcpy(dev->broadcast, phydev->broadcast,
+			       dev->addr_len);
+	} else {
+		eth_hw_addr_random(dev);
+		eth_broadcast_addr(dev->broadcast);
+	}
 
 	return 0;
 }
@@ -655,13 +662,8 @@ static int xfrmi_newlink(struct net *src
 	xi->p = p;
 	xi->net = net;
 	xi->dev = dev;
-	xi->phydev = dev_get_by_index(net, p.link);
-	if (!xi->phydev)
-		return -ENODEV;
 
 	err = xfrmi_create(dev);
-	if (err < 0)
-		dev_put(xi->phydev);
 	return err;
 }
 



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

* [PATCH 4.19 216/243] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (214 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 215/243] xfrm interface: fix management of phydev Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 217/243] CIFS: Fix SMB2 oplock break processing Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Pavel Shilovsky, Aurelien Aptel,
	Steve French

From: Pavel Shilovsky <pshilov@microsoft.com>

commit 6f582b273ec23332074d970a7fb25bef835df71f upstream.

Currently when the client creates a cifsFileInfo structure for
a newly opened file, it allocates a list of byte-range locks
with a pointer to the new cfile and attaches this list to the
inode's lock list. The latter happens before initializing all
other fields, e.g. cfile->tlink. Thus a partially initialized
cifsFileInfo structure becomes available to other threads that
walk through the inode's lock list. One example of such a thread
may be an oplock break worker thread that tries to push all
cached byte-range locks. This causes NULL-pointer dereference
in smb2_push_mandatory_locks() when accessing cfile->tlink:

[598428.945633] BUG: kernel NULL pointer dereference, address: 0000000000000038
...
[598428.945749] Workqueue: cifsoplockd cifs_oplock_break [cifs]
[598428.945793] RIP: 0010:smb2_push_mandatory_locks+0xd6/0x5a0 [cifs]
...
[598428.945834] Call Trace:
[598428.945870]  ? cifs_revalidate_mapping+0x45/0x90 [cifs]
[598428.945901]  cifs_oplock_break+0x13d/0x450 [cifs]
[598428.945909]  process_one_work+0x1db/0x380
[598428.945914]  worker_thread+0x4d/0x400
[598428.945921]  kthread+0x104/0x140
[598428.945925]  ? process_one_work+0x380/0x380
[598428.945931]  ? kthread_park+0x80/0x80
[598428.945937]  ret_from_fork+0x35/0x40

Fix this by reordering initialization steps of the cifsFileInfo
structure: initialize all the fields first and then add the new
byte-range lock list to the inode's lock list.

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -312,9 +312,6 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 	INIT_LIST_HEAD(&fdlocks->locks);
 	fdlocks->cfile = cfile;
 	cfile->llist = fdlocks;
-	cifs_down_write(&cinode->lock_sem);
-	list_add(&fdlocks->llist, &cinode->llist);
-	up_write(&cinode->lock_sem);
 
 	cfile->count = 1;
 	cfile->pid = current->tgid;
@@ -338,6 +335,10 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 		oplock = 0;
 	}
 
+	cifs_down_write(&cinode->lock_sem);
+	list_add(&fdlocks->llist, &cinode->llist);
+	up_write(&cinode->lock_sem);
+
 	spin_lock(&tcon->open_file_lock);
 	if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE && oplock)
 		oplock = fid->pending_open->oplock;



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

* [PATCH 4.19 217/243] CIFS: Fix SMB2 oplock break processing
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (215 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 216/243] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 218/243] tty: vt: keyboard: reject invalid keycodes Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Pavel Shilovsky, Steve French

From: Pavel Shilovsky <pshilov@microsoft.com>

commit fa9c2362497fbd64788063288dc4e74daf977ebb upstream.

Even when mounting modern protocol version the server may be
configured without supporting SMB2.1 leases and the client
uses SMB2 oplock to optimize IO performance through local caching.

However there is a problem in oplock break handling that leads
to missing a break notification on the client who has a file
opened. It latter causes big latencies to other clients that
are trying to open the same file.

The problem reproduces when there are multiple shares from the
same server mounted on the client. The processing code tries to
match persistent and volatile file ids from the break notification
with an open file but it skips all share besides the first one.
Fix this by looking up in all shares belonging to the server that
issued the oplock break.

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -673,10 +673,10 @@ smb2_is_valid_oplock_break(char *buffer,
 	spin_lock(&cifs_tcp_ses_lock);
 	list_for_each(tmp, &server->smb_ses_list) {
 		ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
+
 		list_for_each(tmp1, &ses->tcon_list) {
 			tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
 
-			cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks);
 			spin_lock(&tcon->open_file_lock);
 			list_for_each(tmp2, &tcon->openFileList) {
 				cfile = list_entry(tmp2, struct cifsFileInfo,
@@ -688,6 +688,8 @@ smb2_is_valid_oplock_break(char *buffer,
 					continue;
 
 				cifs_dbg(FYI, "file id match, oplock break\n");
+				cifs_stats_inc(
+				    &tcon->stats.cifs_stats.num_oplock_brks);
 				cinode = CIFS_I(d_inode(cfile->dentry));
 				spin_lock(&cfile->file_info_lock);
 				if (!CIFS_CACHE_WRITE(cinode) &&
@@ -720,9 +722,6 @@ smb2_is_valid_oplock_break(char *buffer,
 				return true;
 			}
 			spin_unlock(&tcon->open_file_lock);
-			spin_unlock(&cifs_tcp_ses_lock);
-			cifs_dbg(FYI, "No matching file for oplock break\n");
-			return true;
 		}
 	}
 	spin_unlock(&cifs_tcp_ses_lock);



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

* [PATCH 4.19 218/243] tty: vt: keyboard: reject invalid keycodes
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (216 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 217/243] CIFS: Fix SMB2 oplock break processing Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 219/243] can: slcan: Fix use-after-free Read in slcan_open Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+19340dff067c2d3835c0, Dmitry Torokhov

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

commit b2b2dd71e0859436d4e05b2f61f86140250ed3f8 upstream.

Do not try to handle keycodes that are too big, otherwise we risk doing
out-of-bounds writes:

BUG: KASAN: global-out-of-bounds in clear_bit include/asm-generic/bitops-instrumented.h:56 [inline]
BUG: KASAN: global-out-of-bounds in kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
BUG: KASAN: global-out-of-bounds in kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
Write of size 8 at addr ffffffff89a1b2d8 by task syz-executor108/1722
...
 kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
 kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
 input_to_handler+0x3b6/0x4c0 drivers/input/input.c:118
 input_pass_values.part.0+0x2e3/0x720 drivers/input/input.c:145
 input_pass_values drivers/input/input.c:949 [inline]
 input_set_keycode+0x290/0x320 drivers/input/input.c:954
 evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882
 evdev_do_ioctl drivers/input/evdev.c:1150 [inline]

In this case we were dealing with a fuzzed HID device that declared over
12K buttons, and while HID layer should not be reporting to us such big
keycodes, we should also be defensive and reject invalid data ourselves as
well.

Reported-by: syzbot+19340dff067c2d3835c0@syzkaller.appspotmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191122204220.GA129459@dtor-ws
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1491,7 +1491,7 @@ static void kbd_event(struct input_handl
 
 	if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
 		kbd_rawcode(value);
-	if (event_type == EV_KEY)
+	if (event_type == EV_KEY && event_code <= KEY_MAX)
 		kbd_keycode(event_code, value, HW_RAW(handle->dev));
 
 	spin_unlock(&kbd_event_lock);



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

* [PATCH 4.19 219/243] can: slcan: Fix use-after-free Read in slcan_open
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (217 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 218/243] tty: vt: keyboard: reject invalid keycodes Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 220/243] kernfs: fix ino wrap-around detection Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wolfgang Grandegger,
	Marc Kleine-Budde, David Miller, Oliver Hartkopp, Lukas Bulwahn,
	Jouni Hogander

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

commit 9ebd796e24008f33f06ebea5a5e6aceb68b51794 upstream.

Slcan_open doesn't clean-up device which registration failed from the
slcan_devs device list. On next open this list is iterated and freed
device is accessed. Fix this by calling slc_free_netdev in error path.

Driver/net/can/slcan.c is derived from slip.c. Use-after-free error was
identified in slip_open by syzboz. Same bug is in slcan.c. Here is the
trace from the Syzbot slip report:

__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
sl_sync drivers/net/slip/slip.c:725 [inline]
slip_open+0xecd/0x11b7 drivers/net/slip/slip.c:801
tty_ldisc_open.isra.0+0xa3/0x110 drivers/tty/tty_ldisc.c:469
tty_set_ldisc+0x30e/0x6b0 drivers/tty/tty_ldisc.c:596
tiocsetd drivers/tty/tty_io.c:2334 [inline]
tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2594
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:509 [inline]
do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696
ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl fs/ioctl.c:718 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Fixes: ed50e1600b44 ("slcan: Fix memory leak in error path")
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: David 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>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.4
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
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);
+	slc_free_netdev(sl->dev);
 	free_netdev(sl->dev);
 
 err_exit:



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

* [PATCH 4.19 220/243] kernfs: fix ino wrap-around detection
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (218 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 219/243] can: slcan: Fix use-after-free Read in slcan_open Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 221/243] jbd2: Fix possible overflow in jbd2_log_space_left() Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tejun Heo, Namhyung Kim

From: Tejun Heo <tj@kernel.org>

commit e23f568aa63f64cd6b355094224cc9356c0f696b upstream.

When the 32bit ino wraps around, kernfs increments the generation
number to distinguish reused ino instances.  The wrap-around detection
tests whether the allocated ino is lower than what the cursor but the
cursor is pointing to the next ino to allocate so the condition never
triggers.

Fix it by remembering the last ino and comparing against that.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 4a3ef68acacf ("kernfs: implement i_generation")
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/kernfs/dir.c        |    5 ++---
 include/linux/kernfs.h |    1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -624,7 +624,6 @@ static struct kernfs_node *__kernfs_new_
 {
 	struct kernfs_node *kn;
 	u32 gen;
-	int cursor;
 	int ret;
 
 	name = kstrdup_const(name, GFP_KERNEL);
@@ -637,11 +636,11 @@ static struct kernfs_node *__kernfs_new_
 
 	idr_preload(GFP_KERNEL);
 	spin_lock(&kernfs_idr_lock);
-	cursor = idr_get_cursor(&root->ino_idr);
 	ret = idr_alloc_cyclic(&root->ino_idr, kn, 1, 0, GFP_ATOMIC);
-	if (ret >= 0 && ret < cursor)
+	if (ret >= 0 && ret < root->last_ino)
 		root->next_generation++;
 	gen = root->next_generation;
+	root->last_ino = ret;
 	spin_unlock(&kernfs_idr_lock);
 	idr_preload_end();
 	if (ret < 0)
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -186,6 +186,7 @@ struct kernfs_root {
 
 	/* private fields, do not use outside kernfs proper */
 	struct idr		ino_idr;
+	u32			last_ino;
 	u32			next_generation;
 	struct kernfs_syscall_ops *syscall_ops;
 



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

* [PATCH 4.19 221/243] jbd2: Fix possible overflow in jbd2_log_space_left()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (219 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 220/243] kernfs: fix ino wrap-around detection Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 222/243] drm/msm: fix memleak on release Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Theodore Tso, Jan Kara

From: Jan Kara <jack@suse.cz>

commit add3efdd78b8a0478ce423bb9d4df6bd95e8b335 upstream.

When number of free space in the journal is very low, the arithmetic in
jbd2_log_space_left() could underflow resulting in very high number of
free blocks and thus triggering assertion failure in transaction commit
code complaining there's not enough space in the journal:

J_ASSERT(journal->j_free > 1);

Properly check for the low number of free blocks.

CC: stable@vger.kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1587,7 +1587,7 @@ static inline int jbd2_space_needed(jour
 static inline unsigned long jbd2_log_space_left(journal_t *journal)
 {
 	/* Allow for rounding errors */
-	unsigned long free = journal->j_free - 32;
+	long free = journal->j_free - 32;
 
 	if (journal->j_committing_transaction) {
 		unsigned long committing = atomic_read(&journal->
@@ -1596,7 +1596,7 @@ static inline unsigned long jbd2_log_spa
 		/* Transaction + control blocks */
 		free -= committing + (committing >> JBD2_CONTROL_BLOCKS_SHIFT);
 	}
-	return free;
+	return max_t(long, free, 0);
 }
 
 /*



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

* [PATCH 4.19 222/243] drm/msm: fix memleak on release
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (220 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 221/243] jbd2: Fix possible overflow in jbd2_log_space_left() Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 223/243] drm/i810: Prevent underflow in ioctl Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jordan Crouse, Rob Clark,
	Johan Hovold, Sean Paul

From: Johan Hovold <johan@kernel.org>

commit a64fc11b9a520c55ca34d82e5ca32274f49b6b15 upstream.

If a process is interrupted while accessing the "gpu" debugfs file and
the drm device struct_mutex is contended, release() could return early
and fail to free related resources.

Note that the return value from release() is ignored.

Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state")
Cc: stable <stable@vger.kernel.org>     # 4.18
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191010131333.23635-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/msm/msm_debugfs.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -53,12 +53,8 @@ static int msm_gpu_release(struct inode
 	struct msm_gpu_show_priv *show_priv = m->private;
 	struct msm_drm_private *priv = show_priv->dev->dev_private;
 	struct msm_gpu *gpu = priv->gpu;
-	int ret;
-
-	ret = mutex_lock_interruptible(&show_priv->dev->struct_mutex);
-	if (ret)
-		return ret;
 
+	mutex_lock(&show_priv->dev->struct_mutex);
 	gpu->funcs->gpu_state_put(show_priv->state);
 	mutex_unlock(&show_priv->dev->struct_mutex);
 



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

* [PATCH 4.19 223/243] drm/i810: Prevent underflow in ioctl
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (221 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 222/243] drm/msm: fix memleak on release Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 224/243] arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node" Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Chris Wilson

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

commit 4f69851fbaa26b155330be35ce8ac393e93e7442 upstream.

The "used" variables here come from the user in the ioctl and it can be
negative.  It could result in an out of bounds write.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004102251.GC823@mwanda
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/i810/i810_dma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -721,7 +721,7 @@ static void i810_dma_dispatch_vertex(str
 	if (nbox > I810_NR_SAREA_CLIPRECTS)
 		nbox = I810_NR_SAREA_CLIPRECTS;
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	if (sarea_priv->dirty)
@@ -1041,7 +1041,7 @@ static void i810_dma_dispatch_mc(struct
 	if (u != I810_BUF_CLIENT)
 		DRM_DEBUG("MC found buffer that isn't mine!\n");
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	sarea_priv->dirty = 0x7f;



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

* [PATCH 4.19 224/243] arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node"
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (222 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 223/243] drm/i810: Prevent underflow in ioctl Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 225/243] KVM: arm/arm64: vgic: Dont rely on the wrong pending table Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alim Akhtar, Marek Szyprowski,
	Krzysztof Kozlowski

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

commit bed903167ae5b5532eda5d7db26de451bd232da5 upstream.

Commit ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space
mapping for soc node") changed the address and size cells in root node from
2 to 1, but /memory nodes for the affected boards were not updated. This
went unnoticed on Exynos5433-based TM2(e) boards, because they use u-boot,
which updates /memory node to the correct values. On the other hand, the
mentioned commit broke boot on Exynos7-based Espresso board, which
bootloader doesn't touch /memory node at all.

This patch reverts commit ef72171b3621 ("arm64: dts: exynos: Remove
unneeded address space mapping for soc node"), so Exynos5433 and Exynos7
SoCs again matches other ARM64 platforms with 64bit mappings in root
node.

Reported-by: Alim Akhtar <alim.akhtar@samsung.com>
Fixes: ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: <stable@vger.kernel.org> # 5.3.x: 72ddcf6aa224 arm64: dts: exynos: Move GPU under /soc node for Exynos5433
Cc: <stable@vger.kernel.org> # 5.3.x: ede87c3a2bdb arm64: dts: exynos: Move GPU under /soc node for Exynos7
Cc: <stable@vger.kernel.org> # 4.18.x
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi |    6 +++---
 arch/arm64/boot/dts/exynos/exynos7.dtsi    |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -18,8 +18,8 @@
 
 / {
 	compatible = "samsung,exynos5433";
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	interrupt-parent = <&gic>;
 
@@ -235,7 +235,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0x0 0x0 0x0 0x18000000>;
 
 		arm_a53_pmu {
 			compatible = "arm,cortex-a53-pmu", "arm,armv8-pmuv3";
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -12,8 +12,8 @@
 / {
 	compatible = "samsung,exynos7";
 	interrupt-parent = <&gic>;
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	aliases {
 		pinctrl0 = &pinctrl_alive;
@@ -70,7 +70,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0 0 0 0x18000000>;
 
 		chipid@10000000 {
 			compatible = "samsung,exynos4210-chipid";



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

* [PATCH 4.19 225/243] KVM: arm/arm64: vgic: Dont rely on the wrong pending table
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (223 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 224/243] arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node" Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 226/243] KVM: x86: do not modify masked bits of shared MSRs Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Zenghui Yu, Marc Zyngier, Eric Auger

From: Zenghui Yu <yuzenghui@huawei.com>

commit ca185b260951d3b55108c0b95e188682d8a507b7 upstream.

It's possible that two LPIs locate in the same "byte_offset" but target
two different vcpus, where their pending status are indicated by two
different pending tables.  In such a scenario, using last_byte_offset
optimization will lead KVM relying on the wrong pending table entry.
Let us use last_ptr instead, which can be treated as a byte index into
a pending table and also, can be vcpu specific.

Fixes: 280771252c1b ("KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES")
Cc: stable@vger.kernel.org
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20191029071919.177-4-yuzenghui@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 virt/kvm/arm/vgic/vgic-v3.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/virt/kvm/arm/vgic/vgic-v3.c
+++ b/virt/kvm/arm/vgic/vgic-v3.c
@@ -375,8 +375,8 @@ retry:
 int vgic_v3_save_pending_tables(struct kvm *kvm)
 {
 	struct vgic_dist *dist = &kvm->arch.vgic;
-	int last_byte_offset = -1;
 	struct vgic_irq *irq;
+	gpa_t last_ptr = ~(gpa_t)0;
 	int ret;
 	u8 val;
 
@@ -396,11 +396,11 @@ int vgic_v3_save_pending_tables(struct k
 		bit_nr = irq->intid % BITS_PER_BYTE;
 		ptr = pendbase + byte_offset;
 
-		if (byte_offset != last_byte_offset) {
+		if (ptr != last_ptr) {
 			ret = kvm_read_guest_lock(kvm, ptr, &val, 1);
 			if (ret)
 				return ret;
-			last_byte_offset = byte_offset;
+			last_ptr = ptr;
 		}
 
 		stored = val & (1U << bit_nr);



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

* [PATCH 4.19 226/243] KVM: x86: do not modify masked bits of shared MSRs
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (224 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 225/243] KVM: arm/arm64: vgic: Dont rely on the wrong pending table Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 227/243] KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jim Mattson, Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

commit de1fca5d6e0105c9d33924e1247e2f386efc3ece upstream.

"Shared MSRs" are guest MSRs that are written to the host MSRs but
keep their value until the next return to userspace.  They support
a mask, so that some bits keep the host value, but this mask is
only used to skip an unnecessary MSR write and the value written
to the MSR is always the guest MSR.

Fix this and, while at it, do not update smsr->values[slot].curr if
for whatever reason the wrmsr fails.  This should only happen due to
reserved bits, so the value written to smsr->values[slot].curr
will not match when the user-return notifier and the host value will
always be restored.  However, it is untidy and in rare cases this
can actually avoid spurious WRMSRs on return to userspace.

Cc: stable@vger.kernel.org
Reviewed-by: Jim Mattson <jmattson@google.com>
Tested-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/x86.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -290,13 +290,14 @@ int kvm_set_shared_msr(unsigned slot, u6
 	struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
 	int err;
 
-	if (((value ^ smsr->values[slot].curr) & mask) == 0)
+	value = (value & mask) | (smsr->values[slot].host & ~mask);
+	if (value == smsr->values[slot].curr)
 		return 0;
-	smsr->values[slot].curr = value;
 	err = wrmsrl_safe(shared_msrs_global.msrs[slot], value);
 	if (err)
 		return 1;
 
+	smsr->values[slot].curr = value;
 	if (!smsr->registered) {
 		smsr->urn.on_user_return = kvm_on_user_return;
 		user_return_notifier_register(&smsr->urn);



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

* [PATCH 4.19 227/243] KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (225 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 226/243] KVM: x86: do not modify masked bits of shared MSRs Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 228/243] KVM: x86: Grab KVMs srcu lock when setting nested state Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jim Mattson, Paolo Bonzini

From: Paolo Bonzini <pbonzini@redhat.com>

commit cbbaa2727aa3ae9e0a844803da7cef7fd3b94f2b upstream.

KVM does not implement MSR_IA32_TSX_CTRL, so it must not be presented
to the guests.  It is also confusing to have !ARCH_CAP_TSX_CTRL_MSR &&
!RTM && ARCH_CAP_TAA_NO: lack of MSR_IA32_TSX_CTRL suggests TSX was not
hidden (it actually was), yet the value says that TSX is not vulnerable
to microarchitectural data sampling.  Fix both.

Cc: stable@vger.kernel.org
Tested-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/x86.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1174,10 +1174,15 @@ u64 kvm_get_arch_capabilities(void)
 	 * If TSX is disabled on the system, guests are also mitigated against
 	 * TAA and clear CPU buffer mitigation is not required for guests.
 	 */
-	if (boot_cpu_has_bug(X86_BUG_TAA) && boot_cpu_has(X86_FEATURE_RTM) &&
-	    (data & ARCH_CAP_TSX_CTRL_MSR))
+	if (!boot_cpu_has(X86_FEATURE_RTM))
+		data &= ~ARCH_CAP_TAA_NO;
+	else if (!boot_cpu_has_bug(X86_BUG_TAA))
+		data |= ARCH_CAP_TAA_NO;
+	else if (data & ARCH_CAP_TSX_CTRL_MSR)
 		data &= ~ARCH_CAP_MDS_NO;
 
+	/* KVM does not emulate MSR_IA32_TSX_CTRL.  */
+	data &= ~ARCH_CAP_TSX_CTRL_MSR;
 	return data;
 }
 



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

* [PATCH 4.19 228/243] KVM: x86: Grab KVMs srcu lock when setting nested state
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (226 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 227/243] KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 229/243] crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sean Christopherson, Paolo Bonzini

From: Sean Christopherson <sean.j.christopherson@intel.com>

commit ad5996d9a0e8019c3ae5151e687939369acfe044 upstream.

Acquire kvm->srcu for the duration of ->set_nested_state() to fix a bug
where nVMX derefences ->memslots without holding ->srcu or ->slots_lock.

The other half of nested migration, ->get_nested_state(), does not need
to acquire ->srcu as it is a purely a dump of internal KVM (and CPU)
state to userspace.

Detected as an RCU lockdep splat that is 100% reproducible by running
KVM's state_test selftest with CONFIG_PROVE_LOCKING=y.  Note that the
failing function, kvm_is_visible_gfn(), is only checking the validity of
a gfn, it's not actually accessing guest memory (which is more or less
unsupported during vmx_set_nested_state() due to incorrect MMU state),
i.e. vmx_set_nested_state() itself isn't fundamentally broken.  In any
case, setting nested state isn't a fast path so there's no reason to go
out of our way to avoid taking ->srcu.

  =============================
  WARNING: suspicious RCU usage
  5.4.0-rc7+ #94 Not tainted
  -----------------------------
  include/linux/kvm_host.h:626 suspicious rcu_dereference_check() usage!

               other info that might help us debug this:

  rcu_scheduler_active = 2, debug_locks = 1
  1 lock held by evmcs_test/10939:
   #0: ffff88826ffcb800 (&vcpu->mutex){+.+.}, at: kvm_vcpu_ioctl+0x85/0x630 [kvm]

  stack backtrace:
  CPU: 1 PID: 10939 Comm: evmcs_test Not tainted 5.4.0-rc7+ #94
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
  Call Trace:
   dump_stack+0x68/0x9b
   kvm_is_visible_gfn+0x179/0x180 [kvm]
   mmu_check_root+0x11/0x30 [kvm]
   fast_cr3_switch+0x40/0x120 [kvm]
   kvm_mmu_new_cr3+0x34/0x60 [kvm]
   nested_vmx_load_cr3+0xbd/0x1f0 [kvm_intel]
   nested_vmx_enter_non_root_mode+0xab8/0x1d60 [kvm_intel]
   vmx_set_nested_state+0x256/0x340 [kvm_intel]
   kvm_arch_vcpu_ioctl+0x491/0x11a0 [kvm]
   kvm_vcpu_ioctl+0xde/0x630 [kvm]
   do_vfs_ioctl+0xa2/0x6c0
   ksys_ioctl+0x66/0x70
   __x64_sys_ioctl+0x16/0x20
   do_syscall_64+0x54/0x200
   entry_SYSCALL_64_after_hwframe+0x49/0xbe
  RIP: 0033:0x7f59a2b95f47

Fixes: 8fcc4b5923af5 ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4117,6 +4117,7 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 	case KVM_SET_NESTED_STATE: {
 		struct kvm_nested_state __user *user_kvm_nested_state = argp;
 		struct kvm_nested_state kvm_state;
+		int idx;
 
 		r = -EINVAL;
 		if (!kvm_x86_ops->set_nested_state)
@@ -4138,7 +4139,9 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 		if (kvm_state.flags == KVM_STATE_NESTED_RUN_PENDING)
 			break;
 
+		idx = srcu_read_lock(&vcpu->kvm->srcu);
 		r = kvm_x86_ops->set_nested_state(vcpu, user_kvm_nested_state, &kvm_state);
+		srcu_read_unlock(&vcpu->kvm->srcu, idx);
 		break;
 	}
 	default:



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

* [PATCH 4.19 229/243] crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (227 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 228/243] KVM: x86: Grab KVMs srcu lock when setting nested state Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 230/243] crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Christian Lamparter, Herbert Xu

From: Christian Lamparter <chunkeey@gmail.com>

commit 746c908c4d72e49068ab216c3926d2720d71a90d upstream.

This patch fixes a crash that can happen during probe
when the available dma memory is not enough (this can
happen if the crypto4xx is built as a module).

The descriptor window mapping would end up being free'd
twice, once in crypto4xx_build_pdr() and the second time
in crypto4xx_destroy_sdr().

Fixes: 5d59ad6eea82 ("crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/amcc/crypto4xx_core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -373,12 +373,8 @@ static u32 crypto4xx_build_sdr(struct cr
 		dma_alloc_coherent(dev->core_dev->device,
 			PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
 			&dev->scatter_buffer_pa, GFP_ATOMIC);
-	if (!dev->scatter_buffer_va) {
-		dma_free_coherent(dev->core_dev->device,
-				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
-				  dev->sdr, dev->sdr_pa);
+	if (!dev->scatter_buffer_va)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < PPC4XX_NUM_SD; i++) {
 		dev->sdr[i].ptr = dev->scatter_buffer_pa +



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

* [PATCH 4.19 230/243] crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (228 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 229/243] crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 231/243] crypto: af_alg - cast ki_complete ternary op to int Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tudor Ambarus, Herbert Xu

From: Tudor Ambarus <tudor.ambarus@microchip.com>

commit 86ef1dfcb561473fbf5e199d58d18c55554d78be upstream.

commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property")
adds a test vector where the input length is smaller than the IV length
(the second test vector). This revealed a NULL pointer dereference in
the atmel-aes driver, that is caused by passing an incorrect offset in
scatterwalk_map_and_copy() when atmel_aes_complete() is called.

Do not save the IV in req->info of ablkcipher_request (or equivalently
req->iv of skcipher_request) when req->nbytes < ivsize, because the IV
will not be further used.

While touching the code, modify the type of ivsize from int to
unsigned int, to comply with the return type of
crypto_ablkcipher_ivsize().

Fixes: 91308019ecb4 ("crypto: atmel-aes - properly set IV after {en,de}crypt")
Cc: <stable@vger.kernel.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/atmel-aes.c |   53 +++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -493,6 +493,29 @@ static inline bool atmel_aes_is_encrypt(
 static void atmel_aes_authenc_complete(struct atmel_aes_dev *dd, int err);
 #endif
 
+static void atmel_aes_set_iv_as_last_ciphertext_block(struct atmel_aes_dev *dd)
+{
+	struct ablkcipher_request *req = ablkcipher_request_cast(dd->areq);
+	struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
+	struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req);
+	unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+
+	if (req->nbytes < ivsize)
+		return;
+
+	if (rctx->mode & AES_FLAGS_ENCRYPT) {
+		scatterwalk_map_and_copy(req->info, req->dst,
+					 req->nbytes - ivsize, ivsize, 0);
+	} else {
+		if (req->src == req->dst)
+			memcpy(req->info, rctx->lastc, ivsize);
+		else
+			scatterwalk_map_and_copy(req->info, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
+	}
+}
+
 static inline int atmel_aes_complete(struct atmel_aes_dev *dd, int err)
 {
 #ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC
@@ -503,26 +526,8 @@ static inline int atmel_aes_complete(str
 	clk_disable(dd->iclk);
 	dd->flags &= ~AES_FLAGS_BUSY;
 
-	if (!dd->ctx->is_aead) {
-		struct ablkcipher_request *req =
-			ablkcipher_request_cast(dd->areq);
-		struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
-		struct crypto_ablkcipher *ablkcipher =
-			crypto_ablkcipher_reqtfm(req);
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
-
-		if (rctx->mode & AES_FLAGS_ENCRYPT) {
-			scatterwalk_map_and_copy(req->info, req->dst,
-				req->nbytes - ivsize, ivsize, 0);
-		} else {
-			if (req->src == req->dst) {
-				memcpy(req->info, rctx->lastc, ivsize);
-			} else {
-				scatterwalk_map_and_copy(req->info, req->src,
-					req->nbytes - ivsize, ivsize, 0);
-			}
-		}
-	}
+	if (!dd->ctx->is_aead)
+		atmel_aes_set_iv_as_last_ciphertext_block(dd);
 
 	if (dd->is_async)
 		dd->areq->complete(dd->areq, err);
@@ -1128,10 +1133,12 @@ static int atmel_aes_crypt(struct ablkci
 	rctx->mode = mode;
 
 	if (!(mode & AES_FLAGS_ENCRYPT) && (req->src == req->dst)) {
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+		unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
 
-		scatterwalk_map_and_copy(rctx->lastc, req->src,
-			(req->nbytes - ivsize), ivsize, 0);
+		if (req->nbytes >= ivsize)
+			scatterwalk_map_and_copy(rctx->lastc, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
 	}
 
 	return atmel_aes_handle_queue(dd, &req->base);



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

* [PATCH 4.19 231/243] crypto: af_alg - cast ki_complete ternary op to int
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (229 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 230/243] crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 232/243] crypto: ccp - fix uninitialized list head Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ayush Sawal, Atul Gupta, Herbert Xu

From: Ayush Sawal <ayush.sawal@chelsio.com>

commit 64e7f852c47ce99f6c324c46d6a299a5a7ebead9 upstream.

when libkcapi test is executed  using HW accelerator, cipher operation
return -74.Since af_alg_async_cb->ki_complete treat err as unsigned int,
libkcapi receive 429467222 even though it expect -ve value.

Hence its required to cast resultlen to int so that proper
error is returned to libkcapi.

AEAD one shot non-aligned test 2(libkcapi test)
./../bin/kcapi   -x 10   -c "gcm(aes)" -i 7815d4b06ae50c9c56e87bd7
-k ea38ac0c9b9998c80e28fb496a2b88d9 -a
"853f98a750098bec1aa7497e979e78098155c877879556bb51ddeb6374cbaefc"
-t "c4ce58985b7203094be1d134c1b8ab0b" -q
"b03692f86d1b8b39baf2abb255197c98"

Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/af_alg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1058,7 +1058,7 @@ void af_alg_async_cb(struct crypto_async
 	af_alg_free_resources(areq);
 	sock_put(sk);
 
-	iocb->ki_complete(iocb, err ? err : resultlen, 0);
+	iocb->ki_complete(iocb, err ? err : (int)resultlen, 0);
 }
 EXPORT_SYMBOL_GPL(af_alg_async_cb);
 



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

* [PATCH 4.19 232/243] crypto: ccp - fix uninitialized list head
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (230 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 231/243] crypto: af_alg - cast ki_complete ternary op to int Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 233/243] crypto: ecdh - fix big endian bug in ECC library Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sahaj Sarup, Mark Salter,
	Gary R Hook, Herbert Xu

From: Mark Salter <msalter@redhat.com>

commit 691505a803a7f223b2af621848d581259c61f77d upstream.

A NULL-pointer dereference was reported in fedora bz#1762199 while
reshaping a raid6 array after adding a fifth drive to an existing
array.

[   47.343549] md/raid:md0: raid level 6 active with 3 out of 5 devices, algorithm 2
[   47.804017] md0: detected capacity change from 0 to 7885289422848
[   47.822083] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
...
[   47.940477] CPU: 1 PID: 14210 Comm: md0_raid6 Tainted: G        W         5.2.18-200.fc30.aarch64 #1
[   47.949594] Hardware name: AMD Overdrive/Supercharger/To be filled by O.E.M., BIOS ROD1002C 04/08/2016
[   47.958886] pstate: 00400085 (nzcv daIf +PAN -UAO)
[   47.963668] pc : __list_del_entry_valid+0x2c/0xa8
[   47.968366] lr : ccp_tx_submit+0x84/0x168 [ccp]
[   47.972882] sp : ffff00001369b970
[   47.976184] x29: ffff00001369b970 x28: ffff00001369bdb8
[   47.981483] x27: 00000000ffffffff x26: ffff8003b758af70
[   47.986782] x25: ffff8003b758b2d8 x24: ffff8003e6245818
[   47.992080] x23: 0000000000000000 x22: ffff8003e62450c0
[   47.997379] x21: ffff8003dfd6add8 x20: 0000000000000003
[   48.002678] x19: ffff8003e6245100 x18: 0000000000000000
[   48.007976] x17: 0000000000000000 x16: 0000000000000000
[   48.013274] x15: 0000000000000000 x14: 0000000000000000
[   48.018572] x13: ffff7e000ef83a00 x12: 0000000000000001
[   48.023870] x11: ffff000010eff998 x10: 00000000000019a0
[   48.029169] x9 : 0000000000000000 x8 : ffff8003e6245180
[   48.034467] x7 : 0000000000000000 x6 : 000000000000003f
[   48.039766] x5 : 0000000000000040 x4 : ffff8003e0145080
[   48.045064] x3 : dead000000000200 x2 : 0000000000000000
[   48.050362] x1 : 0000000000000000 x0 : ffff8003e62450c0
[   48.055660] Call trace:
[   48.058095]  __list_del_entry_valid+0x2c/0xa8
[   48.062442]  ccp_tx_submit+0x84/0x168 [ccp]
[   48.066615]  async_tx_submit+0x224/0x368 [async_tx]
[   48.071480]  async_trigger_callback+0x68/0xfc [async_tx]
[   48.076784]  ops_run_biofill+0x178/0x1e8 [raid456]
[   48.081566]  raid_run_ops+0x248/0x818 [raid456]
[   48.086086]  handle_stripe+0x864/0x1208 [raid456]
[   48.090781]  handle_active_stripes.isra.0+0xb0/0x278 [raid456]
[   48.096604]  raid5d+0x378/0x618 [raid456]
[   48.100602]  md_thread+0xa0/0x150
[   48.103905]  kthread+0x104/0x130
[   48.107122]  ret_from_fork+0x10/0x18
[   48.110686] Code: d2804003 f2fbd5a3 eb03003f 54000320 (f9400021)
[   48.116766] ---[ end trace 23f390a527f7ad77 ]---

ccp_tx_submit is passed a dma_async_tx_descriptor which is contained in
a ccp_dma_desc and adds it to a ccp channel's pending list:

	list_del(&desc->entry);
	list_add_tail(&desc->entry, &chan->pending);

The problem is that desc->entry may be uninitialized in the
async_trigger_callback path where the descriptor was gotten
from ccp_prep_dma_interrupt which got it from ccp_alloc_dma_desc
which doesn't initialize the desc->entry list head. So, just
initialize the list head to avoid the problem.

Cc: <stable@vger.kernel.org>
Reported-by: Sahaj Sarup <sahajsarup@gmail.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/ccp/ccp-dmaengine.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/crypto/ccp/ccp-dmaengine.c
+++ b/drivers/crypto/ccp/ccp-dmaengine.c
@@ -340,6 +340,7 @@ static struct ccp_dma_desc *ccp_alloc_dm
 	desc->tx_desc.flags = flags;
 	desc->tx_desc.tx_submit = ccp_tx_submit;
 	desc->ccp = chan->ccp;
+	INIT_LIST_HEAD(&desc->entry);
 	INIT_LIST_HEAD(&desc->pending);
 	INIT_LIST_HEAD(&desc->active);
 	desc->status = DMA_IN_PROGRESS;



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

* [PATCH 4.19 233/243] crypto: ecdh - fix big endian bug in ECC library
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (231 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 232/243] crypto: ccp - fix uninitialized list head Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 234/243] crypto: user - fix memory leak in crypto_report Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ard Biesheuvel, Herbert Xu

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

commit f398243e9fd6a3a059c1ea7b380c40628dbf0c61 upstream.

The elliptic curve arithmetic library used by the EC-DH KPP implementation
assumes big endian byte order, and unconditionally reverses the byte
and word order of multi-limb quantities. On big endian systems, the byte
reordering is not necessary, while the word ordering needs to be retained.

So replace the __swab64() invocation with a call to be64_to_cpu() which
should do the right thing for both little and big endian builds.

Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support")
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/ecc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -906,10 +906,11 @@ static void ecc_point_mult(struct ecc_po
 static inline void ecc_swap_digits(const u64 *in, u64 *out,
 				   unsigned int ndigits)
 {
+	const __be64 *src = (__force __be64 *)in;
 	int i;
 
 	for (i = 0; i < ndigits; i++)
-		out[i] = __swab64(in[ndigits - 1 - i]);
+		out[i] = be64_to_cpu(src[ndigits - 1 - i]);
 }
 
 static int __ecc_is_key_valid(const struct ecc_curve *curve,



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

* [PATCH 4.19 234/243] crypto: user - fix memory leak in crypto_report
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (232 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 233/243] crypto: ecdh - fix big endian bug in ECC library Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 235/243] spi: atmel: Fix CS high support Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Navid Emamdoost, Herbert Xu

From: Navid Emamdoost <navid.emamdoost@gmail.com>

commit ffdde5932042600c6807d46c1550b28b0db6a3bc upstream.

In crypto_report, a new skb is created via nlmsg_new(). This skb should
be released if crypto_report_alg() fails.

Fixes: a38f7907b926 ("crypto: Add userspace configuration API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/crypto_user.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -288,8 +288,10 @@ static int crypto_report(struct sk_buff
 drop_alg:
 	crypto_mod_put(alg);
 
-	if (err)
+	if (err) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
 }



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

* [PATCH 4.19 235/243] spi: atmel: Fix CS high support
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (233 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 234/243] crypto: user - fix memory leak in crypto_report Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 236/243] mwifiex: update set_mac_address logic Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Gregory CLEMENT, Mark Brown

From: Gregory CLEMENT <gregory.clement@bootlin.com>

commit 7cbb16b2122c09f2ae393a1542fed628505b9da6 upstream.

Until a few years ago, this driver was only used with CS GPIO. The
only exception is CS0 on AT91RM9200 which has to use internal CS. A
limitation of the internal CS is that they don't support CS High.

So by using the CS GPIO the CS high configuration was available except
for the particular case CS0 on RM9200.

When the support for the internal chip-select was added, the check of
the CS high support was not updated. Due to this the driver accepts
this configuration for all the SPI controller v2 (used by all SoCs
excepting the AT91RM9200) whereas the hardware doesn't support it for
infernal CS.

This patch fixes the test to match the hardware capabilities.

Fixes: 4820303480a1 ("spi: atmel: add support for the internal chip-select of the spi controller")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20191017141846.7523-3-gregory.clement@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/spi/spi-atmel.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1193,10 +1193,8 @@ static int atmel_spi_setup(struct spi_de
 	as = spi_master_get_devdata(spi->master);
 
 	/* see notes above re chipselect */
-	if (!atmel_spi_is_v2(as)
-			&& spi->chip_select == 0
-			&& (spi->mode & SPI_CS_HIGH)) {
-		dev_dbg(&spi->dev, "setup: can't be active-high\n");
+	if (!as->use_cs_gpios && (spi->mode & SPI_CS_HIGH)) {
+		dev_warn(&spi->dev, "setup: non GPIO CS can't be active-high\n");
 		return -EINVAL;
 	}
 



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

* [PATCH 4.19 236/243] mwifiex: update set_mac_address logic
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (234 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 235/243] spi: atmel: Fix CS high support Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 237/243] can: ucan: fix non-atomic allocation in completion handler Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sharvari Harisangam, Ganapathi Bhat,
	Kalle Valo, Brian Norris

From: Sharvari Harisangam <sharvari@marvell.com>

commit 7afb94da3cd8a28ed7ae268143117bf1ac8a3371 upstream.

In set_mac_address, driver check for interfaces with same bss_type
For first STA entry, this would return 3 interfaces since all priv's have
bss_type as 0 due to kzalloc. Thus mac address gets changed for STA
unexpected. This patch adds check for first STA and avoids mac address
change. This patch also adds mac_address change for p2p based on bss_num
type.

Signed-off-by: Sharvari Harisangam <sharvari@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Cc: Brian Norris <briannorris@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/marvell/mwifiex/main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -960,10 +960,10 @@ int mwifiex_set_mac_address(struct mwifi
 
 		mac_addr = old_mac_addr;
 
-		if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P)
+		if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P) {
 			mac_addr |= BIT_ULL(MWIFIEX_MAC_LOCAL_ADMIN_BIT);
-
-		if (mwifiex_get_intf_num(priv->adapter, priv->bss_type) > 1) {
+			mac_addr += priv->bss_num;
+		} else if (priv->adapter->priv[0] != priv) {
 			/* Set mac address based on bss_type/bss_num */
 			mac_addr ^= BIT_ULL(priv->bss_type + 8);
 			mac_addr += priv->bss_num;



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

* [PATCH 4.19 237/243] can: ucan: fix non-atomic allocation in completion handler
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (235 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 236/243] mwifiex: update set_mac_address logic Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 238/243] RDMA/qib: Validate ->show()/store() callbacks before calling them Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jakob Unterwurzacher,
	Martin Elshuber, Philipp Tomsich, Johan Hovold,
	Marc Kleine-Budde

From: Johan Hovold <johan@kernel.org>

commit 870db5d1015c8bd63e93b579e857223c96249ff7 upstream.

USB completion handlers are called in atomic context and must
specifically not allocate memory using GFP_KERNEL.

Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices")
Cc: stable <stable@vger.kernel.org>     # 4.19
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Cc: Martin Elshuber <martin.elshuber@theobroma-systems.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/usb/ucan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -796,7 +796,7 @@ resubmit:
 			  up);
 
 	usb_anchor_urb(urb, &up->rx_urbs);
-	ret = usb_submit_urb(urb, GFP_KERNEL);
+	ret = usb_submit_urb(urb, GFP_ATOMIC);
 
 	if (ret < 0) {
 		netdev_err(up->netdev,



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

* [PATCH 4.19 238/243] RDMA/qib: Validate ->show()/store() callbacks before calling them
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (236 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 237/243] can: ucan: fix non-atomic allocation in completion handler Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 239/243] iomap: Fix pipe page leakage during splicing Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Viresh Kumar, Jason Gunthorpe, Sasha Levin

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 7ee23491b39259ae83899dd93b2a29ef0f22f0a7 upstream.

The permissions of the read-only or write-only sysfs files can be
changed (as root) and the user can then try to read a write-only file or
write to a read-only file which will lead to kernel crash here.

Protect against that by always validating the show/store callbacks.

Link: https://lore.kernel.org/r/d45cc26361a174ae12dbb86c994ef334d257924b.1573096807.git.viresh.kumar@linaro.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/qib/qib_sysfs.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/infiniband/hw/qib/qib_sysfs.c
+++ b/drivers/infiniband/hw/qib/qib_sysfs.c
@@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->show)
+		return -EIO;
+
 	return pattr->show(ppd, buf);
 }
 
@@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->store)
+		return -EIO;
+
 	return pattr->store(ppd, buf, len);
 }
 



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

* [PATCH 4.19 239/243] iomap: Fix pipe page leakage during splicing
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (237 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 238/243] RDMA/qib: Validate ->show()/store() callbacks before calling them Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 240/243] thermal: Fix deadlock in thermal thermal_zone_device_check Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot+991400e8eba7e00a26e1,
	Jan Kara, Darrick J. Wong, Christoph Hellwig

From: Jan Kara <jack@suse.cz>

commit 419e9c38aa075ed0cd3c13d47e15954b686bcdb6 upstream.

When splicing using iomap_dio_rw() to a pipe, we may leak pipe pages
because bio_iov_iter_get_pages() records that the pipe will have full
extent worth of data however if file size is not block size aligned
iomap_dio_rw() returns less than what bio_iov_iter_get_pages() set up
and splice code gets confused leaking a pipe page with the file tail.

Handle the situation similarly to the old direct IO implementation and
revert iter to actually returned read amount which makes iter consistent
with value returned from iomap_dio_rw() and thus the splice code is
happy.

Fixes: ff6a9292e6f6 ("iomap: implement direct I/O")
CC: stable@vger.kernel.org
Reported-by: syzbot+991400e8eba7e00a26e1@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/iomap.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1913,8 +1913,15 @@ iomap_dio_rw(struct kiocb *iocb, struct
 		}
 		pos += ret;
 
-		if (iov_iter_rw(iter) == READ && pos >= dio->i_size)
+		if (iov_iter_rw(iter) == READ && pos >= dio->i_size) {
+			/*
+			 * We only report that we've read data up to i_size.
+			 * Revert iter to a state corresponding to that as
+			 * some callers (such as splice code) rely on it.
+			 */
+			iov_iter_revert(iter, pos - dio->i_size);
 			break;
+		}
 	} while ((count = iov_iter_count(iter)) > 0);
 	blk_finish_plug(&plug);
 



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

* [PATCH 4.19 240/243] thermal: Fix deadlock in thermal thermal_zone_device_check
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (238 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 239/243] iomap: Fix pipe page leakage during splicing Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 241/243] vcs: prevent write access to vcsu devices Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Wei Wang, Zhang Rui

From: Wei Wang <wvw@google.com>

commit 163b00cde7cf2206e248789d2780121ad5e6a70b upstream.

1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone
device") changed cancel_delayed_work to cancel_delayed_work_sync to avoid
a use-after-free issue. However, cancel_delayed_work_sync could be called
insides the WQ causing deadlock.

[54109.642398] c0   1162 kworker/u17:1   D    0 11030      2 0x00000000
[54109.642437] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
[54109.642447] c0   1162 Call trace:
[54109.642456] c0   1162  __switch_to+0x138/0x158
[54109.642467] c0   1162  __schedule+0xba4/0x1434
[54109.642480] c0   1162  schedule_timeout+0xa0/0xb28
[54109.642492] c0   1162  wait_for_common+0x138/0x2e8
[54109.642511] c0   1162  flush_work+0x348/0x40c
[54109.642522] c0   1162  __cancel_work_timer+0x180/0x218
[54109.642544] c0   1162  handle_thermal_trip+0x2c4/0x5a4
[54109.642553] c0   1162  thermal_zone_device_update+0x1b4/0x25c
[54109.642563] c0   1162  thermal_zone_device_check+0x18/0x24
[54109.642574] c0   1162  process_one_work+0x3cc/0x69c
[54109.642583] c0   1162  worker_thread+0x49c/0x7c0
[54109.642593] c0   1162  kthread+0x17c/0x1b0
[54109.642602] c0   1162  ret_from_fork+0x10/0x18
[54109.643051] c0   1162 kworker/u17:2   D    0 16245      2 0x00000000
[54109.643067] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
[54109.643077] c0   1162 Call trace:
[54109.643085] c0   1162  __switch_to+0x138/0x158
[54109.643095] c0   1162  __schedule+0xba4/0x1434
[54109.643104] c0   1162  schedule_timeout+0xa0/0xb28
[54109.643114] c0   1162  wait_for_common+0x138/0x2e8
[54109.643122] c0   1162  flush_work+0x348/0x40c
[54109.643131] c0   1162  __cancel_work_timer+0x180/0x218
[54109.643141] c0   1162  handle_thermal_trip+0x2c4/0x5a4
[54109.643150] c0   1162  thermal_zone_device_update+0x1b4/0x25c
[54109.643159] c0   1162  thermal_zone_device_check+0x18/0x24
[54109.643167] c0   1162  process_one_work+0x3cc/0x69c
[54109.643177] c0   1162  worker_thread+0x49c/0x7c0
[54109.643186] c0   1162  kthread+0x17c/0x1b0
[54109.643195] c0   1162  ret_from_fork+0x10/0x18
[54109.644500] c0   1162 cat             D    0  7766      1 0x00000001
[54109.644515] c0   1162 Call trace:
[54109.644524] c0   1162  __switch_to+0x138/0x158
[54109.644536] c0   1162  __schedule+0xba4/0x1434
[54109.644546] c0   1162  schedule_preempt_disabled+0x80/0xb0
[54109.644555] c0   1162  __mutex_lock+0x3a8/0x7f0
[54109.644563] c0   1162  __mutex_lock_slowpath+0x14/0x20
[54109.644575] c0   1162  thermal_zone_get_temp+0x84/0x360
[54109.644586] c0   1162  temp_show+0x30/0x78
[54109.644609] c0   1162  dev_attr_show+0x5c/0xf0
[54109.644628] c0   1162  sysfs_kf_seq_show+0xcc/0x1a4
[54109.644636] c0   1162  kernfs_seq_show+0x48/0x88
[54109.644656] c0   1162  seq_read+0x1f4/0x73c
[54109.644664] c0   1162  kernfs_fop_read+0x84/0x318
[54109.644683] c0   1162  __vfs_read+0x50/0x1bc
[54109.644692] c0   1162  vfs_read+0xa4/0x140
[54109.644701] c0   1162  SyS_read+0xbc/0x144
[54109.644708] c0   1162  el0_svc_naked+0x34/0x38
[54109.845800] c0   1162 D 720.000s 1->7766->7766 cat [panic]

Fixes: 1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone device")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -296,7 +296,7 @@ static void thermal_zone_device_set_poll
 		mod_delayed_work(system_freezable_wq, &tz->poll_queue,
 				 msecs_to_jiffies(delay));
 	else
-		cancel_delayed_work_sync(&tz->poll_queue);
+		cancel_delayed_work(&tz->poll_queue);
 }
 
 static void monitor_thermal_zone(struct thermal_zone_device *tz)
@@ -1349,7 +1349,7 @@ void thermal_zone_device_unregister(stru
 
 	mutex_unlock(&thermal_list_lock);
 
-	thermal_zone_device_set_polling(tz, 0);
+	cancel_delayed_work_sync(&tz->poll_queue);
 
 	thermal_set_governor(tz, NULL);
 



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

* [PATCH 4.19 241/243] vcs: prevent write access to vcsu devices
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (239 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 240/243] thermal: Fix deadlock in thermal thermal_zone_device_check Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 242/243] binder: Fix race between mmap() and binder_alloc_print_pages() Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Or Cohen, Nicolas Pitre, Jiri Slaby

From: Nicolas Pitre <nico@fluxnic.net>

commit 0c9acb1af77a3cb8707e43f45b72c95266903cee upstream.

Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded
against using devices containing attributes as this is not yet
implemented. It however failed to guard against writes to any devices
as this is also unimplemented.

Reported-by: Or Cohen <orcohen@paloaltonetworks.com>
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Cc: <stable@vger.kernel.org> # v4.19+
Cc: Jiri Slaby <jslaby@suse.com>
Fixes: d21b0be246bf ("vt: introduce unicode mode for /dev/vcs")
Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.1911051030580.30289@knanqh.ubzr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/tty/vt/vc_screen.c
+++ b/drivers/tty/vt/vc_screen.c
@@ -437,6 +437,9 @@ vcs_write(struct file *file, const char
 	size_t ret;
 	char *con_buf;
 
+	if (use_unicode(inode))
+		return -EOPNOTSUPP;
+
 	con_buf = (char *) __get_free_page(GFP_KERNEL);
 	if (!con_buf)
 		return -ENOMEM;



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

* [PATCH 4.19 242/243] binder: Fix race between mmap() and binder_alloc_print_pages()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (240 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 241/243] vcs: prevent write access to vcsu devices Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 15:06 ` [PATCH 4.19 243/243] binder: Handle start==NULL in binder_update_page_range() Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jann Horn, Christian Brauner

From: Jann Horn <jannh@google.com>

commit 8eb52a1ee37aafd9b796713aa0b3ab9cbc455be3 upstream.

binder_alloc_print_pages() iterates over
alloc->pages[0..alloc->buffer_size-1] under alloc->mutex.
binder_alloc_mmap_handler() writes alloc->pages and alloc->buffer_size
without holding that lock, and even writes them before the last bailout
point.

Unfortunately we can't take the alloc->mutex in the ->mmap() handler
because mmap_sem can be taken while alloc->mutex is held.
So instead, we have to locklessly check whether the binder_alloc has been
fully initialized with binder_alloc_get_vma(), like in
binder_alloc_new_buf_locked().

Fixes: 8ef4665aa129 ("android: binder: Add page usage in binder stats")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191018205631.248274-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/android/binder_alloc.c |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -880,14 +880,20 @@ void binder_alloc_print_pages(struct seq
 	int free = 0;
 
 	mutex_lock(&alloc->mutex);
-	for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
-		page = &alloc->pages[i];
-		if (!page->page_ptr)
-			free++;
-		else if (list_empty(&page->lru))
-			active++;
-		else
-			lru++;
+	/*
+	 * Make sure the binder_alloc is fully initialized, otherwise we might
+	 * read inconsistent state.
+	 */
+	if (binder_alloc_get_vma(alloc) != NULL) {
+		for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
+			page = &alloc->pages[i];
+			if (!page->page_ptr)
+				free++;
+			else if (list_empty(&page->lru))
+				active++;
+			else
+				lru++;
+		}
 	}
 	mutex_unlock(&alloc->mutex);
 	seq_printf(m, "  pages: %d:%d:%d\n", active, lru, free);



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

* [PATCH 4.19 243/243] binder: Handle start==NULL in binder_update_page_range()
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (241 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 242/243] binder: Fix race between mmap() and binder_alloc_print_pages() Greg Kroah-Hartman
@ 2019-12-11 15:06 ` Greg Kroah-Hartman
  2019-12-11 16:25 ` [PATCH 4.19 000/243] 4.19.89-stable review Chris Paterson
                   ` (6 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 15:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jann Horn, Christian Brauner

From: Jann Horn <jannh@google.com>

commit 2a9edd056ed4fbf9d2e797c3fc06335af35bccc4 upstream.

The old loop wouldn't stop when reaching `start` if `start==NULL`, instead
continuing backwards to index -1 and crashing.

Luckily you need to be highly privileged to map things at NULL, so it's not
a big problem.

Fix it by adjusting the loop so that the loop variable is always in bounds.

This patch is deliberately minimal to simplify backporting, but IMO this
function could use a refactor. The jump labels in the second loop body are
horrible (the error gotos should be jumping to free_range instead), and
both loops would look nicer if they just iterated upwards through indices.
And the up_read()+mmput() shouldn't be duplicated like that.

Cc: stable@vger.kernel.org
Fixes: 457b9a6f09f0 ("Staging: android: add binder driver")
Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191018205631.248274-3-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/android/binder_alloc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -295,8 +295,7 @@ static int binder_update_page_range(stru
 	return 0;
 
 free_range:
-	for (page_addr = end - PAGE_SIZE; page_addr >= start;
-	     page_addr -= PAGE_SIZE) {
+	for (page_addr = end - PAGE_SIZE; 1; page_addr -= PAGE_SIZE) {
 		bool ret;
 		size_t index;
 
@@ -309,6 +308,8 @@ free_range:
 		WARN_ON(!ret);
 
 		trace_binder_free_lru_end(alloc, index);
+		if (page_addr == start)
+			break;
 		continue;
 
 err_vm_insert_page_failed:
@@ -318,7 +319,8 @@ err_map_kernel_failed:
 		page->page_ptr = NULL;
 err_alloc_page_failed:
 err_page_ptr_cleared:
-		;
+		if (page_addr == start)
+			break;
 	}
 err_no_vma:
 	if (mm) {



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

* RE: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (242 preceding siblings ...)
  2019-12-11 15:06 ` [PATCH 4.19 243/243] binder: Handle start==NULL in binder_update_page_range() Greg Kroah-Hartman
@ 2019-12-11 16:25 ` Chris Paterson
  2019-12-11 18:26   ` Greg Kroah-Hartman
  2019-12-11 21:36   ` Jon Hunter
                   ` (5 subsequent siblings)
  249 siblings, 1 reply; 280+ messages in thread
From: Chris Paterson @ 2019-12-11 16:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable

Hi Greg,

> From: stable-owner@vger.kernel.org <stable-owner@vger.kernel.org> On
> Behalf Of Greg Kroah-Hartman
> Sent: 11 December 2019 15:03
> 
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 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.

All the issues I was reporting before have gone. No new ones either.

Kind regards, Chris

> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:
> 
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Linux 4.19.89-rc1
> 
> Jann Horn <jannh@google.com>
>     binder: Handle start==NULL in binder_update_page_range()
> 
> Jann Horn <jannh@google.com>
>     binder: Fix race between mmap() and binder_alloc_print_pages()
> 
> Nicolas Pitre <nico@fluxnic.net>
>     vcs: prevent write access to vcsu devices
> 
> Wei Wang <wvw@google.com>
>     thermal: Fix deadlock in thermal thermal_zone_device_check
> 
> Jan Kara <jack@suse.cz>
>     iomap: Fix pipe page leakage during splicing
> 
> Viresh Kumar <viresh.kumar@linaro.org>
>     RDMA/qib: Validate ->show()/store() callbacks before calling them
> 
> Johan Hovold <johan@kernel.org>
>     can: ucan: fix non-atomic allocation in completion handler
> 
> Sharvari Harisangam <sharvari@marvell.com>
>     mwifiex: update set_mac_address logic
> 
> Gregory CLEMENT <gregory.clement@bootlin.com>
>     spi: atmel: Fix CS high support
> 
> Navid Emamdoost <navid.emamdoost@gmail.com>
>     crypto: user - fix memory leak in crypto_report
> 
> Ard Biesheuvel <ard.biesheuvel@linaro.org>
>     crypto: ecdh - fix big endian bug in ECC library
> 
> Mark Salter <msalter@redhat.com>
>     crypto: ccp - fix uninitialized list head
> 
> Ayush Sawal <ayush.sawal@chelsio.com>
>     crypto: af_alg - cast ki_complete ternary op to int
> 
> Tudor Ambarus <tudor.ambarus@microchip.com>
>     crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
> 
> Christian Lamparter <chunkeey@gmail.com>
>     crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
> 
> Sean Christopherson <sean.j.christopherson@intel.com>
>     KVM: x86: Grab KVM's srcu lock when setting nested state
> 
> Paolo Bonzini <pbonzini@redhat.com>
>     KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
> 
> Paolo Bonzini <pbonzini@redhat.com>
>     KVM: x86: do not modify masked bits of shared MSRs
> 
> Zenghui Yu <yuzenghui@huawei.com>
>     KVM: arm/arm64: vgic: Don't rely on the wrong pending table
> 
> Marek Szyprowski <m.szyprowski@samsung.com>
>     arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc
> node"
> 
> Dan Carpenter <dan.carpenter@oracle.com>
>     drm/i810: Prevent underflow in ioctl
> 
> Johan Hovold <johan@kernel.org>
>     drm/msm: fix memleak on release
> 
> Jan Kara <jack@suse.cz>
>     jbd2: Fix possible overflow in jbd2_log_space_left()
> 
> Tejun Heo <tj@kernel.org>
>     kernfs: fix ino wrap-around detection
> 
> Jouni Hogander <jouni.hogander@unikie.com>
>     can: slcan: Fix use-after-free Read in slcan_open
> 
> Dmitry Torokhov <dmitry.torokhov@gmail.com>
>     tty: vt: keyboard: reject invalid keycodes
> 
> Pavel Shilovsky <pshilov@microsoft.com>
>     CIFS: Fix SMB2 oplock break processing
> 
> Pavel Shilovsky <pshilov@microsoft.com>
>     CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
> 
> Nicolas Dichtel <nicolas.dichtel@6wind.com>
>     xfrm interface: fix management of phydev
> 
> Nicolas Dichtel <nicolas.dichtel@6wind.com>
>     xfrm interface: fix list corruption for x-netns
> 
> Nicolas Dichtel <nicolas.dichtel@6wind.com>
>     xfrm interface: avoid corruption on changelink
> 
> Nicolas Dichtel <nicolas.dichtel@6wind.com>
>     xfrm interface: fix memory leak on creation
> 
> Kai-Heng Feng <kai.heng.feng@canonical.com>
>     x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
> 
> Joerg Roedel <jroedel@suse.de>
>     x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()
> 
> Navid Emamdoost <navid.emamdoost@gmail.com>
>     Input: Fix memory leak in psxpad_spi_probe
> 
> Mike Leach <mike.leach@linaro.org>
>     coresight: etm4x: Fix input validation for sysfs.
> 
> Hans de Goede <hdegoede@redhat.com>
>     Input: goodix - add upside-down quirk for Teclast X89 tablet
> 
> Hans Verkuil <hverkuil-cisco@xs4all.nl>
>     Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
> 
> Lucas Stach <l.stach@pengutronix.de>
>     Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
> 
> Hans Verkuil <hverkuil-cisco@xs4all.nl>
>     Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus
> 
> Kai-Heng Feng <kai.heng.feng@canonical.com>
>     ALSA: hda - Add mute led support for HP ProBook 645 G4
> 
> Takashi Iwai <tiwai@suse.de>
>     ALSA: pcm: oss: Avoid potential buffer overflows
> 
> Kailang Yang <kailang@realtek.com>
>     ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236
> 
> Hui Wang <hui.wang@canonical.com>
>     ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
> 
> Jian-Hong Pan <jian-hong@endlessm.com>
>     ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
> 
> Miklos Szeredi <mszeredi@redhat.com>
>     fuse: verify attributes
> 
> Miklos Szeredi <mszeredi@redhat.com>
>     fuse: verify nlink
> 
> Xuewei Zhang <xueweiz@google.com>
>     sched/fair: Scale bandwidth quota and period without losing quota/period
> ratio precision
> 
> Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
>     net: aquantia: fix RSS table and key sizes
> 
> Helen Fornazier <helen.koike@collabora.com>
>     media: vimc: fix start stream when link is disabled
> 
> Felix Brack <fb@ltec.ch>
>     ARM: dts: am335x-pdu001: Fix polarity of card detection input
> 
> Rob Herring <robh@kernel.org>
>     ARM: dts: sunxi: Fix PMU compatible strings
> 
> Ladislav Michl <ladis@linux-mips.org>
>     ASoC: max9867: Fix power management
> 
> Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>     clk: renesas: rcar-gen3: Set state when registering SD clocks
> 
> YueHaibing <yuehaibing@huawei.com>
>     usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler
> 
> Qian Cai <cai@gmx.us>
>     mlx4: Use snprintf instead of complicated strcpy
> 
> Mike Marciniszyn <mike.marciniszyn@intel.com>
>     IB/hfi1: Close VNIC sdma_progress sleep window
> 
> Kaike Wan <kaike.wan@intel.com>
>     IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state
> 
> Chen-Yu Tsai <wens@csie.org>
>     ARM: dts: sun8i: a23/a33: Fix up RTC device node
> 
> Nir Dotan <nird@mellanox.com>
>     mlxsw: spectrum_router: Relax GRE decap matching check
> 
> Geert Uytterhoeven <geert+renesas@glider.be>
>     soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B}
> 
> Jakub Audykowicz <jakub.audykowicz@gmail.com>
>     sctp: frag_point sanity check
> 
> Bjorn Andersson <bjorn.andersson@linaro.org>
>     clk: qcom: gcc-msm8998: Disable halt check of UFS clocks
> 
> Jonathan Marek <jonathan@marek.ca>
>     firmware: qcom: scm: fix compilation error when disabled
> 
> Andreas Pape <ap@ca-pape.de>
>     media: stkwebcam: Bugfix for wrong return values
> 
> Dmitry Safonov <dima@arista.com>
>     tty: Don't block on IO when ldisc change is pending
> 
> Paul Kocialkowski <paul.kocialkowski@bootlin.com>
>     ARM: dts: sun8i: h3: Fix the system-control register range
> 
> Ryan Case <ryandcase@chromium.org>
>     tty: serial: qcom_geni_serial: Fix softlock
> 
> Kieran Bingham <kieran.bingham@ideasonboard.com>
>     media: uvcvideo: Abstract streaming object lifetime
> 
> zhengbin <zhengbin13@huawei.com>
>     nfsd: Return EPERM, not EACCES, in some SETATTR cases
> 
> Aaro Koskinen <aaro.koskinen@iki.fi>
>     MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible
> definition
> 
> Geert Uytterhoeven <geert+renesas@glider.be>
>     clk: renesas: r8a77995: Correct parent clock of DU
> 
> Takeshi Kihara <takeshi.kihara.df@renesas.com>
>     clk: renesas: r8a77990: Correct parent clock of DU
> 
> Joel Stanley <joel@jms.id.au>
>     powerpc/math-emu: Update macros from GCC
> 
> Kees Cook <keescook@chromium.org>
>     pstore/ram: Avoid NULL deref in ftrace merging failure path
> 
> Erez Alfasi <ereza@mellanox.com>
>     net/mlx4_core: Fix return codes of unsupported operations
> 
> David Teigland <teigland@redhat.com>
>     dlm: fix invalid cluster name warning
> 
> Rob Herring <robh@kernel.org>
>     ARM: dts: realview: Fix some more duplicate regulator nodes
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     media: cxd2880-spi: fix probe when dvb_attach fails
> 
> Jeffrey Hugo <jhugo@codeaurora.org>
>     clk: qcom: Fix MSM8998 resets
> 
> Chen-Yu Tsai <wens@csie.org>
>     clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
> 
> Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>     clk: meson: meson8b: fix the offset of vid_pll_dco's N value
> 
> Daniel Mack <daniel@zonque.org>
>     ARM: dts: pxa: clean up USB controller nodes
> 
> Miquel Raynal <miquel.raynal@bootlin.com>
>     mtd: fix mtd_oobavail() incoherent returned value
> 
> Masahiro Yamada <yamada.masahiro@socionext.com>
>     kbuild: fix single target build for external module
> 
> Paul Walmsley <paul.walmsley@sifive.com>
>     modpost: skip ELF local symbols during section mismatch check
> 
> Yuchung Cheng <ycheng@google.com>
>     tcp: fix SNMP TCP timeout under-estimation
> 
> Yuchung Cheng <ycheng@google.com>
>     tcp: fix SNMP under-estimation on failed retransmission
> 
> Yuchung Cheng <ycheng@google.com>
>     tcp: fix off-by-one bug on aborting window-probing socket
> 
> Rob Herring <robh@kernel.org>
>     ARM: dts: realview-pbx: Fix duplicate regulator nodes
> 
> Lubomir Rintel <lkundrak@v3.sk>
>     ARM: dts: mmp2: fix the gpio interrupt cell number
> 
> Eric Dumazet <edumazet@google.com>
>     tcp: make tcp_space() aware of socket backlog
> 
> Rob Herring <robh@kernel.org>
>     kbuild: disable dtc simple_bus_reg warnings by default
> 
> Geert Uytterhoeven <geert+renesas@glider.be>
>     soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy
> 
> Geert Uytterhoeven <geert+renesas@glider.be>
>     soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains
> 
> Geert Uytterhoeven <geert+renesas@glider.be>
>     soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains
> 
> Stephen Boyd <sboyd@kernel.org>
>     clk: mediatek: Drop more __init markings for driver probe
> 
> Stephen Boyd <sboyd@kernel.org>
>     clk: mediatek: Drop __init from mtk_clk_register_cpumuxes()
> 
> Yonghong Song <yhs@fb.com>
>     tools/bpf: make libbpf _GNU_SOURCE friendly
> 
> Martin Schiller <ms@dev.tdt.de>
>     net/x25: fix null_x25_address handling
> 
> Martin Schiller <ms@dev.tdt.de>
>     net/x25: fix called/calling length calculation in x25_parse_address_block
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names
> 
> Aaro Koskinen <aaro.koskinen@iki.fi>
>     ARM: OMAP1/2: fix SoC name printing
> 
> Linus Walleij <linus.walleij@linaro.org>
>     gpio: OF: Parse MMC-specific CD and WP properties
> 
> Young_X <YangX92@hotmail.com>
>     ASoC: au8540: use 64-bit arithmetic instead of 32-bit
> 
> Yonghong Song <yhs@fb.com>
>     tools: bpftool: fix a bitfield pretty print issue
> 
> Yonghong Song <yhs@fb.com>
>     bpf: btf: check name validity for various types
> 
> Yonghong Song <yhs@fb.com>
>     bpf: btf: implement btf_name_valid_identifier()
> 
> Scott Mayhew <smayhew@redhat.com>
>     nfsd: fix a warning in __cld_pipe_upcall()
> 
> YueHaibing <yuehaibing@huawei.com>
>     can: xilinx: fix return type of ndo_start_xmit function
> 
> Clément Péron <peron.clem@gmail.com>
>     ARM: debug: enable UART1 for socfpga Cyclone5
> 
> Wen Yang <wen.yang99@zte.com.cn>
>     dlm: NULL check before kmem_cache_destroy is not needed
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun7i: Fix HDMI output DTC warning
> 
> Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>     ARM: dts: r8a779[01]: Disable unconnected LVDS encoders
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun5i: a10s: Fix HDMI output DTC warning
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun4i: Fix HDMI output DTC warning
> 
> Maxime Ripard <maxime.ripard@bootlin.com>
>     ARM: dts: sun4i: Fix gpio-keys warning
> 
> Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>     ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
> 
> Joerg Roedel <jroedel@suse.de>
>     iommu/amd: Fix line-break in error log reporting
> 
> Xin Long <lucien.xin@gmail.com>
>     sctp: increase sk_wmem_alloc when head->truesize is increased
> 
> J. Bruce Fields <bfields@redhat.com>
>     lockd: fix decoding of TEST results
> 
> Thierry Reding <treding@nvidia.com>
>     gpu: host1x: Fix syncpoint ID field size on Tegra186
> 
> Neil Armstrong <narmstrong@baylibre.com>
>     clk: meson: Fix GXL HDMI PLL fractional bits width
> 
> Lucas Stach <l.stach@pengutronix.de>
>     i2c: imx: don't print error message on probe defer
> 
> Stefan Agner <stefan@agner.ch>
>     serial: imx: fix error handling in console_setup
> 
> Colin Ian King <colin.king@canonical.com>
>     altera-stapl: check for a null key before strcasecmp'ing it
> 
> Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>     slimbus: ngd: Fix build error on x86
> 
> Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>     dma-mapping: fix return type of dma_set_max_seg_size()
> 
> Keith Busch <keith.busch@intel.com>
>     nvme: Free ctrl device name on init failure
> 
> David Miller <davem@davemloft.net>
>     sparc: Correct ctx->saw_frame_pointer logic.
> 
> David Miller <davem@davemloft.net>
>     sparc: Fix JIT fused branch convergance.
> 
> Sahitya Tummala <stummala@codeaurora.org>
>     f2fs: fix to allow node segment for GC by ioctl path
> 
> Otavio Salvador <otavio@ossystems.com.br>
>     ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108
> 
> Otavio Salvador <otavio@ossystems.com.br>
>     ARM: dts: rockchip: Fix the PMU interrupt number for rv1108
> 
> Yunlong Song <yunlong.song@huawei.com>
>     f2fs: change segment to section in f2fs_ioc_gc_range
> 
> Yunlong Song <yunlong.song@huawei.com>
>     f2fs: fix count of seg_freed to make sec_freed correct
> 
> Chao Yu <yuchao0@huawei.com>
>     f2fs: fix to account preflush command for noflush_merge mode
> 
> Alexey Dobriyan <adobriyan@gmail.com>
>     ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
> 
> Brian Norris <briannorris@chromium.org>
>     usb: dwc3: don't log probe deferrals; but do log other error codes
> 
> Thinh Nguyen <thinh.nguyen@synopsys.com>
>     usb: dwc3: debugfs: Properly print/set link state for HS
> 
> Breno Leitao <leitao@debian.org>
>     selftests/powerpc: Skip test instead of failing
> 
> Breno Leitao <leitao@debian.org>
>     selftests/powerpc: Allocate base registers
> 
> Colin Ian King <colin.king@canonical.com>
>     net: qualcomm: rmnet: move null check on dev before dereferecing it
> 
> Christian Lamparter <chunkeey@gmail.com>
>     dmaengine: dw-dmac: implement dma protection control setting
> 
> Vinod Koul <vkoul@kernel.org>
>     dmaengine: coh901318: Remove unused variable
> 
> Jia-Ju Bai <baijiaju1990@gmail.com>
>     dmaengine: coh901318: Fix a double-lock bug
> 
> Hangbin Liu <liuhangbin@gmail.com>
>     net/ipv6: re-do dad when interface has IFF_NOARP flag change
> 
> Magnus Damm <damm+renesas@opensource.se>
>     ravb: Clean up duplex handling
> 
> Luca Coelho <luciano.coelho@intel.com>
>     iwlwifi: fix cfg structs for 22000 with different RF modules
> 
> Hans Verkuil <hverkuil-cisco@xs4all.nl>
>     media: cec: report Vendor ID after initialization
> 
> Hans Verkuil <hverkuil@xs4all.nl>
>     media: pulse8-cec: return 0 when invalidating the logical address
> 
> Philipp Zabel <p.zabel@pengutronix.de>
>     media: coda: fix memory corruption in case more than 32 instances are
> opened
> 
> Marek Szyprowski <m.szyprowski@samsung.com>
>     ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
> 
> Baruch Siach <baruch@tkos.co.il>
>     rtc: dt-binding: abx80x: fix resistance scale
> 
> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>     rtc: max8997: Fix the returned value in case of error in
> 'max8997_rtc_read_alarm()'
> 
> Nylon Chen <nylon7@andestech.com>
>     nds32: Fix the items of hwcap_str ordering issue.
> 
> Vincent Chen <vincentc@andestech.com>
>     math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
> 
> Ursula Braun <ursula.braun@linux.ibm.com>
>     net/smc: use after free fix in smc_wr_tx_put_slot()
> 
> Aaro Koskinen <aaro.koskinen@iki.fi>
>     MIPS: OCTEON: octeon-platform: fix typing
> 
> Steve Wise <swise@opengridcomputing.com>
>     iw_cxgb4: only reconnect with MPAv1 if the peer aborts
> 
> Dave Chinner <dchinner@redhat.com>
>     iomap: readpages doesn't zero page tail beyond EOF
> 
> Dave Chinner <dchinner@redhat.com>
>     iomap: dio data corruption and spurious errors when pipes fill
> 
> Dave Chinner <dchinner@redhat.com>
>     iomap: sub-block dio needs to zeroout beyond EOF
> 
> Dave Chinner <dchinner@redhat.com>
>     iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents
> 
> Bruce Allan <bruce.w.allan@intel.com>
>     ice: Fix possible NULL pointer de-reference
> 
> Dave Ertman <david.m.ertman@intel.com>
>     ice: Fix return value from NAPI poll
> 
> Xue Chaojing <xuechaojing@huawei.com>
>     net-next/hinic: fix a bug in rx data flow
> 
> Xue Chaojing <xuechaojing@huawei.com>
>     net-next/hinic:fix a bug in set mac address
> 
> Dave Chinner <dchinner@redhat.com>
>     xfs: extent shifting doesn't fully invalidate page cache
> 
> Ji-Ze Hong (Peter Hong) <hpeter@gmail.com>
>     USB: serial: f81534: fix reading old/new IC config
> 
> Mark Brown <broonie@kernel.org>
>     regulator: Fix return value of _set_load() stub
> 
> Xin Long <lucien.xin@gmail.com>
>     sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit
> 
> Katsuhiro Suzuki <katsuhiro@katsuster.net>
>     clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328
> 
> Katsuhiro Suzuki <katsuhiro@katsuster.net>
>     clk: rockchip: fix I2S1 clock gate register for rk3328
> 
> Janne Huttunen <janne.huttunen@nokia.com>
>     mm/vmstat.c: fix NUMA statistics updates
> 
> James Hughes <james.hughes@raspberrypi.org>
>     firmware: raspberrypi: Fix firmware calls with large buffers
> 
> Shreeya Patel <shreeya.patel23498@gmail.com>
>     Staging: iio: adt7316: Fix i2c data reading, set the data field
> 
> Brian Masney <masneyb@onstation.org>
>     pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
> 
> Michal Simek <michal.simek@xilinx.com>
>     arm64: dts: zynqmp: Fix node names which contain "_"
> 
> Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
>     crypto: bcm - fix normal/non key hash algorithm failure
> 
> Vitaly Chikunov <vt@altlinux.org>
>     crypto: ecc - check for invalid values in the key verification test
> 
> Lucas Stach <l.stach@pengutronix.de>
>     ARM: dts: imx6: RDU2: fix eGalax touchscreen node
> 
> Tony Lindgren <tony@atomide.com>
>     bus: ti-sysc: Fix getting optional clocks in clock_roles
> 
> Maxime Jourdan <mjourdan@baylibre.com>
>     drivers: soc: Allow building the amlogic drivers without ARCH_MESON
> 
> Steffen Maier <maier@linux.ibm.com>
>     scsi: zfcp: drop default switch case which might paper over missing case
> 
> Steffen Maier <maier@linux.ibm.com>
>     scsi: zfcp: update kernel message for invalid FCP_CMND length, it's not the
> CDB
> 
> Andrew Lunn <andrew@lunn.ch>
>     net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2
> 
> Maciej W. Rozycki <macro@linux-mips.org>
>     MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
> 
> David Teigland <teigland@redhat.com>
>     dlm: fix missing idr_destroy for recover_idr
> 
> John Keeping <john@metanate.com>
>     ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
> 
> Heiko Stuebner <heiko@sntech.de>
>     clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
> 
> Finley Xiao <finley.xiao@rock-chips.com>
>     clk: rockchip: fix rk3188 sclk_smc gate data
> 
> Alice Michael <alice.michael@intel.com>
>     virtchnl: Fix off by one error
> 
> Mitch Williams <mitch.a.williams@intel.com>
>     i40e: don't restart nway if autoneg not supported
> 
> Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>     rtc: max77686: Fix the returned value in case of error in
> 'max77686_rtc_read_time()'
> 
> Marek Szyprowski <m.szyprowski@samsung.com>
>     rtc: s3c-rtc: Avoid using broken ALMYEAR register
> 
> Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
>     net: ethernet: ti: cpts: correct debug for expired txq skb
> 
> Marek Szyprowski <m.szyprowski@samsung.com>
>     extcon: max8997: Fix lack of path setting in USB device mode
> 
> Anand Moon <linux.amoon@gmail.com>
>     ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1
> 
> Denis V. Lunev <den@openvz.org>
>     dlm: fix possible call to kfree() for non-initialized pointer
> 
> Lev Faerman <lev.faerman@intel.com>
>     ice: Fix NVM mask defines
> 
> Jagan Teki <jagan@amarulasolutions.com>
>     clk: sunxi-ng: a64: Fix gate bit of DSI DPHY
> 
> Moni Shoua <monis@mellanox.com>
>     net/mlx5: Release resource on error flow
> 
> Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
>     ARC: IOC: panic if kernel was started with previously enabled IOC
> 
> Florian Westphal <fw@strlen.de>
>     netfilter: nf_tables: don't use position attribute on rule replacement
> 
> Jan Kara <jack@suse.cz>
>     audit: Embed key into chunk
> 
> Vincent Whitchurch <vincent.whitchurch@axis.com>
>     ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
> 
> Andrei Otcheretianski <andrei.otcheretianski@intel.com>
>     iwlwifi: mvm: Send non offchannel traffic via AP sta
> 
> Shahar S Matityahu <shahar.s.matityahu@intel.com>
>     iwlwifi: trans: Clear persistence bit when starting the FW
> 
> Johannes Berg <johannes.berg@intel.com>
>     iwlwifi: mvm: synchronize TID queue removal
> 
> Arjun Vynipadath <arjun@chelsio.com>
>     cxgb4vf: fix memleak in mac_hlist initialization
> 
> Douglas Anderson <dianders@chromium.org>
>     serial: core: Allow processing sysrq at port unlock time
> 
> Wen Yang <wenyang@linux.alibaba.com>
>     i2c: core: fix use after free in of_i2c_notify
> 
> Chuhong Yuan <hslester96@gmail.com>
>     net: ep93xx_eth: fix mismatch of request_mem_region in remove
> 
> Chuhong Yuan <hslester96@gmail.com>
>     rsxx: add missed destroy_workqueue calls in remove
> 
> Vitaly Kuznetsov <vkuznets@redhat.com>
>     selftests: kvm: fix build with glibc >= 2.30
> 
> Yunhao Tian <t123yh@outlook.com>
>     drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
> 
> paulhsia <paulhsia@chromium.org>
>     ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
> 
> Alexander Shishkin <alexander.shishkin@linux.intel.com>
>     perf/core: Consistently fail fork on allocation failures
> 
> Peter Zijlstra <peterz@infradead.org>
>     sched/core: Avoid spurious lock dependencies
> 
> Pan Bian <bianpan2016@163.com>
>     Input: cyttsp4_core - fix use after free bug
> 
> Xiaodong Xu <stid.smth@gmail.com>
>     xfrm: release device reference for invalid state
> 
> Stephan Gerhold <stephan@gerhold.net>
>     NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
> 
> Al Viro <viro@zeniv.linux.org.uk>
>     audit_get_nd(): don't unlock parent too early
> 
> Al Viro <viro@zeniv.linux.org.uk>
>     exportfs_decode_fh(): negative pinned may become positive without the
> parent locked
> 
> Mordechay Goodstein <mordechay.goodstein@intel.com>
>     iwlwifi: pcie: don't consider IV len in A-MSDU
> 
> Sirong Wang <wangsirong@huawei.com>
>     RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
> 
> Al Viro <viro@zeniv.linux.org.uk>
>     autofs: fix a leak in autofs_expire_indirect()
> 
> Chuhong Yuan <hslester96@gmail.com>
>     serial: ifx6x60: add missed pm_runtime_disable
> 
> Jiangfeng Xiao <xiaojiangfeng@huawei.com>
>     serial: serial_core: Perform NULL checks for break_ctl ops
> 
> Vincent Whitchurch <vincent.whitchurch@axis.com>
>     serial: pl011: Fix DMA ->flush_buffer()
> 
> Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
>     tty: serial: msm_serial: Fix flow control
> 
> Peng Fan <peng.fan@nxp.com>
>     tty: serial: fsl_lpuart: use the sg count from dma_map_sg
> 
> Michał Mirosław <mirq-linux@rere.qmqm.pl>
>     usb: gadget: u_serial: add missing port entry locking
> 
> Arnd Bergmann <arnd@arndb.de>
>     lp: fix sparc64 LPSETTIMEOUT ioctl
> 
> Tuowen Zhao <ztuowen@gmail.com>
>     sparc64: implement ioremap_uc
> 
> Jon Hunter <jonathanh@nvidia.com>
>     arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
> 
> Navid Emamdoost <navid.emamdoost@gmail.com>
>     rsi: release skb if rsi_prepare_beacon fails
> 
> 
> -------------
> 
> Diffstat:
> 
>  .../devicetree/bindings/rtc/abracon,abx80x.txt     |   2 +-
>  Makefile                                           |  15 +--
>  arch/arc/include/asm/cache.h                       |   2 +
>  arch/arc/mm/cache.c                                |  20 +++-
>  arch/arm/Kconfig.debug                             |  23 ++--
>  arch/arm/boot/dts/am335x-pdu001.dts                |   2 +-
>  arch/arm/boot/dts/arm-realview-pb1176.dts          |   4 +-
>  arch/arm/boot/dts/arm-realview-pb11mp.dts          |   4 +-
>  arch/arm/boot/dts/arm-realview-pbx.dtsi            |   5 +-
>  arch/arm/boot/dts/exynos3250.dtsi                  |   2 +-
>  arch/arm/boot/dts/exynos5422-odroid-core.dtsi      |   2 +-
>  arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi            |   5 +-
>  arch/arm/boot/dts/mmp2.dtsi                        |   2 +-
>  arch/arm/boot/dts/pxa27x.dtsi                      |   2 +-
>  arch/arm/boot/dts/pxa2xx.dtsi                      |   7 --
>  arch/arm/boot/dts/pxa3xx.dtsi                      |   2 +-
>  arch/arm/boot/dts/r8a7790-lager.dts                |   2 -
>  arch/arm/boot/dts/r8a7791-koelsch.dts              |   2 -
>  arch/arm/boot/dts/r8a7791-porter.dts               |   2 -
>  arch/arm/boot/dts/rk3288-rock2-som.dtsi            |   2 +-
>  arch/arm/boot/dts/rv1108.dtsi                      |  10 +-
>  arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts       |   2 -
>  arch/arm/boot/dts/sun4i-a10-pcduino.dts            |   2 -
>  arch/arm/boot/dts/sun4i-a10.dtsi                   |   2 -
>  arch/arm/boot/dts/sun5i-a10s.dtsi                  |   2 -
>  arch/arm/boot/dts/sun6i-a31.dtsi                   |   2 +-
>  arch/arm/boot/dts/sun7i-a20.dtsi                   |   4 +-
>  arch/arm/boot/dts/sun8i-a23-a33.dtsi               |   6 +-
>  arch/arm/boot/dts/sun8i-h3.dtsi                    |   8 +-
>  arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts       |   4 +-
>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts      |   4 +-
>  arch/arm/boot/dts/sun8i-v3s.dtsi                   |  10 +-
>  arch/arm/include/asm/uaccess.h                     |  18 +++
>  arch/arm/lib/getuser.S                             |  11 ++
>  arch/arm/lib/putuser.S                             |  20 ++--
>  arch/arm/mach-omap1/id.c                           |   6 +-
>  arch/arm/mach-omap2/id.c                           |   4 +-
>  .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      |   4 +-
>  .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |   4 +-
>  .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts     |   4 +-
>  .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts   |   4 +-
>  arch/arm64/boot/dts/exynos/exynos5433.dtsi         |   6 +-
>  arch/arm64/boot/dts/exynos/exynos7.dtsi            |   6 +-
>  arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   2 +-
>  arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi         |   4 +-
>  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts  |   4 +-
>  arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts  |  10 +-
>  arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts  |   2 +-
>  arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts  |   2 +-
>  arch/arm64/boot/dts/xilinx/zynqmp.dtsi             |   4 +-
>  arch/mips/Kconfig                                  |   1 +
>  arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c |   2 +-
>  arch/mips/cavium-octeon/octeon-platform.c          |   2 +-
>  arch/mips/include/asm/octeon/cvmx-pko.h            |   2 +-
>  arch/nds32/kernel/setup.c                          |   3 +-
>  arch/powerpc/include/asm/sfp-machine.h             |  92 +++++---------
>  arch/sparc/include/asm/io_64.h                     |   1 +
>  arch/sparc/net/bpf_jit_comp_64.c                   |  89 +++++++++-----
>  arch/x86/kvm/x86.c                                 |  17 ++-
>  arch/x86/mm/fault.c                                |   2 +-
>  arch/x86/pci/fixup.c                               |  11 ++
>  crypto/af_alg.c                                    |   2 +-
>  crypto/crypto_user.c                               |   4 +-
>  crypto/ecc.c                                       |  45 ++++---
>  drivers/android/binder_alloc.c                     |  30 +++--
>  drivers/block/rsxx/core.c                          |   2 +
>  drivers/bus/ti-sysc.c                              |   9 +-
>  drivers/char/lp.c                                  |   4 +
>  drivers/clk/mediatek/clk-cpumux.c                  |   8 +-
>  drivers/clk/mediatek/clk-mt7622.c                  |   4 +-
>  drivers/clk/meson/gxbb.c                           |   8 +-
>  drivers/clk/meson/meson8b.c                        |   2 +-
>  drivers/clk/qcom/gcc-msm8998.c                     |  44 +++----
>  drivers/clk/renesas/r8a77990-cpg-mssr.c            |   4 +-
>  drivers/clk/renesas/r8a77995-cpg-mssr.c            |   4 +-
>  drivers/clk/renesas/rcar-gen3-cpg.c                |  16 +--
>  drivers/clk/rockchip/clk-rk3188.c                  |   8 +-
>  drivers/clk/rockchip/clk-rk3328.c                  |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun50i-a64.c              |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun8i-h3.c                |   2 +-
>  drivers/crypto/amcc/crypto4xx_core.c               |   6 +-
>  drivers/crypto/atmel-aes.c                         |  53 +++++----
>  drivers/crypto/bcm/cipher.c                        |   6 +-
>  drivers/crypto/ccp/ccp-dmaengine.c                 |   1 +
>  drivers/dma/coh901318.c                            |   5 -
>  drivers/dma/dw/core.c                              |   2 +
>  drivers/dma/dw/platform.c                          |   6 +
>  drivers/dma/dw/regs.h                              |   4 +
>  drivers/extcon/extcon-max8997.c                    |  10 +-
>  drivers/firmware/raspberrypi.c                     |  35 +++---
>  drivers/gpio/gpiolib-of.c                          |  39 ++++++
>  drivers/gpu/drm/i810/i810_dma.c                    |   4 +-
>  drivers/gpu/drm/msm/msm_debugfs.c                  |   6 +-
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                 |   2 +-
>  drivers/gpu/host1x/hw/hw_host1x06_uclass.h         |   2 +-
>  .../hwtracing/coresight/coresight-etm4x-sysfs.c    |  21 ++--
>  drivers/i2c/busses/i2c-imx.c                       |   3 +-
>  drivers/i2c/i2c-core-of.c                          |   4 +-
>  drivers/infiniband/hw/cxgb4/cm.c                   |   3 +-
>  drivers/infiniband/hw/hfi1/chip.c                  |  47 +++++++-
>  drivers/infiniband/hw/hfi1/vnic_sdma.c             |  15 +--
>  drivers/infiniband/hw/hns/hns_roce_hem.h           |   2 +-
>  drivers/infiniband/hw/mlx4/sysfs.c                 |  12 +-
>  drivers/infiniband/hw/qib/qib_sysfs.c              |   6 +
>  drivers/input/joystick/psxpad-spi.c                |   2 +-
>  drivers/input/mouse/synaptics.c                    |   1 +
>  drivers/input/rmi4/rmi_f34v7.c                     |   3 +
>  drivers/input/rmi4/rmi_smbus.c                     |   2 -
>  drivers/input/touchscreen/cyttsp4_core.c           |   7 --
>  drivers/input/touchscreen/goodix.c                 |   9 ++
>  drivers/iommu/amd_iommu.c                          |  22 ++--
>  drivers/media/cec/cec-adap.c                       |   7 ++
>  drivers/media/platform/coda/coda-common.c          |  26 ++--
>  drivers/media/platform/coda/coda.h                 |   3 +-
>  drivers/media/platform/vimc/vimc-common.c          |   2 +
>  drivers/media/spi/cxd2880-spi.c                    |   1 +
>  drivers/media/usb/pulse8-cec/pulse8-cec.c          |   2 +-
>  drivers/media/usb/stkwebcam/stk-webcam.c           |   6 +-
>  drivers/media/usb/uvc/uvc_driver.c                 |  54 ++++++---
>  drivers/misc/altera-stapl/altera.c                 |   3 +-
>  drivers/net/can/slcan.c                            |   1 +
>  drivers/net/can/usb/ucan.c                         |   2 +-
>  drivers/net/can/xilinx_can.c                       |   2 +-
>  drivers/net/dsa/mv88e6xxx/chip.c                   |  21 +++-
>  drivers/net/ethernet/aquantia/atlantic/aq_cfg.h    |   4 +-
>  drivers/net/ethernet/aquantia/atlantic/aq_nic.c    |   2 +-
>  .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c    |   6 +-
>  drivers/net/ethernet/cirrus/ep93xx_eth.c           |   5 +-
>  drivers/net/ethernet/huawei/hinic/hinic_main.c     |   7 +-
>  drivers/net/ethernet/huawei/hinic/hinic_rx.c       |   2 +-
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  10 +-
>  drivers/net/ethernet/intel/ice/ice_adminq_cmd.h    |   6 +-
>  drivers/net/ethernet/intel/ice/ice_switch.c        |   3 +
>  drivers/net/ethernet/intel/ice/ice_txrx.c          |   3 +-
>  drivers/net/ethernet/mellanox/mlx4/main.c          |  11 +-
>  drivers/net/ethernet/mellanox/mlx5/core/qp.c       |   4 +-
>  .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |   5 +-
>  drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c |   5 +-
>  drivers/net/ethernet/renesas/ravb.h                |   1 -
>  drivers/net/ethernet/renesas/ravb_main.c           |  19 +--
>  drivers/net/ethernet/ti/cpts.c                     |   4 +-
>  drivers/net/wireless/intel/iwlwifi/cfg/22000.c     |   1 -
>  drivers/net/wireless/intel/iwlwifi/iwl-prph.h      |   7 ++
>  drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  15 +++
>  drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |  10 ++
>  drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   2 +-
>  drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |  34 +++++-
>  drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |  20 ++--
>  drivers/net/wireless/marvell/mwifiex/main.c        |   6 +-
>  drivers/net/wireless/rsi/rsi_91x_mgmt.c            |   1 +
>  drivers/nfc/nxp-nci/i2c.c                          |   6 +-
>  drivers/nvme/host/core.c                           |   2 +-
>  drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c           |  23 +++-
>  drivers/rtc/rtc-max77686.c                         |   2 +-
>  drivers/rtc/rtc-max8997.c                          |   2 +-
>  drivers/rtc/rtc-s3c.c                              |   6 -
>  drivers/s390/scsi/zfcp_erp.c                       |   3 -
>  drivers/s390/scsi/zfcp_fsf.c                       |   7 +-
>  drivers/slimbus/qcom-ngd-ctrl.c                    |   5 +-
>  drivers/soc/Makefile                               |   2 +-
>  drivers/soc/renesas/r8a77970-sysc.c                |   4 +-
>  drivers/soc/renesas/r8a77980-sysc.c                |  10 +-
>  drivers/soc/renesas/r8a77990-sysc.c                |  23 +---
>  drivers/spi/spi-atmel.c                            |   6 +-
>  drivers/staging/iio/addac/adt7316-i2c.c            |   2 +
>  drivers/thermal/thermal_core.c                     |   4 +-
>  drivers/tty/n_hdlc.c                               |   4 +-
>  drivers/tty/n_r3964.c                              |   2 +-
>  drivers/tty/n_tty.c                                |   8 +-
>  drivers/tty/serial/amba-pl011.c                    |   6 +-
>  drivers/tty/serial/fsl_lpuart.c                    |   4 +-
>  drivers/tty/serial/ifx6x60.c                       |   3 +
>  drivers/tty/serial/imx.c                           |   2 +-
>  drivers/tty/serial/msm_serial.c                    |   6 +-
>  drivers/tty/serial/qcom_geni_serial.c              |  56 ++++++---
>  drivers/tty/serial/serial_core.c                   |   2 +-
>  drivers/tty/tty_ldisc.c                            |   7 ++
>  drivers/tty/vt/keyboard.c                          |   2 +-
>  drivers/tty/vt/vc_screen.c                         |   3 +
>  drivers/usb/dwc3/core.c                            |   3 +-
>  drivers/usb/dwc3/debug.h                           |  29 +++++
>  drivers/usb/dwc3/debugfs.c                         |  19 ++-
>  drivers/usb/gadget/function/u_serial.c             |   2 +
>  drivers/usb/mtu3/mtu3_qmu.c                        |   2 +-
>  drivers/usb/serial/f81534.c                        |  20 +++-
>  fs/autofs/expire.c                                 |   5 +-
>  fs/cifs/file.c                                     |   7 +-
>  fs/cifs/smb2misc.c                                 |   7 +-
>  fs/dlm/lockspace.c                                 |   1 +
>  fs/dlm/member.c                                    |   2 +-
>  fs/dlm/memory.c                                    |   9 +-
>  fs/dlm/user.c                                      |   3 +-
>  fs/exportfs/expfs.c                                |  31 +++--
>  fs/f2fs/file.c                                     |   2 +-
>  fs/f2fs/gc.c                                       |  10 +-
>  fs/f2fs/segment.c                                  |   2 +
>  fs/fuse/dir.c                                      |  27 +++--
>  fs/fuse/fuse_i.h                                   |   2 +
>  fs/iomap.c                                         |  62 ++++++++--
>  fs/kernfs/dir.c                                    |   5 +-
>  fs/lockd/clnt4xdr.c                                |  22 +---
>  fs/lockd/clntxdr.c                                 |  22 +---
>  fs/nfsd/nfs4recover.c                              |  17 +--
>  fs/nfsd/vfs.c                                      |  17 ++-
>  fs/pstore/ram.c                                    |   2 +-
>  fs/xfs/xfs_bmap_util.c                             |   8 +-
>  include/dt-bindings/clock/rk3328-cru.h             |   2 +-
>  include/dt-bindings/power/r8a77970-sysc.h          |   6 +-
>  include/dt-bindings/power/r8a77980-sysc.h          |   6 +-
>  include/linux/acpi.h                               |   2 +-
>  include/linux/avf/virtchnl.h                       |   4 +-
>  include/linux/dma-mapping.h                        |   3 +-
>  include/linux/jbd2.h                               |   4 +-
>  include/linux/kernfs.h                             |   1 +
>  include/linux/mtd/mtd.h                            |   2 +-
>  include/linux/platform_data/dma-dw.h               |   6 +
>  include/linux/qcom_scm.h                           |   3 +
>  include/linux/regulator/consumer.h                 |   2 +-
>  include/linux/serial_core.h                        |  37 +++++-
>  include/linux/tty.h                                |   7 ++
>  include/math-emu/soft-fp.h                         |   2 +-
>  include/net/sctp/sctp.h                            |   5 +
>  include/net/tcp.h                                  |   2 +-
>  include/net/xfrm.h                                 |   1 -
>  kernel/audit_tree.c                                |  27 ++---
>  kernel/audit_watch.c                               |   2 +-
>  kernel/bpf/btf.c                                   |  82 +++++++++++++
>  kernel/events/core.c                               |   2 +-
>  kernel/sched/core.c                                |   3 +-
>  kernel/sched/fair.c                                |  36 +++---
>  mm/vmstat.c                                        |   7 +-
>  net/ipv4/tcp_output.c                              |   2 +-
>  net/ipv4/tcp_timer.c                               |  10 +-
>  net/ipv6/addrconf.c                                |  19 ++-
>  net/netfilter/nf_tables_api.c                      |  17 ++-
>  net/sctp/chunk.c                                   |   6 +
>  net/sctp/output.c                                  |  22 +---
>  net/sctp/socket.c                                  |   3 +-
>  net/smc/smc_wr.c                                   |   4 +-
>  net/x25/af_x25.c                                   |  18 +--
>  net/xfrm/xfrm_input.c                              |   3 +
>  net/xfrm/xfrm_interface.c                          | 132 +++++++--------------
>  scripts/Makefile.lib                               |   1 +
>  scripts/mod/modpost.c                              |  12 ++
>  sound/core/oss/linear.c                            |   2 +
>  sound/core/oss/mulaw.c                             |   2 +
>  sound/core/oss/route.c                             |   2 +
>  sound/core/pcm_lib.c                               |   8 +-
>  sound/pci/hda/patch_conexant.c                     |   1 +
>  sound/pci/hda/patch_realtek.c                      |  18 ++-
>  sound/soc/codecs/max9867.c                         |  72 ++++++-----
>  sound/soc/codecs/max9867.h                         |   2 +-
>  sound/soc/codecs/nau8540.c                         |   2 +-
>  sound/soc/sh/rcar/core.c                           |  12 ++
>  sound/soc/sh/rcar/dvc.c                            |   8 --
>  tools/bpf/bpftool/btf_dumper.c                     |   6 +-
>  tools/lib/bpf/libbpf.c                             |   2 +
>  tools/lib/bpf/libbpf_errno.c                       |   1 +
>  tools/testing/selftests/kvm/lib/assert.c           |   4 +-
>  tools/testing/selftests/powerpc/ptrace/core-pkey.c |   5 +-
>  .../testing/selftests/powerpc/ptrace/ptrace-gpr.c  |   2 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-gpr.c       |   4 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-spd-tar.c   |   2 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c   |   3 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-spr.c       |   2 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-tar.c       |   2 +-
>  .../selftests/powerpc/ptrace/ptrace-tm-vsx.c       |   3 +-
>  virt/kvm/arm/vgic/vgic-v3.c                        |   6 +-
>  268 files changed, 1563 insertions(+), 1024 deletions(-)
> 


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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 16:25 ` [PATCH 4.19 000/243] 4.19.89-stable review Chris Paterson
@ 2019-12-11 18:26   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-11 18:26 UTC (permalink / raw)
  To: Chris Paterson
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

On Wed, Dec 11, 2019 at 04:25:19PM +0000, Chris Paterson wrote:
> Hi Greg,
> 
> > From: stable-owner@vger.kernel.org <stable-owner@vger.kernel.org> On
> > Behalf Of Greg Kroah-Hartman
> > Sent: 11 December 2019 15:03
> > 
> > This is the start of the stable review cycle for the 4.19.89 release.
> > There are 243 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.
> 
> All the issues I was reporting before have gone. No new ones either.

Wonderful, thanks for letting me know.

greg k-h

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
@ 2019-12-11 21:36   ` Jon Hunter
  2019-12-11 15:02 ` [PATCH 4.19 002/243] arm64: tegra: Fix active-low warning for Jetson TX1 regulator Greg Kroah-Hartman
                     ` (248 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-11 21:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:

...

> Linus Walleij <linus.walleij@linaro.org>
>     gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC.
Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
@ 2019-12-11 21:36   ` Jon Hunter
  0 siblings, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-11 21:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:

...

> Linus Walleij <linus.walleij@linaro.org>
>     gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC.
Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
  2019-12-11 15:04 ` [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new() Greg Kroah-Hartman
@ 2019-12-11 22:59   ` Nobuhiro Iwamatsu
  2019-12-12  9:34     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 280+ messages in thread
From: Nobuhiro Iwamatsu @ 2019-12-11 22:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Nguyen Viet Dung, Kuninori Morimoto,
	Hiroyuki Yokoyama, Mark Brown, Sasha Levin

Hi,

On Wed, Dec 11, 2019 at 04:04:43PM +0100, Greg Kroah-Hartman wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> [ Upstream commit 9c698e8481a15237a5b1db5f8391dd66d59e42a4 ]
> 
> Current rsnd dvc.c is using flags to avoid duplicating register for
> MIXer case. OTOH, commit e894efef9ac7 ("ASoC: core: add support to card
> rebind") allows to rebind sound card without rebinding all drivers.
> 
> Because of above patch and dvc.c flags, it can't re-register kctrl if
> only sound card was rebinded, because dvc is keeping old flags.
> (Of course it will be no problem if rsnd driver also be rebinded,
> but it is not purpose of above patch).
> 
> This patch checks current card registered kctrl when registering.
> In MIXer case, it can avoid duplicate register if card already has same
> kctrl. In rebind case, it can re-register kctrl because card registered
> kctl had been removed when unbinding.
> 
> This patch is updated version of commit b918f1bc7f1ce ("ASoC: rsnd: DVC
> kctrl sets once")
> 
> Reported-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

This commit also requires the following commit:

commit 7aea8a9d71d54f449f49e20324df06341cc18395
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Fri Feb 1 16:49:30 2019 +0900

    ASoC: rsnd: fixup MIX kctrl registration

    Renesas sound device has many IPs and many situations.
    If platform/board uses MIXer, situation will be more complex.
    To avoid duplicate DVC kctrl registration when MIXer was used,
    it had original flags.
    But it was issue when sound card was re-binded, because
    no one can't cleanup this flags then.

    To solve this issue, commit 9c698e8481a15237a ("ASoC: rsnd: tidyup
    registering method for rsnd_kctrl_new()") checks registered
    card->controls, because if card was re-binded, these were cleanuped
    automatically. This patch could solve re-binding issue.
    But, it start to avoid MIX kctrl.

    To solve these issues, we need below.
    To avoid card re-binding issue: check registered card->controls
    To avoid duplicate DVC registration: check registered rsnd_kctrl_cfg
    To allow multiple MIX registration: check registered rsnd_kctrl_cfg
    This patch do it.

    Fixes: 9c698e8481a15237a ("ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()")
    Reported-by: Jiada Wang <jiada_wang@mentor.com>
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Tested-By: Jiada Wang <jiada_wang@mentor.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>


Please apply this to 4.19.y and 4.14.y.

Best regards,
  Nobuhiro

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

* Re: [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache
  2019-12-11 15:03 ` [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache Greg Kroah-Hartman
@ 2019-12-11 23:26   ` Nobuhiro Iwamatsu
  2019-12-12  9:33     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 280+ messages in thread
From: Nobuhiro Iwamatsu @ 2019-12-11 23:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

On Wed, Dec 11, 2019 at 04:03:52PM +0100, Greg Kroah-Hartman wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> [ Upstream commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce ]
> 
> The extent shifting code uses a flush and invalidate mechainsm prior
> to shifting extents around. This is similar to what
> xfs_free_file_space() does, but it doesn't take into account things
> like page cache vs block size differences, and it will fail if there
> is a page that it currently busy.
> 
> xfs_flush_unmap_range() handles all of these cases, so just convert
> xfs_prepare_shift() to us that mechanism rather than having it's own
> special sauce.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>


This commit also required following commit:

commit 1749d1ea89bdf3181328b7d846e609d5a0e53e50
Author: Brian Foster <bfoster@redhat.com>
Date:   Fri Apr 26 07:30:24 2019 -0700

    xfs: add missing error check in xfs_prepare_shift()

    xfs_prepare_shift() fails to check the error return from
    xfs_flush_unmap_range(). If the latter fails, that could lead to an
    insert/collapse range operation over a delalloc range, which is not
    supported.

    Add an error check and return appropriately. This is reproduced
    rarely by generic/475.

    Fixes: 7f9f71be84bc ("xfs: extent shifting doesn't fully invalidate page cache")
    Signed-off-by: Brian Foster <bfoster@redhat.com>
    Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Allison Collins <allison.henderson@oracle.com>
    Reviewed-by: Dave Chinner <dchinner@redhat.com>

Best regards,
  Nobuhirio

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 21:36   ` Jon Hunter
  (?)
@ 2019-12-11 23:48   ` Guenter Roeck
  -1 siblings, 0 replies; 280+ messages in thread
From: Guenter Roeck @ 2019-12-11 23:48 UTC (permalink / raw)
  To: Jon Hunter, Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuah, patches, ben.hutchings, lkft-triage,
	stable, linux-tegra

On 12/11/19 1:36 PM, Jon Hunter wrote:
> 
> On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.19.89 release.
>> There are 243 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
>>
>> -------------
>> Pseudo-Shortlog of commits:
> 
> ...
> 
>> Linus Walleij <linus.walleij@linaro.org>
>>      gpio: OF: Parse MMC-specific CD and WP properties
> 
> The above change is causing intermittent failures on Tegra30 eMMC.
> Reverting this change on top of the 4.19.89-rc1 fixes the problem.
> 

Thanks for tracking that down. I see boot failures for arm:vexpress-a9
when trying to boot from mmc.

I dimly recall that I have seen this before. Ah yes ... commit 89a5e15bcba8
("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit.
Can you give it a try ?

One may wonder though why the parsing code was backported in the first place.
It doesn't look like a bug fix to me.

Thanks,
Guenter

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

* Re: [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill
  2019-12-11 15:03 ` [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill Greg Kroah-Hartman
@ 2019-12-11 23:50   ` Nobuhiro Iwamatsu
  2019-12-12  9:33     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 280+ messages in thread
From: Nobuhiro Iwamatsu @ 2019-12-11 23:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Dave Chinner, Darrick J. Wong,
	Christoph Hellwig, Sasha Levin

On Wed, Dec 11, 2019 at 04:03:59PM +0100, Greg Kroah-Hartman wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> [ Upstream commit 4721a6010990971440b4ffefbdf014976b8eda2f ]
> 
> When doing direct IO to a pipe for do_splice_direct(), then pipe is
> trivial to fill up and overflow as it can only hold 16 pages. At
> this point bio_iov_iter_get_pages() then returns -EFAULT, and we
> abort the IO submission process. Unfortunately, iomap_dio_rw()
> propagates the error back up the stack.
> 
> The error is converted from the EFAULT to EAGAIN in
> generic_file_splice_read() to tell the splice layers that the pipe
> is full. do_splice_direct() completely fails to handle EAGAIN errors
> (it aborts on error) and returns EAGAIN to the caller.
> 
> copy_file_write() then completely fails to handle EAGAIN as well,
> and so returns EAGAIN to userspace, having failed to copy the data
> it was asked to.
> 
> Avoid this whole steaming pile of fail by having iomap_dio_rw()
> silently swallow EFAULT errors and so do short reads.
> 
> To make matters worse, iomap_dio_actor() has a stale data exposure
> bug bio_iov_iter_get_pages() fails - it does not zero the tail block
> that it may have been left uncovered by partial IO. Fix the error
> handling case to drop to the sub-block zeroing rather than
> immmediately returning the -EFAULT error.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>



This commit also seems to require the following 2 commits:

commit 8f67b5adc030553fbc877124306f3f3bdab89aa8
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Sun Dec 2 08:38:07 2018 -0800

    iomap: partially revert 4721a601099 (simulated directio short read on EFAULT)

    In commit 4721a601099, we tried to fix a problem wherein directio reads
    into a splice pipe will bounce EFAULT/EAGAIN all the way out to
    userspace by simulating a zero-byte short read.  This happens because
    some directio read implementations (xfs) will call
    bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous
    reads, but as soon as we run out of pipe buffers that _get_pages call
    returns EFAULT, which the splice code translates to EAGAIN and bounces
    out to userspace.

    In that commit, the iomap code catches the EFAULT and simulates a
    zero-byte read, but that causes assertion errors on regular splice reads
    because xfs doesn't allow short directio reads.  This causes infinite
    splice() loops and assertion failures on generic/095 on overlayfs
    because xfs only permit total success or total failure of a directio
    operation.  The underlying issue in the pipe splice code has now been
    fixed by changing the pipe splice loop to avoid avoid reading more data
    than there is space in the pipe.

    Therefore, it's no longer necessary to simulate the short directio, so
    remove the hack from iomap.

    Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill")
    Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
    Ranted-by: Amir Goldstein <amir73il@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
i
commit 17614445576b6af24e9cf36607c6448164719c96
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Fri Nov 30 10:37:49 2018 -0800

    splice: don't read more than available pipe space

    In commit 4721a601099, we tried to fix a problem wherein directio reads
    into a splice pipe will bounce EFAULT/EAGAIN all the way out to
    userspace by simulating a zero-byte short read.  This happens because
    some directio read implementations (xfs) will call
    bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous
    reads, but as soon as we run out of pipe buffers that _get_pages call
    returns EFAULT, which the splice code translates to EAGAIN and bounces
    out to userspace.

    In that commit, the iomap code catches the EFAULT and simulates a
    zero-byte read, but that causes assertion errors on regular splice reads
    because xfs doesn't allow short directio reads.

    The brokenness is compounded by splice_direct_to_actor immediately
    bailing on do_splice_to returning <= 0 without ever calling ->actor
    (which empties out the pipe), so if userspace calls back we'll EFAULT
    again on the full pipe, and nothing ever gets copied.

    Therefore, teach splice_direct_to_actor to clamp its requests to the
    amount of free space in the pipe and remove the simulated short read
    from the iomap directio code.

    Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill")
    Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
    Ranted-by: Amir Goldstein <amir73il@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Pleaase apply these commits.

Best regards.
  Nobuhiro

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 21:36   ` Jon Hunter
  (?)
  (?)
@ 2019-12-12  1:40   ` Guenter Roeck
  2019-12-12  9:30     ` Greg Kroah-Hartman
  2019-12-12 11:19       ` Jon Hunter
  -1 siblings, 2 replies; 280+ messages in thread
From: Guenter Roeck @ 2019-12-12  1:40 UTC (permalink / raw)
  To: Jon Hunter, Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuah, patches, ben.hutchings, lkft-triage,
	stable, linux-tegra

On 12/11/19 1:36 PM, Jon Hunter wrote:
> 
> On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.19.89 release.
>> There are 243 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
>>
>> -------------
>> Pseudo-Shortlog of commits:
> 
> ...
> 
>> Linus Walleij <linus.walleij@linaro.org>
>>      gpio: OF: Parse MMC-specific CD and WP properties
> 
> The above change is causing intermittent failures on Tegra30 eMMC.
> Reverting this change on top of the 4.19.89-rc1 fixes the problem.
> 

Thanks for tracking that down. I see boot failures for arm:vexpress-a9
when trying to boot from mmc.

I dimly recall that this was a problem before. Ah yes ... commit 89a5e15bcba8
("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit.
Can you give it a try ?

[ One may wonder though why this was back-ported in the first place. ]

Thanks,
Guenter

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (244 preceding siblings ...)
  2019-12-11 21:36   ` Jon Hunter
@ 2019-12-12  2:47 ` shuah
  2019-12-12  5:07 ` Naresh Kamboju
                   ` (3 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: shuah @ 2019-12-12  2:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, lkft-triage,
	stable, shuah

On 12/11/19 8:02 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.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] 280+ messages in thread

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (245 preceding siblings ...)
  2019-12-12  2:47 ` shuah
@ 2019-12-12  5:07 ` Naresh Kamboju
  2019-12-12 10:05 ` Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  249 siblings, 0 replies; 280+ messages in thread
From: Naresh Kamboju @ 2019-12-12  5:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list, Linus Torvalds, Andrew Morton, Guenter Roeck,
	Shuah Khan, patches, Ben Hutchings, lkft-triage, linux- stable

On Wed, 11 Dec 2019 at 20:47, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.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.19.89-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: 62dbca0959b37287a49ac6a949578849d490df83
git describe: v4.19.88-244-g62dbca0959b3
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.88-244-g62dbca0959b3


No regressions (compared to build v4.19.88)

No fixes (compared to build v4.19.88)

Ran 22458 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

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
* network-basic-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* kvm-unit-tests
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* ssuite

-- 
Linaro LKFT
https://lkft.linaro.org

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-12  1:40   ` Guenter Roeck
@ 2019-12-12  9:30     ` Greg Kroah-Hartman
  2019-12-12 11:19       ` Jon Hunter
  1 sibling, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12  9:30 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Jon Hunter, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Wed, Dec 11, 2019 at 05:40:34PM -0800, Guenter Roeck wrote:
> On 12/11/19 1:36 PM, Jon Hunter wrote:
> > 
> > On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
> > > This is the start of the stable review cycle for the 4.19.89 release.
> > > There are 243 patches in this series, all will be posted as a response
> > > to this one.  If anyone has any issues with these being applied, please
> > > let me know.
> > > 
> > > Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> > > and the diffstat can be found below.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > > 
> > > -------------
> > > Pseudo-Shortlog of commits:
> > 
> > ...
> > 
> > > Linus Walleij <linus.walleij@linaro.org>
> > >      gpio: OF: Parse MMC-specific CD and WP properties
> > 
> > The above change is causing intermittent failures on Tegra30 eMMC.
> > Reverting this change on top of the 4.19.89-rc1 fixes the problem.
> > 
> 
> Thanks for tracking that down. I see boot failures for arm:vexpress-a9
> when trying to boot from mmc.
> 
> I dimly recall that this was a problem before. Ah yes ... commit 89a5e15bcba8
> ("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit.
> Can you give it a try ?
> 
> [ One may wonder though why this was back-ported in the first place. ]

I've dropped the original patch here now, thanks.

greg k-h

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

* Re: [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache
  2019-12-11 23:26   ` Nobuhiro Iwamatsu
@ 2019-12-12  9:33     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12  9:33 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: linux-kernel, stable, Dave Chinner, Christoph Hellwig,
	Darrick J. Wong, Sasha Levin

On Thu, Dec 12, 2019 at 08:26:13AM +0900, Nobuhiro Iwamatsu wrote:
> On Wed, Dec 11, 2019 at 04:03:52PM +0100, Greg Kroah-Hartman wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > [ Upstream commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce ]
> > 
> > The extent shifting code uses a flush and invalidate mechainsm prior
> > to shifting extents around. This is similar to what
> > xfs_free_file_space() does, but it doesn't take into account things
> > like page cache vs block size differences, and it will fail if there
> > is a page that it currently busy.
> > 
> > xfs_flush_unmap_range() handles all of these cases, so just convert
> > xfs_prepare_shift() to us that mechanism rather than having it's own
> > special sauce.
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> 
> This commit also required following commit:
> 
> commit 1749d1ea89bdf3181328b7d846e609d5a0e53e50
> Author: Brian Foster <bfoster@redhat.com>
> Date:   Fri Apr 26 07:30:24 2019 -0700
> 
>     xfs: add missing error check in xfs_prepare_shift()
> 
>     xfs_prepare_shift() fails to check the error return from
>     xfs_flush_unmap_range(). If the latter fails, that could lead to an
>     insert/collapse range operation over a delalloc range, which is not
>     supported.
> 
>     Add an error check and return appropriately. This is reproduced
>     rarely by generic/475.
> 
>     Fixes: 7f9f71be84bc ("xfs: extent shifting doesn't fully invalidate page cache")
>     Signed-off-by: Brian Foster <bfoster@redhat.com>
>     Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>     Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>     Reviewed-by: Allison Collins <allison.henderson@oracle.com>
>     Reviewed-by: Dave Chinner <dchinner@redhat.com>

Now added, thanks!

greg k-h

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

* Re: [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill
  2019-12-11 23:50   ` Nobuhiro Iwamatsu
@ 2019-12-12  9:33     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12  9:33 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: linux-kernel, stable, Dave Chinner, Darrick J. Wong,
	Christoph Hellwig, Sasha Levin

On Thu, Dec 12, 2019 at 08:50:25AM +0900, Nobuhiro Iwamatsu wrote:
> On Wed, Dec 11, 2019 at 04:03:59PM +0100, Greg Kroah-Hartman wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> > 
> > [ Upstream commit 4721a6010990971440b4ffefbdf014976b8eda2f ]
> > 
> > When doing direct IO to a pipe for do_splice_direct(), then pipe is
> > trivial to fill up and overflow as it can only hold 16 pages. At
> > this point bio_iov_iter_get_pages() then returns -EFAULT, and we
> > abort the IO submission process. Unfortunately, iomap_dio_rw()
> > propagates the error back up the stack.
> > 
> > The error is converted from the EFAULT to EAGAIN in
> > generic_file_splice_read() to tell the splice layers that the pipe
> > is full. do_splice_direct() completely fails to handle EAGAIN errors
> > (it aborts on error) and returns EAGAIN to the caller.
> > 
> > copy_file_write() then completely fails to handle EAGAIN as well,
> > and so returns EAGAIN to userspace, having failed to copy the data
> > it was asked to.
> > 
> > Avoid this whole steaming pile of fail by having iomap_dio_rw()
> > silently swallow EFAULT errors and so do short reads.
> > 
> > To make matters worse, iomap_dio_actor() has a stale data exposure
> > bug bio_iov_iter_get_pages() fails - it does not zero the tail block
> > that it may have been left uncovered by partial IO. Fix the error
> > handling case to drop to the sub-block zeroing rather than
> > immmediately returning the -EFAULT error.
> > 
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> 
> 
> This commit also seems to require the following 2 commits:
> 
> commit 8f67b5adc030553fbc877124306f3f3bdab89aa8
> Author: Darrick J. Wong <darrick.wong@oracle.com>
> Date:   Sun Dec 2 08:38:07 2018 -0800
> 
>     iomap: partially revert 4721a601099 (simulated directio short read on EFAULT)
> 
>     In commit 4721a601099, we tried to fix a problem wherein directio reads
>     into a splice pipe will bounce EFAULT/EAGAIN all the way out to
>     userspace by simulating a zero-byte short read.  This happens because
>     some directio read implementations (xfs) will call
>     bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous
>     reads, but as soon as we run out of pipe buffers that _get_pages call
>     returns EFAULT, which the splice code translates to EAGAIN and bounces
>     out to userspace.
> 
>     In that commit, the iomap code catches the EFAULT and simulates a
>     zero-byte read, but that causes assertion errors on regular splice reads
>     because xfs doesn't allow short directio reads.  This causes infinite
>     splice() loops and assertion failures on generic/095 on overlayfs
>     because xfs only permit total success or total failure of a directio
>     operation.  The underlying issue in the pipe splice code has now been
>     fixed by changing the pipe splice loop to avoid avoid reading more data
>     than there is space in the pipe.
> 
>     Therefore, it's no longer necessary to simulate the short directio, so
>     remove the hack from iomap.
> 
>     Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill")
>     Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
>     Ranted-by: Amir Goldstein <amir73il@gmail.com>
>     Reviewed-by: Christoph Hellwig <hch@lst.de>
>     Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> i
> commit 17614445576b6af24e9cf36607c6448164719c96
> Author: Darrick J. Wong <darrick.wong@oracle.com>
> Date:   Fri Nov 30 10:37:49 2018 -0800
> 
>     splice: don't read more than available pipe space
> 
>     In commit 4721a601099, we tried to fix a problem wherein directio reads
>     into a splice pipe will bounce EFAULT/EAGAIN all the way out to
>     userspace by simulating a zero-byte short read.  This happens because
>     some directio read implementations (xfs) will call
>     bio_iov_iter_get_pages to grab pipe buffer pages and issue asynchronous
>     reads, but as soon as we run out of pipe buffers that _get_pages call
>     returns EFAULT, which the splice code translates to EAGAIN and bounces
>     out to userspace.
> 
>     In that commit, the iomap code catches the EFAULT and simulates a
>     zero-byte read, but that causes assertion errors on regular splice reads
>     because xfs doesn't allow short directio reads.
> 
>     The brokenness is compounded by splice_direct_to_actor immediately
>     bailing on do_splice_to returning <= 0 without ever calling ->actor
>     (which empties out the pipe), so if userspace calls back we'll EFAULT
>     again on the full pipe, and nothing ever gets copied.
> 
>     Therefore, teach splice_direct_to_actor to clamp its requests to the
>     amount of free space in the pipe and remove the simulated short read
>     from the iomap directio code.
> 
>     Fixes: 4721a601099 ("iomap: dio data corruption and spurious errors when pipes fill")
>     Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
>     Ranted-by: Amir Goldstein <amir73il@gmail.com>
>     Reviewed-by: Christoph Hellwig <hch@lst.de>
>     Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 

Sasha has queued these up already, thanks.

greg k-h

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

* Re: [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
  2019-12-11 22:59   ` Nobuhiro Iwamatsu
@ 2019-12-12  9:34     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12  9:34 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: linux-kernel, stable, Nguyen Viet Dung, Kuninori Morimoto,
	Hiroyuki Yokoyama, Mark Brown, Sasha Levin

On Thu, Dec 12, 2019 at 07:59:37AM +0900, Nobuhiro Iwamatsu wrote:
> Hi,
> 
> On Wed, Dec 11, 2019 at 04:04:43PM +0100, Greg Kroah-Hartman wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > [ Upstream commit 9c698e8481a15237a5b1db5f8391dd66d59e42a4 ]
> > 
> > Current rsnd dvc.c is using flags to avoid duplicating register for
> > MIXer case. OTOH, commit e894efef9ac7 ("ASoC: core: add support to card
> > rebind") allows to rebind sound card without rebinding all drivers.
> > 
> > Because of above patch and dvc.c flags, it can't re-register kctrl if
> > only sound card was rebinded, because dvc is keeping old flags.
> > (Of course it will be no problem if rsnd driver also be rebinded,
> > but it is not purpose of above patch).
> > 
> > This patch checks current card registered kctrl when registering.
> > In MIXer case, it can avoid duplicate register if card already has same
> > kctrl. In rebind case, it can re-register kctrl because card registered
> > kctl had been removed when unbinding.
> > 
> > This patch is updated version of commit b918f1bc7f1ce ("ASoC: rsnd: DVC
> > kctrl sets once")
> > 
> > Reported-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
> > Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> > Signed-off-by: Mark Brown <broonie@kernel.org>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> This commit also requires the following commit:
> 
> commit 7aea8a9d71d54f449f49e20324df06341cc18395
> Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Date:   Fri Feb 1 16:49:30 2019 +0900
> 
>     ASoC: rsnd: fixup MIX kctrl registration
> 
>     Renesas sound device has many IPs and many situations.
>     If platform/board uses MIXer, situation will be more complex.
>     To avoid duplicate DVC kctrl registration when MIXer was used,
>     it had original flags.
>     But it was issue when sound card was re-binded, because
>     no one can't cleanup this flags then.
> 
>     To solve this issue, commit 9c698e8481a15237a ("ASoC: rsnd: tidyup
>     registering method for rsnd_kctrl_new()") checks registered
>     card->controls, because if card was re-binded, these were cleanuped
>     automatically. This patch could solve re-binding issue.
>     But, it start to avoid MIX kctrl.
> 
>     To solve these issues, we need below.
>     To avoid card re-binding issue: check registered card->controls
>     To avoid duplicate DVC registration: check registered rsnd_kctrl_cfg
>     To allow multiple MIX registration: check registered rsnd_kctrl_cfg
>     This patch do it.
> 
>     Fixes: 9c698e8481a15237a ("ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()")
>     Reported-by: Jiada Wang <jiada_wang@mentor.com>
>     Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>     Tested-By: Jiada Wang <jiada_wang@mentor.com>
>     Signed-off-by: Mark Brown <broonie@kernel.org>
> 
> 
> Please apply this to 4.19.y and 4.14.y.

Now queued up, thanks!

greg k-h

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (246 preceding siblings ...)
  2019-12-12  5:07 ` Naresh Kamboju
@ 2019-12-12 10:05 ` Greg Kroah-Hartman
  2019-12-12 13:15     ` Jon Hunter
  2019-12-13  5:18   ` Naresh Kamboju
  2019-12-12 18:24 ` Guenter Roeck
  2019-12-13  9:30 ` Pavel Machek
  249 siblings, 2 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 10:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> and the diffstat can be found below.

I have pushed out -rc2 with a bunch of fixes for existing issues, and
some new fixes:
 	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz


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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-12  1:40   ` Guenter Roeck
@ 2019-12-12 11:19       ` Jon Hunter
  2019-12-12 11:19       ` Jon Hunter
  1 sibling, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-12 11:19 UTC (permalink / raw)
  To: Guenter Roeck, Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuah, patches, ben.hutchings, lkft-triage,
	stable, linux-tegra


On 12/12/2019 01:40, Guenter Roeck wrote:
> On 12/11/19 1:36 PM, Jon Hunter wrote:
>>
>> On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
>>> This is the start of the stable review cycle for the 4.19.89 release.
>>> There are 243 patches in this series, all will be posted as a response
>>> to this one.  If anyone has any issues with these being applied, please
>>> let me know.
>>>
>>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>>> and the diffstat can be found below.
>>>
>>> thanks,
>>>
>>> greg k-h
>>>
>>> -------------
>>> Pseudo-Shortlog of commits:
>>
>> ...
>>
>>> Linus Walleij <linus.walleij@linaro.org>
>>>      gpio: OF: Parse MMC-specific CD and WP properties
>>
>> The above change is causing intermittent failures on Tegra30 eMMC.
>> Reverting this change on top of the 4.19.89-rc1 fixes the problem.
>>
> 
> Thanks for tracking that down. I see boot failures for arm:vexpress-a9
> when trying to boot from mmc.
> 
> I dimly recall that this was a problem before. Ah yes ... commit
> 89a5e15bcba8
> ("gpio/mmc/of: Respect polarity in the device tree") fixes the above
> commit.
> Can you give it a try ?

Thanks. I did try this and I can confirm that it does indeed work,
although does not apply cleanly.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
@ 2019-12-12 11:19       ` Jon Hunter
  0 siblings, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-12 11:19 UTC (permalink / raw)
  To: Guenter Roeck, Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuah, patches, ben.hutchings, lkft-triage,
	stable, linux-tegra


On 12/12/2019 01:40, Guenter Roeck wrote:
> On 12/11/19 1:36 PM, Jon Hunter wrote:
>>
>> On 11/12/2019 15:02, Greg Kroah-Hartman wrote:
>>> This is the start of the stable review cycle for the 4.19.89 release.
>>> There are 243 patches in this series, all will be posted as a response
>>> to this one.  If anyone has any issues with these being applied, please
>>> let me know.
>>>
>>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>>> and the diffstat can be found below.
>>>
>>> thanks,
>>>
>>> greg k-h
>>>
>>> -------------
>>> Pseudo-Shortlog of commits:
>>
>> ...
>>
>>> Linus Walleij <linus.walleij@linaro.org>
>>>      gpio: OF: Parse MMC-specific CD and WP properties
>>
>> The above change is causing intermittent failures on Tegra30 eMMC.
>> Reverting this change on top of the 4.19.89-rc1 fixes the problem.
>>
> 
> Thanks for tracking that down. I see boot failures for arm:vexpress-a9
> when trying to boot from mmc.
> 
> I dimly recall that this was a problem before. Ah yes ... commit
> 89a5e15bcba8
> ("gpio/mmc/of: Respect polarity in the device tree") fixes the above
> commit.
> Can you give it a try ?

Thanks. I did try this and I can confirm that it does indeed work,
although does not apply cleanly.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 134/243] bpf: btf: check name validity for various types
  2019-12-11 15:04 ` [PATCH 4.19 134/243] bpf: btf: check name validity for various types Greg Kroah-Hartman
@ 2019-12-12 12:06   ` Pavel Machek
  0 siblings, 0 replies; 280+ messages in thread
From: Pavel Machek @ 2019-12-12 12:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Martin KaFai Lau, Yonghong Song,
	Alexei Starovoitov, Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On Wed 2019-12-11 16:04:56, Greg Kroah-Hartman wrote:
> From: Yonghong Song <yhs@fb.com>
> 
> [ Upstream commit eb04bbb608e683f8fd3ef7f716e2fa32dd90861f ]
> 
> This patch added name checking for the following types:
>  . BTF_KIND_PTR, BTF_KIND_ARRAY, BTF_KIND_VOLATILE,
>    BTF_KIND_CONST, BTF_KIND_RESTRICT:
>      the name must be null
>  . BTF_KIND_STRUCT, BTF_KIND_UNION: the struct/member name
>      is either null or a valid identifier
>  . BTF_KIND_ENUM: the enum type name is either null or a valid
>      identifier; the enumerator name must be a valid identifier.
>  . BTF_KIND_FWD: the name must be a valid identifier
>  . BTF_KIND_TYPEDEF: the name must be a valid identifier
> 
> For those places a valid name is required, the name must be
> a valid C identifier. This can be relaxed later if we found
> use cases for a different (non-C) frontend.

Does this fix any serious bug? I don't think this is suitable for
stable.

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-12 10:05 ` Greg Kroah-Hartman
@ 2019-12-12 13:15     ` Jon Hunter
  2019-12-13  5:18   ` Naresh Kamboju
  1 sibling, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-12 13:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 12/12/2019 10:05, Greg Kroah-Hartman wrote:
> On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.19.89 release.
>> There are 243 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>> and the diffstat can be found below.
> 
> I have pushed out -rc2 with a bunch of fixes for existing issues, and
> some new fixes:
>  	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz
> 


All tests are passing for Tegra ...

Test results for stable-v4.19:
    13 builds:	13 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version:	4.19.89-rc2-gb71ac9dfc6f0
Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
@ 2019-12-12 13:15     ` Jon Hunter
  0 siblings, 0 replies; 280+ messages in thread
From: Jon Hunter @ 2019-12-12 13:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings,
	lkft-triage, stable, linux-tegra


On 12/12/2019 10:05, Greg Kroah-Hartman wrote:
> On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
>> This is the start of the stable review cycle for the 4.19.89 release.
>> There are 243 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
>> and the diffstat can be found below.
> 
> I have pushed out -rc2 with a bunch of fixes for existing issues, and
> some new fixes:
>  	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz
> 


All tests are passing for Tegra ...

Test results for stable-v4.19:
    13 builds:	13 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version:	4.19.89-rc2-gb71ac9dfc6f0
Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-12 13:15     ` Jon Hunter
  (?)
@ 2019-12-12 13:28     ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 13:28 UTC (permalink / raw)
  To: Jon Hunter
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable, linux-tegra

On Thu, Dec 12, 2019 at 01:15:25PM +0000, Jon Hunter wrote:
> 
> On 12/12/2019 10:05, Greg Kroah-Hartman wrote:
> > On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
> >> This is the start of the stable review cycle for the 4.19.89 release.
> >> There are 243 patches in this series, all will be posted as a response
> >> to this one.  If anyone has any issues with these being applied, please
> >> let me know.
> >>
> >> Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> >> and the diffstat can be found below.
> > 
> > I have pushed out -rc2 with a bunch of fixes for existing issues, and
> > some new fixes:
> >  	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz
> > 
> 
> 
> All tests are passing for Tegra ...
> 
> Test results for stable-v4.19:
>     13 builds:	13 pass, 0 fail
>     22 boots:	22 pass, 0 fail
>     32 tests:	32 pass, 0 fail
> 
> Linux version:	4.19.89-rc2-gb71ac9dfc6f0
> Boards tested:	tegra124-jetson-tk1, tegra186-p2771-0000,
>                 tegra194-p2972-0000, tegra20-ventana,
>                 tegra210-p2371-2180, tegra30-cardhu-a04
> 

Wonderful, thanks for testing all of these and letting me know.

greg k-h

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

* Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-11 15:05 ` [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node Greg Kroah-Hartman
@ 2019-12-12 13:31   ` Pavel Machek
  2019-12-12 14:02     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 280+ messages in thread
From: Pavel Machek @ 2019-12-12 13:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

Hi!

> The RTC module on the A23 was claimed to be the same as on the A31, when
> in fact it is not. The A31 does not have an RTC external clock output,
> and its internal RC oscillator's average clock rate is not in the same
> range. The A33's RTC is the same as the A23.
> 
> This patch fixes the compatible string and clock properties to conform
> to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in
./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Best regards,
								Pavel

> +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> @@ -565,11 +565,11 @@
>  		};
>  
>  		rtc: rtc@1f00000 {
> -			compatible = "allwinner,sun6i-a31-rtc";
> -			reg = <0x01f00000 0x54>;
> +			compatible = "allwinner,sun8i-a23-rtc";
> +			reg = <0x01f00000 0x400>;
>  			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
> -			clock-output-names = "osc32k";
> +			clock-output-names = "osc32k", "osc32k-out";
>  			clocks = <&ext_osc32k>;
>  			#clock-cells = <1>;
>  		};

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-12 13:31   ` Pavel Machek
@ 2019-12-12 14:02     ` Greg Kroah-Hartman
  2019-12-12 14:18       ` Chen-Yu Tsai
  2019-12-13 11:50       ` Pavel Machek
  0 siblings, 2 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 14:02 UTC (permalink / raw)
  To: Pavel Machek
  Cc: linux-kernel, stable, Maxime Ripard, Chen-Yu Tsai, Sasha Levin

On Thu, Dec 12, 2019 at 02:31:32PM +0100, Pavel Machek wrote:
> Hi!
> 
> > The RTC module on the A23 was claimed to be the same as on the A31, when
> > in fact it is not. The A31 does not have an RTC external clock output,
> > and its internal RC oscillator's average clock rate is not in the same
> > range. The A33's RTC is the same as the A23.
> > 
> > This patch fixes the compatible string and clock properties to conform
> > to the updated bindings. The register range is also fixed.
> 
> No, this is not okay for v4.19. New compatible is not in
> ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Good catch, I would have thought both of those would happen at the same
time.

Now dropped, thanks.

greg k-h

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

* Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-12 14:02     ` Greg Kroah-Hartman
@ 2019-12-12 14:18       ` Chen-Yu Tsai
  2019-12-12 16:11         ` Greg Kroah-Hartman
  2019-12-13 11:50       ` Pavel Machek
  1 sibling, 1 reply; 280+ messages in thread
From: Chen-Yu Tsai @ 2019-12-12 14:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Pavel Machek, linux-kernel, stable, Sasha Levin, Maxime Ripard

On Thu, Dec 12, 2019 at 10:02 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Thu, Dec 12, 2019 at 02:31:32PM +0100, Pavel Machek wrote:
> > Hi!
> >
> > > The RTC module on the A23 was claimed to be the same as on the A31, when
> > > in fact it is not. The A31 does not have an RTC external clock output,
> > > and its internal RC oscillator's average clock rate is not in the same
> > > range. The A33's RTC is the same as the A23.
> > >
> > > This patch fixes the compatible string and clock properties to conform
> > > to the updated bindings. The register range is also fixed.
> >
> > No, this is not okay for v4.19. New compatible is not in
> > ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.
>
> Good catch, I would have thought both of those would happen at the same
> time.

(Fixed Maxime's email)

Neither were marked for stable. I guess Sasha's auto selection bot is at
work here. Is there anything we can do to prevent them from being selected?
For sunxi, we pretty much don't expect things to be backported, unless
something critical was fixed.

Thanks

ChenYu

> Now dropped, thanks.
>
> greg k-h

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

* Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-12 14:18       ` Chen-Yu Tsai
@ 2019-12-12 16:11         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-12 16:11 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Pavel Machek, linux-kernel, stable, Sasha Levin, Maxime Ripard

On Thu, Dec 12, 2019 at 10:18:34PM +0800, Chen-Yu Tsai wrote:
> On Thu, Dec 12, 2019 at 10:02 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Dec 12, 2019 at 02:31:32PM +0100, Pavel Machek wrote:
> > > Hi!
> > >
> > > > The RTC module on the A23 was claimed to be the same as on the A31, when
> > > > in fact it is not. The A31 does not have an RTC external clock output,
> > > > and its internal RC oscillator's average clock rate is not in the same
> > > > range. The A33's RTC is the same as the A23.
> > > >
> > > > This patch fixes the compatible string and clock properties to conform
> > > > to the updated bindings. The register range is also fixed.
> > >
> > > No, this is not okay for v4.19. New compatible is not in
> > > ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.
> >
> > Good catch, I would have thought both of those would happen at the same
> > time.
> 
> (Fixed Maxime's email)
> 
> Neither were marked for stable. I guess Sasha's auto selection bot is at
> work here. Is there anything we can do to prevent them from being selected?
> For sunxi, we pretty much don't expect things to be backported, unless
> something critical was fixed.

Sasha can add any files to the bot to ignore, just let him know what
ones to mark that way.

thanks,

greg k-h

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (247 preceding siblings ...)
  2019-12-12 10:05 ` Greg Kroah-Hartman
@ 2019-12-12 18:24 ` Guenter Roeck
  2019-12-13  9:30 ` Pavel Machek
  249 siblings, 0 replies; 280+ messages in thread
From: Guenter Roeck @ 2019-12-12 18:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000.
> Anything received after that time might be too late.
> 

For v4.19.88-255-gb71ac9dfc6f0:

Build results:
	total: 156 pass: 156 fail: 0
Qemu test results:
	total: 393 pass: 393 fail: 0

Guenter

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-12 10:05 ` Greg Kroah-Hartman
  2019-12-12 13:15     ` Jon Hunter
@ 2019-12-13  5:18   ` Naresh Kamboju
  1 sibling, 0 replies; 280+ messages in thread
From: Naresh Kamboju @ 2019-12-13  5:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: open list, Linus Torvalds, Andrew Morton, Guenter Roeck,
	Shuah Khan, patches, Ben Hutchings, lkft-triage, linux- stable

On Thu, 12 Dec 2019 at 15:35, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Dec 11, 2019 at 04:02:42PM +0100, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.19.89 release.
> > There are 243 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Fri, 13 Dec 2019 14:56:06 +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.19.89-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.19.y
> > and the diffstat can be found below.
>
> I have pushed out -rc2 with a bunch of fixes for existing issues, and
> some new fixes:
>         https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

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

kernel: 4.19.89-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: b71ac9dfc6f0f5ef4a9dfa80113bea22cd8b8167
git describe: v4.19.88-255-gb71ac9dfc6f0
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.88-255-gb71ac9dfc6f0

No regressions (compared to build v4.19.88)

No fixes (compared to build v4.19.88)

Ran 24936 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* 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_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
* kselftest
* ltp-fs-tests
* network-basic-tests
* ltp-open-posix-tests
* kvm-unit-tests
* ssuite
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none

-- 
Linaro LKFT
https://lkft.linaro.org

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
                   ` (248 preceding siblings ...)
  2019-12-12 18:24 ` Guenter Roeck
@ 2019-12-13  9:30 ` Pavel Machek
  2019-12-13 13:56   ` Guenter Roeck
  249 siblings, 1 reply; 280+ messages in thread
From: Pavel Machek @ 2019-12-13  9:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuah, patches,
	ben.hutchings, lkft-triage, stable

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Hi!

> This is the start of the stable review cycle for the 4.19.89 release.
> There are 243 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000.
> Anything received after that time might be too late.

Is there something funny going on with the timing, again? I see that
4.19.89 is already out:

commit 312017a460d5ea31d646e7148e400e13db799ddc
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Fri Dec 13 08:52:59 2019 +0100

    Linux 4.19.89

Best regards,
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS
  2019-12-11 15:04 ` [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS Greg Kroah-Hartman
@ 2019-12-13  9:35   ` Pavel Machek
  2019-12-13 19:23     ` Thinh Nguyen
  2019-12-13  9:40   ` Pavel Machek
  1 sibling, 1 reply; 280+ messages in thread
From: Pavel Machek @ 2019-12-13  9:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Thinh Nguyen, Felipe Balbi, Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

On Wed 2019-12-11 16:04:21, Greg Kroah-Hartman wrote:
> From: Thinh Nguyen <thinh.nguyen@synopsys.com>
> 
> [ Upstream commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 ]
> 
> Highspeed device and below has different state names than superspeed and
> higher. Add proper checks and printouts of link states for highspeed and
> below.

This is debugfs, so I don't believe it was suitable for stable in the
first place, but....


> +	case DWC3_LINK_STATE_RESUME:
> +		return "Resume";
> +	default:
> +		return "UNKNOWN link state\n";
> +	}

You may want to delete \n here, it will be duplicated if this ever
triggers.

Best regards,
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS
  2019-12-11 15:04 ` [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS Greg Kroah-Hartman
  2019-12-13  9:35   ` Pavel Machek
@ 2019-12-13  9:40   ` Pavel Machek
  2019-12-13 19:35     ` Thinh Nguyen
  1 sibling, 1 reply; 280+ messages in thread
From: Pavel Machek @ 2019-12-13  9:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Thinh Nguyen, Felipe Balbi, Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]

Hi!

> From: Thinh Nguyen <thinh.nguyen@synopsys.com>
> 
> [ Upstream commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 ]
> 
> Highspeed device and below has different state names than superspeed and
> higher. Add proper checks and printouts of link states for highspeed and
> below.

Just noticed some more oddity:
> 

> +	case DWC3_LINK_STATE_RESUME:
> +		return "Resume";
> +	default:
> +		return "UNKNOWN link state\n";
> +	}

"UNKNOWN" would be consistent with the rest of the file.

> +++ b/drivers/usb/dwc3/debugfs.c
> @@ -433,13 +433,17 @@ static int dwc3_link_state_show(struct seq_file *s, void *unused)
>  	unsigned long		flags;
>  	enum dwc3_link_state	state;
>  	u32			reg;
> +	u8			speed;
>  
>  	spin_lock_irqsave(&dwc->lock, flags);
>  	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
>  	state = DWC3_DSTS_USBLNKST(reg);
> -	spin_unlock_irqrestore(&dwc->lock, flags);
> +	speed = reg & DWC3_DSTS_CONNECTSPD;
>  
> -	seq_printf(s, "%s\n", dwc3_gadget_link_string(state));
> +	seq_printf(s, "%s\n", (speed >= DWC3_DSTS_SUPERSPEED) ?
> +		   dwc3_gadget_link_string(state) :
> +		   dwc3_gadget_hs_link_string(state));
> +	spin_unlock_irqrestore(&dwc->lock, flags);
>  
>  	return 0;
>  }

The locking change is really wrong, right? There's no reason to do
seq_printfs under spinlock..

> @@ -477,6 +483,15 @@ static ssize_t dwc3_link_state_write(struct
file *file,
>  		return -EINVAL;
>  
>  	spin_lock_irqsave(&dwc->lock, flags);
> +	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
> +	speed = reg & DWC3_DSTS_CONNECTSPD;
> +
> +	if (speed < DWC3_DSTS_SUPERSPEED &&
> +	    state != DWC3_LINK_STATE_RECOV) {
> +		spin_unlock_irqrestore(&dwc->lock, flags);
> +		return -EINVAL;
> +	}
> +
>  	dwc3_gadget_set_link_state(dwc, state);
>  	spin_unlock_irqrestore(&dwc->lock, flags);
>  

This might be ok but is not mentioned in the changelog.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node
  2019-12-12 14:02     ` Greg Kroah-Hartman
  2019-12-12 14:18       ` Chen-Yu Tsai
@ 2019-12-13 11:50       ` Pavel Machek
  1 sibling, 0 replies; 280+ messages in thread
From: Pavel Machek @ 2019-12-13 11:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Pavel Machek, linux-kernel, stable, Maxime Ripard, Chen-Yu Tsai,
	Sasha Levin

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

On Thu 2019-12-12 15:02:41, Greg Kroah-Hartman wrote:
> On Thu, Dec 12, 2019 at 02:31:32PM +0100, Pavel Machek wrote:
> > Hi!
> > 
> > > The RTC module on the A23 was claimed to be the same as on the A31, when
> > > in fact it is not. The A31 does not have an RTC external clock output,
> > > and its internal RC oscillator's average clock rate is not in the same
> > > range. The A33's RTC is the same as the A23.
> > > 
> > > This patch fixes the compatible string and clock properties to conform
> > > to the updated bindings. The register range is also fixed.
> > 
> > No, this is not okay for v4.19. New compatible is not in
> > ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.
> 
> Good catch, I would have thought both of those would happen at the same
> time.

That's not normally how it works for dts changes. Drivers and dts very
often have different maintainers, so there is preference for them to
go in separately.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-13  9:30 ` Pavel Machek
@ 2019-12-13 13:56   ` Guenter Roeck
  2019-12-13 14:09     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 280+ messages in thread
From: Guenter Roeck @ 2019-12-13 13:56 UTC (permalink / raw)
  To: Pavel Machek, Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuah, patches, ben.hutchings,
	lkft-triage, stable

On 12/13/19 1:30 AM, Pavel Machek wrote:
> Hi!
> 
>> This is the start of the stable review cycle for the 4.19.89 release.
>> There are 243 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000.
>> Anything received after that time might be too late.
> 
> Is there something funny going on with the timing, again? I see that
> 4.19.89 is already out:
> 

Just for the record, in my opinion it is perfectly fine to publish stable
releases early after all expected feedback is in. That lets me merge the
release early today and gives me time to fix any merge related problems.
I don't see the benefit of waiting until 14:46:07.

Guenter

> commit 312017a460d5ea31d646e7148e400e13db799ddc
> Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Date:   Fri Dec 13 08:52:59 2019 +0100
> 
>      Linux 4.19.89
> 
> Best regards,
> 								Pavel
> 


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

* Re: [PATCH 4.19 000/243] 4.19.89-stable review
  2019-12-13 13:56   ` Guenter Roeck
@ 2019-12-13 14:09     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 280+ messages in thread
From: Greg Kroah-Hartman @ 2019-12-13 14:09 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Pavel Machek, linux-kernel, torvalds, akpm, shuah, patches,
	ben.hutchings, lkft-triage, stable

On Fri, Dec 13, 2019 at 05:56:41AM -0800, Guenter Roeck wrote:
> On 12/13/19 1:30 AM, Pavel Machek wrote:
> > Hi!
> > 
> > > This is the start of the stable review cycle for the 4.19.89 release.
> > > There are 243 patches in this series, all will be posted as a response
> > > to this one.  If anyone has any issues with these being applied, please
> > > let me know.
> > > 
> > > Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000.
> > > Anything received after that time might be too late.
> > 
> > Is there something funny going on with the timing, again? I see that
> > 4.19.89 is already out:
> > 
> 
> Just for the record, in my opinion it is perfectly fine to publish stable
> releases early after all expected feedback is in. That lets me merge the
> release early today and gives me time to fix any merge related problems.
> I don't see the benefit of waiting until 14:46:07.

And that's exactly what I do.  I wait for the expected feedback to come
in and if it looks good, I do a release.

I ususally delay the "official" announcement a bit to give the Android
builder/testers some time to give feedback after I make the tarballs as
they are good at finding problems no one else seems to catch, and then I
do the email announcements.

thanks,

greg k-h

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

* Re: [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS
  2019-12-13  9:35   ` Pavel Machek
@ 2019-12-13 19:23     ` Thinh Nguyen
  0 siblings, 0 replies; 280+ messages in thread
From: Thinh Nguyen @ 2019-12-13 19:23 UTC (permalink / raw)
  To: Pavel Machek, Greg Kroah-Hartman
  Cc: linux-kernel, stable, Felipe Balbi, Sasha Levin

Hi,

Pavel Machek wrote:
> On Wed 2019-12-11 16:04:21, Greg Kroah-Hartman wrote:
>> From: Thinh Nguyen <thinh.nguyen@synopsys.com>
>>
>> [ Upstream commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 ]
>>
>> Highspeed device and below has different state names than superspeed and
>> higher. Add proper checks and printouts of link states for highspeed and
>> below.
> This is debugfs, so I don't believe it was suitable for stable in the
> first place, but....
>
>
>> +	case DWC3_LINK_STATE_RESUME:
>> +		return "Resume";
>> +	default:
>> +		return "UNKNOWN link state\n";
>> +	}
> You may want to delete \n here, it will be duplicated if this ever
> triggers.

We already fixed it upstream:
038761ce68c2 ("usb: dwc3: debug: Remove newline printout")

> Best regards,
> 								Pavel

BR
Thinh

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

* Re: [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS
  2019-12-13  9:40   ` Pavel Machek
@ 2019-12-13 19:35     ` Thinh Nguyen
  0 siblings, 0 replies; 280+ messages in thread
From: Thinh Nguyen @ 2019-12-13 19:35 UTC (permalink / raw)
  To: Pavel Machek, Greg Kroah-Hartman
  Cc: linux-kernel, stable, Felipe Balbi, Sasha Levin

Hi,

Pavel Machek wrote:
> Hi!
>
>> From: Thinh Nguyen <thinh.nguyen@synopsys.com>
>>
>> [ Upstream commit 0d36dede457873404becd7c9cb9d0f2bcfd0dcd9 ]
>>
>> Highspeed device and below has different state names than superspeed and
>> higher. Add proper checks and printouts of link states for highspeed and
>> below.
> Just noticed some more oddity:
>> +	case DWC3_LINK_STATE_RESUME:
>> +		return "Resume";
>> +	default:
>> +		return "UNKNOWN link state\n";
>> +	}
> "UNKNOWN" would be consistent with the rest of the file.

Leaving the "link state" there may be fine for now due to the way it's 
printed in the log making it clearer.

>
>> +++ b/drivers/usb/dwc3/debugfs.c
>> @@ -433,13 +433,17 @@ static int dwc3_link_state_show(struct seq_file *s, void *unused)
>>   	unsigned long		flags;
>>   	enum dwc3_link_state	state;
>>   	u32			reg;
>> +	u8			speed;
>>   
>>   	spin_lock_irqsave(&dwc->lock, flags);
>>   	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
>>   	state = DWC3_DSTS_USBLNKST(reg);
>> -	spin_unlock_irqrestore(&dwc->lock, flags);
>> +	speed = reg & DWC3_DSTS_CONNECTSPD;
>>   
>> -	seq_printf(s, "%s\n", dwc3_gadget_link_string(state));
>> +	seq_printf(s, "%s\n", (speed >= DWC3_DSTS_SUPERSPEED) ?
>> +		   dwc3_gadget_link_string(state) :
>> +		   dwc3_gadget_hs_link_string(state));
>> +	spin_unlock_irqrestore(&dwc->lock, flags);
>>   
>>   	return 0;
>>   }
> The locking change is really wrong, right? There's no reason to do
> seq_printfs under spinlock..

Yes, it can be unlocked earlier.

>
>> @@ -477,6 +483,15 @@ static ssize_t dwc3_link_state_write(struct
> file *file,
>>   		return -EINVAL;
>>   
>>   	spin_lock_irqsave(&dwc->lock, flags);
>> +	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
>> +	speed = reg & DWC3_DSTS_CONNECTSPD;
>> +
>> +	if (speed < DWC3_DSTS_SUPERSPEED &&
>> +	    state != DWC3_LINK_STATE_RECOV) {
>> +		spin_unlock_irqrestore(&dwc->lock, flags);
>> +		return -EINVAL;
>> +	}
>> +
>>   	dwc3_gadget_set_link_state(dwc, state);
>>   	spin_unlock_irqrestore(&dwc->lock, flags);
>>   
> This might be ok but is not mentioned in the changelog.
>

I'll spell it out next time when I mention "add proper checks" in the 
commit message as it obviously wasn't clear.

Thanks,
Thinh


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

end of thread, other threads:[~2019-12-13 21:48 UTC | newest]

Thread overview: 280+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 15:02 [PATCH 4.19 000/243] 4.19.89-stable review Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 001/243] rsi: release skb if rsi_prepare_beacon fails Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 002/243] arm64: tegra: Fix active-low warning for Jetson TX1 regulator Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 003/243] sparc64: implement ioremap_uc Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 004/243] lp: fix sparc64 LPSETTIMEOUT ioctl Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 005/243] usb: gadget: u_serial: add missing port entry locking Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 006/243] tty: serial: fsl_lpuart: use the sg count from dma_map_sg Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 007/243] tty: serial: msm_serial: Fix flow control Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 008/243] serial: pl011: Fix DMA ->flush_buffer() Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 009/243] serial: serial_core: Perform NULL checks for break_ctl ops Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 010/243] serial: ifx6x60: add missed pm_runtime_disable Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 011/243] autofs: fix a leak in autofs_expire_indirect() Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 012/243] RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 013/243] iwlwifi: pcie: dont consider IV len in A-MSDU Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 014/243] exportfs_decode_fh(): negative pinned may become positive without the parent locked Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 015/243] audit_get_nd(): dont unlock parent too early Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 016/243] NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error Greg Kroah-Hartman
2019-12-11 15:02 ` [PATCH 4.19 017/243] xfrm: release device reference for invalid state Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 018/243] Input: cyttsp4_core - fix use after free bug Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 019/243] sched/core: Avoid spurious lock dependencies Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 020/243] perf/core: Consistently fail fork on allocation failures Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 021/243] ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed() Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 022/243] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1 Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 023/243] selftests: kvm: fix build with glibc >= 2.30 Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 024/243] rsxx: add missed destroy_workqueue calls in remove Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 025/243] net: ep93xx_eth: fix mismatch of request_mem_region " Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 026/243] i2c: core: fix use after free in of_i2c_notify Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 027/243] serial: core: Allow processing sysrq at port unlock time Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 028/243] cxgb4vf: fix memleak in mac_hlist initialization Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 029/243] iwlwifi: mvm: synchronize TID queue removal Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 030/243] iwlwifi: trans: Clear persistence bit when starting the FW Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 031/243] iwlwifi: mvm: Send non offchannel traffic via AP sta Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 032/243] ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+ Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 033/243] audit: Embed key into chunk Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 034/243] netfilter: nf_tables: dont use position attribute on rule replacement Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 035/243] ARC: IOC: panic if kernel was started with previously enabled IOC Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 036/243] net/mlx5: Release resource on error flow Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 037/243] clk: sunxi-ng: a64: Fix gate bit of DSI DPHY Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 038/243] ice: Fix NVM mask defines Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 039/243] dlm: fix possible call to kfree() for non-initialized pointer Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 040/243] ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1 Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 041/243] extcon: max8997: Fix lack of path setting in USB device mode Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 042/243] net: ethernet: ti: cpts: correct debug for expired txq skb Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 043/243] rtc: s3c-rtc: Avoid using broken ALMYEAR register Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 044/243] rtc: max77686: Fix the returned value in case of error in max77686_rtc_read_time() Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 045/243] i40e: dont restart nway if autoneg not supported Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 046/243] virtchnl: Fix off by one error Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 047/243] clk: rockchip: fix rk3188 sclk_smc gate data Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 048/243] clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 049/243] ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 050/243] dlm: fix missing idr_destroy for recover_idr Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 051/243] MIPS: SiByte: Enable ZONE_DMA32 for LittleSur Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 052/243] net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2 Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 053/243] scsi: zfcp: update kernel message for invalid FCP_CMND length, its not the CDB Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 054/243] scsi: zfcp: drop default switch case which might paper over missing case Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 055/243] drivers: soc: Allow building the amlogic drivers without ARCH_MESON Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 056/243] bus: ti-sysc: Fix getting optional clocks in clock_roles Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 057/243] ARM: dts: imx6: RDU2: fix eGalax touchscreen node Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 058/243] crypto: ecc - check for invalid values in the key verification test Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 059/243] crypto: bcm - fix normal/non key hash algorithm failure Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 060/243] arm64: dts: zynqmp: Fix node names which contain "_" Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 061/243] pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 062/243] Staging: iio: adt7316: Fix i2c data reading, set the data field Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 063/243] firmware: raspberrypi: Fix firmware calls with large buffers Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 064/243] mm/vmstat.c: fix NUMA statistics updates Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 065/243] clk: rockchip: fix I2S1 clock gate register for rk3328 Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 066/243] clk: rockchip: fix ID of 8ch clock of I2S1 " Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 067/243] sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 068/243] regulator: Fix return value of _set_load() stub Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 069/243] USB: serial: f81534: fix reading old/new IC config Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache Greg Kroah-Hartman
2019-12-11 23:26   ` Nobuhiro Iwamatsu
2019-12-12  9:33     ` Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 071/243] net-next/hinic:fix a bug in set mac address Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 072/243] net-next/hinic: fix a bug in rx data flow Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 073/243] ice: Fix return value from NAPI poll Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 074/243] ice: Fix possible NULL pointer de-reference Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 075/243] iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 076/243] iomap: sub-block dio needs to zeroout beyond EOF Greg Kroah-Hartman
2019-12-11 15:03 ` [PATCH 4.19 077/243] iomap: dio data corruption and spurious errors when pipes fill Greg Kroah-Hartman
2019-12-11 23:50   ` Nobuhiro Iwamatsu
2019-12-12  9:33     ` Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 078/243] iomap: readpages doesnt zero page tail beyond EOF Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 079/243] iw_cxgb4: only reconnect with MPAv1 if the peer aborts Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 080/243] MIPS: OCTEON: octeon-platform: fix typing Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 081/243] net/smc: use after free fix in smc_wr_tx_put_slot() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 082/243] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 083/243] nds32: Fix the items of hwcap_str ordering issue Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 084/243] rtc: max8997: Fix the returned value in case of error in max8997_rtc_read_alarm() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 085/243] rtc: dt-binding: abx80x: fix resistance scale Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 086/243] ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 087/243] media: coda: fix memory corruption in case more than 32 instances are opened Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 088/243] media: pulse8-cec: return 0 when invalidating the logical address Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 089/243] media: cec: report Vendor ID after initialization Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 090/243] iwlwifi: fix cfg structs for 22000 with different RF modules Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 091/243] ravb: Clean up duplex handling Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 092/243] net/ipv6: re-do dad when interface has IFF_NOARP flag change Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 093/243] dmaengine: coh901318: Fix a double-lock bug Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 094/243] dmaengine: coh901318: Remove unused variable Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 095/243] dmaengine: dw-dmac: implement dma protection control setting Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 096/243] net: qualcomm: rmnet: move null check on dev before dereferecing it Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 097/243] selftests/powerpc: Allocate base registers Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 098/243] selftests/powerpc: Skip test instead of failing Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 099/243] usb: dwc3: debugfs: Properly print/set link state for HS Greg Kroah-Hartman
2019-12-13  9:35   ` Pavel Machek
2019-12-13 19:23     ` Thinh Nguyen
2019-12-13  9:40   ` Pavel Machek
2019-12-13 19:35     ` Thinh Nguyen
2019-12-11 15:04 ` [PATCH 4.19 100/243] usb: dwc3: dont log probe deferrals; but do log other error codes Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 101/243] ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 102/243] f2fs: fix to account preflush command for noflush_merge mode Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 103/243] f2fs: fix count of seg_freed to make sec_freed correct Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 104/243] f2fs: change segment to section in f2fs_ioc_gc_range Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 105/243] ARM: dts: rockchip: Fix the PMU interrupt number for rv1108 Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 106/243] ARM: dts: rockchip: Assign the proper GPIO clocks " Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 107/243] f2fs: fix to allow node segment for GC by ioctl path Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 108/243] sparc: Fix JIT fused branch convergance Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 109/243] sparc: Correct ctx->saw_frame_pointer logic Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 110/243] nvme: Free ctrl device name on init failure Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 111/243] dma-mapping: fix return type of dma_set_max_seg_size() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 112/243] slimbus: ngd: Fix build error on x86 Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 113/243] altera-stapl: check for a null key before strcasecmping it Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 114/243] serial: imx: fix error handling in console_setup Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 115/243] i2c: imx: dont print error message on probe defer Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 116/243] clk: meson: Fix GXL HDMI PLL fractional bits width Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 117/243] gpu: host1x: Fix syncpoint ID field size on Tegra186 Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 118/243] lockd: fix decoding of TEST results Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 119/243] sctp: increase sk_wmem_alloc when head->truesize is increased Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 120/243] iommu/amd: Fix line-break in error log reporting Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 121/243] ASoC: rsnd: tidyup registering method for rsnd_kctrl_new() Greg Kroah-Hartman
2019-12-11 22:59   ` Nobuhiro Iwamatsu
2019-12-12  9:34     ` Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 122/243] ARM: dts: sun4i: Fix gpio-keys warning Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 123/243] ARM: dts: sun4i: Fix HDMI output DTC warning Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 124/243] ARM: dts: sun5i: a10s: " Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 125/243] ARM: dts: r8a779[01]: Disable unconnected LVDS encoders Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 126/243] ARM: dts: sun7i: Fix HDMI output DTC warning Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 127/243] ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 128/243] ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 129/243] dlm: NULL check before kmem_cache_destroy is not needed Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 130/243] ARM: debug: enable UART1 for socfpga Cyclone5 Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 131/243] can: xilinx: fix return type of ndo_start_xmit function Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 132/243] nfsd: fix a warning in __cld_pipe_upcall() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 133/243] bpf: btf: implement btf_name_valid_identifier() Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 134/243] bpf: btf: check name validity for various types Greg Kroah-Hartman
2019-12-12 12:06   ` Pavel Machek
2019-12-11 15:04 ` [PATCH 4.19 135/243] tools: bpftool: fix a bitfield pretty print issue Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 136/243] ASoC: au8540: use 64-bit arithmetic instead of 32-bit Greg Kroah-Hartman
2019-12-11 15:04 ` [PATCH 4.19 137/243] gpio: OF: Parse MMC-specific CD and WP properties Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 138/243] ARM: OMAP1/2: fix SoC name printing Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 139/243] arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 140/243] arm64: dts: meson-gxbb-nanopi-k2: " Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 141/243] arm64: dts: meson-gxbb-odroidc2: " Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 142/243] arm64: dts: meson-gxl-khadas-vim: " Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 143/243] net/x25: fix called/calling length calculation in x25_parse_address_block Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 144/243] net/x25: fix null_x25_address handling Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 145/243] tools/bpf: make libbpf _GNU_SOURCE friendly Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 146/243] clk: mediatek: Drop __init from mtk_clk_register_cpumuxes() Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 147/243] clk: mediatek: Drop more __init markings for driver probe Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 148/243] soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 149/243] soc: renesas: r8a77980-sysc: Correct names of A2DP[01] " Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 150/243] soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 151/243] kbuild: disable dtc simple_bus_reg warnings by default Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 152/243] tcp: make tcp_space() aware of socket backlog Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 153/243] ARM: dts: mmp2: fix the gpio interrupt cell number Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 154/243] ARM: dts: realview-pbx: Fix duplicate regulator nodes Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 155/243] tcp: fix off-by-one bug on aborting window-probing socket Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 156/243] tcp: fix SNMP under-estimation on failed retransmission Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 157/243] tcp: fix SNMP TCP timeout under-estimation Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 158/243] modpost: skip ELF local symbols during section mismatch check Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 159/243] kbuild: fix single target build for external module Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 160/243] mtd: fix mtd_oobavail() incoherent returned value Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 161/243] ARM: dts: pxa: clean up USB controller nodes Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 162/243] clk: meson: meson8b: fix the offset of vid_pll_dcos N value Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 163/243] clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 164/243] clk: qcom: Fix MSM8998 resets Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 165/243] media: cxd2880-spi: fix probe when dvb_attach fails Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 166/243] ARM: dts: realview: Fix some more duplicate regulator nodes Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 167/243] dlm: fix invalid cluster name warning Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 168/243] net/mlx4_core: Fix return codes of unsupported operations Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 169/243] pstore/ram: Avoid NULL deref in ftrace merging failure path Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 170/243] powerpc/math-emu: Update macros from GCC Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 171/243] clk: renesas: r8a77990: Correct parent clock of DU Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 172/243] clk: renesas: r8a77995: " Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 173/243] MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 174/243] nfsd: Return EPERM, not EACCES, in some SETATTR cases Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 175/243] media: uvcvideo: Abstract streaming object lifetime Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 176/243] tty: serial: qcom_geni_serial: Fix softlock Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 177/243] ARM: dts: sun8i: h3: Fix the system-control register range Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 178/243] tty: Dont block on IO when ldisc change is pending Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 179/243] media: stkwebcam: Bugfix for wrong return values Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 180/243] firmware: qcom: scm: fix compilation error when disabled Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 181/243] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 182/243] sctp: frag_point sanity check Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 183/243] soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B} Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 184/243] mlxsw: spectrum_router: Relax GRE decap matching check Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node Greg Kroah-Hartman
2019-12-12 13:31   ` Pavel Machek
2019-12-12 14:02     ` Greg Kroah-Hartman
2019-12-12 14:18       ` Chen-Yu Tsai
2019-12-12 16:11         ` Greg Kroah-Hartman
2019-12-13 11:50       ` Pavel Machek
2019-12-11 15:05 ` [PATCH 4.19 186/243] IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 187/243] IB/hfi1: Close VNIC sdma_progress sleep window Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 188/243] mlx4: Use snprintf instead of complicated strcpy Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 189/243] usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 190/243] clk: renesas: rcar-gen3: Set state when registering SD clocks Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 191/243] ASoC: max9867: Fix power management Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 192/243] ARM: dts: sunxi: Fix PMU compatible strings Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 193/243] ARM: dts: am335x-pdu001: Fix polarity of card detection input Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 194/243] media: vimc: fix start stream when link is disabled Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 195/243] net: aquantia: fix RSS table and key sizes Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 196/243] sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision Greg Kroah-Hartman
2019-12-11 15:05 ` [PATCH 4.19 197/243] fuse: verify nlink Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 198/243] fuse: verify attributes Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 199/243] ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 200/243] ALSA: hda/realtek - Enable the headset-mic on a Xiaomis laptop Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 201/243] ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 202/243] ALSA: pcm: oss: Avoid potential buffer overflows Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 203/243] ALSA: hda - Add mute led support for HP ProBook 645 G4 Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 204/243] Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 205/243] Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 206/243] Input: synaptics-rmi4 - dont increment rmiaddr for SMBus transfers Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 207/243] Input: goodix - add upside-down quirk for Teclast X89 tablet Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 208/243] coresight: etm4x: Fix input validation for sysfs Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 209/243] Input: Fix memory leak in psxpad_spi_probe Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 210/243] x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 211/243] x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 212/243] xfrm interface: fix memory leak on creation Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 213/243] xfrm interface: avoid corruption on changelink Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 214/243] xfrm interface: fix list corruption for x-netns Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 215/243] xfrm interface: fix management of phydev Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 216/243] CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 217/243] CIFS: Fix SMB2 oplock break processing Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 218/243] tty: vt: keyboard: reject invalid keycodes Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 219/243] can: slcan: Fix use-after-free Read in slcan_open Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 220/243] kernfs: fix ino wrap-around detection Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 221/243] jbd2: Fix possible overflow in jbd2_log_space_left() Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 222/243] drm/msm: fix memleak on release Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 223/243] drm/i810: Prevent underflow in ioctl Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 224/243] arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node" Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 225/243] KVM: arm/arm64: vgic: Dont rely on the wrong pending table Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 226/243] KVM: x86: do not modify masked bits of shared MSRs Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 227/243] KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 228/243] KVM: x86: Grab KVMs srcu lock when setting nested state Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 229/243] crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 230/243] crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 231/243] crypto: af_alg - cast ki_complete ternary op to int Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 232/243] crypto: ccp - fix uninitialized list head Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 233/243] crypto: ecdh - fix big endian bug in ECC library Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 234/243] crypto: user - fix memory leak in crypto_report Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 235/243] spi: atmel: Fix CS high support Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 236/243] mwifiex: update set_mac_address logic Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 237/243] can: ucan: fix non-atomic allocation in completion handler Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 238/243] RDMA/qib: Validate ->show()/store() callbacks before calling them Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 239/243] iomap: Fix pipe page leakage during splicing Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 240/243] thermal: Fix deadlock in thermal thermal_zone_device_check Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 241/243] vcs: prevent write access to vcsu devices Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 242/243] binder: Fix race between mmap() and binder_alloc_print_pages() Greg Kroah-Hartman
2019-12-11 15:06 ` [PATCH 4.19 243/243] binder: Handle start==NULL in binder_update_page_range() Greg Kroah-Hartman
2019-12-11 16:25 ` [PATCH 4.19 000/243] 4.19.89-stable review Chris Paterson
2019-12-11 18:26   ` Greg Kroah-Hartman
2019-12-11 21:36 ` Jon Hunter
2019-12-11 21:36   ` Jon Hunter
2019-12-11 23:48   ` Guenter Roeck
2019-12-12  1:40   ` Guenter Roeck
2019-12-12  9:30     ` Greg Kroah-Hartman
2019-12-12 11:19     ` Jon Hunter
2019-12-12 11:19       ` Jon Hunter
2019-12-12  2:47 ` shuah
2019-12-12  5:07 ` Naresh Kamboju
2019-12-12 10:05 ` Greg Kroah-Hartman
2019-12-12 13:15   ` Jon Hunter
2019-12-12 13:15     ` Jon Hunter
2019-12-12 13:28     ` Greg Kroah-Hartman
2019-12-13  5:18   ` Naresh Kamboju
2019-12-12 18:24 ` Guenter Roeck
2019-12-13  9:30 ` Pavel Machek
2019-12-13 13:56   ` Guenter Roeck
2019-12-13 14:09     ` Greg Kroah-Hartman

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