Skip to contentSkip to conversation

4.19.99-stable review

PATCH In review Greg Kroah-Hartman 9 participants 677 messages Jan 24, 2020 – Jan 27, 2020 1 message not in the archive Page 1 of 5

Subsystems (10)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 4.19.99-stable review

This is the start of the stable review cycle for the 4.19.99 release. There are 639 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Jan 2020 09:26:29 +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.99-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 <[email protected]>

    Linux 4.19.99-rc1

Finn Thain <[email protected]>
m68k: Call timer_interrupt() with interrupts disabled

Christian Hewitt <[email protected]>
arm64: dts: meson-gxm-khadas-vim2: fix uart_A bluetooth node

Fabrice Gasnier <[email protected]>
serial: stm32: fix clearing interrupt error flags

Max Gurtovoy <[email protected]>
IB/iser: Fix dma_nents type definition

Marc Gonzalez <[email protected]>
usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON

Jesper Dangaard Brouer <[email protected]>
samples/bpf: Fix broken xdp_rxq_info due to map order assumptions

Andre Przywara <[email protected]>
arm64: dts: juno: Fix UART frequency

Sam Bobroff <[email protected]>
drm/radeon: fix bad DMA from INTERRUPT_CNTL2

Chuhong Yuan <[email protected]>
dmaengine: ti: edma: fix missed failure handling

zhengbin <[email protected]>
afs: Remove set but not used variables 'before', 'after'

Navid Emamdoost <[email protected]>
affs: fix a memory leak in affs_remount

H. Nikolaus Schaller <[email protected]>
mmc: core: fix wl1251 sdio quirks

H. Nikolaus Schaller <[email protected]>
mmc: sdio: fix wl1251 vendor id

Alain Volmat <[email protected]>
i2c: stm32f7: report dma error during probe

Eric Dumazet <[email protected]>
packet: fix data-race in fanout_flow_is_huge()

Eric Dumazet <[email protected]>
net: neigh: use long type to store jiffies delta

Stephen Hemminger <[email protected]>
hv_netvsc: flag software created hash value

Tiezhu Yang <[email protected]>
MIPS: Loongson: Fix return value of loongson_hwmon_init

Madalin Bucur <[email protected]>
dpaa_eth: avoid timestamp read on error paths

Madalin Bucur <[email protected]>
dpaa_eth: perform DMA unmapping before read

Tony Lindgren <[email protected]>
hwrng: omap3-rom - Fix missing clock by probing with device tree

Dan Carpenter <[email protected]>
drm: panel-lvds: Potential Oops in probe error handling

Marc Dionne <[email protected]>
afs: Fix large file support

Haiyang Zhang <[email protected]>
hv_netvsc: Fix send_table offset in case of a host bug

Haiyang Zhang <[email protected]>
hv_netvsc: Fix offset usage in netvsc_send_table()

Stefan Wahren <[email protected]>
net: qca_spi: Move reset_count to struct qcaspi

David Howells <[email protected]>
afs: Fix missing timeout reset

Dan Carpenter <[email protected]>
bpf, offload: Unlock on error in bpf_offload_dev_create()

Magnus Karlsson <[email protected]>
xsk: Fix registration of Rx-only sockets

Jakub Kicinski <[email protected]>
net: netem: correct the parent's backlog when corrupted packet was dropped

Jakub Kicinski <[email protected]>
net: netem: fix error path for corrupted GSO frames

Pavel Tatashin <[email protected]>
arm64: hibernate: check pgd table allocation

Jean Delvare <[email protected]>
firmware: dmi: Fix unlikely out-of-bounds read in save_mem_devices

Robin Gong <[email protected]>
dmaengine: imx-sdma: fix size check for sdma script_number

Michael S. Tsirkin <[email protected]>
vhost/test: stop device before reset

Jeffrey Hugo <[email protected]>
drm/msm/dsi: Implement reset correctly

Karsten Graul <[email protected]>
net/smc: receive pending data after RCV_SHUTDOWN

Karsten Graul <[email protected]>
net/smc: receive returns without data

Eric Dumazet <[email protected]>
tcp: annotate lockless access to tcp_memory_pressure

Eric Dumazet <[email protected]>

    net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head

Eric Dumazet <[email protected]>
net: avoid possible false sharing in sk_leave_memory_pressure()

YueHaibing <[email protected]>
act_mirred: Fix mirred_init_module error handling

Alexandra Winter <[email protected]>
s390/qeth: Fix initialization of vnicc cmd masks during set online

Alexandra Winter <[email protected]>
s390/qeth: Fix error handling during VNICC initialization

Xin Long <[email protected]>
sctp: add chunks to sk_backlog when the newsk sk_socket is not set

Antonio Borneo <[email protected]>
net: stmmac: fix disabling flexible PPS output

Antonio Borneo <[email protected]>
net: stmmac: fix length of PTP clock's name string

Haishuang Yan <[email protected]>
ip6erspan: remove the incorrect mtu limit for ip6erspan

Eric Biggers <[email protected]>
llc: fix sk_buff refcounting in llc_conn_state_process()

Eric Biggers <[email protected]>
llc: fix another potential sk_buff leak in llc_ui_sendmsg()

Johannes Berg <[email protected]>
mac80211: accept deauth frames in IBSS mode

David Howells <[email protected]>
rxrpc: Fix trace-after-put looking at the put connection record

Jose Abreu <[email protected]>
net: stmmac: gmac4+: Not all Unicast addresses may be available

Ard Biesheuvel <[email protected]>
nvme: retain split access workaround for capability reads

Vladimir Oltean <[email protected]>
net: sched: cbs: Avoid division by zero when calculating the port rate

Dan Carpenter <[email protected]>
net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()

Dan Carpenter <[email protected]>
net: nixge: Fix a signedness bug in nixge_probe()

Dan Carpenter <[email protected]>
of: mdio: Fix a signedness bug in of_phy_get_and_connect()

Dan Carpenter <[email protected]>
net: axienet: fix a signedness bug in probe

Dan Carpenter <[email protected]>
net: stmmac: dwmac-meson8b: Fix signedness bug in probe

Dan Carpenter <[email protected]>
net: socionext: Fix a signedness bug in ave_probe()

Dan Carpenter <[email protected]>
net: netsec: Fix signedness bug in netsec_probe()

Dan Carpenter <[email protected]>
net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe()

Dan Carpenter <[email protected]>
net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()

Dan Carpenter <[email protected]>
cxgb4: Signedness bug in init_one()

Dan Carpenter <[email protected]>
net: aquantia: Fix aq_vec_isr_legacy() return value

Filippo Sironi <[email protected]>
iommu/amd: Wait for completion of IOTLB flush in attach_device

Yunfeng Ye <[email protected]>
crypto: hisilicon - Matching the dma address for dma_pool_free()

Alexei Starovoitov <[email protected]>
bpf: fix BTF limits

Aneesh Kumar K.V <[email protected]>
powerpc/mm/mce: Keep irqs disabled during lockless page table walk

Manivannan Sadhasivam <[email protected]>
clk: actions: Fix factor clk struct member access

Jorge Ramirez-Ortiz <[email protected]>
mailbox: qcom-apcs: fix max_register value

Chao Yu <[email protected]>
f2fs: fix to avoid accessing uninitialized field of inode page in is_alive()

Vasundhara Volam <[email protected]>
bnxt_en: Increase timeout for HWRM_DBG_COREDUMP_XX commands

Anton Ivanov <[email protected]>
um: Fix off by one error in IRQ enumeration

Gerd Rausch <[email protected]>
net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'

Håkon Bugge <[email protected]>
RDMA/cma: Fix false error message

Nicolas Boichat <[email protected]>
ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet

Rashmica Gupta <[email protected]>
gpio/aspeed: Fix incorrect number of banks

Li Jin <[email protected]>
pinctrl: iproc-gpio: Fix incorrect pinconf configurations

Mao Wenan <[email protected]>
net: sonic: replace dev_kfree_skb in sonic_send_packet

Dan Robertson <[email protected]>
hwmon: (shtc1) fix shtc1 and shtw1 id mask

Firo Yang <[email protected]>
ixgbe: sync the first fragment unconditionally

Omar Sandoval <[email protected]>
btrfs: use correct count in btrfs_file_write_iter()

Filipe Manana <[email protected]>
Btrfs: fix inode cache waiters hanging on path allocation failure

Filipe Manana <[email protected]>
Btrfs: fix inode cache waiters hanging on failure to start caching thread

Filipe Manana <[email protected]>
Btrfs: fix hang when loading existing inode cache off disk

Govindarajulu Varadarajan <[email protected]>
scsi: fnic: fix msix interrupt allocation

Chao Yu <[email protected]>
f2fs: fix error path of f2fs_convert_inline_page()

Chao Yu <[email protected]>
f2fs: fix wrong error injection path in inc_valid_block_count()

Adam Ford <[email protected]>
ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux

Wei Yongjun <[email protected]>
rtlwifi: Fix file release memory leak

Jian Shen <[email protected]>
net: hns3: fix error VF index when setting VLAN offload

Mao Wenan <[email protected]>
net: sonic: return NETDEV_TX_OK if failed to map buffer

Oleh Kravchenko <[email protected]>
led: triggers: Fix dereferencing of null pointer

Björn Töpel <[email protected]>
xsk: avoid store-tearing when assigning umem

Björn Töpel <[email protected]>
xsk: avoid store-tearing when assigning queues

Oscar A Perez <[email protected]>
ARM: dts: aspeed-g5: Fixe gpio-ranges upper limit

Andrey Smirnov <[email protected]>
tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs

Arnd Bergmann <[email protected]>
wcn36xx: use dynamic allocation for large variables

Lorenzo Bianconi <[email protected]>
ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init

Pablo Neira Ayuso <[email protected]>
netfilter: ctnetlink: honor IPS_OFFLOAD flag

Colin Ian King <[email protected]>
iio: dac: ad5380: fix incorrect assignment to val

Dan Carpenter <[email protected]>
bcache: Fix an error code in bch_dump_read()

YueHaibing <[email protected]>
usb: typec: tps6598x: Fix build error without CONFIG_REGMAP_I2C

Colin Ian King <[email protected]>
bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA

Dexuan Cui <[email protected]>

    irqdomain: Add the missing assignment of domain->fwnode for named fwnode

Dan Carpenter <[email protected]>
staging: greybus: light: fix a couple double frees

Masami Hiramatsu <[email protected]>
x86, perf: Fix the dependency of the x86 insn decoder selftest

Stephen Boyd <[email protected]>
power: supply: Init device wakeup after device_add()

Vladimir Oltean <[email protected]>
net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate

Guenter Roeck <[email protected]>
hwmon: (lm75) Fix write operations for negative temperatures

Linus Torvalds <[email protected]>
Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()"

David Howells <[email protected]>
rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2]

Andy Shevchenko <[email protected]>
ahci: Do not export local variable ahci_em_messages

Yong Wu <[email protected]>
iommu/mediatek: Fix iova_to_phys PA start for 4GB mode

Markus Elfring <[email protected]>
media: em28xx: Fix exception handling in em28xx_alloc_urbs()

Nick Desaulniers <[email protected]>
mips: avoid explicit UB in assignment of mips_io_port_base

Bruno Thomsen <[email protected]>
rtc: pcf2127: bugfix: read rtc disables watchdog

Geert Uytterhoeven <[email protected]>
ARM: 8896/1: VDSO: Don't leak kernel addresses

Alexandre Kroupski <[email protected]>
media: atmel: atmel-isi: fix timeout value for stop streaming

Arnd Bergmann <[email protected]>
i40e: reduce stack usage in i40e_set_fc

Felix Fietkau <[email protected]>
mac80211: minstrel_ht: fix per-group max throughput rate initialization

Dan Carpenter <[email protected]>
rtc: rv3029: revert error handling patch to rv3029_eeprom_write()

Andy Shevchenko <[email protected]>
dmaengine: dw: platform: Switch to acpi_dma_controller_register()

Maxime Ripard <[email protected]>
ASoC: sun4i-i2s: RX and TX counter registers are swapped

Nicholas Piggin <[email protected]>
powerpc/64s/radix: Fix memory hot-unplug page table split

Eric W. Biederman <[email protected]>
signal: Allow cifs and drbd to receive their terminating signals

Vasundhara Volam <[email protected]>
bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails

Fabrizio Castro <[email protected]>
drm: rcar-du: lvds: Fix bridge_to_rcar_lvds

Quentin Monnet <[email protected]>
tools: bpftool: fix format strings and arguments for jsonw_printf()

Quentin Monnet <[email protected]>
tools: bpftool: fix arguments for p_err() in do_event_pipe()

Gerd Rausch <[email protected]>
net/rds: Add a few missing rds_stat_names entries

YueHaibing <[email protected]>
ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls

YueHaibing <[email protected]>

    ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'

YueHaibing <[email protected]>
ASoC: es8328: Fix copy-paste error in es8328_right_line_controls

Xi Wang <[email protected]>
RDMA/hns: bugfix for slab-out-of-bounds when loading hip08 driver

Xi Wang <[email protected]>
RDMA/hns: Bugfix for slab-out-of-bounds when unloading hip08 driver

Colin Ian King <[email protected]>
ext4: set error return correctly when ext4_htree_store_dirent fails

Iuliana Prodan <[email protected]>
crypto: caam - free resources in case caam_rng registration failed

Chuhong Yuan <[email protected]>
cxgb4: smt: Add lock for atomic_dec_and_test

Rayagonda Kokatanur <[email protected]>
spi: bcm-qspi: Fix BSPI QUAD and DUAL mode support when using flex mode

Jesper Dangaard Brouer <[email protected]>
net: fix bpf_xdp_adjust_head regression for generic-XDP

Chuhong Yuan <[email protected]>

    iio: tsl2772: Use devm_add_action_or_reset for tsl2772_chip_off

Steve French <[email protected]>
cifs: fix rmmod regression in cifs.ko caused by force_sig changes

Mark Zhang <[email protected]>
net/mlx5: Fix mlx5_ifc_query_lag_out_bits

Fabrice Gasnier <[email protected]>
ARM: dts: stm32: add missing vdda-supply to adc on stm32h743i-eval

Jon Maloy <[email protected]>
tipc: reduce risk of wakeup queue starvation

Yoshihiro Kaneko <[email protected]>
arm64: dts: renesas: r8a77995: Fix register range of display node

Johannes Berg <[email protected]>
ALSA: aoa: onyx: always initialize register read value

Arnd Bergmann <[email protected]>
crypto: ccp - Reduce maximum stack usage

Thomas Gleixner <[email protected]>
x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI

Arnd Bergmann <[email protected]>
mic: avoid statically declaring a 'struct device'.

Niklas Söderlund <[email protected]>
media: rcar-vin: Clean up correct notifier in error path

Ruslan Bilovol <[email protected]>
usb: host: xhci-hub: fix extra endianness conversion

Arnd Bergmann <[email protected]>
qed: reduce maximum stack frame size

YueHaibing <[email protected]>
libertas_tf: Use correct channel range in lbtf_geo_init

Rafael J. Wysocki <[email protected]>
PM: sleep: Fix possible overflow in pm_system_cancel_wakeup()

Icenowy Zheng <[email protected]>
clk: sunxi-ng: v3s: add the missing PLL_DDR1

Jani Nikula <[email protected]>
drm/panel: make drm_panel.h self-contained

Nicolas Dichtel <[email protected]>
xfrm interface: ifname may be wrong in logs

Colin Ian King <[email protected]>
scsi: libfc: fix null pointer dereference on a null lport

Masahiro Yamada <[email protected]>
ARM: stm32: use "depends on" instead of "if" after prompt

Ilya Maximets <[email protected]>
xdp: fix possible cq entry leak

Arnd Bergmann <[email protected]>
x86/pgtable/32: Fix LOWMEM_PAGES constant

Jakub Kicinski <[email protected]>
net/tls: fix socket wmem accounting on fallback with netem

Wen Yang <[email protected]>
net: pasemi: fix an use-after-free in pasemi_mac_phy_init()

David Disseldorp <[email protected]>
ceph: fix "ceph.dir.rctime" vxattr value

Hou Zhiqiang <[email protected]>
PCI: mobiveil: Fix the valid check for inbound and outbound windows

Hou Zhiqiang <[email protected]>
PCI: mobiveil: Fix devfn check in mobiveil_pcie_valid_device()

Hou Zhiqiang <[email protected]>
PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI

Xi Wang <[email protected]>
RDMA/hns: Fixs hw access invalid dma memory error

Eddie James <[email protected]>
fsi: sbefifo: Don't fail operations when in SBE IPL state

Arnd Bergmann <[email protected]>
devres: allow const resource arguments

Jeremy Kerr <[email protected]>
fsi/core: Fix error paths on CFAM init

Rafael J. Wysocki <[email protected]>
ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS

Rafael J. Wysocki <[email protected]>
ACPI: PM: Simplify and fix PM domain hibernation callbacks

Rafael J. Wysocki <[email protected]>
PM: ACPI/PCI: Resume all devices during hibernation

Jouni Malinen <[email protected]>
um: Fix IRQ controller regression on console read

Chuck Lever <[email protected]>
xprtrdma: Fix use-after-free in rpcrdma_post_recvs

David Howells <[email protected]>
rxrpc: Fix uninitialized error code in rxrpc_send_data_packet()

Andy Shevchenko <[email protected]>
mfd: intel-lpss: Release IDA resources

Kevin Mitchell <[email protected]>
iommu/amd: Make iommu_disable safer

Michael Chan <[email protected]>
bnxt_en: Suppress error messages when querying DSCP DCB capabilities.

Michael Chan <[email protected]>
bnxt_en: Fix ethtool selftest crash under error conditions.

Andrea Arcangeli <[email protected]>

    fork,memcg: alloc_thread_stack_node needs to set tsk->stack

Matthias Kaehlcke <[email protected]>
backlight: pwm_bl: Fix heuristic to determine number of brightness levels

Jakub Kicinski <[email protected]>
tools: bpftool: use correct argument in cgroup errors

Bryan O'Donoghue <[email protected]>
nvmem: imx-ocotp: Change TIMING calculation to u-boot algorithm

Bryan O'Donoghue <[email protected]>
nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing

Nathan Huckleberry <[email protected]>
clk: qcom: Fix -Wunused-const-variable

Andy Shevchenko <[email protected]>
dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"

Ravi Bangoria <[email protected]>
perf/ioctl: Add check for the sample_period value

Stefano Brivio <[email protected]>
ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1()

Rob Clark <[email protected]>
drm/msm/a3xx: remove TPL1 regs from snapshot

Chen-Yu Tsai <[email protected]>
arm64: dts: allwinner: h6: Pine H64: Add interrupt line for RTC

YueHaibing <[email protected]>
net/sched: cbs: Fix error path of cbs_module_init

Fabrizio Castro <[email protected]>
ARM: dts: iwg20d-q7-common: Fix SDHI1 VccQ regularor

Chen-Yu Tsai <[email protected]>
rtc: pcf8563: Clear event flags and disable interrupts before requesting irq

Chen-Yu Tsai <[email protected]>
rtc: pcf8563: Fix interrupt trigger method

Peter Ujfalusi <[email protected]>
ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs

Julian Wiedmann <[email protected]>
net/af_iucv: always register net_device notifier

Julian Wiedmann <[email protected]>
net/af_iucv: build proper skbs for HiperTransport

Fred Klassen <[email protected]>
net/udp_gso: Allow TX timestamp with UDP GSO

Jakub Kicinski <[email protected]>
net: netem: fix backlog accounting for corrupted GSO frames

Jeffrey Hugo <[email protected]>
drm/msm/mdp5: Fix mdp5_cfg_init error return

Mike Marciniszyn <[email protected]>
IB/hfi1: Handle port down properly in pio

Anton Protopopov <[email protected]>
bpf: fix the check that forwarding is enabled in bpf_ipv6_fib_lookup

Nathan Lynch <[email protected]>
powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

Nathan Lynch <[email protected]>
powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

Michal Kalderon <[email protected]>
qed: iWARP - fix uninitialized callback

Michal Kalderon <[email protected]>

    qed: iWARP - Use READ_ONCE and smp_store_release to access ep->state

Rafael J. Wysocki <[email protected]>
PCI: PM: Skip devices in D0 for suspend-to-idle

Jerome Brunet <[email protected]>
ASoC: meson: axg-tdmout: right_j is not supported

Jerome Brunet <[email protected]>
ASoC: meson: axg-tdmin: right_j is not supported

Dan Carpenter <[email protected]>
ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev()

Peng Fan <[email protected]>
firmware: arm_scmi: update rate_discrete in clock_describe_rates_get

Sudeep Holla <[email protected]>
firmware: arm_scmi: fix bitfield definitions for SENSOR_DESC attributes

Florian Fainelli <[email protected]>
phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal

Eric Auger <[email protected]>
iommu/vt-d: Duplicate iommu_resv_region objects per device list

Christian Hewitt <[email protected]>
arm64: dts: meson-gxm-khadas-vim2: fix Bluetooth support

Christian Hewitt <[email protected]>
arm64: dts: meson-gxm-khadas-vim2: fix gpio-keys-polled node

Borut Seljak <[email protected]>
serial: stm32: fix a recursive locking in stm32_config_rs485

George Wilkie <[email protected]>
mpls: fix warning with multi-label encap

Takeshi Kihara <[email protected]>
arm64: dts: renesas: ebisu: Remove renesas, no-ether-link property

Antoine Tenart <[email protected]>
crypto: inside-secure - fix queued len computation

Antoine Tenart <[email protected]>
crypto: inside-secure - fix zeroing of the request in ahash_exit_inv

Colin Ian King <[email protected]>
media: vivid: fix incorrect assignment operation when setting video mode

Ondrej Jirman <[email protected]>
clk: sunxi-ng: sun50i-h6-r: Fix incorrect W1 clock gate register

Florian Fainelli <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency

Florian Fainelli <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix initial command check

Colin Ian King <[email protected]>
phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

Jakub Kicinski <[email protected]>

    net: don't clear sock->sk early to avoid trouble in strparser

Dan Carpenter <[email protected]>
RDMA/uverbs: check for allocation failure in uapi_add_elm()

Stephen Hemminger <[email protected]>
net: core: support XDP generic on stacked devices.

Stephen Hemminger <[email protected]>
netvsc: unshare skb in VF rx handler

Christophe Leroy <[email protected]>
crypto: talitos - fix AEAD processing.

Christophe JAILLET <[email protected]>
media: Staging: media: Release the correct resource in an error handling path

Huazhong Tan <[email protected]>
net: hns3: fix a memory leak issue for hclge_map_unmap_ring_to_vf_vector

Eric Dumazet <[email protected]>
inet: frags: call inet_frags_fini() after unregister_pernet_subsys()

Eric W. Biederman <[email protected]>
signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig

Eric W. Biederman <[email protected]>
signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig

Lu Baolu <[email protected]>
iommu: Use right function to get group for device

Lu Baolu <[email protected]>
iommu: Add missing new line for dma type

Rafael J. Wysocki <[email protected]>
PCI: PM: Avoid possible suspend-to-idle issue

Nathan Chancellor <[email protected]>
misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa

Erwan Le Ray <[email protected]>
serial: stm32: fix wakeup source initialization

Erwan Le Ray <[email protected]>
serial: stm32: Add support of TC bit status check

Erwan Le Ray <[email protected]>
serial: stm32: fix transmit_chars when tx is stopped

Erwan Le Ray <[email protected]>
serial: stm32: fix rx data length when parity enabled

Erwan Le Ray <[email protected]>
serial: stm32: fix rx error handling

Erwan Le Ray <[email protected]>
serial: stm32: fix word length configuration

Hook, Gary <[email protected]>
crypto: ccp - Fix 3DES complaint from ccp-crypto module

Hook, Gary <[email protected]>
crypto: ccp - fix AES CFB error exposed by new test vectors

Christophe Leroy <[email protected]>
spi: spi-fsl-spi: call spi_finalize_current_message() at the end

Sagiv Ozeri <[email protected]>
RDMA/qedr: Fix incorrect device rate.

Jerome Brunet <[email protected]>
arm64: dts: meson: libretech-cc: set eMMC as removable

Jon Hunter <[email protected]>
dmaengine: tegra210-adma: Fix crash during probe

Jerome Brunet <[email protected]>
clk: meson: axg: spread spectrum is on mpll2

Jerome Brunet <[email protected]>
clk: meson: gxbb: no spread spectrum on mpll0

Jernej Skrabec <[email protected]>
ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT

David Howells <[email protected]>

    afs: Fix double inc of vnode->cb_break

David Howells <[email protected]>
afs: Fix lock-wait/callback-break double locking

David Howells <[email protected]>
afs: Don't invalidate callback if AFS_VNODE_DIR_VALID not set

David Howells <[email protected]>
afs: Fix key leak in afs_release() and afs_evict_inode()

Robert Richter <[email protected]>
EDAC/mc: Fix edac_mc_find() in case no device is found

Matthias Kaehlcke <[email protected]>
thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power

Jiada Wang <[email protected]>
thermal: rcar_gen3_thermal: fix interrupt type

Brian Masney <[email protected]>
backlight: lm3630a: Return 0 on success in update_status functions

Florian Westphal <[email protected]>
netfilter: nf_tables: correct NFT_LOGLEVEL_MAX value

Dan Carpenter <[email protected]>
kdb: do a sanity check on the cpu in kdb_per_cpu()

Jiong Wang <[email protected]>
nfp: bpf: fix static check error through tightening shift amount adjustment

Russell King <[email protected]>
ARM: riscpc: fix lack of keyboard interrupts after irq conversion

Bichao Zheng <[email protected]>
pwm: meson: Don't disable PWM when setting duty repeatedly

Martin Blumenstingl <[email protected]>
pwm: meson: Consider 128 a valid pre-divider

Florian Westphal <[email protected]>
netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule

Iuliana Prodan <[email protected]>
crypto: caam - fix caam_dump_sg that iterates through scatterlist

Dan Carpenter <[email protected]>
platform/x86: alienware-wmi: printing the wrong error code

Dan Carpenter <[email protected]>
media: davinci/vpbe: array underflow in vpbe_enum_outputs()

Dan Carpenter <[email protected]>
media: omap_vout: potential buffer overflow in vidioc_dqbuf()

Takashi Iwai <[email protected]>
ALSA: aica: Fix a long-time build breakage

YueHaibing <[email protected]>
l2tp: Fix possible NULL pointer dereference

Parav Pandit <[email protected]>
vfio/mdev: Fix aborting mdev child device removal if one fails

Parav Pandit <[email protected]>
vfio/mdev: Follow correct remove sequence

Parav Pandit <[email protected]>
vfio/mdev: Avoid release parent reference during error path

David Howells <[email protected]>
afs: Fix the afs.cell and afs.volume xattr handlers

Rakesh Pillai <[email protected]>
ath10k: Fix encoding for protected management frames

Igor Konopko <[email protected]>
lightnvm: pblk: fix lock order in pblk_rb_tear_down_check

Pan Bian <[email protected]>
mmc: core: fix possible use after free of host

Guenter Roeck <[email protected]>
watchdog: rtd119x_wdt: Fix remove function

Sameer Pujar <[email protected]>
dmaengine: tegra210-adma: restore channel status

Sameeh Jubran <[email protected]>
net: ena: fix ena_com_fill_hash_function() implementation

Sameeh Jubran <[email protected]>
net: ena: fix incorrect test of supported hash function

Sameeh Jubran <[email protected]>
net: ena: fix: Free napi resources when ena_up() fails

Sameeh Jubran <[email protected]>
net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry

Lu Baolu <[email protected]>
iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU

Parav Pandit <[email protected]>
RDMA/rxe: Consider skb reserve space based on netdev of GID

Jack Morgenstein <[email protected]>
IB/mlx5: Add missing XRC options to QP optional params mask

Minas Harutyunyan <[email protected]>
dwc2: gadget: Fix completed transfer size calculation in DDMA

Arnd Bergmann <[email protected]>
usb: gadget: fsl: fix link error against usb-gadget module

Jerome Brunet <[email protected]>
ASoC: fix valid stream condition

Willem de Bruijn <[email protected]>
packet: in recvmsg msg_name return at least sizeof sockaddr_ll

Adam Ford <[email protected]>
ARM: dts: logicpd-som-lv: Fix MMC1 card detect

Srinath Mannam <[email protected]>
PCI: iproc: Enable iProc config read for PAXBv2

Pablo Neira Ayuso <[email protected]>
netfilter: nft_flow_offload: add entry to flowtable after confirmation

Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S HV: Fix lockdep warning when entering the guest

Bart Van Assche <[email protected]>
scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory

Bart Van Assche <[email protected]>
scsi: qla2xxx: Fix error handling in qlt_alloc_qfull_cmd()

Bart Van Assche <[email protected]>
scsi: qla2xxx: Fix a format specifier

Hongbo Yao <[email protected]>
irqchip/gic-v3-its: fix some definitions of inner cacheability attributes

Philipp Rudo <[email protected]>
s390/kexec_file: Fix potential segment overlap in ELF loader

Arnd Bergmann <[email protected]>
coresight: catu: fix clang build warning

Trond Myklebust <[email protected]>
NFS: Don't interrupt file writeout due to fatal errors

David Howells <[email protected]>
afs: Further fix file locking

David Howells <[email protected]>
afs: Fix AFS file locking to allow fine grained locks

Takashi Iwai <[email protected]>
ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()

Alexandru Ardelean <[email protected]>
dmaengine: axi-dmac: Don't check the number of frames for alignment

Dan Carpenter <[email protected]>

    6lowpan: Off by one handling ->nexthdr

Akinobu Mita <[email protected]>
media: ov2659: fix unbalanced mutex_lock/unlock

Vladimir Oltean <[email protected]>
ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect

Ben Hutchings <[email protected]>
powerpc: vdso: Make vdso32 installation conditional in vdso_install

Jian Shen <[email protected]>
net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info()

Kees Cook <[email protected]>
selftests/ipc: Fix msgque compiler warnings

Hans de Goede <[email protected]>
usb: typec: tcpm: Notify the tcpc to start connection-detection for SRPs

Jie Liu <[email protected]>
tipc: set sysctl_tipc_rmem and named_timeout right range

Colin Ian King <[email protected]>
platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer

Neil Armstrong <[email protected]>
soc: amlogic: meson-gx-pwrc-vpu: Fix power on/off register bitmask

Kishon Vijay Abraham I <[email protected]>
PCI: dwc: Fix dw_pcie_ep_find_capability() to return correct capability offset

Vincent Stehlé <[email protected]>
staging: android: vsoc: fix copy_from_user overrun

Alexander Shishkin <[email protected]>
perf/core: Fix the address filtering fix

Guenter Roeck <[email protected]>
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses

Yunsheng Lin <[email protected]>

    net: hns3: fix for vport->bw_limit overflow problem

Colin Ian King <[email protected]>
PCI: rockchip: Fix rockchip_pcie_ep_assert_intx() bitwise operations

YueHaibing <[email protected]>
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"

Colin Ian King <[email protected]>
brcmfmac: fix leak of mypkt on error return path

Bart Van Assche <[email protected]>
scsi: target/core: Fix a race condition in the LUN lookup code

Jeffrey Altman <[email protected]>
rxrpc: Fix detection of out of order acks

Steven Price <[email protected]>
firmware: arm_scmi: fix of_node leak in scmi_mailbox_check

Zhang Rui <[email protected]>
ACPI: button: reinitialize button state upon resume

Marc Gonzalez <[email protected]>
clk: qcom: Skip halt checks on gcc_pcie_0_pipe_clk for 8998

Leandro Dorileo <[email protected]>
net/sched: cbs: fix port_rate miscalculation

Chris Packham <[email protected]>
of: use correct function prototype for of_overlay_fdt_apply()

Bart Van Assche <[email protected]>
scsi: qla2xxx: Unregister chrdev if module initialization fails

YueHaibing <[email protected]>
drm/vmwgfx: Remove set but not used variable 'restart'

Andrey Ignatov <[email protected]>
bpf: Add missed newline in verifier verbose log

YueHaibing <[email protected]>
ehea: Fix a copy-paste err in ehea_init_port_res

Pi-Hsun Shih <[email protected]>
rtc: mt6397: Don't call irq_dispose_mapping.

Geert Uytterhoeven <[email protected]>
rtc: Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900

Matteo Croce <[email protected]>
arm64/vdso: don't leak kernel addresses

Noralf Trønnes <[email protected]>
drm/fb-helper: generic: Call drm_client_add() after setup is done

Martin Sperl <[email protected]>

    spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios

Dan Carpenter <[email protected]>
soc/fsl/qe: Fix an error code in qe_pin_request()

Tony Lindgren <[email protected]>
bus: ti-sysc: Fix sysc_unprepare() when no clocks have been allocated

Sowjanya Komatineni <[email protected]>
spi: tegra114: configure dma burst size to fifo trig level

Sowjanya Komatineni <[email protected]>
spi: tegra114: flush fifos

Sowjanya Komatineni <[email protected]>
spi: tegra114: terminate dma and reset on transfer timeout

Sowjanya Komatineni <[email protected]>
spi: tegra114: fix for unpacked mode transfers

Sowjanya Komatineni <[email protected]>
spi: tegra114: clear packed bit for unpacked mode

YueHaibing <[email protected]>
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame

Arnd Bergmann <[email protected]>
media: davinci-isif: avoid uninitialized variable use

Dan Carpenter <[email protected]>
soc: qcom: cmd-db: Fix an error code in cmd_db_dev_probe()

Vladimir Oltean <[email protected]>
net: dsa: Avoid null pointer when failing to connect to PHY

Tony Lindgren <[email protected]>
ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()

Heiner Kallweit <[email protected]>
net: phy: don't clear BMCR in genphy_soft_reset

Maxime Ripard <[email protected]>
ARM: dts: sun9i: optimus: Fix fixed-regulators

Maxime Ripard <[email protected]>
arm64: dts: allwinner: a64: Add missing PIO clocks

Maxime Ripard <[email protected]>
ARM: dts: sun8i: a33: Reintroduce default pinctrl muxing

Finn Thain <[email protected]>
m68k: mac: Fix VIA timer counter accesses

Jon Maloy <[email protected]>
tipc: tipc clang warning

Arnd Bergmann <[email protected]>
jfs: fix bogus variable self-initialization

Arnd Bergmann <[email protected]>
crypto: ccree - reduce kernel stack usage with clang

Axel Lin <[email protected]>

    regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB

Nicholas Mc Guire <[email protected]>
media: cx23885: check allocation return

Dan Carpenter <[email protected]>
media: wl128x: Fix an error code in fm_download_firmware()

Dan Carpenter <[email protected]>
media: cx18: update *pos correctly in cx18_read_pos()

Dan Carpenter <[email protected]>
media: ivtv: update *pos correctly in ivtv_read_pos()

Neil Armstrong <[email protected]>
soc: amlogic: gx-socinfo: Add mask for each SoC packages

Axel Lin <[email protected]>

    regulator: lp87565: Fix missing register for LP87565_BUCK_0

Kangjie Lu <[email protected]>
net: sh_eth: fix a missing check of of_get_phy_mode

Feras Daoud <[email protected]>
net/mlx5e: IPoIB, Fix RX checksum statistics update

Eli Britstein <[email protected]>
net/mlx5: Fix multiple updates of steering rules in parallel

Dan Carpenter <[email protected]>
xen, cpu_hotplug: Prevent an out of bounds access

Dan Carpenter <[email protected]>
drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()

Dirk van der Merwe <[email protected]>
nfp: fix simple vNIC mailbox length

Steve Sistare <[email protected]>
scsi: megaraid_sas: reduce module load time

Qian Cai <[email protected]>
x86/mm: Remove unused variable 'cpu'

Guenter Roeck <[email protected]>
nios2: ksyms: Add missing symbol exports

Alex Williamson <[email protected]>
PCI: Fix "try" semantics of bus and slot reset

Ilya Dryomov <[email protected]>

    rbd: clear ->xferred on error from rbd_obj_issue_copyup()

Akihiro Tsukada <[email protected]>
media: dvb/earth-pt1: fix wrong initialization for demod blocks

Rashmica Gupta <[email protected]>
powerpc/mm: Check secondary hash page table

Igor Russkikh <[email protected]>
net: aquantia: fixed instack structure overflow

Trond Myklebust <[email protected]>
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()

Anna Schumaker <[email protected]>
NFS: Add missing encode / decode sequence_maxsz to v4.2 operations

Lu Baolu <[email protected]>
iommu/vt-d: Fix NULL pointer reference in intel_svm_bind_mm()

Jonas Gorski <[email protected]>
hwrng: bcm2835 - fix probe as platform device

Eli Britstein <[email protected]>
net: sched: act_csum: Fix csum calc for tagged packets

Pablo Neira Ayuso <[email protected]>
netfilter: nft_set_hash: bogus element self comparison from deactivation path

Pablo Neira Ayuso <[email protected]>
netfilter: nft_set_hash: fix lookups with fixed size hash on big endian

Surabhi Vishnoi <[email protected]>
ath10k: Fix length of wmi tlv command for protected mgmt frames

Axel Lin <[email protected]>
regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA

Vladimir Murzin <[email protected]>
ARM: 8849/1: NOMMU: Fix encodings for PMSAv8's PRBAR4/PRLAR4

Vladimir Murzin <[email protected]>
ARM: 8848/1: virt: Align GIC version check with arm64 counterpart

Marek Szyprowski <[email protected]>
ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used

Geert Uytterhoeven <[email protected]>
iommu: Fix IOMMU debugfs fallout

Stefan Wahren <[email protected]>
mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe

Trond Myklebust <[email protected]>
NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount

Mattias Jacobsson <[email protected]>
platform/x86: wmi: fix potential null pointer dereference

Marek Szyprowski <[email protected]>
clocksource/drivers/exynos_mct: Fix error path in timer resources initialization

Chen-Yu Tsai <[email protected]>
clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable

Alexander Shishkin <[email protected]>
perf, pt, coresight: Fix address filters for vmas with non-zero offset

Alexander Shishkin <[email protected]>
perf: Copy parent's address filter offsets on clone

Trond Myklebust <[email protected]>
NFS: Fix a soft lockup in the delegation recovery code

Michael Ellerman <[email protected]>
powerpc/64s: Fix logic when handling unknown CPU features

Nathan Chancellor <[email protected]>
staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx

Eric W. Biederman <[email protected]>
fs/nfs: Fix nfs_parse_devname to not modify it's argument

Russell King <[email protected]>
net: dsa: fix unintended change of bridge interface STP state

Takashi Iwai <[email protected]>
ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()

Rafael J. Wysocki <[email protected]>
driver core: Fix PM-runtime for links added during consumer probe

Colin Ian King <[email protected]>
drm/nouveau: fix missing break in switch statement

Colin Ian King <[email protected]>
drm/nouveau/pmu: don't print reply values if exec is false

Colin Ian King <[email protected]>
drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

Leon Romanovsky <[email protected]>
net/mlx5: Delete unused FPGA QPN variable

Vinod Koul <[email protected]>
net: dsa: qca8k: Enable delay for RGMII_ID mode

Axel Lin <[email protected]>
regulator: pv88090: Fix array out-of-bounds access

Axel Lin <[email protected]>
regulator: pv88080: Fix array out-of-bounds access

Axel Lin <[email protected]>
regulator: pv88060: Fix array out-of-bounds access

Arend van Spriel <[email protected]>
brcmfmac: create debugfs files for bus-specific layer

YueHaibing <[email protected]>
cdc-wdm: pass return value of recover_from_urb_loss

Robin Murphy <[email protected]>
dmaengine: mv_xor: Use correct device for DMA API

Nicholas Mc Guire <[email protected]>
staging: r8822be: check kzalloc return or bail

Alexey Kardashevskiy <[email protected]>
KVM: PPC: Release all hardware TCE tables attached to a group

YueHaibing <[email protected]>
mdio_bus: Fix PTR_ERR() usage after initialization to constant

Vadim Pasternak <[email protected]>
hwmon: (pmbus/tps53679) Fix driver info initialization in probe routine

Eric Auger <[email protected]>
vfio_pci: Enable memory accesses before calling pci_map_rom

Jacopo Mondi <[email protected]>
media: sh: migor: Include missing dma-mapping header

Lorenzo Bianconi <[email protected]>
mt76: usb: fix possible memory leak in mt76u_buf_free

Florian Fainelli <[email protected]>
net: dsa: b53: Do not program CPU port's PVID

Florian Fainelli <[email protected]>
net: dsa: b53: Properly account for VLAN filtering

Florian Fainelli <[email protected]>
net: dsa: b53: Fix default VLAN ID

David Howells <[email protected]>
keys: Timestamp new keys

Ming Lei <[email protected]>

    block: don't use bio->bi_vcnt to figure out segment number

Sven Van Asbroeck <[email protected]>
usb: phy: twl6030-usb: fix possible use-after-free on remove

Wen Yang <[email protected]>
PCI: endpoint: functions: Use memcpy_fromio()/memcpy_toio()

Rafael J. Wysocki <[email protected]>
driver core: Fix possible supplier PM-usage counter imbalance

Mark Bloch <[email protected]>
RDMA/mlx5: Fix memory leak in case we fail to add an IB device

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups

Geert Uytterhoeven <[email protected]>

    pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: emev2: Add missing pinmux functions

Wesley Sheng <[email protected]>
ntb_hw_switchtec: NT req id mapping table register entry number should be 512

Paul Selles <[email protected]>
ntb_hw_switchtec: debug print 64bit aligned crosslink BAR Numbers

Dan Carpenter <[email protected]>
drm/etnaviv: potential NULL dereference

Magnus Karlsson <[email protected]>
xsk: add missing smp_rmb() in xsk_mmap

Nicholas Mc Guire <[email protected]>
ipmi: kcs_bmc: handle devm_kasprintf() failure case

Steve Wise <[email protected]>
iw_cxgb4: use tos when finding ipv6 routes

Steve Wise <[email protected]>
iw_cxgb4: use tos when importing the endpoint

YueHaibing <[email protected]>
fbdev: chipsfb: remove set but not used variable 'size'

Colin Ian King <[email protected]>
rtc: pm8xxx: fix unintended sign extension

Colin Ian King <[email protected]>

    rtc: 88pm80x: fix unintended sign extension

Colin Ian King <[email protected]>

    rtc: 88pm860x: fix unintended sign extension

Karsten Graul <[email protected]>
net/smc: original socket family in inet_sock_diag

Uwe Kleine-König <[email protected]>

    rtc: ds1307: rx8130: Fix alarm handling

Moritz Fischer <[email protected]>
net: phy: fixed_phy: Fix fixed_phy not checking GPIO

Rakesh Pillai <[email protected]>
ath10k: fix dma unmap direction for management frames

Niklas Cassel <[email protected]>
arm64: dts: msm8916: remove bogus argument to the cpu clock

Michael Kao <[email protected]>
thermal: mediatek: fix register index error

Colin Ian King <[email protected]>
rtc: ds1672: fix unintended sign extension

Paul Cercueil <[email protected]>
clk: ingenic: jz4740: Fix gating of UDC clock

Colin Ian King <[email protected]>
staging: most: cdev: add missing check for cdev_add failure

Sara Sharon <[email protected]>
iwlwifi: mvm: fix RSS config command

Oleksandr Andrushchenko <[email protected]>
drm/xen-front: Fix mmap attributes for display buffers

Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage

Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property

Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant

Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: reparent keypad controller to SIC1

Vladimir Zapolskiy <[email protected]>
ARM: dts: lpc32xx: add required clocks property to keypad device node

Rafael J. Wysocki <[email protected]>
driver core: Do not call rpm_put_suppliers() in pm_runtime_drop_link()

Rafael J. Wysocki <[email protected]>
driver core: Fix handling of runtime PM flags in device_link_add()

Rafael J. Wysocki <[email protected]>
driver core: Do not resume suppliers under device_links_write_lock()

Rafael J. Wysocki <[email protected]>
driver core: Avoid careless re-use of existing device links

Rafael J. Wysocki <[email protected]>
driver core: Fix DL_FLAG_AUTOREMOVE_SUPPLIER device link flag handling

Corentin Labbe <[email protected]>
crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments

Liu Jian <[email protected]>
driver: uio: fix possible use-after-free in __uio_register_device

Liu Jian <[email protected]>
driver: uio: fix possible memory leak in __uio_register_device

YueHaibing <[email protected]>
tty: ipwireless: Fix potential NULL pointer dereference

Tony Lindgren <[email protected]>
bus: ti-sysc: Fix timer handling with drop pm_runtime_irq_safe()

Johannes Berg <[email protected]>
iwlwifi: mvm: fix A-MPDU reference assignment

Chen-Yu Tsai <[email protected]>
arm64: dts: allwinner: h6: Move GIC device node fix base address ordering

wenxu <[email protected]>
ip_tunnel: Fix route fl4 init in ip_md_tunnel_xmit

Moni Shoua <[email protected]>
net/mlx5: Take lock with IRQs disabled to avoid deadlock

Mordechay Goodstein <[email protected]>
iwlwifi: mvm: avoid possible access out of array.

Chen-Yu Tsai <[email protected]>
clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it

Chen-Yu Tsai <[email protected]>
ARM: dts: sun8i-a23-a33: Move NAND controller device node to sort by address

Huazhong Tan <[email protected]>
net: hns3: fix bug of ethtool_ops.get_channels for VF

YueHaibing <[email protected]>
spi/topcliff_pch: Fix potential NULL dereference on allocation error

Eric Wong <[email protected]>
rtc: cmos: ignore bogus century byte

Maor Gottlieb <[email protected]>
IB/mlx5: Don't override existing ip_protocol

Jacopo Mondi <[email protected]>
media: tw9910: Unregister subdevice with v4l2-async

Huazhong Tan <[email protected]>
net: hns3: fix wrong combined count returned by ethtool -l

Israel Rukshin <[email protected]>
IB/iser: Pass the correct number of entries for dma mapped SGL

Stefan Agner <[email protected]>
ASoC: imx-sgtl5000: put of nodes if finding codec fails

Eric Biggers <[email protected]>
crypto: tgr192 - fix unaligned memory access

YueHaibing <[email protected]>
crypto: brcm - Fix some set-but-not-used warning

Masahiro Yamada <[email protected]>
kbuild: mark prepare0 as PHONY to fix external module build

Pawe? Chmiel <[email protected]>
media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL

Dan Carpenter <[email protected]>
drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()

Dmitry Osipenko <[email protected]>
memory: tegra: Don't invoke Tegra30+ specific memory timing setup on Tegra20

Heiner Kallweit <[email protected]>
net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ9031

Raju Rangoju <[email protected]>
RDMA/iw_cxgb4: Fix the unchecked ep dereference

Charles Keepax <[email protected]>
spi: cadence: Correct initialisation of runtime PM

Loic Poulain <[email protected]>
arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD

YueHaibing <[email protected]>
drm/shmob: Fix return value check in shmob_drm_probe

Gal Pressman <[email protected]>
RDMA/qedr: Fix out of bounds index check in query pkey

Gal Pressman <[email protected]>
RDMA/ocrdma: Fix out of bounds index check in query pkey

Gal Pressman <[email protected]>
IB/usnic: Fix out of bounds index check in query pkey

Shakeel Butt <[email protected]>
fork, memcg: fix cached_stacks case

Noralf Trønnes <[email protected]>
drm/fb-helper: generic: Fix setup error path

Dan Carpenter <[email protected]>
drm/etnaviv: fix some off by one bugs

Biju Das <[email protected]>
ARM: dts: r8a7743: Remove generic compatible string from iic3

YueHaibing <[email protected]>
drm: Fix error handling in drm_legacy_addctx

Sibi Sankar <[email protected]>
remoteproc: qcom: q6v5-mss: Add missing regulator for MSM8996

Sibi Sankar <[email protected]>
remoteproc: qcom: q6v5-mss: Add missing clocks for MSM8996

Stefan Wahren <[email protected]>
arm64: defconfig: Re-enable bcm2835-thermal driver

Jonas Gorski <[email protected]>
MIPS: BCM63XX: drop unused and broken DSP platform device

Yangtao Li <[email protected]>
clk: dove: fix refcount leak in dove_clk_init()

Yangtao Li <[email protected]>

    clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()

Yangtao Li <[email protected]>
clk: armada-xp: fix refcount leak in axp_clk_init()

Yangtao Li <[email protected]>
clk: kirkwood: fix refcount leak in kirkwood_clk_init()

Yangtao Li <[email protected]>
clk: armada-370: fix refcount leak in a370_clk_init()

Yangtao Li <[email protected]>
clk: vf610: fix refcount leak in vf610_clocks_init()

Yangtao Li <[email protected]>
clk: imx7d: fix refcount leak in imx7d_clocks_init()

Yangtao Li <[email protected]>
clk: imx6sx: fix refcount leak in imx6sx_clocks_init()

Yangtao Li <[email protected]>
clk: imx6q: fix refcount leak in imx6q_clocks_init()

Yangtao Li <[email protected]>
clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()

Yangtao Li <[email protected]>
clk: socfpga: fix refcount leak

Yangtao Li <[email protected]>
clk: ti: fix refcount leak in ti_dt_clocks_register()

Yangtao Li <[email protected]>
clk: qoriq: fix refcount leak in clockgen_init()

Yangtao Li <[email protected]>
clk: highbank: fix refcount leak in hb_clk_init()

Rik van Riel <[email protected]>
fork,memcg: fix crash in free_thread_stack on memcg charge fail

Dan Carpenter <[email protected]>
Input: nomadik-ske-keypad - fix a loop timeout test

Petr Machata <[email protected]>
vxlan: changelink: Fix handling of default remotes

Huazhong Tan <[email protected]>
net: hns3: fix error handling int the hns3_get_vector_ring_chain

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field

Geert Uytterhoeven <[email protected]>

    pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh7734: Add missing IPSR11 field

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a77980: Add missing MOD_SEL0 field

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a77970: Add missing MOD_SEL0 field

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group

Geert Uytterhoeven <[email protected]>
pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group

Willem de Bruijn <[email protected]>
ipv6: add missing tx timestamping on IPPROTO_RAW

Kelvin Cao <[email protected]>
switchtec: Remove immediate status check after submitting MRPC command

Stefan Wahren <[email protected]>
staging: bcm2835-camera: fix module autoloading

Stefan Wahren <[email protected]>
staging: bcm2835-camera: Abort probe if there is no camera

Dan Carpenter <[email protected]>
mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate()

Yuval Shaia <[email protected]>
IB/rxe: Fix incorrect cache cleanup in error flow

Viresh Kumar <[email protected]>
OPP: Fix missing debugfs supply directory for OPPs

Mitko Haralanov <[email protected]>
IB/hfi1: Correctly process FECN and BECN in packets

Yoshihiro Shimoda <[email protected]>
net: phy: Fix not to call phy_resume() if PHY is not attached

Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a7795-es1: Add missing power domains to IPMMU nodes

Neil Armstrong <[email protected]>
arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply

Lyude Paul <[email protected]>
drm/dp_mst: Skip validating ports during destruction, just ref

Willem de Bruijn <[email protected]>
net: always initialize pagedlen

Laurent Pinchart <[email protected]>
drm: rcar-du: Fix vblank initialization

Christophe JAILLET <[email protected]>
drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()'

YueHaibing <[email protected]>
exportfs: fix 'passing zero to ERR_PTR()' warning

Tony Lindgren <[email protected]>
bus: ti-sysc: Add mcasp optional clocks flag

Neil Armstrong <[email protected]>
pinctrl: meson-gxl: remove invalid GPIOX tsin_a pins

Vasily Khoruzhick <[email protected]>
ASoC: sun8i-codec: add missing route for ADC

Colin Ian King <[email protected]>
pcrypt: use format specifier in kobject_add

Phil Elwell <[email protected]>
ARM: dts: bcm283x: Correct mailbox register sizes

Arnd Bergmann <[email protected]>
ASoC: wm97xx: fix uninitialized regmap pointer problem

Gustavo A. R. Silva <[email protected]>
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks

Petr Machata <[email protected]>
mlxsw: spectrum: Set minimum shaper on MC TCs

Petr Machata <[email protected]>
mlxsw: reg: QEEC: Add minimum shaper fields

Huazhong Tan <[email protected]>
net: hns3: add error handler for hns3_nic_init_vector_data()

Maxime Ripard <[email protected]>
drm/sun4i: hdmi: Fix double flag assignation

Masahisa Kojima <[email protected]>
net: socionext: Add dummy PHY register read in phy_write()

Jon Maloy <[email protected]>
tipc: eliminate message disordering during binding table update

Christophe Leroy <[email protected]>
powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()

Taehee Yoo <[email protected]>
netfilter: nf_flow_table: do not remove offload when other netns's interface is down

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Add missing spin lock initialization

Colin Ian King <[email protected]>
rtlwifi: rtl8821ae: replace _rtl8821ae_mrate_idx_to_arfr_id with generic version

YueHaibing <[email protected]>
powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index

Hans de Goede <[email protected]>
pwm: lpss: Release runtime-pm reference from the driver's remove callback

Fernando Fernandez Mancera <[email protected]>
netfilter: nft_osf: usage from output path is not valid

Spencer E. Olson <[email protected]>
staging: comedi: ni_mio_common: protect register write overflow

Naftali Goldstein <[email protected]>
iwlwifi: nvm: get num of hw addresses from firmware

Nicolas Huaman <[email protected]>
ALSA: usb-audio: update quirk for B&W PX to remove microphone

Rob Herring <[email protected]>
of: Fix property name in of_node_get_device_type

Colin Ian King <[email protected]>
drm/msm: fix unsigned comparison with less than zero

Tomas Winkler <[email protected]>
mei: replace POLL* with EPOLL* for write queues.

Linus Walleij <[email protected]>
regulator: fixed: Default enable high on DT regulators

Johannes Berg <[email protected]>
cfg80211: regulatory: make initialization more robust

Nicholas Mc Guire <[email protected]>
usb: gadget: fsl_udc_core: check allocation return value and cleanup on failure

Arnd Bergmann <[email protected]>
usb: dwc3: add EXTCON dependency for qcom

Marc Zyngier <[email protected]>
genirq/debugfs: Reinstate full OF path for domain name

Alex Estrin <[email protected]>
IB/hfi1: Add mtu check for operational data VLs

Zhu Yanjun <[email protected]>
IB/rxe: replace kvfree with vfree

Houlong Wei <[email protected]>
mailbox: mediatek: Add check for possible failure of kzalloc

Arnd Bergmann <[email protected]>
ASoC: wm9712: fix unused variable warning

Eric W. Biederman <[email protected]>
signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn

Eric W. Biederman <[email protected]>
signal/ia64: Use the generic force_sigsegv in setup_frame

John Garry <[email protected]>
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth

Roopa Prabhu <[email protected]>
bridge: br_arp_nd_proxy: set icmp6_router if neigh has NTF_ROUTER

Jitendra Bhivare <[email protected]>
PCI: iproc: Remove PAXC slot check to allow VF support

Stephen Boyd <[email protected]>
firmware: coreboot: Let OF core populate platform device

Frank Rowand <[email protected]>
ARM: qcom_defconfig: Enable MAILBOX

Jann Horn <[email protected]>
apparmor: don't try to replace stale label in ptrace access check

Anders Roxell <[email protected]>
ALSA: hda: fix unused variable warning

Tony Jones <[email protected]>
apparmor: Fix network performance issue in aa_label_sk_perm

Eugen Hristev <[email protected]>
iio: fix position relative kernel version

Dan Carpenter <[email protected]>
drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

Shannon Nelson <[email protected]>
ixgbe: don't clear IPsec sa counters on HW clearing

Peter Rosin <[email protected]>
ARM: dts: at91: nattis: make the SD-card slot work

Peter Rosin <[email protected]>
ARM: dts: at91: nattis: set the PRLUD and HIPOW signals low

Peter Rosin <[email protected]>
drm/sti: do not remove the drm_bridge that was never added

Navid Emamdoost <[email protected]>
ipmi: Fix memory leak in __ipmi_bmc_register

Shuiqing Li <[email protected]>
watchdog: sprd: Fix the incorrect pointer getting from driver data

Luc Van Oostenryck <[email protected]>
soc: aspeed: Fix snoop_file_poll()'s return type

Jean-Jacques Hiblot <[email protected]>
leds: tlc591xx: update the maximum brightness

Arnaldo Carvalho de Melo <[email protected]>
perf map: No need to adjust the long name of modules

Corentin Labbe <[email protected]>
crypto: sun4i-ss - fix big endian issues

Lorenzo Bianconi <[email protected]>
mt7601u: fix bbp version check in mt7601u_wait_bbp_ready

Tung Nguyen <[email protected]>
tipc: fix wrong timeout input for tipc_wait_for_cond()

Hoang Le <[email protected]>
tipc: update mon's self addr when node addr generated

Ard Biesheuvel <[email protected]>
powerpc/archrandom: fix arch_get_random_seed_int()

Tyrel Datwyler <[email protected]>
powerpc/pseries: Enable support for ibm,drc-info property

Chuck Lever <[email protected]>
SUNRPC: Fix svcauth_gss_proxy_init()

Jarkko Nikula <[email protected]>
mfd: intel-lpss: Add default I2C device properties for Gemini Lake

Alain Volmat <[email protected]>
i2c: i2c-stm32f7: fix 10-bits check in slave free id search loop

Alain Volmat <[email protected]>
i2c: stm32f7: rework slave_id allocation

Jan Kara <[email protected]>
xfs: Sanity check flags of Q_XQUOTARM call

Greg Kroah-Hartman <[email protected]>
Revert "efi: Fix debugobjects warning on 'efi_rts_work'"

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

Diffstat:

 Documentation/ABI/testing/sysfs-bus-iio            |   2 +-
 Documentation/devicetree/bindings/bus/ti-sysc.txt  |   1 +
 .../devicetree/bindings/rng/omap3_rom_rng.txt      |  27 ++
 Makefile                                           |   8 +-
 arch/arm/boot/dts/aspeed-g5.dtsi                   |   2 +-
 arch/arm/boot/dts/at91-nattis-2-natte-2.dts        |   7 +-
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |   2 +-
 arch/arm/boot/dts/iwg20d-q7-common.dtsi            |   2 +-
 arch/arm/boot/dts/logicpd-som-lv-baseboard.dtsi    |   2 +-
 arch/arm/boot/dts/logicpd-som-lv.dtsi              |  26 +-
 arch/arm/boot/dts/lpc3250-phy3250.dts              |   4 +-
 arch/arm/boot/dts/lpc32xx.dtsi                     |  10 +-
 arch/arm/boot/dts/ls1021a-twr.dts                  |   9 +-
 arch/arm/boot/dts/ls1021a.dtsi                     |  11 +-
 arch/arm/boot/dts/omap3-n900.dts                   |   6 +
 arch/arm/boot/dts/r8a7743.dtsi                     |   4 +-
 arch/arm/boot/dts/stm32h743i-eval.dts              |   1 +
 arch/arm/boot/dts/sun8i-a23-a33.dtsi               |  30 +-
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts          |   4 +
 arch/arm/boot/dts/sun9i-a80-optimus.dts            |   4 +-
 arch/arm/common/mcpm_entry.c                       |   2 +-
 arch/arm/configs/qcom_defconfig                    |   1 +
 arch/arm/include/asm/suspend.h                     |   1 +
 arch/arm/kernel/head-nommu.S                       |   4 +-
 arch/arm/kernel/hyp-stub.S                         |   4 +-
 arch/arm/kernel/sleep.S                            |  12 +
 arch/arm/kernel/vdso.c                             |   1 -
 arch/arm/mach-omap2/omap_hwmod.c                   |   2 +-
 arch/arm/mach-omap2/pdata-quirks.c                 |  12 +-
 arch/arm/mach-rpc/irq.c                            |   3 +-
 arch/arm/mach-stm32/Kconfig                        |   3 +-
 arch/arm/plat-pxa/ssp.c                            |   6 -
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      |   3 +-
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts      |   2 +
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi       |  22 +-
 .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi |   1 +
 .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts     |   1 +
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts   |   2 +-
 .../boot/dts/amlogic/meson-gxl-s905x-p212.dts      |   1 +
 .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts     |  17 +-
 arch/arm64/boot/dts/arm/juno-clocks.dtsi           |   4 +-
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi          |   2 +
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |   8 +-
 arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi       |   2 +
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts     |   1 -
 arch/arm64/boot/dts/renesas/r8a77995.dtsi          |   2 +-
 arch/arm64/configs/defconfig                       |   1 +
 arch/arm64/kernel/hibernate.c                      |   9 +-
 arch/arm64/kernel/vdso.c                           |   2 -
 arch/ia64/kernel/signal.c                          |  60 +--
 arch/m68k/amiga/cia.c                              |   9 +
 arch/m68k/atari/ataints.c                          |   4 +-
 arch/m68k/atari/time.c                             |  15 +-
 arch/m68k/bvme6000/config.c                        |  20 +-
 arch/m68k/hp300/time.c                             |  10 +-
 arch/m68k/mac/via.c                                | 119 +++---
 arch/m68k/mvme147/config.c                         |  18 +-
 arch/m68k/mvme16x/config.c                         |  21 +-
 arch/m68k/q40/q40ints.c                            |  19 +-
 arch/m68k/sun3/sun3ints.c                          |   3 +
 arch/m68k/sun3x/time.c                             |  16 +-
 arch/mips/bcm63xx/Makefile                         |   6 +-
 arch/mips/bcm63xx/boards/board_bcm963xx.c          |  20 -
 arch/mips/bcm63xx/dev-dsp.c                        |  56 ---
 arch/mips/include/asm/io.h                         |  14 +-
 .../include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h     |  14 -
 .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h |   5 -
 arch/mips/kernel/setup.c                           |   2 +-
 arch/nios2/kernel/nios2_ksyms.c                    |  12 +
 arch/powerpc/Makefile                              |   2 +
 arch/powerpc/include/asm/archrandom.h              |   2 +-
 arch/powerpc/include/asm/kgdb.h                    |   5 +-
 arch/powerpc/kernel/cacheinfo.c                    |  21 ++
 arch/powerpc/kernel/cacheinfo.h                    |   4 +
 arch/powerpc/kernel/dt_cpu_ftrs.c                  |  17 +-
 arch/powerpc/kernel/kgdb.c                         |  43 ++-
 arch/powerpc/kernel/mce_power.c                    |  20 +-
 arch/powerpc/kernel/prom_init.c                    |   2 +-
 arch/powerpc/kvm/book3s_64_vio.c                   |   1 -
 arch/powerpc/kvm/book3s_hv.c                       |  15 +-
 arch/powerpc/mm/dump_hashpagetable.c               |   2 +-
 arch/powerpc/mm/pgtable-radix.c                    |   4 +-
 arch/powerpc/platforms/pseries/hotplug-memory.c    |  61 ++-
 arch/powerpc/platforms/pseries/mobility.c          |  10 +
 arch/s390/kernel/kexec_elf.c                       |   2 +-
 arch/sh/boards/mach-migor/setup.c                  |   1 +
 arch/um/drivers/chan_kern.c                        |  52 ++-
 arch/um/include/asm/irq.h                          |   2 +-
 arch/um/kernel/irq.c                               |   4 +
 arch/x86/Kconfig.debug                             |   2 +-
 arch/x86/events/intel/pt.c                         |   9 +-
 arch/x86/include/asm/pgtable_32.h                  |   2 +-
 arch/x86/kernel/kgdb.c                             |   2 +-
 arch/x86/mm/tlb.c                                  |   3 -
 block/blk-merge.c                                  |   8 +-
 crypto/pcrypt.c                                    |   2 +-
 crypto/tgr192.c                                    |   6 +-
 drivers/acpi/acpi_lpss.c                           | 111 +++++-
 drivers/acpi/button.c                              |   5 +-
 drivers/acpi/device_pm.c                           |  94 ++---
 drivers/ata/libahci.c                              |   1 -
 drivers/base/core.c                                |  88 +++--
 drivers/base/power/runtime.c                       |  40 +-
 drivers/base/power/wakeup.c                        |   2 +-
 drivers/bcma/driver_pci.c                          |   4 +-
 drivers/block/drbd/drbd_main.c                     |   2 +
 drivers/block/rbd.c                                |   1 +
 drivers/bus/ti-sysc.c                              |  18 +-
 drivers/char/hw_random/bcm2835-rng.c               |  18 +-
 drivers/char/hw_random/omap3-rom-rng.c             |  17 +-
 drivers/char/ipmi/ipmi_msghandler.c                |   5 +-
 drivers/char/ipmi/kcs_bmc.c                        |   5 +-
 drivers/clk/actions/owl-factor.c                   |   7 +-
 drivers/clk/clk-highbank.c                         |   1 +
 drivers/clk/clk-qoriq.c                            |   1 +
 drivers/clk/imx/clk-imx6q.c                        |   1 +
 drivers/clk/imx/clk-imx6sx.c                       |   1 +
 drivers/clk/imx/clk-imx7d.c                        |   1 +
 drivers/clk/imx/clk-vf610.c                        |   1 +
 drivers/clk/ingenic/jz4740-cgu.c                   |   2 +-
 drivers/clk/meson/axg.c                            |  10 +-
 drivers/clk/meson/gxbb.c                           |   5 -
 drivers/clk/mvebu/armada-370.c                     |   4 +-
 drivers/clk/mvebu/armada-xp.c                      |   4 +-
 drivers/clk/mvebu/dove.c                           |   8 +-
 drivers/clk/mvebu/kirkwood.c                       |   2 +
 drivers/clk/mvebu/mv98dx3236.c                     |   4 +-
 drivers/clk/qcom/gcc-msm8996.c                     |  36 --
 drivers/clk/qcom/gcc-msm8998.c                     |   2 +-
 drivers/clk/samsung/clk-exynos4.c                  |   1 +
 drivers/clk/socfpga/clk-pll-a10.c                  |   1 +
 drivers/clk/socfpga/clk-pll.c                      |   1 +
 drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c             |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-a23.c               |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-v3s.c               |  19 +-
 drivers/clk/sunxi-ng/ccu-sun8i-v3s.h               |   6 +-
 drivers/clk/ti/clk.c                               |   8 +-
 drivers/clocksource/exynos_mct.c                   |  14 +-
 drivers/clocksource/timer-sun5i.c                  |  10 +
 drivers/clocksource/timer-ti-dm.c                  |   1 -
 drivers/cpufreq/brcmstb-avs-cpufreq.c              |  12 +-
 drivers/crypto/amcc/crypto4xx_trng.h               |   4 +-
 drivers/crypto/bcm/cipher.c                        |   6 +-
 drivers/crypto/caam/caamrng.c                      |   5 +-
 drivers/crypto/caam/error.c                        |   2 +-
 drivers/crypto/ccp/ccp-crypto-aes.c                |   8 +-
 drivers/crypto/ccp/ccp-ops.c                       |  67 ++--
 drivers/crypto/ccree/cc_cipher.c                   |   2 +-
 drivers/crypto/hisilicon/sec/sec_algs.c            |  44 +--
 drivers/crypto/inside-secure/safexcel_hash.c       |  10 +-
 drivers/crypto/sunxi-ss/sun4i-ss-hash.c            |  21 +-
 drivers/crypto/talitos.c                           | 158 +++-----
 drivers/crypto/talitos.h                           |   2 +-
 drivers/dma/dma-axi-dmac.c                         |   2 +-
 drivers/dma/dw/platform.c                          |  14 +-
 drivers/dma/hsu/hsu.c                              |   4 +-
 drivers/dma/imx-sdma.c                             |   8 +
 drivers/dma/mv_xor.c                               |   2 +-
 drivers/dma/tegra210-adma.c                        |  72 +++-
 drivers/dma/ti/edma.c                              |   6 +-
 drivers/edac/edac_mc.c                             |  12 +-
 drivers/firmware/arm_scmi/clock.c                  |   2 +
 drivers/firmware/arm_scmi/driver.c                 |   4 +-
 drivers/firmware/arm_scmi/sensors.c                |   4 +-
 drivers/firmware/dmi_scan.c                        |   2 +-
 drivers/firmware/efi/runtime-wrappers.c            |   2 +-
 drivers/firmware/google/coreboot_table-of.c        |  28 +-
 drivers/fsi/fsi-core.c                             |  32 +-
 drivers/fsi/fsi-sbefifo.c                          |   4 +-
 drivers/gpio/gpio-aspeed.c                         |   2 +-
 drivers/gpu/drm/drm_context.c                      |  15 +-
 drivers/gpu/drm/drm_dp_mst_topology.c              |  15 +-
 drivers/gpu/drm/drm_fb_helper.c                    | 102 ++---
 drivers/gpu/drm/etnaviv/etnaviv_dump.c             |   2 +-
 drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c        |   2 +-
 drivers/gpu/drm/etnaviv/etnaviv_perfmon.c          |   6 +-
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c  |   1 -
 drivers/gpu/drm/msm/adreno/a3xx_gpu.c              |  24 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c           |   2 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c                 |   6 +-
 drivers/gpu/drm/nouveau/nouveau_abi16.c            |   1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c     |   2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c     |   4 +-
 drivers/gpu/drm/panel/panel-lvds.c                 |  21 +-
 drivers/gpu/drm/radeon/cik.c                       |   4 +-
 drivers/gpu/drm/radeon/r600.c                      |   4 +-
 drivers/gpu/drm/radeon/si.c                        |   4 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c             |   2 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c              |   2 +-
 drivers/gpu/drm/rcar-du/rcar_lvds.c                |   8 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c           |   4 +-
 drivers/gpu/drm/sti/sti_hda.c                      |   1 -
 drivers/gpu/drm/sti/sti_hdmi.c                     |   1 -
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c        |   2 +-
 drivers/gpu/drm/virtio/virtgpu_vq.c                |   5 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c             |   6 +-
 drivers/gpu/drm/xen/xen_drm_front_gem.c            |  13 +-
 drivers/hwmon/lm75.c                               |   2 +-
 drivers/hwmon/pmbus/tps53679.c                     |   9 +-
 drivers/hwmon/shtc1.c                              |   2 +-
 drivers/hwmon/w83627hf.c                           |  42 ++-
 drivers/hwtracing/coresight/coresight-catu.h       |   5 -
 drivers/hwtracing/coresight/coresight-etm-perf.c   |   7 +-
 drivers/hwtracing/coresight/coresight-tmc-etr.c    |   5 +-
 drivers/i2c/busses/i2c-stm32.c                     |  16 +-
 drivers/i2c/busses/i2c-stm32f7.c                   |  13 +-
 drivers/iio/dac/ad5380.c                           |   2 +-
 drivers/iio/light/tsl2772.c                        |  16 +-
 drivers/infiniband/core/cma.c                      |   2 +-
 drivers/infiniband/core/uverbs_uapi.c              |   2 +
 drivers/infiniband/hw/bnxt_re/ib_verbs.c           |   1 +
 drivers/infiniband/hw/bnxt_re/qplib_fp.c           |   1 +
 drivers/infiniband/hw/cxgb4/cm.c                   |  24 +-
 drivers/infiniband/hw/hfi1/chip.c                  |  26 +-
 drivers/infiniband/hw/hfi1/driver.c                |  70 ++--
 drivers/infiniband/hw/hfi1/hfi.h                   |  35 +-
 drivers/infiniband/hw/hfi1/pio.c                   |   5 +-
 drivers/infiniband/hw/hfi1/rc.c                    |  32 +-
 drivers/infiniband/hw/hfi1/uc.c                    |   2 +-
 drivers/infiniband/hw/hfi1/ud.c                    |  33 +-
 drivers/infiniband/hw/hfi1/verbs.c                 |   4 +-
 drivers/infiniband/hw/hns/hns_roce_hem.c           |  19 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c         |   6 +-
 drivers/infiniband/hw/hns/hns_roce_qp.c            |   1 -
 drivers/infiniband/hw/mlx5/ib_rep.c                |   4 +-
 drivers/infiniband/hw/mlx5/main.c                  |  53 ++-
 drivers/infiniband/hw/mlx5/qp.c                    |  21 ++
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c        |   2 +-
 drivers/infiniband/hw/qedr/verbs.c                 |  27 +-
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c       |   2 +-
 drivers/infiniband/sw/rxe/rxe_cq.c                 |   4 +-
 drivers/infiniband/sw/rxe/rxe_net.c                |   3 +-
 drivers/infiniband/sw/rxe/rxe_pool.c               |  26 +-
 drivers/infiniband/sw/rxe/rxe_qp.c                 |   5 +-
 drivers/infiniband/ulp/iser/iscsi_iser.h           |   2 +-
 drivers/infiniband/ulp/iser/iser_memory.c          |  10 +-
 drivers/input/keyboard/nomadik-ske-keypad.c        |   2 +-
 drivers/iommu/amd_iommu.c                          |   2 +
 drivers/iommu/amd_iommu_init.c                     |   3 +
 drivers/iommu/intel-iommu.c                        |  39 +-
 drivers/iommu/intel-svm.c                          |   2 +-
 drivers/iommu/iommu-debugfs.c                      |  23 +-
 drivers/iommu/iommu.c                              |   8 +-
 drivers/iommu/mtk_iommu.c                          |  26 +-
 drivers/leds/led-triggers.c                        |   4 +-
 drivers/leds/leds-tlc591xx.c                       |   7 +-
 drivers/lightnvm/pblk-rb.c                         |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   3 +
 drivers/mailbox/qcom-apcs-ipc-mailbox.c            |   2 +-
 drivers/mailbox/ti-msgmgr.c                        |   2 +-
 drivers/md/bcache/debug.c                          |   5 +-
 drivers/media/i2c/ov2659.c                         |   2 +-
 drivers/media/i2c/tw9910.c                         |   2 +-
 drivers/media/pci/cx18/cx18-fileops.c              |   2 +-
 drivers/media/pci/cx23885/cx23885-dvb.c            |   5 +-
 drivers/media/pci/ivtv/ivtv-fileops.c              |   2 +-
 drivers/media/pci/pt1/pt1.c                        |  54 ++-
 drivers/media/pci/tw5864/tw5864-video.c            |   4 +-
 drivers/media/platform/atmel/atmel-isi.c           |   2 +-
 drivers/media/platform/davinci/isif.c              |   9 -
 drivers/media/platform/davinci/vpbe.c              |   2 +-
 drivers/media/platform/omap/omap_vout.c            |  15 +-
 drivers/media/platform/rcar-vin/rcar-core.c        |   2 +-
 drivers/media/platform/s5p-jpeg/jpeg-core.c        |   2 +-
 drivers/media/platform/vivid/vivid-osd.c           |   2 +-
 drivers/media/radio/wl128x/fmdrv_common.c          |   5 +-
 drivers/media/usb/em28xx/em28xx-core.c             |   2 +-
 drivers/memory/tegra/mc.c                          |  11 +-
 drivers/mfd/intel-lpss-pci.c                       |  28 +-
 drivers/mfd/intel-lpss.c                           |   1 +
 drivers/misc/aspeed-lpc-snoop.c                    |   4 +-
 drivers/misc/mei/main.c                            |   4 +-
 drivers/misc/mic/card/mic_x100.c                   |  28 +-
 drivers/misc/sgi-xp/xpc_partition.c                |   2 +-
 drivers/mmc/core/host.c                            |   2 -
 drivers/mmc/core/quirks.h                          |   7 +
 drivers/mmc/host/sdhci-brcmstb.c                   |   4 +-
 drivers/net/dsa/b53/b53_common.c                   |  90 ++++-
 drivers/net/dsa/b53/b53_priv.h                     |   3 +
 drivers/net/dsa/qca8k.c                            |  12 +
 drivers/net/dsa/qca8k.h                            |   1 +
 drivers/net/ethernet/amazon/ena/ena_com.c          |   3 +-
 drivers/net/ethernet/amazon/ena/ena_ethtool.c      |   4 +-
 drivers/net/ethernet/amazon/ena/ena_netdev.c       |   1 +
 drivers/net/ethernet/aquantia/atlantic/aq_vec.c    |  15 +-
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c  |   4 +-
 .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c  |   4 +-
 drivers/net/ethernet/broadcom/bcmsysport.c         |   2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h          |   1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c      |   2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c  |  20 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/smt.c           |   4 +-
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c     |  47 +--
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c      |   2 +-
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c    |  17 +-
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |  21 +-
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h    |   2 +-
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c |   4 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c  |   5 +-
 drivers/net/ethernet/ibm/ehea/ehea_main.c          |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  91 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c     |   4 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |  16 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    |  11 +-
 .../net/ethernet/mellanox/mlx5/core/fpga/core.c    |   2 -
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  |   6 +
 drivers/net/ethernet/mellanox/mlx5/core/qp.c       |   5 +-
 drivers/net/ethernet/mellanox/mlxsw/reg.h          |  22 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |  25 ++
 drivers/net/ethernet/natsemi/sonic.c               |   6 +-
 drivers/net/ethernet/netronome/nfp/bpf/jit.c       |  13 +-
 drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h  |   2 +-
 drivers/net/ethernet/ni/nixge.c                    |   2 +-
 drivers/net/ethernet/pasemi/pasemi_mac.c           |   2 +-
 drivers/net/ethernet/qlogic/qed/qed_iwarp.c        |  17 +-
 drivers/net/ethernet/qlogic/qed/qed_l2.c           |  34 +-
 drivers/net/ethernet/qualcomm/qca_spi.c            |   9 +-
 drivers/net/ethernet/qualcomm/qca_spi.h            |   1 +
 drivers/net/ethernet/renesas/sh_eth.c              |   6 +-
 drivers/net/ethernet/socionext/netsec.c            |  20 +-
 drivers/net/ethernet/socionext/sni_ave.c           |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c    |   2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-meson8b.c    |   2 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c  |   2 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac5.c       |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c   |   2 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  |   2 +-
 drivers/net/hyperv/hyperv_net.h                    |   3 +-
 drivers/net/hyperv/netvsc.c                        |  38 +-
 drivers/net/hyperv/netvsc_drv.c                    |  13 +-
 drivers/net/phy/fixed_phy.c                        |   6 +-
 drivers/net/phy/mdio_bus.c                         |  11 +-
 drivers/net/phy/micrel.c                           |   1 +
 drivers/net/phy/phy_device.c                       |  13 +-
 drivers/net/vxlan.c                                |   7 +-
 drivers/net/wireless/ath/ath10k/mac.c              |   4 +-
 drivers/net/wireless/ath/ath10k/sdio.c             |  29 +-
 drivers/net/wireless/ath/ath10k/wmi-tlv.c          |   2 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |   4 +-
 drivers/net/wireless/ath/ath9k/dynack.c            |   8 +-
 drivers/net/wireless/ath/wcn36xx/smd.c             | 186 ++++++----
 .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c  |   8 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h |  10 +
 .../wireless/broadcom/brcm80211/brcmfmac/core.c    |   1 +
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    |  12 +-
 .../net/wireless/intel/iwlwifi/fw/api/nvm-reg.h    |  14 +-
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |  10 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c        |  12 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c      |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |  19 +-
 drivers/net/wireless/marvell/libertas_tf/cmd.c     |   2 +-
 drivers/net/wireless/mediatek/mt76/usb.c           |  14 +-
 drivers/net/wireless/mediatek/mt7601u/phy.c        |   2 +-
 drivers/net/wireless/realtek/rtlwifi/debug.c       |   2 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c    |  71 +---
 drivers/ntb/hw/idt/ntb_hw_idt.c                    |   8 +-
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c             |   4 +-
 drivers/nvme/host/pci.c                            |   2 +-
 drivers/nvmem/imx-ocotp.c                          |  39 +-
 drivers/of/of_mdio.c                               |   2 +-
 drivers/opp/core.c                                 |  12 +-
 drivers/opp/of.c                                   |  20 +-
 drivers/opp/opp.h                                  |   6 +-
 drivers/pci/controller/dwc/pcie-designware-ep.c    |  10 +-
 drivers/pci/controller/pcie-iproc.c                |  10 +-
 drivers/pci/controller/pcie-mobiveil.c             |   8 +-
 drivers/pci/controller/pcie-rockchip-ep.c          |   2 +-
 drivers/pci/endpoint/functions/pci-epf-test.c      |   4 +-
 drivers/pci/pci-driver.c                           |  60 ++-
 drivers/pci/pci.c                                  |  54 ++-
 drivers/pci/switch/switchtec.c                     |   4 -
 drivers/phy/broadcom/phy-brcm-usb.c                |   8 +
 drivers/phy/qualcomm/phy-qcom-qusb2.c              |   2 +-
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c           |  96 ++++-
 drivers/pinctrl/meson/pinctrl-meson-gxl.c          |  12 +-
 drivers/pinctrl/sh-pfc/pfc-emev2.c                 |  20 +
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c               |   3 +-
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c               |   8 +-
 drivers/pinctrl/sh-pfc/pfc-r8a7792.c               |   1 +
 drivers/pinctrl/sh-pfc/pfc-r8a7794.c               |   2 +-
 drivers/pinctrl/sh-pfc/pfc-r8a77970.c              |   2 +-
 drivers/pinctrl/sh-pfc/pfc-r8a77980.c              |   2 +-
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c              |   8 +-
 drivers/pinctrl/sh-pfc/pfc-sh7269.c                |   2 +-
 drivers/pinctrl/sh-pfc/pfc-sh73a0.c                |   4 +-
 drivers/pinctrl/sh-pfc/pfc-sh7734.c                |   4 +-
 drivers/platform/mips/cpu_hwmon.c                  |   2 +-
 drivers/platform/x86/alienware-wmi.c               |  19 +-
 drivers/platform/x86/wmi.c                         |   3 +
 drivers/power/supply/power_supply_core.c           |  10 +-
 drivers/pwm/pwm-lpss.c                             |   6 +
 drivers/pwm/pwm-meson.c                            |   9 +-
 drivers/rapidio/rio_cm.c                           |   4 +-
 drivers/regulator/fixed.c                          |  11 +-
 drivers/regulator/lp87565-regulator.c              |   2 +-
 drivers/regulator/pv88060-regulator.c              |   2 +-
 drivers/regulator/pv88080-regulator.c              |   2 +-
 drivers/regulator/pv88090-regulator.c              |   2 +-
 drivers/regulator/tps65086-regulator.c             |   4 +-
 drivers/regulator/wm831x-dcdc.c                    |   4 +-
 drivers/remoteproc/qcom_q6v5_pil.c                 |  12 +-
 drivers/rtc/rtc-88pm80x.c                          |  21 +-
 drivers/rtc/rtc-88pm860x.c                         |  21 +-
 drivers/rtc/rtc-ds1307.c                           |   7 +-
 drivers/rtc/rtc-ds1672.c                           |   3 +-
 drivers/rtc/rtc-mc146818-lib.c                     |   2 +-
 drivers/rtc/rtc-mt6397.c                           |   9 +-
 drivers/rtc/rtc-pcf2127.c                          |  32 +-
 drivers/rtc/rtc-pcf8563.c                          |  13 +-
 drivers/rtc/rtc-pm8xxx.c                           |   6 +-
 drivers/rtc/rtc-rv3029c2.c                         |  16 +-
 drivers/s390/net/qeth_l2_main.c                    |  23 +-
 drivers/scsi/fnic/fnic_isr.c                       |   4 +-
 drivers/scsi/libfc/fc_exch.c                       |   2 +-
 drivers/scsi/megaraid/megaraid_sas_base.c          |   4 +-
 drivers/scsi/qla2xxx/qla_os.c                      |  34 +-
 drivers/scsi/qla2xxx/qla_target.c                  |  21 +-
 drivers/soc/amlogic/meson-gx-pwrc-vpu.c            |   8 +-
 drivers/soc/amlogic/meson-gx-socinfo.c             |  32 +-
 drivers/soc/fsl/qe/gpio.c                          |   4 +-
 drivers/soc/qcom/cmd-db.c                          |   4 +-
 drivers/spi/spi-bcm-qspi.c                         |   4 +-
 drivers/spi/spi-bcm2835aux.c                       |  13 +-
 drivers/spi/spi-cadence.c                          |  11 +-
 drivers/spi/spi-fsl-spi.c                          |   2 +-
 drivers/spi/spi-tegra114.c                         | 145 ++++++--
 drivers/spi/spi-topcliff-pch.c                     |   6 +
 drivers/staging/android/vsoc.c                     |   3 +-
 drivers/staging/comedi/drivers/ni_mio_common.c     |  24 +-
 drivers/staging/greybus/light.c                    |  12 +-
 drivers/staging/media/davinci_vpfe/dm365_ipipe.c   |  10 +-
 drivers/staging/most/cdev/cdev.c                   |   5 +-
 .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c  |   5 +-
 .../vc04_services/bcm2835-camera/bcm2835-camera.c  |  10 +
 drivers/target/target_core_device.c                |   4 +-
 drivers/thermal/cpu_cooling.c                      |   2 +-
 drivers/thermal/mtk_thermal.c                      |   6 +-
 drivers/thermal/rcar_gen3_thermal.c                |  38 +-
 drivers/tty/ipwireless/hardware.c                  |   2 +
 drivers/tty/serial/fsl_lpuart.c                    |  28 +-
 drivers/tty/serial/stm32-usart.c                   | 194 ++++++----
 drivers/tty/serial/stm32-usart.h                   |  14 +-
 drivers/uio/uio.c                                  |  10 +-
 drivers/usb/class/cdc-wdm.c                        |   2 +-
 drivers/usb/dwc2/gadget.c                          |   1 +
 drivers/usb/dwc3/Kconfig                           |   4 +-
 drivers/usb/gadget/udc/fsl_udc_core.c              |  30 +-
 drivers/usb/host/xhci-hub.c                        |   2 +-
 drivers/usb/phy/Kconfig                            |   2 +-
 drivers/usb/phy/phy-twl6030-usb.c                  |   2 +-
 drivers/usb/typec/Kconfig                          |   1 +
 drivers/usb/typec/fusb302/fusb302.c                |  10 +-
 drivers/usb/typec/tcpci.c                          |  10 +-
 drivers/usb/typec/tcpm.c                           |  32 +-
 drivers/usb/typec/typec_wcove.c                    |  10 +-
 drivers/vfio/mdev/mdev_core.c                      |  11 +-
 drivers/vfio/mdev/mdev_sysfs.c                     |   2 +-
 drivers/vfio/pci/vfio_pci.c                        |  19 +-
 drivers/vhost/test.c                               |   2 +
 drivers/video/backlight/lm3630a_bl.c               |   4 +-
 drivers/video/backlight/pwm_bl.c                   |  24 +-
 drivers/video/fbdev/chipsfb.c                      |   3 +-
 drivers/watchdog/rtd119x_wdt.c                     |   2 +-
 drivers/watchdog/sprd_wdt.c                        |   6 +-
 drivers/xen/cpu_hotplug.c                          |   2 +-
 drivers/xen/pvcalls-back.c                         |   2 +-
 fs/affs/super.c                                    |   6 -
 fs/afs/callback.c                                  |   8 +-
 fs/afs/dir_edit.c                                  |  12 +-
 fs/afs/file.c                                      |   7 +-
 fs/afs/flock.c                                     | 412 ++++++++++-----------
 fs/afs/inode.c                                     |   8 +-
 fs/afs/rxrpc.c                                     |   1 +
 fs/afs/security.c                                  |   4 +-
 fs/afs/super.c                                     |   1 +
 fs/afs/xattr.c                                     |   4 +-
 fs/btrfs/file.c                                    |   3 +-
 fs/btrfs/inode-map.c                               |  28 +-
 fs/ceph/xattr.c                                    |   2 +-
 fs/cifs/connect.c                                  |   3 +-
 fs/exportfs/expfs.c                                |   1 +
 fs/ext4/inline.c                                   |   2 +-
 fs/f2fs/dir.c                                      |   5 +
 fs/f2fs/f2fs.h                                     |   3 +-
 fs/f2fs/inline.c                                   |   6 +
 fs/jfs/jfs_txnmgr.c                                |   3 +-
 fs/nfs/delegation.c                                |  20 +-
 fs/nfs/delegation.h                                |   1 +
 fs/nfs/flexfilelayout/flexfilelayout.h             |  32 +-
 fs/nfs/nfs42xdr.c                                  |  10 +
 fs/nfs/pnfs.c                                      |  33 +-
 fs/nfs/pnfs.h                                      |   1 +
 fs/nfs/super.c                                     |   2 +-
 fs/nfs/write.c                                     |   2 +-
 fs/xfs/xfs_quotaops.c                              |   3 +
 include/drm/drm_panel.h                            |   1 +
 include/linux/acpi.h                               |  12 +-
 include/linux/device.h                             |   6 +-
 include/linux/irqchip/arm-gic-v3.h                 |  12 +-
 include/linux/mlx5/mlx5_ifc.h                      |   2 -
 include/linux/mmc/sdio_ids.h                       |   2 +
 include/linux/of.h                                 |   5 +-
 include/linux/pci.h                                |   1 +
 include/linux/perf_event.h                         |   7 +-
 include/linux/platform_data/dma-imx-sdma.h         |   3 +
 include/linux/rtc.h                                |   2 +-
 include/linux/signal.h                             |  15 +-
 include/linux/switchtec.h                          |   4 +-
 include/linux/usb/tcpm.h                           |  13 +-
 include/media/davinci/vpbe.h                       |   2 +-
 include/net/request_sock.h                         |   4 +-
 include/net/sctp/sctp.h                            |   5 +
 include/net/tcp.h                                  |   2 +-
 include/net/xfrm.h                                 |   1 -
 include/sound/soc.h                                |   2 +-
 include/trace/events/rxrpc.h                       |   6 +-
 include/uapi/linux/btf.h                           |   4 +-
 include/uapi/linux/netfilter/nf_tables.h           |   2 +-
 kernel/bpf/offload.c                               |   4 +-
 kernel/bpf/verifier.c                              |   2 +-
 kernel/debug/kdb/kdb_main.c                        |   2 +-
 kernel/events/core.c                               | 126 ++++---
 kernel/fork.c                                      |  16 +-
 kernel/irq/irqdomain.c                             |   3 +-
 kernel/signal.c                                    |   5 +
 lib/devres.c                                       |   3 +-
 lib/kfifo.c                                        |   3 +-
 net/6lowpan/nhc.c                                  |   2 +-
 net/bpfilter/bpfilter_kern.c                       |   2 +-
 net/bridge/br_arp_nd_proxy.c                       |   2 +-
 net/bridge/netfilter/ebtables.c                    |   4 +-
 net/core/dev.c                                     |  73 ++--
 net/core/filter.c                                  |   2 +-
 net/core/neighbour.c                               |   4 +-
 net/core/sock.c                                    |   4 +-
 net/dsa/port.c                                     |   7 +-
 net/dsa/slave.c                                    |   8 +-
 net/ieee802154/6lowpan/reassembly.c                |   2 +-
 net/ipv4/af_inet.c                                 |   2 +-
 net/ipv4/inet_connection_sock.c                    |   2 +-
 net/ipv4/ip_output.c                               |   3 +-
 net/ipv4/ip_tunnel.c                               |   5 +-
 net/ipv4/tcp.c                                     |   4 +-
 net/ipv4/udp_offload.c                             |   5 +
 net/ipv6/ip6_fib.c                                 |   3 +-
 net/ipv6/ip6_gre.c                                 |   1 +
 net/ipv6/ip6_output.c                              |   3 +-
 net/ipv6/raw.c                                     |   2 +
 net/ipv6/reassembly.c                              |   2 +-
 net/iucv/af_iucv.c                                 |  40 +-
 net/l2tp/l2tp_core.c                               |   3 +-
 net/llc/af_llc.c                                   |  34 +-
 net/llc/llc_conn.c                                 |  35 +-
 net/llc/llc_if.c                                   |  12 +-
 net/mac80211/rc80211_minstrel_ht.c                 |   2 +-
 net/mac80211/rx.c                                  |  11 +-
 net/mpls/mpls_iptunnel.c                           |   2 +-
 net/netfilter/nf_conntrack_netlink.c               |   7 +-
 net/netfilter/nf_flow_table_core.c                 |   9 +-
 net/netfilter/nft_flow_offload.c                   |   3 +-
 net/netfilter/nft_osf.c                            |  10 +
 net/netfilter/nft_set_hash.c                       |  25 +-
 net/packet/af_packet.c                             |  25 +-
 net/rds/ib_stats.c                                 |   2 +-
 net/rds/stats.c                                    |   2 +
 net/rxrpc/af_rxrpc.c                               |   3 -
 net/rxrpc/ar-internal.h                            |   2 +
 net/rxrpc/call_accept.c                            |   2 +-
 net/rxrpc/conn_client.c                            |  50 ++-
 net/rxrpc/conn_object.c                            |  15 +-
 net/rxrpc/conn_service.c                           |   2 +-
 net/rxrpc/input.c                                  |  18 +-
 net/rxrpc/local_object.c                           |   5 +-
 net/rxrpc/output.c                                 |   3 +
 net/sched/act_csum.c                               |  31 +-
 net/sched/act_mirred.c                             |   6 +-
 net/sched/sch_cbs.c                                | 108 +++++-
 net/sched/sch_netem.c                              |  18 +-
 net/sctp/input.c                                   |  12 +-
 net/smc/smc_diag.c                                 |   3 +-
 net/smc/smc_rx.c                                   |  29 +-
 net/sunrpc/auth_gss/svcauth_gss.c                  |  84 +++--
 net/sunrpc/xprtrdma/verbs.c                        |   3 +-
 net/tipc/link.c                                    |  29 +-
 net/tipc/monitor.c                                 |  15 +
 net/tipc/monitor.h                                 |   1 +
 net/tipc/name_distr.c                              |  18 +-
 net/tipc/name_table.c                              |   1 +
 net/tipc/name_table.h                              |   1 +
 net/tipc/net.c                                     |   2 +
 net/tipc/node.c                                    |   7 +-
 net/tipc/socket.c                                  |   2 +-
 net/tipc/sysctl.c                                  |   8 +-
 net/tls/tls_device_fallback.c                      |   4 +
 net/wireless/reg.c                                 |   9 +
 net/xdp/xdp_umem.c                                 |   6 +
 net/xdp/xsk.c                                      |  21 +-
 net/xfrm/xfrm_interface.c                          |  10 +-
 samples/bpf/xdp_rxq_info_user.c                    |   6 +-
 security/apparmor/include/cred.h                   |   2 +
 security/apparmor/lsm.c                            |   4 +-
 security/apparmor/net.c                            |  15 +-
 security/keys/key.c                                |   1 +
 sound/aoa/codecs/onyx.c                            |   4 +-
 sound/pci/hda/hda_controller.h                     |   9 +-
 sound/sh/aica.c                                    |  14 +-
 sound/soc/codecs/cs4349.c                          |   1 +
 sound/soc/codecs/es8328.c                          |   2 +-
 sound/soc/codecs/wm8737.c                          |   2 +-
 sound/soc/codecs/wm9705.c                          |  10 +-
 sound/soc/codecs/wm9712.c                          |  13 +-
 sound/soc/codecs/wm9713.c                          |  10 +-
 sound/soc/davinci/davinci-mcasp.c                  |  13 +-
 sound/soc/fsl/imx-sgtl5000.c                       |   3 +-
 sound/soc/meson/axg-tdmin.c                        |   1 -
 sound/soc/meson/axg-tdmout.c                       |   1 -
 sound/soc/qcom/apq8016_sbc.c                       |  21 +-
 sound/soc/soc-pcm.c                                |   4 +-
 sound/soc/sunxi/sun4i-i2s.c                        |   4 +-
 sound/soc/sunxi/sun8i-codec.c                      |   6 +-
 sound/usb/mixer.c                                  |   4 +-
 sound/usb/quirks-table.h                           |   9 +-
 tools/bpf/bpftool/btf_dumper.c                     |   8 +-
 tools/bpf/bpftool/cgroup.c                         |   6 +-
 tools/bpf/bpftool/map_perf_ring.c                  |   4 +-
 tools/perf/util/machine.c                          |  27 +-
 tools/testing/selftests/ipc/msgque.c               |  11 +-
 629 files changed, 4721 insertions(+), 3155 deletions(-)
author maintainer
#1 lore raw

PATCH 1/639 Revert "efi: Fix debugobjects warning on efi_rts_work"

From: Greg Kroah-Hartman <[email protected]>

This reverts commit 3e6b472f474accf757e107919f8ee42e7315ac0d which is commit ef1491e791308317bb9851a0ad380c4a68b58d54 upstream.

Chris reports that this commit has problems and should not have been backported to 4.19.y

Cc Waiman Long <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Sai Praneeth Prakhya <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sasha Levin <[email protected]>
---
 drivers/firmware/efi/runtime-wrappers.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/runtime-wrappers.c +1 -1
@@ -95,7 +95,7 @@ struct efi_runtime_work {
 	efi_rts_work.status = EFI_ABORTED;				\
 									\
 	init_completion(&efi_rts_work.efi_rts_comp);			\
-	INIT_WORK(&efi_rts_work.work, efi_call_rts);			\
+	INIT_WORK_ONSTACK(&efi_rts_work.work, efi_call_rts);		\
 	efi_rts_work.arg1 = _arg1;					\
 	efi_rts_work.arg2 = _arg2;					\
 	efi_rts_work.arg3 = _arg3;					\
author maintainer
#2 lore raw

PATCH 2/639 xfs: Sanity check flags of Q_XQUOTARM call

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit 3dd4d40b420846dd35869ccc8f8627feef2cff32 upstream.

Flags passed to Q_XQUOTARM were not sanity checked for invalid values. Fix that.

---
 fs/xfs/xfs_quotaops.c |    3 +++
 1 file changed, 3 insertions(+)
fs/xfs/xfs_quotaops.c +3 -0
@@ -202,6 +202,9 @@ xfs_fs_rm_xquota(
 	if (XFS_IS_QUOTA_ON(mp))
 		return -EINVAL;
 
+	if (uflags & ~(FS_USER_QUOTA | FS_GROUP_QUOTA | FS_PROJ_QUOTA))
+		return -EINVAL;
+
 	if (uflags & FS_USER_QUOTA)
 		flags |= XFS_DQ_USER;
 	if (uflags & FS_GROUP_QUOTA)
author maintainer
#3 lore raw

PATCH 3/639 i2c: stm32f7: rework slave_id allocation

In reply to Greg Kroah-Hartman

From: Alain Volmat <[email protected]>

commit 52d3be711e065a97a57c2f2ffba3098748855bd6 upstream.

The IP can handle two slave addresses. One address can either be 7 bits or 10 bits while the other can only be 7 bits.
In order to ensure that a 10 bits address can always be allocated (assuming there is only one 7 bits address already allocated), pick up the 7-bits only address slot in priority when performing a 7-bits address allocation.

Fixes 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support")
---
 drivers/i2c/busses/i2c-stm32f7.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-stm32f7.c +1 -1
@@ -1252,7 +1252,7 @@ static int stm32f7_i2c_get_free_slave_id
 	 * slave[0] supports 7-bit and 10-bit slave address
 	 * slave[1] supports 7-bit slave address only
 	 */
-	for (i = 0; i < STM32F7_I2C_MAX_SLAVE; i++) {
+	for (i = STM32F7_I2C_MAX_SLAVE - 1; i >= 0; i--) {
 		if (i == 1 && (slave->flags & I2C_CLIENT_PEC))
 			continue;
 		if (!i2c_dev->slave[i]) {
author maintainer
#4 lore raw

PATCH 4/639 i2c: i2c-stm32f7: fix 10-bits check in slave free id search loop

In reply to Greg Kroah-Hartman

From: Alain Volmat <[email protected]>

commit 7787657d7ee55a9ecf4aea4907b46b87a44eda67 upstream.

Fix a typo in the free slave id search loop. Instead of I2C_CLIENT_PEC, it should have been I2C_CLIENT_TEN. The slave id 1 can only handle 7-bit addresses and thus is not eligible in case of 10-bit addresses. As a matter of fact none of the slave id support I2C_CLIENT_PEC, overall check is performed at the beginning of the stm32f7_i2c_reg_slave function.

Fixes 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support")
---
 drivers/i2c/busses/i2c-stm32f7.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-stm32f7.c +1 -1
@@ -1253,7 +1253,7 @@ static int stm32f7_i2c_get_free_slave_id
 	 * slave[1] supports 7-bit slave address only
 	 */
 	for (i = STM32F7_I2C_MAX_SLAVE - 1; i >= 0; i--) {
-		if (i == 1 && (slave->flags & I2C_CLIENT_PEC))
+		if (i == 1 && (slave->flags & I2C_CLIENT_TEN))
 			continue;
 		if (!i2c_dev->slave[i]) {
 			*id = i;
author maintainer
#5 lore raw

PATCH 5/639 mfd: intel-lpss: Add default I2C device properties for Gemini Lake

In reply to Greg Kroah-Hartman

From: Jarkko Nikula <[email protected]>

commit 3f31bc67e4dc6a555341dffefe328ddd58e8b431 upstream.

It turned out Intel Gemini Lake doesn't use the same I2C timing parameters as Broxton.

I got confirmation from the Windows team that Gemini Lake systems should use updated timing parameters that differ from those used in Broxton based systems.

Fixes f80e78aa11ad ("mfd: intel-lpss: Add Intel Gemini Lake PCI IDs")
---
 drivers/mfd/intel-lpss-pci.c |   28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)
drivers/mfd/intel-lpss-pci.c +20 -8
@@ -126,6 +126,18 @@ static const struct intel_lpss_platform_
 	.properties = apl_i2c_properties,
 };
 
+static struct property_entry glk_i2c_properties[] = {
+	PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 313),
+	PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
+	PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 290),
+	{ },
+};
+
+static const struct intel_lpss_platform_info glk_i2c_info = {
+	.clk_rate = 133000000,
+	.properties = glk_i2c_properties,
+};
+
 static const struct intel_lpss_platform_info cnl_i2c_info = {
 	.clk_rate = 216000000,
 	.properties = spt_i2c_properties,
@@ -165,14 +177,14 @@ static const struct pci_device_id intel_
 	{ PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info },
 	{ PCI_VDEVICE(INTEL, 0x1aee), (kernel_ulong_t)&bxt_uart_info },
 	/* GLK */
-	{ PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&bxt_i2c_info },
-	{ PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&bxt_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&glk_i2c_info },
+	{ PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&glk_i2c_info },
 	{ PCI_VDEVICE(INTEL, 0x31bc), (kernel_ulong_t)&bxt_uart_info },
 	{ PCI_VDEVICE(INTEL, 0x31be), (kernel_ulong_t)&bxt_uart_info },
 	{ PCI_VDEVICE(INTEL, 0x31c0), (kernel_ulong_t)&bxt_uart_info },
author maintainer
#6 lore raw

PATCH 6/639 SUNRPC: Fix svcauth_gss_proxy_init()

In reply to Greg Kroah-Hartman

From: Chuck Lever <[email protected]>

commit 5866efa8cbfbadf3905072798e96652faf02dbe8 upstream.

gss_read_proxy_verf() assumes things about the XDR buffer containing the RPC Call that are not true for buffers generated by svc_rdma_recv().

RDMA's buffers look more like what the upper layer generates for
sending: head is a kmalloc'd buffer; it does not point to a page whose contents are contiguous with the first page in the buffers' page array. The result is that ACCEPT_SEC_CONTEXT via RPC/RDMA has stopped working on Linux NFS servers that use gssproxy.

This does not affect clients that use only TCP to send their ACCEPT_SEC_CONTEXT operation (that's all Linux clients). Other clients, like Solaris NFS clients, send ACCEPT_SEC_CONTEXT on the same transport as they send all other NFS operations. Such clients can send ACCEPT_SEC_CONTEXT via RPC/RDMA.

I thought I had found every direct reference in the server RPC code to the rqstp->rq_pages field.

Bug found at the 2019 Westford NFS bake-a-thon.

Fixes 3316f0631139 ("svcrdma: Persistently allocate and DMA- ... ")
---
 net/sunrpc/auth_gss/svcauth_gss.c |   84 ++++++++++++++++++++++++++++----------
 1 file changed, 63 insertions(+), 21 deletions(-)
net/sunrpc/auth_gss/svcauth_gss.c +63 -21
@@ -1054,24 +1054,32 @@ gss_read_verf(struct rpc_gss_wire_cred *
 	return 0;
 }
 
-/* Ok this is really heavily depending on a set of semantics in
- * how rqstp is set up by svc_recv and pages laid down by the
- * server when reading a request. We are basically guaranteed that
- * the token lays all down linearly across a set of pages, starting
- * at iov_base in rq_arg.head[0] which happens to be the first of a
- * set of pages stored in rq_pages[].
- * rq_arg.head[0].iov_base will provide us the page_base to pass
- * to the upcall.
- */
-static inline int
-gss_read_proxy_verf(struct svc_rqst *rqstp,
-		    struct rpc_gss_wire_cred *gc, __be32 *authp,
-		    struct xdr_netobj *in_handle,
-		    struct gssp_in_token *in_token)
+static void gss_free_in_token_pages(struct gssp_in_token *in_token)
 {
-	struct kvec *argv = &rqstp->rq_arg.head[0];
 	u32 inlen;
-	int res;
+	int i;
+
+	i = 0;
+	inlen = in_token->page_len;
+	while (inlen) {
+		if (in_token->pages[i])
+			put_page(in_token->pages[i]);
+		inlen -= inlen > PAGE_SIZE ? PAGE_SIZE : inlen;
+	}
+
+	kfree(in_token->pages);
+	in_token->pages = NULL;
+}
+
+static int gss_read_proxy_verf(struct svc_rqst *rqstp,
+			       struct rpc_gss_wire_cred *gc, __be32 *authp,
+			       struct xdr_netobj *in_handle,
+			       struct gssp_in_token *in_token)
+{
+	struct kvec *argv = &rqstp->rq_arg.head[0];
+	unsigned int page_base, length;
+	int pages, i, res;
+	size_t inlen;
 
 	res = gss_read_common_verf(gc, argv, authp, in_handle);
 	if (res)
@@ -1081,10 +1089,36 @@ gss_read_proxy_verf(struct svc_rqst *rqs
 	if (inlen > (argv->iov_len + rqstp->rq_arg.page_len))
 		return SVC_DENIED;
 
-	in_token->pages = rqstp->rq_pages;
-	in_token->page_base = (ulong)argv->iov_base & ~PAGE_MASK;
+	pages = DIV_ROUND_UP(inlen, PAGE_SIZE);
+	in_token->pages = kcalloc(pages, sizeof(struct page *), GFP_KERNEL);
+	if (!in_token->pages)
+		return SVC_DENIED;
+	in_token->page_base = 0;
 	in_token->page_len = inlen;
+	for (i = 0; i < pages; i++) {
+		in_token->pages[i] = alloc_page(GFP_KERNEL);
+		if (!in_token->pages[i]) {
+			gss_free_in_token_pages(in_token);
+			return SVC_DENIED;
+		}
+	}
 
+	length = min_t(unsigned int, inlen, argv->iov_len);
+	memcpy(page_address(in_token->pages[0]), argv->iov_base, length);
+	inlen -= length;
+
+	i = 1;
+	page_base = rqstp->rq_arg.page_base;
+	while (inlen) {
+		length = min_t(unsigned int, inlen, PAGE_SIZE);
+		memcpy(page_address(in_token->pages[i]),
+		       page_address(rqstp->rq_arg.pages[i]) + page_base,
+		       length);
+
+		inlen -= length;
+		page_base = 0;
+		i++;
+	}
 	return 0;
 }
 
@@ -1259,8 +1293,11 @@ static int svcauth_gss_proxy_init(struct
 		break;
 	case GSS_S_COMPLETE:
 		status = gss_proxy_save_rsc(sn->rsc_cache, &ud, &handle);
-		if (status)
+		if (status) {
+			pr_info("%s: gss_proxy_save_rsc failed (%d)\n",
+				__func__, status);
 			goto out;
+		}
 		cli_handle.data = (u8 *)&handle;
 		cli_handle.len = sizeof(handle);
 		break;
@@ -1271,15 +1308,20 @@ static int svcauth_gss_proxy_init(struct
 
 	/* Got an answer to the upcall; use it: */
 	if (gss_write_init_verf(sn->rsc_cache, rqstp,
-				&cli_handle, &ud.major_status))
+				&cli_handle, &ud.major_status)) {
+		pr_info("%s: gss_write_init_verf failed\n", __func__);
 		goto out;
+	}
 	if (gss_write_resv(resv, PAGE_SIZE,
 			   &cli_handle, &ud.out_token,
-			   ud.major_status, ud.minor_status))
+			   ud.major_status, ud.minor_status)) {
+		pr_info("%s: gss_write_resv failed\n", __func__);
 		goto out;
+	}
 
 	ret = SVC_COMPLETE;
 out:
+	gss_free_in_token_pages(&ud.in_token);
 	gssp_free_upcall_data(&ud);
 	return ret;
 }
author maintainer
#7 lore raw

PATCH 7/639 powerpc/pseries: Enable support for ibm,drc-info property

In reply to Greg Kroah-Hartman

From: Tyrel Datwyler <[email protected]>

commit 0a87ccd3699983645f54cafd2258514a716b20b8 upstream.

Advertise client support for the PAPR architected ibm,drc-info device tree property during CAS handshake.

Fixes c7a3275e0f9e ("powerpc/pseries: Revert support for ibm,drc-info devtree property")
---
 arch/powerpc/kernel/prom_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/prom_init.c +1 -1
@@ -904,7 +904,7 @@ struct ibm_arch_vec __cacheline_aligned
 		.reserved2 = 0,
 		.reserved3 = 0,
 		.subprocessors = 1,
-		.byte22 = OV5_FEAT(OV5_DRMEM_V2),
+		.byte22 = OV5_FEAT(OV5_DRMEM_V2) | OV5_FEAT(OV5_DRC_INFO),
 		.intarch = 0,
 		.mmu = 0,
 		.hash_ext = 0,
author maintainer
#8 lore raw

PATCH 8/639 powerpc/archrandom: fix arch_get_random_seed_int()

In reply to Greg Kroah-Hartman

From: Ard Biesheuvel <[email protected]>

commit b6afd1234cf93aa0d71b4be4788c47534905f0be upstream.

Commit 01c9348c7620ec65

powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*

updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to arch_get_random_seed_[int|long]() instead. However, it failed to take into account that arch_get_random_int() was implemented in terms of arch_get_random_long(), and so we ended up with a version of the former that is essentially a NOP as well.

Fix this by calling arch_get_random_seed_long() from arch_get_random_seed_int() instead.

Fixes 01c9348c7620ec65 ("powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*")
---
 arch/powerpc/include/asm/archrandom.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/archrandom.h +1 -1
@@ -28,7 +28,7 @@ static inline int arch_get_random_seed_i
 	unsigned long val;
 	int rc;
 
-	rc = arch_get_random_long(&val);
+	rc = arch_get_random_seed_long(&val);
 	if (rc)
 		*v = val;
 
author maintainer
#9 lore raw

PATCH 9/639 tipc: update mons self addr when node addr generated

In reply to Greg Kroah-Hartman

From: Hoang Le <[email protected]>

commit 46cb01eeeb86fca6afe24dda1167b0cb95424e29 upstream.

In commit 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values"), the 32-bit node address only generated after one second trial period expired. However the self's addr in struct tipc_monitor do not update according to node address generated. This lead to it is always zero as initial value. As result, sorting algorithm using this value does not work as expected, neither neighbor monitoring framework.

In this commit, we add a fix to update self's addr when 32-bit node address generated.

Fixes 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
---
 net/tipc/monitor.c |   15 +++++++++++++++
 net/tipc/monitor.h |    1 +
 net/tipc/net.c     |    2 ++
 3 files changed, 18 insertions(+)
net/tipc/monitor.c +15 -0
@@ -665,6 +665,21 @@ void tipc_mon_delete(struct net *net, in
 	kfree(mon);
 }
 
+void tipc_mon_reinit_self(struct net *net)
+{
+	struct tipc_monitor *mon;
+	int bearer_id;
+
+	for (bearer_id = 0; bearer_id < MAX_BEARERS; bearer_id++) {
+		mon = tipc_monitor(net, bearer_id);
+		if (!mon)
+			continue;
+		write_lock_bh(&mon->lock);
+		mon->self->addr = tipc_own_addr(net);
+		write_unlock_bh(&mon->lock);
+	}
+}
+
 int tipc_nl_monitor_set_threshold(struct net *net, u32 cluster_size)
 {
 	struct tipc_net *tn = tipc_net(net);
net/tipc/monitor.h +1 -0
@@ -77,6 +77,7 @@ int __tipc_nl_add_monitor(struct net *ne
 			  u32 bearer_id);
 int tipc_nl_add_monitor_peer(struct net *net, struct tipc_nl_msg *msg,
 			     u32 bearer_id, u32 *prev_node);
+void tipc_mon_reinit_self(struct net *net);
 
 extern const int tipc_max_domain_size;
 #endif
net/tipc/net.c +2 -0
@@ -42,6 +42,7 @@
 #include "node.h"
 #include "bcast.h"
 #include "netlink.h"
+#include "monitor.h"
 
 /*
  * The TIPC locking policy is designed to ensure a very fine locking
@@ -136,6 +137,7 @@ static void tipc_net_finalize(struct net
 	tipc_set_node_addr(net, addr);
 	tipc_named_reinit(net);
 	tipc_sk_reinit(net);
+	tipc_mon_reinit_self(net);
 	tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr,
 			     TIPC_CLUSTER_SCOPE, 0, addr);
 }
author maintainer
#10 lore raw

PATCH 10/639 tipc: fix wrong timeout input for tipc_wait_for_cond()

In reply to Greg Kroah-Hartman

From: Tung Nguyen <[email protected]>

commit 12db3c8083fcab4270866a88191933f2d9f24f89 upstream.

In function __tipc_shutdown(), the timeout value passed to tipc_wait_for_cond() is not jiffies.

This commit fixes it by converting that value from milliseconds to jiffies.

Fixes 365ad353c256 ("tipc: reduce risk of user starvation during link congestion")
---
 net/tipc/socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/socket.c +1 -1
@@ -501,7 +501,7 @@ static void __tipc_shutdown(struct socke
 	struct sock *sk = sock->sk;
 	struct tipc_sock *tsk = tipc_sk(sk);
 	struct net *net = sock_net(sk);
-	long timeout = CONN_TIMEOUT_DEFAULT;
+	long timeout = msecs_to_jiffies(CONN_TIMEOUT_DEFAULT);
 	u32 dnode = tsk_peer_node(tsk);
 	struct sk_buff *skb;
 
author maintainer
#11 lore raw

PATCH 11/639 mt7601u: fix bbp version check in mt7601u_wait_bbp_ready

In reply to Greg Kroah-Hartman

From: Lorenzo Bianconi <[email protected]>

commit 15e14f76f85f4f0eab3b8146e1cd3c58ce272823 upstream.

Fix bbp ready check in mt7601u_wait_bbp_ready. The issue is reported by coverity with the following error:

Logical vs. bitwise operator
The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error.

Addresses-Coverity-ID: 1309441 ("Logical vs. bitwise operator")

---
 drivers/net/wireless/mediatek/mt7601u/phy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt7601u/phy.c +1 -1
@@ -221,7 +221,7 @@ int mt7601u_wait_bbp_ready(struct mt7601
 
 	do {
 		val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION);
-		if (val && ~val)
+		if (val && val != 0xff)
 			break;
 	} while (--i);
 
author maintainer
#12 lore raw

PATCH 12/639 crypto: sun4i-ss - fix big endian issues

In reply to Greg Kroah-Hartman

From: Corentin Labbe <[email protected]>

commit d1d787bcebfe122a5bd443ae565696661e2e9656 upstream.

When testing BigEndian kernel, the sun4i-ss was failling all crypto tests.
This patch fix endian issues with it.

Fixes 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
---
 drivers/crypto/sunxi-ss/sun4i-ss-hash.c |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/crypto/sunxi-ss/sun4i-ss-hash.c +11 -10
@@ -179,7 +179,7 @@ static int sun4i_hash(struct ahash_reque
 	 */
 	unsigned int i = 0, end, fill, min_fill, nwait, nbw = 0, j = 0, todo;
 	unsigned int in_i = 0;
-	u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, wb = 0, v, ivmode = 0;
+	u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, v, ivmode = 0;
 	struct sun4i_req_ctx *op = ahash_request_ctx(areq);
 	struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
 	struct sun4i_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
@@ -188,6 +188,7 @@ static int sun4i_hash(struct ahash_reque
 	struct sg_mapping_iter mi;
 	int in_r, err = 0;
 	size_t copied = 0;
+	__le32 wb = 0;
 
 	dev_dbg(ss->dev, "%s %s bc=%llu len=%u mode=%x wl=%u h0=%0x",
 		__func__, crypto_tfm_alg_name(areq->base.tfm),
@@ -399,7 +400,7 @@ hash_final:
 
 		nbw = op->len - 4 * nwait;
 		if (nbw) {
-			wb = *(u32 *)(op->buf + nwait * 4);
+			wb = cpu_to_le32(*(u32 *)(op->buf + nwait * 4));
 			wb &= GENMASK((nbw * 8) - 1, 0);
 
 			op->byte_count += nbw;
@@ -408,7 +409,7 @@ hash_final:
 
 	/* write the remaining bytes of the nbw buffer */
 	wb |= ((1 << 7) << (nbw * 8));
-	bf[j++] = wb;
+	bf[j++] = le32_to_cpu(wb);
 
 	/*
 	 * number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
@@ -427,13 +428,13 @@ hash_final:
 
 	/* write the length of data */
 	if (op->mode == SS_OP_SHA1) {
-		__be64 bits = cpu_to_be64(op->byte_count << 3);
-		bf[j++] = lower_32_bits(bits);
-		bf[j++] = upper_32_bits(bits);
+		__be64 *bits = (__be64 *)&bf[j];
+		*bits = cpu_to_be64(op->byte_count << 3);
+		j += 2;
 	} else {
-		__le64 bits = op->byte_count << 3;
-		bf[j++] = lower_32_bits(bits);
-		bf[j++] = upper_32_bits(bits);
+		__le64 *bits = (__le64 *)&bf[j];
+		*bits = cpu_to_le64(op->byte_count << 3);
+		j += 2;
 	}
 	writesl(ss->base + SS_RXFIFO, bf, j);
 
@@ -475,7 +476,7 @@ hash_final:
 		}
 	} else {
 		for (i = 0; i < 4; i++) {
-			v = readl(ss->base + SS_MD0 + i * 4);
+			v = cpu_to_le32(readl(ss->base + SS_MD0 + i * 4));
 			memcpy(areq->result + i * 4, &v, 4);
 		}
 	}
author maintainer
#13 lore raw

PATCH 13/639 perf map: No need to adjust the long name of modules

In reply to Greg Kroah-Hartman

From: Arnaldo Carvalho de Melo <[email protected]>

commit f068435d9bb2d825d59e3c101bc579f09315ee01 upstream.

At some point in the past we needed to make sure we would get the long name of modules and not just what we get from /proc/modules, but that need, as described in the cset that introduced the adjustment function:

Fixes c03d5184f0e9 ("perf machine: Adjust dso->long_name for offline module")

Without using the buildid-cache:

  # lsmod | grep trusted
  # insmod trusted.ko
  # lsmod | grep trusted
  trusted                24576  0
  # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted
  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4
  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3
  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
    probe:key_seal       (on key_seal in trusted)
  # perf probe -l
    probe:key_seal       (on key_seal in trusted)
  #

No attempt at opening '[trusted]'.

Now using the build-id cache:

  # rmmod trusted
  # perf buildid-cache --add ./trusted.ko
  # insmod trusted.ko
  # strace -e open,openat perf probe -m ./trusted.ko key_seal |& grep trusted
  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 4
  openat(AT_FDCWD, "/sys/module/trusted/notes/.note.gnu.build-id", O_RDONLY) = 7
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/.debug/root/trusted.ko/dd3d355d567394d540f527e093e0f64b95879584/probes", O_RDWR|O_CREAT, 0644) = 3
  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/usr/lib/debug/root/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/.debug/trusted.ko", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, ".debug/trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "trusted.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 4
  openat(AT_FDCWD, "/root/trusted.ko", O_RDONLY) = 3
  #

Again, no attempt at reading '[trusted]'.

Finally, adding a probe to that function and then using:

[root@quaco ~]# perf trace -e probe_perf:*/max-stack=16/ --max-events=2

     0.000 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263)
                                       dso__adjust_kmod_long_name (/home/acme/bin/perf)
                                       machine__process_kernel_mmap_event (/home/acme/bin/perf)
                                       machine__process_mmap_event (/home/acme/bin/perf)
                                       perf_event__process_mmap (/home/acme/bin/perf)
                                       machines__deliver_event (/home/acme/bin/perf)
                                       perf_session__deliver_event (/home/acme/bin/perf)
                                       perf_session__process_event (/home/acme/bin/perf)
                                       process_simple (/home/acme/bin/perf)
                                       reader__process_events (/home/acme/bin/perf)
                                       __perf_session__process_events (/home/acme/bin/perf)
                                       perf_session__process_events (/home/acme/bin/perf)
                                       process_buildids (/home/acme/bin/perf)
                                       record__finish_output (/home/acme/bin/perf)
                                       __cmd_record (/home/acme/bin/perf)
                                       cmd_record (/home/acme/bin/perf)
                                       run_builtin (/home/acme/bin/perf)
     0.055 perf/13456 probe_perf:dso__adjust_kmod_long_name(__probe_ip: 5492263)
                                       dso__adjust_kmod_long_name (/home/acme/bin/perf)
                                       machine__process_kernel_mmap_event (/home/acme/bin/perf)
                                       machine__process_mmap_event (/home/acme/bin/perf)
                                       perf_event__process_mmap (/home/acme/bin/perf)
                                       machines__deliver_event (/home/acme/bin/perf)
                                       perf_session__deliver_event (/home/acme/bin/perf)
                                       perf_session__process_event (/home/acme/bin/perf)
                                       process_simple (/home/acme/bin/perf)
                                       reader__process_events (/home/acme/bin/perf)
                                       __perf_session__process_events (/home/acme/bin/perf)
                                       perf_session__process_events (/home/acme/bin/perf)
                                       process_buildids (/home/acme/bin/perf)
                                       record__finish_output (/home/acme/bin/perf)
                                       __cmd_record (/home/acme/bin/perf)
                                       cmd_record (/home/acme/bin/perf)
                                       run_builtin (/home/acme/bin/perf)

#

This was the only path I could find using the perf tools that reach at this function, then as of november/2019, if we put a probe in the line where the actuall setting of the dso->long_name is done:

  # perf trace -e probe_perf:*
  ^C[root@quaco ~]
  # perf stat -e probe_perf:*  -I 2000
       2.000404265                  0      probe_perf:dso__adjust_kmod_long_name
       4.001142200                  0      probe_perf:dso__adjust_kmod_long_name
       6.001704120                  0      probe_perf:dso__adjust_kmod_long_name
       8.002398316                  0      probe_perf:dso__adjust_kmod_long_name
      10.002984010                  0      probe_perf:dso__adjust_kmod_long_name
      12.003597851                  0      probe_perf:dso__adjust_kmod_long_name
      14.004113303                  0      probe_perf:dso__adjust_kmod_long_name
      16.004582773                  0      probe_perf:dso__adjust_kmod_long_name
      18.005176373                  0      probe_perf:dso__adjust_kmod_long_name
      20.005801605                  0      probe_perf:dso__adjust_kmod_long_name
      22.006467540                  0      probe_perf:dso__adjust_kmod_long_name
  ^C    23.683261941                  0      probe_perf:dso__adjust_kmod_long_name

#

Its not being used at all.

To further test this I used kvm.ko as the offline module, i.e. removed if from the buildid-cache by nuking it completely (rm -rf ~/.debug) and moved it from the normal kernel distro path, removed the modules, stoped the kvm guest, and then installed it manually, etc.

  # rmmod kvm-intel
  # rmmod kvm
  # lsmod | grep kvm
  # modprobe kvm-intel
  modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
  modprobe: ERROR: ctx=0x55d3b1722260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
  modprobe: ERROR: could not insert 'kvm_intel': Unknown symbol in module, or unknown parameter (see dmesg)
  # insmod ./kvm.ko
  # modprobe kvm-intel
  modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
  modprobe: ERROR: ctx=0x562f34026260 path=/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm/kvm.ko.xz error=No such file or directory
  # lsmod | grep kvm
  kvm_intel             299008  0
  kvm                   765952  1 kvm_intel
  irqbypass              16384  1 kvm
  #
  # perf probe -x ~/bin/perf machine__findnew_module_map:12 mname=m.name:string filename=filename:string 'dso_long_name=map->dso->long_name:string' 'dso_name=map->dso->name:string'
  # perf probe -l
    probe_perf:machine__findnew_module_map (on machine__findnew_module_map:12@util/machine.c in /home/acme/bin/perf with mname filename dso_long_name dso_name)
  # perf record
  ^C[ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 3.416 MB perf.data (33956 samples) ]
  # perf trace -e probe_perf:machine*
  <SNIP>
       6.322 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[salsa20_generic]", filename: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_long_name: "/lib/modules/5.3.8-200.fc30.x86_64/kernel/crypto/salsa20_generic.ko.xz", dso_name: "[salsa20_generic]")
       6.375 perf/23099 probe_perf:machine__findnew_module_map(__probe_ip: 5492493, mname: "[kvm]", filename: "[kvm]", dso_long_name: "[kvm]", dso_name: "[kvm]")
  <SNIP>

The filename doesn't come with the path, no point in trying to set the dso->long_name.

[root@quaco ~]# strace -e open,openat perf probe -m ./kvm.ko kvm_apic_local_deliver |& egrep 'open.*kvm' openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/module/kvm/notes/.note.gnu.build-id", O_RDONLY) = 4
openat(AT_FDCWD, "/lib/modules/5.3.8-200.fc30.x86_64/kernel/arch/x86/kvm", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7 openat(AT_FDCWD, "/sys/module/kvm_intel/notes/.note.gnu.build-id", O_RDONLY) = 8
openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
openat(AT_FDCWD, "/root/.debug/root/kvm.ko/5955f426cb93f03f30f3e876814be2db80ab0b55/probes", O_RDWR|O_CREAT, 0644) = 3 openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib/debug/root/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/.debug/kvm.ko", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, ".debug/kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "kvm.ko.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 4
openat(AT_FDCWD, "/root/kvm.ko", O_RDONLY) = 3
[root@quaco ~]#

---
 tools/perf/util/machine.c |   27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)
tools/perf/util/machine.c +1 -26
@@ -681,24 +681,6 @@ int machine__process_switch_event(struct
 	return 0;
 }
 
-static void dso__adjust_kmod_long_name(struct dso *dso, const char *filename)
-{
-	const char *dup_filename;
-
-	if (!filename || !dso || !dso->long_name)
-		return;
-	if (dso->long_name[0] != '[')
-		return;
-	if (!strchr(filename, '/'))
-		return;
-
-	dup_filename = strdup(filename);
-	if (!dup_filename)
-		return;
-
-	dso__set_long_name(dso, dup_filename, true);
-}
-
 struct map *machine__findnew_module_map(struct machine *machine, u64 start,
 					const char *filename)
 {
@@ -710,15 +692,8 @@ struct map *machine__findnew_module_map(
 		return NULL;
 
 	map = map_groups__find_by_name(&machine->kmaps, m.name);
-	if (map) {
-		/*
-		 * If the map's dso is an offline module, give dso__load()
-		 * a chance to find the file path of that module by fixing
-		 * long_name.
-		 */
-		dso__adjust_kmod_long_name(map->dso, filename);
+	if (map)
 		goto out;
-	}
 
 	dso = machine__findnew_module_dso(machine, &m, filename);
 	if (dso == NULL)
author maintainer
#14 lore raw

PATCH 14/639 leds: tlc591xx: update the maximum brightness

In reply to Greg Kroah-Hartman

From: Jean-Jacques Hiblot <[email protected]>

commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.

The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON

Fixes e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")
---
 drivers/leds/leds-tlc591xx.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/leds/leds-tlc591xx.c +4 -3
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 
 #define TLC591XX_MAX_LEDS	16
+#define TLC591XX_MAX_BRIGHTNESS	256
 
 #define TLC591XX_REG_MODE1	0x00
 #define MODE1_RESPON_ADDR_MASK	0xF0
@@ -115,11 +116,11 @@ tlc591xx_brightness_set(struct led_class
 	struct tlc591xx_priv *priv = led->priv;
 	int err;
 
-	switch (brightness) {
+	switch ((int)brightness) {
 	case 0:
 		err = tlc591xx_set_ledout(priv, led, LEDOUT_OFF);
 		break;
-	case LED_FULL:
+	case TLC591XX_MAX_BRIGHTNESS:
 		err = tlc591xx_set_ledout(priv, led, LEDOUT_ON);
 		break;
 	default:
@@ -160,7 +161,7 @@ tlc591xx_configure(struct device *dev,
 		led->priv = priv;
 		led->led_no = i;
 		led->ldev.brightness_set_blocking = tlc591xx_brightness_set;
-		led->ldev.max_brightness = LED_FULL;
+		led->ldev.max_brightness = TLC591XX_MAX_BRIGHTNESS;
 		err = led_classdev_register(dev, &led->ldev);
 		if (err < 0) {
 			dev_err(dev, "couldn't register LED %s\n",
#15 lore raw

Re: [PATCH 4.19 014/639] leds: tlc591xx: update the maximum brightness

Quoted 9 lines · Greg Kroah-Hartman

From: Jean-Jacques Hiblot <[email protected]>

commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.

The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON

Quoted 4 lines
Fixes e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")

Its a new feature, really and quite unusual one: 257 brightness levels is not usual. It is theoretically safe, but...

Lets not do that for -stable.

(I'm a LED maintainer).

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#16 lore raw

Re: [PATCH 4.19 014/639] leds: tlc591xx: update the maximum brightness

Quoted 15 lines · Pavel Machek
Quoted 9 lines · Greg Kroah-Hartman

From: Jean-Jacques Hiblot <[email protected]>

commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.

The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON

Quoted 4 lines
Fixes e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")
Quoted 6 lines

Its a new feature, really and quite unusual one: 257 brightness levels is not usual. It is theoretically safe, but...

Lets not do that for -stable.

(I'm a LED maintainer).

Ok, now dropped from 4.19 and older, thanks!

greg k-h

#17 lore raw

Re: [PATCH 4.19 014/639] leds: tlc591xx: update the maximum brightness

Quoted 16 lines · Greg Kroah-Hartman
Quoted 15 lines · Pavel Machek
Quoted 13 lines · Greg Kroah-Hartman

From: Jean-Jacques Hiblot <[email protected]>

commit a2cafdfd8cf5ad8adda6c0ce44a59f46431edf02 upstream.

The TLC chips actually offer 257 levels:
- 0: led OFF
- 1-255: Led dimmed is using a PWM. The duty cycle range from 0.4% to 99.6%
- 256: led fully ON

Fixes e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c LED driver")
Quoted 8 lines
Quoted 6 lines

Its a new feature, really and quite unusual one: 257 brightness levels is not usual. It is theoretically safe, but...

Lets not do that for -stable.

(I'm a LED maintainer).

Ok, now dropped from 4.19 and older, thanks!

Thank you!
Pavel

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author maintainer
#18 lore raw

PATCH 15/639 soc: aspeed: Fix snoop_file_poll()s return type

In reply to Greg Kroah-Hartman

From: Luc Van Oostenryck <[email protected]>

commit a4e55ccd4392e70f296d12e81b93c6ca96ee21d5 upstream.

snoop_file_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type.

Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t.

---
 drivers/misc/aspeed-lpc-snoop.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/aspeed-lpc-snoop.c +2 -2
@@ -101,13 +101,13 @@ static ssize_t snoop_file_read(struct fi
 	return ret ? ret : copied;
 }
 
-static unsigned int snoop_file_poll(struct file *file,
+static __poll_t snoop_file_poll(struct file *file,
 				    struct poll_table_struct *pt)
 {
 	struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
 
 	poll_wait(file, &chan->wq, pt);
-	return !kfifo_is_empty(&chan->fifo) ? POLLIN : 0;
+	return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0;
 }
 
 static const struct file_operations snoop_fops = {
author maintainer
#19 lore raw

PATCH 16/639 watchdog: sprd: Fix the incorrect pointer getting from driver data

In reply to Greg Kroah-Hartman

From: Shuiqing Li <[email protected]>

commit 39e68d9e7ab276880980ee5386301fb218202192 upstream.

The device driver data saved the 'struct sprd_wdt' object, it is incorrect to get 'struct watchdog_device' object from the driver data, thus fix it.

---
 drivers/watchdog/sprd_wdt.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/watchdog/sprd_wdt.c +2 -4
@@ -342,10 +342,9 @@ static int sprd_wdt_probe(struct platfor
 
 static int __maybe_unused sprd_wdt_pm_suspend(struct device *dev)
 {
-	struct watchdog_device *wdd = dev_get_drvdata(dev);
 	struct sprd_wdt *wdt = dev_get_drvdata(dev);
 
-	if (watchdog_active(wdd))
+	if (watchdog_active(&wdt->wdd))
 		sprd_wdt_stop(&wdt->wdd);
 	sprd_wdt_disable(wdt);
 
@@ -354,7 +353,6 @@ static int __maybe_unused sprd_wdt_pm_su
 
 static int __maybe_unused sprd_wdt_pm_resume(struct device *dev)
 {
-	struct watchdog_device *wdd = dev_get_drvdata(dev);
 	struct sprd_wdt *wdt = dev_get_drvdata(dev);
 	int ret;
 
@@ -362,7 +360,7 @@ static int __maybe_unused sprd_wdt_pm_re
 	if (ret)
 		return ret;
 
-	if (watchdog_active(wdd)) {
+	if (watchdog_active(&wdt->wdd)) {
 		ret = sprd_wdt_start(&wdt->wdd);
 		if (ret) {
 			sprd_wdt_disable(wdt);
author maintainer
#20 lore raw

PATCH 17/639 ipmi: Fix memory leak in __ipmi_bmc_register

In reply to Greg Kroah-Hartman

From: Navid Emamdoost <[email protected]>

commit 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab upstream.

In the impelementation of __ipmi_bmc_register() the allocated memory for bmc should be released in case ida_simple_get() fails.

Fixes 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")

Message-Id: <[email protected]>

---
 drivers/char/ipmi/ipmi_msghandler.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/char/ipmi/ipmi_msghandler.c +4 -1
@@ -2965,8 +2965,11 @@ static int __ipmi_bmc_register(struct ip
 		bmc->pdev.name = "ipmi_bmc";
 
 		rv = ida_simple_get(&ipmi_bmc_ida, 0, 0, GFP_KERNEL);
-		if (rv < 0)
+		if (rv < 0) {
+			kfree(bmc);
 			goto out;
+		}
+
 		bmc->pdev.dev.driver = &ipmidriver.driver;
 		bmc->pdev.id = rv;
 		bmc->pdev.dev.release = release_bmc_device;
author maintainer
#21 lore raw

PATCH 18/639 drm/sti: do not remove the drm_bridge that was never added

In reply to Greg Kroah-Hartman

From: Peter Rosin <[email protected]>

[ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ]

Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken.

The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing the drm_bridge_remove is the easier fix.

---
 drivers/gpu/drm/sti/sti_hda.c  | 1 -
 drivers/gpu/drm/sti/sti_hdmi.c | 1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_hda.c +0 -1
index 49438337f70dc..19b9b5ed12970 100644
@@ -721,7 +721,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)
 	return 0;
 
 err_sysfs:
-	drm_bridge_remove(bridge);
 	return -EINVAL;
 }
 
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
index 34cdc46444350..ccf718404a1c2 100644
@@ -1315,7 +1315,6 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)
 	return 0;
 
 err_sysfs:
-	drm_bridge_remove(bridge);
 	hdmi->drm_connector = NULL;
 	return -EINVAL;
 }
Signature · 1 line
2.20.1
author maintainer
#22 lore raw

PATCH 19/639 ARM: dts: at91: nattis: set the PRLUD and HIPOW signals low

In reply to Greg Kroah-Hartman

From: Peter Rosin <[email protected]>

[ Upstream commit 29feb2c960ab32fc24249443d4434194ce96f083 ]

AT91_PINCTRL_OUTPUT_VAL(0) without AT91_PINCTRL_OUTPUT is a no-op, so make sure the pins really output a zero.

Fixes 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power")
---
 arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-nattis-2-natte-2.dts +4 -2
index af9f38456d04e..bfa5815a07214 100644
@@ -38,14 +38,16 @@
 						atmel,pins =
 							<AT91_PIOA 21
 							 AT91_PERIPH_GPIO
-							 AT91_PINCTRL_OUTPUT_VAL(0)>;
+							 (AT91_PINCTRL_OUTPUT |
+							  AT91_PINCTRL_OUTPUT_VAL(0))>;
 					};
 
 					pinctrl_lcd_hipow0: lcd_hipow0 {
 						atmel,pins =
 							<AT91_PIOA 23
 							 AT91_PERIPH_GPIO
-							 AT91_PINCTRL_OUTPUT_VAL(0)>;
+							 (AT91_PINCTRL_OUTPUT |
+							  AT91_PINCTRL_OUTPUT_VAL(0))>;
 					};
 				};
 			};
Signature · 1 line
2.20.1
author maintainer
#23 lore raw

PATCH 20/639 ARM: dts: at91: nattis: make the SD-card slot work

In reply to Greg Kroah-Hartman

From: Peter Rosin <[email protected]>

[ Upstream commit f52eb2067929d533babe106fbc131c88db3eff3d ]

The cd-gpios signal is assumed active-low by the driver, and the cd-inverted property is needed if it is, in fact, active-high. Fix this oversight.

Fixes 0e4323899973 ("ARM: dts: at91: add devicetree for the Axentia Nattis with Natte power")
---
 arch/arm/boot/dts/at91-nattis-2-natte-2.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91-nattis-2-natte-2.dts +1 -0
index bfa5815a07214..4308a07b792ea 100644
@@ -221,6 +221,7 @@
 		reg = <0>;
 		bus-width = <4>;
 		cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
+		cd-inverted;
 	};
 };
 
Signature · 1 line
2.20.1
author maintainer
#24 lore raw

PATCH 21/639 ixgbe: dont clear IPsec sa counters on HW clearing

In reply to Greg Kroah-Hartman

From: Shannon Nelson <[email protected]>

[ Upstream commit 9e3f2f5ecee69b0f70003fb3e07639151e91de73 ]

The software SA record counters should not be cleared when clearing the hardware tables. This causes the counters to be out of sync after a driver reset.

Fixes 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA")
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c +0 -4
index b27f7a968820d..49e6d66ccf802 100644
@@ -114,7 +114,6 @@ static void ixgbe_ipsec_set_rx_ip(struct ixgbe_hw *hw, u16 idx, __be32 addr[])
  **/
 static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
 {
-	struct ixgbe_ipsec *ipsec = adapter->ipsec;
 	struct ixgbe_hw *hw = &adapter->hw;
 	u32 buf[4] = {0, 0, 0, 0};
 	u16 idx;
@@ -133,9 +132,6 @@ static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
 		ixgbe_ipsec_set_tx_sa(hw, idx, buf, 0);
 		ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
 	}
-
-	ipsec->num_rx_sa = 0;
-	ipsec->num_tx_sa = 0;
 }
 
 /**
Signature · 1 line
2.20.1
author maintainer
#25 lore raw

PATCH 22/639 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ]

This doesn't affect runtime because in the current code "idx" is always valid.

First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array.

---
 drivers/gpu/drm/virtio/virtgpu_vq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +3 -2
index c8a581b1f4c40..608906f06cedd 100644
@@ -650,11 +650,11 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,
 {
 	struct virtio_gpu_get_capset *cmd_p;
 	struct virtio_gpu_vbuffer *vbuf;
-	int max_size = vgdev->capsets[idx].max_size;
+	int max_size;
 	struct virtio_gpu_drv_cap_cache *cache_ent;
 	void *resp_buf;
 
-	if (idx > vgdev->num_capsets)
+	if (idx >= vgdev->num_capsets)
 		return -EINVAL;
 
 	if (version > vgdev->capsets[idx].max_version)
@@ -664,6 +664,7 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,
 	if (!cache_ent)
 		return -ENOMEM;
 
+	max_size = vgdev->capsets[idx].max_size;
 	cache_ent->caps_cache = kmalloc(max_size, GFP_KERNEL);
 	if (!cache_ent->caps_cache) {
 		kfree(cache_ent);
Signature · 1 line
2.20.1
author maintainer
#26 lore raw

PATCH 23/639 iio: fix position relative kernel version

In reply to Greg Kroah-Hartman

From: Eugen Hristev <[email protected]>

[ Upstream commit 21eab7861688aa4c69fcb88440cc0c4a422bdcd6 ]

Position relative channel type was added in 4.19 kernel version

Fixes "3055a6cfa04ba" ("iio: Add channel for Position Relative")
---
 Documentation/ABI/testing/sysfs-bus-iio | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/ABI/testing/sysfs-bus-iio +1 -1
index a5b4f223641d9..8127a08e366d8 100644
@@ -199,7 +199,7 @@ Description:
 
 What:		/sys/bus/iio/devices/iio:deviceX/in_positionrelative_x_raw
 What:		/sys/bus/iio/devices/iio:deviceX/in_positionrelative_y_raw
-KernelVersion:	4.18
+KernelVersion:	4.19
 Contact:	[email protected]
 Description:
 		Relative position in direction x or y on a pad (may be
Signature · 1 line
2.20.1
author maintainer
#27 lore raw

PATCH 24/639 apparmor: Fix network performance issue in aa_label_sk_perm

In reply to Greg Kroah-Hartman

From: Tony Jones <[email protected]>

[ Upstream commit 5f997580e8b12b9f585e34cc16304925d26ce49e ]

The netperf benchmark shows a 5.73% reduction in throughput for small (64 byte) transfers by unconfined tasks.

DEFINE_AUDIT_SK() in aa_label_sk_perm() should not be performed unconditionally, rather only when the label is confined.

netperf-tcp

                            56974a6fc^              56974a6fc
Min       64         563.48 (   0.00%)      531.17 (  -5.73%)
Min       128       1056.92 (   0.00%)      999.44 (  -5.44%)
Min       256       1945.95 (   0.00%)     1867.97 (  -4.01%)
Min       1024      6761.40 (   0.00%)     6364.23 (  -5.87%)
Min       2048     11110.53 (   0.00%)    10606.20 (  -4.54%)
Min       3312     13692.67 (   0.00%)    13158.41 (  -3.90%)
Min       4096     14926.29 (   0.00%)    14457.46 (  -3.14%)
Min       8192     18399.34 (   0.00%)    18091.65 (  -1.67%)
Min       16384    21384.13 (   0.00%)    21158.05 (  -1.06%)
Hmean     64         564.96 (   0.00%)      534.38 (  -5.41%)
Hmean     128       1064.42 (   0.00%)     1010.12 (  -5.10%)
Hmean     256       1965.85 (   0.00%)     1879.16 (  -4.41%)
Hmean     1024      6839.77 (   0.00%)     6478.70 (  -5.28%)
Hmean     2048     11154.80 (   0.00%)    10671.13 (  -4.34%)
Hmean     3312     13838.12 (   0.00%)    13249.01 (  -4.26%)
Hmean     4096     15009.99 (   0.00%)    14561.36 (  -2.99%)
Hmean     8192     18975.57 (   0.00%)    18326.54 (  -3.42%)
Hmean     16384    21440.44 (   0.00%)    21324.59 (  -0.54%)
Stddev    64           1.24 (   0.00%)        2.85 (-130.64%)
Stddev    128          4.51 (   0.00%)        6.53 ( -44.84%)
Stddev    256         11.67 (   0.00%)        8.50 (  27.16%)
Stddev    1024        48.33 (   0.00%)       75.07 ( -55.34%)
Stddev    2048        54.82 (   0.00%)       65.16 ( -18.86%)
Stddev    3312       153.57 (   0.00%)       56.29 (  63.35%)
Stddev    4096       100.25 (   0.00%)       88.50 (  11.72%)
Stddev    8192       358.13 (   0.00%)      169.99 (  52.54%)
Stddev    16384       43.99 (   0.00%)      141.82 (-222.39%)
Fixes 56974a6fcfef ("apparmor: add base infastructure for socket

mediation")

---
 security/apparmor/net.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
security/apparmor/net.c +9 -6
index bb24cfa0a164c..d5d72dd1ca1f9 100644
@@ -146,17 +146,20 @@ int aa_af_perm(struct aa_label *label, const char *op, u32 request, u16 family,
 static int aa_label_sk_perm(struct aa_label *label, const char *op, u32 request,
 			    struct sock *sk)
 {
-	struct aa_profile *profile;
-	DEFINE_AUDIT_SK(sa, op, sk);
+	int error = 0;
 
 	AA_BUG(!label);
 	AA_BUG(!sk);
 
-	if (unconfined(label))
-		return 0;
+	if (!unconfined(label)) {
+		struct aa_profile *profile;
+		DEFINE_AUDIT_SK(sa, op, sk);
 
-	return fn_for_each_confined(label, profile,
-			aa_profile_af_sk_perm(profile, &sa, request, sk));
+		error = fn_for_each_confined(label, profile,
+			    aa_profile_af_sk_perm(profile, &sa, request, sk));
+	}
+
+	return error;
 }
 
 int aa_sk_perm(const char *op, u32 request, struct sock *sk)
Signature · 1 line
2.20.1
author maintainer
#28 lore raw

PATCH 25/639 ALSA: hda: fix unused variable warning

In reply to Greg Kroah-Hartman

From: Anders Roxell <[email protected]>

[ Upstream commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 ]

When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true.

sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:
sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]

  struct azx *chip = bus_to_azx(bus);
              ^~~~

Create a inline function of azx_snoop.

Fixes a41d122449be ("ALSA: hda - Embed bus into controller object")
---
 sound/pci/hda/hda_controller.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
sound/pci/hda/hda_controller.h +4 -5
index 8a9dd4767b1ec..63cc10604afc7 100644
@@ -176,11 +176,10 @@ struct azx {
 #define azx_bus(chip)	(&(chip)->bus.core)
 #define bus_to_azx(_bus)	container_of(_bus, struct azx, bus.core)
 
-#ifdef CONFIG_X86
-#define azx_snoop(chip)		((chip)->snoop)
-#else
-#define azx_snoop(chip)		true
-#endif
+static inline bool azx_snoop(struct azx *chip)
+{
+	return !IS_ENABLED(CONFIG_X86) || chip->snoop;
+}
 
 /*
  * macros for easy use
Signature · 1 line
2.20.1
author maintainer
#29 lore raw

PATCH 26/639 apparmor: dont try to replace stale label in ptrace access check

In reply to Greg Kroah-Hartman

From: Jann Horn <[email protected]>

[ Upstream commit 1f8266ff58840d698a1e96d2274189de1bdf7969 ]

As a comment above begin_current_label_crit_section() explains, begin_current_label_crit_section() must run in sleepable context because when label_is_stale() is true, aa_replace_current_label() runs, which uses prepare_creds(), which can sleep.
Until now, the ptrace access check (which runs with a task lock held) violated this rule.

Also add a might_sleep() assertion to begin_current_label_crit_section(), because asserts are less likely to be ignored than comments.

Fixes b2d09ae449ced ("apparmor: move ptrace checks to using labels")
---
 security/apparmor/include/cred.h | 2 ++
 security/apparmor/lsm.c          | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
security/apparmor/include/cred.h +2 -0
index e287b7d0d4beb..265ae6641a064 100644
@@ -151,6 +151,8 @@ static inline struct aa_label *begin_current_label_crit_section(void)
 {
 	struct aa_label *label = aa_current_raw_label();
 
+	might_sleep();
+
 	if (label_is_stale(label)) {
 		label = aa_get_newest_label(label);
 		if (aa_replace_current_label(label) == 0)
security/apparmor/lsm.c +2 -2
index 590ca7d8fae54..730de4638b4e2 100644
@@ -114,13 +114,13 @@ static int apparmor_ptrace_access_check(struct task_struct *child,
 	struct aa_label *tracer, *tracee;
 	int error;
 
-	tracer = begin_current_label_crit_section();
+	tracer = __begin_current_label_crit_section();
 	tracee = aa_get_task_label(child);
 	error = aa_may_ptrace(tracer, tracee,
 			(mode & PTRACE_MODE_READ) ? AA_PTRACE_READ
 						  : AA_PTRACE_TRACE);
 	aa_put_label(tracee);
-	end_current_label_crit_section(tracer);
+	__end_current_label_crit_section(tracer);
 
 	return error;
 }
Signature · 1 line
2.20.1
author maintainer
#30 lore raw

PATCH 27/639 ARM: qcom_defconfig: Enable MAILBOX

In reply to Greg Kroah-Hartman

From: Frank Rowand <[email protected]>

[ Upstream commit 54c2678cd198f61555796bbda5e1727e6e1858f1 ]

Problem:
ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" added a "depends on MAILBOX") to RPMSG_QCOM_SMD, thus RPMSG_QCOM_SMD becomes unset since MAILBOX was not enabled in qcom_defconfig and is not otherwise selected for the dragonboard. When the resulting kernel is booted the mmc device which contains the root file system is not available.

Fix:
add CONFIG_MAILBOX to qcom_defconfig

Fixes ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework"

added a "depends on MAILBOX")

---
 arch/arm/configs/qcom_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/qcom_defconfig +1 -0
index 6aa7046fb91ff..bd6440f234939 100644
@@ -207,6 +207,7 @@ CONFIG_MSM_MMCC_8974=y
 CONFIG_MSM_IOMMU=y
 CONFIG_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_QCOM=y
+CONFIG_MAILBOX=y
 CONFIG_REMOTEPROC=y
 CONFIG_QCOM_ADSP_PIL=y
 CONFIG_QCOM_Q6V5_PIL=y
Signature · 1 line
2.20.1
author maintainer
#31 lore raw

PATCH 28/639 firmware: coreboot: Let OF core populate platform device

In reply to Greg Kroah-Hartman

From: Stephen Boyd <[email protected]>

[ Upstream commit 09ed061a4f56d50758851ca3997510f27115f81b ]

Now that the /firmware/coreboot node in DT is populated by the core DT platform code with commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()") we should and can remove the platform device creation here. Otherwise, the of_platform_device_create() call will fail, the coreboot of driver won't be registered, and this driver will never bind. At the same time, we should move this driver to use MODULE_DEVICE_TABLE so that module auto-load works properly when the coreboot device is auto-populated and we should drop the of_node handling that was presumably placed here to hold a reference to the DT node created during module init that no longer happens.

Cc Wei-Ning Huang <[email protected]>
Cc Julius Werner <[email protected]>
Cc Samuel Holland <[email protected]>
Fixes 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()")
---
 drivers/firmware/google/coreboot_table-of.c | 28 +++------------------
 1 file changed, 3 insertions(+), 25 deletions(-)
drivers/firmware/google/coreboot_table-of.c +3 -25
index f15bf404c579b..9b90c0fa4a0b4 100644
@@ -19,7 +19,6 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of_address.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
 #include "coreboot_table.h"
@@ -30,7 +29,6 @@ static int coreboot_table_of_probe(struct platform_device *pdev)
 	void __iomem *ptr;
 
 	ptr = of_iomap(fw_dn, 0);
-	of_node_put(fw_dn);
 	if (!ptr)
 		return -ENOMEM;
 
@@ -44,8 +42,9 @@ static int coreboot_table_of_remove(struct platform_device *pdev)
 
 static const struct of_device_id coreboot_of_match[] = {
 	{ .compatible = "coreboot" },
-	{},
+	{}
 };
+MODULE_DEVICE_TABLE(of, coreboot_of_match);
 
 static struct platform_driver coreboot_table_of_driver = {
 	.probe = coreboot_table_of_probe,
@@ -55,28 +54,7 @@ static struct platform_driver coreboot_table_of_driver = {
 		.of_match_table = coreboot_of_match,
 	},
 };
-
-static int __init platform_coreboot_table_of_init(void)
-{
-	struct platform_device *pdev;
-	struct device_node *of_node;
-
-	/* Limit device creation to the presence of /firmware/coreboot node */
-	of_node = of_find_node_by_path("/firmware/coreboot");
-	if (!of_node)
-		return -ENODEV;
-
-	if (!of_match_node(coreboot_of_match, of_node))
-		return -ENODEV;
-
-	pdev = of_platform_device_create(of_node, "coreboot_table_of", NULL);
-	if (!pdev)
-		return -ENODEV;
-
-	return platform_driver_register(&coreboot_table_of_driver);
-}
-
-module_init(platform_coreboot_table_of_init);
+module_platform_driver(coreboot_table_of_driver);
 
 MODULE_AUTHOR("Google, Inc.");
 MODULE_LICENSE("GPL");
Signature · 1 line
2.20.1
author maintainer
#32 lore raw

PATCH 29/639 PCI: iproc: Remove PAXC slot check to allow VF support

In reply to Greg Kroah-Hartman

From: Jitendra Bhivare <[email protected]>

[ Upstream commit 4da6b4480766e5bc9c4d7bc14bf1d0939a1a5fa7 ]

Fix previous incorrect logic that limits PAXC slot number to zero only. In order for SRIOV/VF to work, we need to allow the slot number to be greater than zero.

Fixes 46560388c476c ("PCI: iproc: Allow multiple devices except on PAXC")
---
 drivers/pci/controller/pcie-iproc.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/pci/controller/pcie-iproc.c +0 -8
index 3160e9342a2fb..c20fd6bd68fd8 100644
@@ -630,14 +630,6 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct iproc_pcie *pcie,
 			return (pcie->base + offset);
 	}
 
-	/*
-	 * PAXC is connected to an internally emulated EP within the SoC.  It
-	 * allows only one device.
-	 */
-	if (pcie->ep_is_internal)
-		if (slot > 0)
-			return NULL;
-
 	return iproc_pcie_map_ep_cfg_reg(pcie, busno, slot, fn, where);
 }
 
Signature · 1 line
2.20.1
author maintainer
#33 lore raw

PATCH 30/639 bridge: br_arp_nd_proxy: set icmp6_router if neigh has NTF_ROUTER

In reply to Greg Kroah-Hartman

From: Roopa Prabhu <[email protected]>

[ Upstream commit 7aca011f88eb57be1b17b0216247f4e32ac54e29 ]

Fixes ed842faeb2bd ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports")
---
 net/bridge/br_arp_nd_proxy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_arp_nd_proxy.c +1 -1
index 2cf7716254be6..d42e3904b4987 100644
@@ -311,7 +311,7 @@ static void br_nd_send(struct net_bridge *br, struct net_bridge_port *p,
 	/* Neighbor Advertisement */
 	memset(na, 0, sizeof(*na) + na_olen);
 	na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT;
-	na->icmph.icmp6_router = 0; /* XXX: should be 1 ? */
+	na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0;
 	na->icmph.icmp6_override = 1;
 	na->icmph.icmp6_solicited = 1;
 	na->target = ns->target;
Signature · 1 line
2.20.1
author maintainer
#34 lore raw

PATCH 31/639 drm/hisilicon: hibmc: Dont overwrite fb helper surface depth

In reply to Greg Kroah-Hartman

From: John Garry <[email protected]>

[ Upstream commit 0ff9f49646353ce31312411e7e7bd2281492a40e ]

Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination.

This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to fail to probe.

Fix by not overwriting the surface depth.

Fixes d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c +0 -1
index 8bd29075ae4eb..edcca17615001 100644
@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 	DRM_DEBUG_DRIVER("surface width(%d), height(%d) and bpp(%d)\n",
 			 sizes->surface_width, sizes->surface_height,
 			 sizes->surface_bpp);
-	sizes->surface_depth = 32;
 
 	bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
 
Signature · 1 line
2.20.1
author maintainer
#35 lore raw

PATCH 32/639 signal/ia64: Use the generic force_sigsegv in setup_frame

In reply to Greg Kroah-Hartman

From: Eric W. Biederman <[email protected]>

[ Upstream commit 8b9c6b28312cc51a87055e292b11c5aa28f0c935 ]

The ia64 handling of failure to setup a signal frame has been trying to set overlapping fields in struct siginfo since 2.3.43. The si_pid and si_uid fields are stomped when the si_addr field is set. The si_code of SI_KERNEL indicates that si_pid and si_uid should be valid, and that si_addr does not exist.

Being at odds with the definition of SI_KERNEL and with nothing to indicate that this was a signal frame setup failure there is no way for userspace to know that si_addr was filled out instead.

In practice failure to setup a signal frame is rare, and si_pid and si_uid are always set to 0 when si_code is SI_KERNEL so I expect no one has looked closely enough before to see this weirdness. Further the only difference between force_sigsegv_info and the generic force_sigsegv other than the return code is that force_sigsegv_info stomps the si_uid and si_pid fields.

Remove the bug and simplify the code by using force_sigsegv in this case just like other architectures.

---
 arch/ia64/kernel/signal.c | 50 ++++++++++-----------------------------
 1 file changed, 12 insertions(+), 38 deletions(-)
arch/ia64/kernel/signal.c +12 -38
index d1234a5ba4c55..01fc133b2e4c8 100644
@@ -231,37 +231,6 @@ rbs_on_sig_stack (unsigned long bsp)
 	return (bsp - current->sas_ss_sp < current->sas_ss_size);
 }
 
-static long
-force_sigsegv_info (int sig, void __user *addr)
-{
-	unsigned long flags;
-	struct siginfo si;
-
-	clear_siginfo(&si);
-	if (sig = SIGSEGV) {
-		/*
-		 * Acquiring siglock around the sa_handler-update is almost
-		 * certainly overkill, but this isn't a
-		 * performance-critical path and I'd rather play it safe
-		 * here than having to debug a nasty race if and when
-		 * something changes in kernel/signal.c that would make it
-		 * no longer safe to modify sa_handler without holding the
-		 * lock.
-		 */
-		spin_lock_irqsave(&current->sighand->siglock, flags);
-		current->sighand->action[sig - 1].sa.sa_handler = SIG_DFL;
-		spin_unlock_irqrestore(&current->sighand->siglock, flags);
-	}
-	si.si_signo = SIGSEGV;
-	si.si_errno = 0;
-	si.si_code = SI_KERNEL;
-	si.si_pid = task_pid_vnr(current);
-	si.si_uid = from_kuid_munged(current_user_ns(), current_uid());
-	si.si_addr = addr;
-	force_sig_info(SIGSEGV, &si, current);
-	return 1;
-}
-
 static long
 setup_frame(struct ksignal *ksig, sigset_t *set, struct sigscratch *scr)
 {
@@ -295,15 +264,18 @@ setup_frame(struct ksignal *ksig, sigset_t *set, struct sigscratch *scr)
 			 * instead so we will die with SIGSEGV.
 			 */
 			check_sp = (new_sp - sizeof(*frame)) & -STACK_ALIGN;
-			if (!likely(on_sig_stack(check_sp)))
-				return force_sigsegv_info(ksig->sig, (void __user *)
-							  check_sp);
+			if (!likely(on_sig_stack(check_sp))) {
+				force_sigsegv(ksig->sig, current);
+				return 1;
+			}
 		}
 	}
 	frame = (void __user *) ((new_sp - sizeof(*frame)) & -STACK_ALIGN);
 
-	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
-		return force_sigsegv_info(ksig->sig, frame);
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) {
+		force_sigsegv(ksig->sig, current);
+		return 1;
+	}
 
 	err  = __put_user(ksig->sig, &frame->arg0);
 	err |= __put_user(&frame->info, &frame->arg1);
@@ -317,8 +289,10 @@ setup_frame(struct ksignal *ksig, sigset_t *set, struct sigscratch *scr)
 	err |= __save_altstack(&frame->sc.sc_stack, scr->pt.r12);
 	err |= setup_sigcontext(&frame->sc, set, scr);
 
-	if (unlikely(err))
-		return force_sigsegv_info(ksig->sig, frame);
+	if (unlikely(err)) {
+		force_sigsegv(ksig->sig, current);
+		return 1;
+	}
 
 	scr->pt.r12 = (unsigned long) frame - 16;	/* new stack pointer */
 	scr->pt.ar_fpsr = FPSR_DEFAULT;			/* reset fpsr for signal handler */
Signature · 1 line
2.20.1
author maintainer
#36 lore raw

PATCH 33/639 signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn

In reply to Greg Kroah-Hartman

From: Eric W. Biederman <[email protected]>

[ Upstream commit b92adb74adde62d9a9780ff2977d63dcb21aeaa6 ]

The ia64 handling of failure to return from a signal frame has been trying to set overlapping fields in struct siginfo since 2.3.43. The si_code corresponds to the fields that were stomped (not the field that is actually written), so I can not imagine a piece of userspace code making sense of the signal frame if it looks closely.

In practice failure to return from a signal frame is a rare event that almost never happens. Someone using an alternate signal stack to recover and looking in detail is even more rare. So I presume no one has ever noticed and reported this ia64 nonsense.

Sort this out by causing ia64 to use force_sig(SIGSEGV) like other architectures.

---
 arch/ia64/kernel/signal.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/ia64/kernel/signal.c +1 -9
index 01fc133b2e4c8..9a960829a01d9 100644
@@ -110,7 +110,6 @@ ia64_rt_sigreturn (struct sigscratch *scr)
 {
 	extern char ia64_strace_leave_kernel, ia64_leave_kernel;
 	struct sigcontext __user *sc;
-	struct siginfo si;
 	sigset_t set;
 	long retval;
 
@@ -153,14 +152,7 @@ ia64_rt_sigreturn (struct sigscratch *scr)
 	return retval;
 
   give_sigsegv:
-	clear_siginfo(&si);
-	si.si_signo = SIGSEGV;
-	si.si_errno = 0;
-	si.si_code = SI_KERNEL;
-	si.si_pid = task_pid_vnr(current);
-	si.si_uid = from_kuid_munged(current_user_ns(), current_uid());
-	si.si_addr = sc;
-	force_sig_info(SIGSEGV, &si, current);
+	force_sig(SIGSEGV, current);
 	return retval;
 }
 
Signature · 1 line
2.20.1
author maintainer
#37 lore raw

PATCH 34/639 ASoC: wm9712: fix unused variable warning

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 18380dcc52cc8965e5144ce33fdfad7e168679a5 ]

The 'ret' variable is now only used in an #ifdef, and causes a warning if it is declared outside of that block:

sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe':
sound/soc/codecs/wm9712.c:641:6: error: unused variable 'ret' [-Werror=unused-variable]

Fixes 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support")
---
 sound/soc/codecs/wm9712.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/wm9712.c +2 -1
index ade34c26ad2f3..e873baa9e7780 100644
@@ -638,13 +638,14 @@ static int wm9712_soc_probe(struct snd_soc_component *component)
 {
 	struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component);
 	struct regmap *regmap;
-	int ret;
 
 	if (wm9712->mfd_pdata) {
 		wm9712->ac97 = wm9712->mfd_pdata->ac97;
 		regmap = wm9712->mfd_pdata->regmap;
 	} else {
 #ifdef CONFIG_SND_SOC_AC97_BUS
+		int ret;
+
 		wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID,
 						      WM9712_VENDOR_ID_MASK);
 		if (IS_ERR(wm9712->ac97)) {
Signature · 1 line
2.20.1
author maintainer
#38 lore raw

PATCH 35/639 mailbox: mediatek: Add check for possible failure of kzalloc

In reply to Greg Kroah-Hartman

From: Houlong Wei <[email protected]>

[ Upstream commit 9f0a0a381c5db56e7922dbeea6831f27db58372f ]

The patch 623a6143a845("mailbox: mediatek: Add Mediatek CMDQ driver") introduce the following static checker warning:
drivers/mailbox/mtk-cmdq-mailbox.c:366 cmdq_mbox_send_data()
error: potential null dereference 'task'. (kzalloc returns null)

Fixes 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver")
---
 drivers/mailbox/mtk-cmdq-mailbox.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mailbox/mtk-cmdq-mailbox.c +3 -0
index aec46d5d35061..f7cc29c00302a 100644
@@ -363,6 +363,9 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 	WARN_ON(cmdq->suspended);
 
 	task = kzalloc(sizeof(*task), GFP_ATOMIC);
+	if (!task)
+		return -ENOMEM;
+
 	task->cmdq = cmdq;
 	INIT_LIST_HEAD(&task->list_entry);
 	task->pa_base = pkt->pa_base;
Signature · 1 line
2.20.1
author maintainer
#39 lore raw

PATCH 36/639 IB/rxe: replace kvfree with vfree

In reply to Greg Kroah-Hartman

From: Zhu Yanjun <[email protected]>

[ Upstream commit 721ad7e643f7002efa398838693f90284ea216d1 ]

The buf is allocated by vmalloc_user in the function rxe_queue_init. So it is better to free it by vfree.

Fixes 8700e3e7c485 ("Soft RoCE driver")
---
 drivers/infiniband/sw/rxe/rxe_cq.c | 4 ++--
 drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_cq.c +2 -2
index 2ee4b08b00ea4..a57276f2cb849 100644
@@ -30,7 +30,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-
+#include <linux/vmalloc.h>
 #include "rxe.h"
 #include "rxe_loc.h"
 #include "rxe_queue.h"
@@ -97,7 +97,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
 	err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, context,
 			   cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);
 	if (err) {
-		kvfree(cq->queue->buf);
+		vfree(cq->queue->buf);
 		kfree(cq->queue);
 		return err;
 	}
drivers/infiniband/sw/rxe/rxe_qp.c +3 -2
index c58452daffc74..230697fa31fe3 100644
@@ -34,6 +34,7 @@
 #include <linux/skbuff.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
+#include <linux/vmalloc.h>
 
 #include "rxe.h"
 #include "rxe_loc.h"
@@ -247,7 +248,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,
 			   &qp->sq.queue->ip);
 
 	if (err) {
-		kvfree(qp->sq.queue->buf);
+		vfree(qp->sq.queue->buf);
 		kfree(qp->sq.queue);
 		return err;
 	}
@@ -300,7 +301,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp,
 				   qp->rq.queue->buf, qp->rq.queue->buf_size,
 				   &qp->rq.queue->ip);
 		if (err) {
-			kvfree(qp->rq.queue->buf);
+			vfree(qp->rq.queue->buf);
 			kfree(qp->rq.queue);
 			return err;
 		}
Signature · 1 line
2.20.1
author maintainer
#40 lore raw

PATCH 37/639 IB/hfi1: Add mtu check for operational data VLs

In reply to Greg Kroah-Hartman

From: Alex Estrin <[email protected]>

[ Upstream commit eb50130964e8c1379f37c3d3bab33a411ec62e98 ]

Since Virtual Lanes BCT credits and MTU are set through separate MADs, we have to ensure both are valid, and data VLs are ready for transmission before we allow port transition to Armed state.

Fixes 5e2d6764a729 ("IB/hfi1: Verify port data VLs credits on transition to Armed")
---
 drivers/infiniband/hw/hfi1/chip.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)
drivers/infiniband/hw/hfi1/chip.c +22 -4
index 6b89353611333..b09a4b1cf397b 100644
@@ -10580,12 +10580,29 @@ void set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason,
 	}
 }
 
-/*
- * Verify if BCT for data VLs is non-zero.
+/**
+ * data_vls_operational() - Verify if data VL BCT credits and MTU
+ *			    are both set.
+ * @ppd: pointer to hfi1_pportdata structure
+ *
+ * Return: true - Ok, false -otherwise.
  */
 static inline bool data_vls_operational(struct hfi1_pportdata *ppd)
 {
-	return !!ppd->actual_vls_operational;
+	int i;
+	u64 reg;
+
+	if (!ppd->actual_vls_operational)
+		return false;
+
+	for (i = 0; i < ppd->vls_supported; i++) {
+		reg = read_csr(ppd->dd, SEND_CM_CREDIT_VL + (8 * i));
+		if ((reg && !ppd->dd->vld[i].mtu) ||
+		    (!reg && ppd->dd->vld[i].mtu))
+			return false;
+	}
+
+	return true;
 }
 
 /*
@@ -10698,7 +10715,8 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
 
 		if (!data_vls_operational(ppd)) {
 			dd_dev_err(dd,
-				   "%s: data VLs not operational\n", __func__);
+				   "%s: Invalid data VL credits or mtu\n",
+				   __func__);
 			ret = -EINVAL;
 			break;
 		}
Signature · 1 line
2.20.1
author maintainer
#41 lore raw

PATCH 38/639 genirq/debugfs: Reinstate full OF path for domain name

In reply to Greg Kroah-Hartman

From: Marc Zyngier <[email protected]>

[ Upstream commit 94967b55ebf3b603f2fe750ecedd896042585a1c ]

On a DT based system, we use the of_node full name to name the corresponding irq domain. We expect that name to be unique, so so that domains with the same base name won't clash (this happens on multi-node topologies, for example).

Since a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name"), of_node_full_name() lies and only returns the basename. This breaks the above requirement, and we end-up with only a subset of the domains in /sys/kernel/debug/irq/domains.

Let's reinstate the feature by using the fancy new %pOF format specifier, which happens to do the right thing.

Fixes a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name")
---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/irqdomain.c +1 -1
index 5d9fc01b60a61..0b90be3607249 100644
@@ -183,7 +183,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
 		 * unhappy about. Replace them with ':', which does
 		 * the trick and is not as offensive as '\'...
 		 */
-		name = kstrdup(of_node_full_name(of_node), GFP_KERNEL);
+		name = kasprintf(GFP_KERNEL, "%pOF", of_node);
 		if (!name) {
 			kfree(domain);
 			return NULL;
Signature · 1 line
2.20.1
author maintainer
#42 lore raw

PATCH 39/639 usb: dwc3: add EXTCON dependency for qcom

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 3def4031b3e3fbb524cbd01555b057a6cef0d5e6 ]

Like the omap back-end, we get a link error with CONFIG_EXTCON=m when building the qcom back-end into the kernel:

drivers/usb/dwc3/dwc3-qcom.o: In function `dwc3_qcom_probe':
dwc3-qcom.c:(.text+0x13dc): undefined reference to extcon_get_edev_by_phandle' dwc3-qcom.c:(.text+0x1b18): undefined reference to devm_extcon_register_notifier' dwc3-qcom.c:(.text+0x1b9c): undefined reference to `extcon_get_state'

Do the same thing as OMAP and add an explicit dependency on EXTCON.

Fixes a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver")
---
 drivers/usb/dwc3/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/Kconfig +1 -1
index 518ead12458d0..1a0404fda596b 100644
@@ -113,7 +113,7 @@ config USB_DWC3_ST
 
 config USB_DWC3_QCOM
 	tristate "Qualcomm Platform"
-	depends on ARCH_QCOM || COMPILE_TEST
+	depends on EXTCON && (ARCH_QCOM || COMPILE_TEST)
 	depends on OF
 	default USB_DWC3
 	help
Signature · 1 line
2.20.1
author maintainer
#43 lore raw

PATCH 40/639 usb: gadget: fsl_udc_core: check allocation return value and cleanup on failure

In reply to Greg Kroah-Hartman

From: Nicholas Mc Guire <[email protected]>

[ Upstream commit 4ab2b48c98f2ec9712452d520a381917f91ac3d2 ]

The allocation with fsl_alloc_request() and kmalloc() were unchecked fixed this up with a NULL check and appropriate cleanup.

Additionally udc->ep_qh_size was reset to 0 on failure of allocation. Similar udc->phy_mode is initially 0 (as udc_controller was allocated with kzalloc in fsl_udc_probe()) so reset it to 0 as well so that this function is side-effect free on failure. Not clear if this is necessary or sensible as fsl_udc_release() probably can not be called if fsl_udc_probe() failed - but it should not hurt.

Fixes b504882da5 ("USB: add Freescale high-speed USB SOC device controller driver")
---
 drivers/usb/gadget/udc/fsl_udc_core.c | 30 +++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)
drivers/usb/gadget/udc/fsl_udc_core.c +26 -4
index d44b26d5b2a2c..367697144cda2 100644
@@ -2247,8 +2247,10 @@ static int struct_udc_setup(struct fsl_udc *udc,
 	udc->phy_mode = pdata->phy_mode;
 
 	udc->eps = kcalloc(udc->max_ep, sizeof(struct fsl_ep), GFP_KERNEL);
-	if (!udc->eps)
-		return -1;
+	if (!udc->eps) {
+		ERR("kmalloc udc endpoint status failed\n");
+		goto eps_alloc_failed;
+	}
 
 	/* initialized QHs, take care of alignment */
 	size = udc->max_ep * sizeof(struct ep_queue_head);
@@ -2262,8 +2264,7 @@ static int struct_udc_setup(struct fsl_udc *udc,
 					&udc->ep_qh_dma, GFP_KERNEL);
 	if (!udc->ep_qh) {
 		ERR("malloc QHs for udc failed\n");
-		kfree(udc->eps);
-		return -1;
+		goto ep_queue_alloc_failed;
 	}
 
 	udc->ep_qh_size = size;
@@ -2272,8 +2273,17 @@ static int struct_udc_setup(struct fsl_udc *udc,
 	/* FIXME: fsl_alloc_request() ignores ep argument */
 	udc->status_req = container_of(fsl_alloc_request(NULL, GFP_KERNEL),
 			struct fsl_req, req);
+	if (!udc->status_req) {
+		ERR("kzalloc for udc status request failed\n");
+		goto udc_status_alloc_failed;
+	}
+
 	/* allocate a small amount of memory to get valid address */
 	udc->status_req->req.buf = kmalloc(8, GFP_KERNEL);
+	if (!udc->status_req->req.buf) {
+		ERR("kzalloc for udc request buffer failed\n");
+		goto udc_req_buf_alloc_failed;
+	}
 
 	udc->resume_state = USB_STATE_NOTATTACHED;
 	udc->usb_state = USB_STATE_POWERED;
@@ -2281,6 +2291,18 @@ static int struct_udc_setup(struct fsl_udc *udc,
 	udc->remote_wakeup = 0;	/* default to 0 on reset */
 
 	return 0;
+
+udc_req_buf_alloc_failed:
+	kfree(udc->status_req);
+udc_status_alloc_failed:
+	kfree(udc->ep_qh);
+	udc->ep_qh_size = 0;
+ep_queue_alloc_failed:
+	kfree(udc->eps);
+eps_alloc_failed:
+	udc->phy_mode = 0;
+	return -1;
+
 }
 
 /*----------------------------------------------------------------
Signature · 1 line
2.20.1
author maintainer
#44 lore raw

PATCH 41/639 cfg80211: regulatory: make initialization more robust

In reply to Greg Kroah-Hartman

From: Johannes Berg <[email protected]>

[ Upstream commit 71e5e886806ee3f8e0c44ed945eb2e4d6659c6e3 ]

Since my change to split out the regulatory init to occur later, any issues during earlier cfg80211_init() or errors during the platform device allocation would lead to crashes later. Make this more robust by checking that the earlier initialization succeeded.

Fixes d7be102f2945 ("cfg80211: initialize regulatory keys/database later")
---
 net/wireless/reg.c | 9 +++++++++
 1 file changed, 9 insertions(+)
net/wireless/reg.c +9 -0
index 64841238df855..5643bdee7198f 100644
@@ -3870,6 +3870,15 @@ static int __init regulatory_init_db(void)
 {
 	int err;
 
+	/*
+	 * It's possible that - due to other bugs/issues - cfg80211
+	 * never called regulatory_init() below, or that it failed;
+	 * in that case, don't try to do any further work here as
+	 * it's doomed to lead to crashes.
+	 */
+	if (IS_ERR_OR_NULL(reg_pdev))
+		return -EINVAL;
+
 	err = load_builtin_regdb_keys();
 	if (err)
 		return err;
Signature · 1 line
2.20.1
author maintainer
#45 lore raw

PATCH 42/639 regulator: fixed: Default enable high on DT regulators

In reply to Greg Kroah-Hartman

From: Linus Walleij <[email protected]>

[ Upstream commit 28be5f15df2ee6882b0a122693159c96a28203c7 ]

commit efdfeb079cc3
("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile.

This meant that we activate the code in
a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core.

As the fixed regulator was inspected again we got the inverted inversion and things broke.

Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle.

Fixes commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only")
---
 drivers/regulator/fixed.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/regulator/fixed.c +8 -3
index 988a7472c2ab5..d68ff65a5adc9 100644
@@ -84,9 +84,14 @@ of_get_fixed_voltage_config(struct device *dev,
 
 	of_property_read_u32(np, "startup-delay-us", &config->startup_delay);
 
-	config->enable_high = of_property_read_bool(np, "enable-active-high");
-	config->gpio_is_open_drain = of_property_read_bool(np,
-							   "gpio-open-drain");
+	/*
+	 * FIXME: we pulled active low/high and open drain handling into
+	 * gpiolib so it will be handled there. Delete this in the second
+	 * step when we also remove the custom inversion handling for all
+	 * legacy boardfiles.
+	 */
+	config->enable_high = 1;
+	config->gpio_is_open_drain = 0;
 
 	if (of_find_property(np, "vin-supply", NULL))
 		config->input_supply = "vin";
Signature · 1 line
2.20.1
author maintainer
#46 lore raw

PATCH 43/639 mei: replace POLL* with EPOLL* for write queues.

In reply to Greg Kroah-Hartman

From: Tomas Winkler <[email protected]>

[ Upstream commit 03b2cbb6ea3c73e08fcf72d9ef8e286c4dcbd1fe ]

Looks like during merging the bulk POLL* -> EPOLL* replacement missed the patch
'commit af336cabe083 ("mei: limit the number of queued writes")'

Fix sparse warning:
drivers/misc/mei/main.c:602:13: warning: restricted __poll_t degrades to integer drivers/misc/mei/main.c:605:30: warning: invalid assignment: |=
drivers/misc/mei/main.c:605:30: left side has type restricted __poll_t
drivers/misc/mei/main.c:605:30: right side has type int

Fixes af336cabe083 ("mei: limit the number of queued writes")
---
 drivers/misc/mei/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/mei/main.c +2 -2
index 4d77a6ae183a9..87281b3695e60 100644
@@ -599,10 +599,10 @@ static __poll_t mei_poll(struct file *file, poll_table *wait)
 			mei_cl_read_start(cl, mei_cl_mtu(cl), file);
 	}
 
-	if (req_events & (POLLOUT | POLLWRNORM)) {
+	if (req_events & (EPOLLOUT | EPOLLWRNORM)) {
 		poll_wait(file, &cl->tx_wait, wait);
 		if (cl->tx_cb_queued < dev->tx_queue_limit)
-			mask |= POLLOUT | POLLWRNORM;
+			mask |= EPOLLOUT | EPOLLWRNORM;
 	}
 
 out:
Signature · 1 line
2.20.1
author maintainer
#47 lore raw

PATCH 44/639 drm/msm: fix unsigned comparison with less than zero

In reply to Greg Kroah-Hartman

From: Colin Ian King <[email protected]>

[ Upstream commit dfdb3be43ef1195c491e6c3760b922acb52e3575 ]

The return from the call to _mixer_stages can be a negative error code however this is being assigned to an unsigned variable 'stages' hence the check is always false. Fix this by making 'stages' an int.

Detected by Coccinelle ("Unsigned expression compared with zero:
stages < 0")

Fixes 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +1 -1
index 06be7cf7ce505..79bafea663542 100644
@@ -310,7 +310,7 @@ static void dpu_hw_ctl_setup_blendstage(struct dpu_hw_ctl *ctx,
 	u32 mixercfg = 0, mixercfg_ext = 0, mix, ext;
 	u32 mixercfg_ext2 = 0, mixercfg_ext3 = 0;
 	int i, j;
-	u8 stages;
+	int stages;
 	int pipes_per_stage;
 
 	stages = _mixer_stages(ctx->mixer_hw_caps, ctx->mixer_count, lm);
Signature · 1 line
2.20.1
author maintainer
#48 lore raw

PATCH 45/639 of: Fix property name in of_node_get_device_type

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 5d5a0ab1a7918fce5ca5c0fb1871a3e2000f85de ]

Commit 0413bedabc88 ("of: Add device_type access helper functions") added a new helper not yet used in preparation for some treewide clean up of accesses to 'device_type' properties. Unfortunately, there's an error and 'type' was used for the property name. Fix this.

Fixes 0413bedabc88 ("of: Add device_type access helper functions")
Cc Frank Rowand <[email protected]>
---
 include/linux/of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/of.h +1 -1
index d5a863c1ee390..dac0201eacef7 100644
@@ -1001,7 +1001,7 @@ static inline struct device_node *of_find_matching_node(
 
 static inline const char *of_node_get_device_type(const struct device_node *np)
 {
-	return of_get_property(np, "type", NULL);
+	return of_get_property(np, "device_type", NULL);
 }
 
 static inline bool of_node_is_type(const struct device_node *np, const char *type)
Signature · 1 line
2.20.1
author maintainer
#49 lore raw

PATCH 46/639 ALSA: usb-audio: update quirk for B&W PX to remove microphone

In reply to Greg Kroah-Hartman

From: Nicolas Huaman <[email protected]>

[ Upstream commit c369c8db15d51fa175d2ba85928f79d16af6b562 ]

A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX:
commit 240a8af929c7c57dcde28682725b29cf8474e8e5
https://lore.kernel.org/patchwork/patch/919689/

However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg:

snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2)

This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel
and successfully applied an tested on my machine (4.18.10.arch1-1).

Fixes 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones")
---
 sound/usb/quirks-table.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
sound/usb/quirks-table.h +2 -7
index 65f9c4ba62ee1..90d4f61cc2308 100644
@@ -3349,19 +3349,14 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 				.ifnum = 0,
 				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
-			/* Capture */
-			{
-				.ifnum = 1,
-				.type = QUIRK_IGNORE_INTERFACE,
-			},
 			/* Playback */
 			{
-				.ifnum = 2,
+				.ifnum = 1,
 				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 				.data = &(const struct audioformat) {
 					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 					.channels = 2,
-					.iface = 2,
+					.iface = 1,
 					.altsetting = 1,
 					.altset_idx = 1,
 					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
Signature · 1 line
2.20.1
author maintainer
#50 lore raw

PATCH 47/639 iwlwifi: nvm: get num of hw addresses from firmware

In reply to Greg Kroah-Hartman

From: Naftali Goldstein <[email protected]>

[ Upstream commit e7eeee08434873c2f781dc1afaa42b03a014b95d ]

With NICs that don't read the NVM directly and instead rely on getting the relevant data from the firmware, the number of reserved MAC addresses was not added to the API. This caused the driver to assume there is only one address which results in all interfaces getting the same address. Update the API to fix this.

While at it, fix-up the comments with firmware api names to actually match what we have in the firmware.

Fixes e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware")
---
 .../net/wireless/intel/iwlwifi/fw/api/nvm-reg.h    | 14 +++++++-------
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 10 +++++++++-
 2 files changed, 16 insertions(+), 8 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +7 -7
index 6c53383647942..d22c1eefba6a2 100644
@@ -165,7 +165,7 @@ struct iwl_nvm_access_resp {
  */
 struct iwl_nvm_get_info {
 	__le32 reserved;
-} __packed; /* GRP_REGULATORY_NVM_GET_INFO_CMD_S_VER_1 */
+} __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */
 
 /**
  * enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp
@@ -180,14 +180,14 @@ enum iwl_nvm_info_general_flags {
  * @flags: bit 0: 1 - empty, 0 - non-empty
  * @nvm_version: nvm version
  * @board_type: board type
- * @reserved: reserved
+ * @n_hw_addrs: number of reserved MAC addresses
  */
 struct iwl_nvm_get_info_general {
 	__le32 flags;
 	__le16 nvm_version;
 	u8 board_type;
-	u8 reserved;
-} __packed; /* GRP_REGULATORY_NVM_GET_INFO_GENERAL_S_VER_1 */
+	u8 n_hw_addrs;
+} __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */
 
 /**
  * enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku
@@ -231,7 +231,7 @@ struct iwl_nvm_get_info_sku {
 struct iwl_nvm_get_info_phy {
 	__le32 tx_chains;
 	__le32 rx_chains;
-} __packed; /* GRP_REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */
+} __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */
 
 #define IWL_NUM_CHANNELS (51)
 
@@ -245,7 +245,7 @@ struct iwl_nvm_get_info_regulatory {
 	__le32 lar_enabled;
 	__le16 channel_profile[IWL_NUM_CHANNELS];
 	__le16 reserved;
-} __packed; /* GRP_REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */
+} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */
 
 /**
  * struct iwl_nvm_get_info_rsp - response to get NVM data
@@ -259,7 +259,7 @@ struct iwl_nvm_get_info_rsp {
 	struct iwl_nvm_get_info_sku mac_sku;
 	struct iwl_nvm_get_info_phy phy_sku;
 	struct iwl_nvm_get_info_regulatory regulatory;
-} __packed; /* GRP_REGULATORY_NVM_GET_INFO_CMD_RSP_S_VER_2 */
+} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */
 
 /**
  * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +9 -1
index 73969dbeb5c5f..b850cca9853c8 100644
@@ -1315,6 +1315,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
 	bool lar_fw_supported = !iwlwifi_mod_params.lar_disable &&
 				fw_has_capa(&fw->ucode_capa,
 					    IWL_UCODE_TLV_CAPA_LAR_SUPPORT);
+	bool empty_otp;
 	u32 mac_flags;
 	u32 sbands_flags = 0;
 
@@ -1330,7 +1331,9 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
 	}
 
 	rsp = (void *)hcmd.resp_pkt->data;
-	if (le32_to_cpu(rsp->general.flags) & NVM_GENERAL_FLAGS_EMPTY_OTP)
+	empty_otp = !!(le32_to_cpu(rsp->general.flags) &
+		       NVM_GENERAL_FLAGS_EMPTY_OTP);
+	if (empty_otp)
 		IWL_INFO(trans, "OTP is empty\n");
 
 	nvm = kzalloc(sizeof(*nvm) +
@@ -1354,6 +1357,11 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
 
 	/* Initialize general data */
 	nvm->nvm_version = le16_to_cpu(rsp->general.nvm_version);
+	nvm->n_hw_addrs = rsp->general.n_hw_addrs;
+	if (nvm->n_hw_addrs == 0)
+		IWL_WARN(trans,
+			 "Firmware declares no reserved mac addresses. OTP is empty: %d\n",
+			 empty_otp);
 
 	/* Initialize MAC sku data */
 	mac_flags = le32_to_cpu(rsp->mac_sku.mac_sku_flags);
Signature · 1 line
2.20.1
author maintainer
#51 lore raw

PATCH 48/639 staging: comedi: ni_mio_common: protect register write overflow

In reply to Greg Kroah-Hartman

From: Spencer E. Olson <[email protected]>

[ Upstream commit 1cbca5852d6c16e85a21487a15d211195aacd4a1 ]

Fixes two problems introduced as early as
commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines.

This patch also cleans up the ni_get_rtsi_routing command for readability.

Fixes 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code")
---
 .../staging/comedi/drivers/ni_mio_common.c    | 24 +++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +17 -7
index d799b1b55de39..747518c295427 100644
@@ -4984,7 +4984,10 @@ static int ni_valid_rtsi_output_source(struct comedi_device *dev,
 	case NI_RTSI_OUTPUT_G_SRC0:
 	case NI_RTSI_OUTPUT_G_GATE0:
 	case NI_RTSI_OUTPUT_RGOUT0:
-	case NI_RTSI_OUTPUT_RTSI_BRD_0:
+	case NI_RTSI_OUTPUT_RTSI_BRD(0):
+	case NI_RTSI_OUTPUT_RTSI_BRD(1):
+	case NI_RTSI_OUTPUT_RTSI_BRD(2):
+	case NI_RTSI_OUTPUT_RTSI_BRD(3):
 		return 1;
 	case NI_RTSI_OUTPUT_RTSI_OSC:
 		return (devpriv->is_m_series) ? 1 : 0;
@@ -5005,11 +5008,18 @@ static int ni_set_rtsi_routing(struct comedi_device *dev,
 		devpriv->rtsi_trig_a_output_reg |= NISTC_RTSI_TRIG(chan, src);
 		ni_stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
 			      NISTC_RTSI_TRIGA_OUT_REG);
-	} else if (chan < 8) {
+	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
 		devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK(chan);
 		devpriv->rtsi_trig_b_output_reg |= NISTC_RTSI_TRIG(chan, src);
 		ni_stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
 			      NISTC_RTSI_TRIGB_OUT_REG);
+	} else if (chan != NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
+		/* probably should never reach this, since the
+		 * ni_valid_rtsi_output_source above errors out if chan is too
+		 * high
+		 */
+		dev_err(dev->class_dev, "%s: unknown rtsi channel\n", __func__);
+		return -EINVAL;
 	}
 	return 2;
 }
@@ -5025,12 +5035,12 @@ static unsigned int ni_get_rtsi_routing(struct comedi_device *dev,
 	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
 		return NISTC_RTSI_TRIG_TO_SRC(chan,
 					      devpriv->rtsi_trig_b_output_reg);
-	} else {
-		if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN)
-			return NI_RTSI_OUTPUT_RTSI_OSC;
-		dev_err(dev->class_dev, "bug! should never get here?\n");
-		return 0;
+	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
+		return NI_RTSI_OUTPUT_RTSI_OSC;
 	}
+
+	dev_err(dev->class_dev, "%s: unknown rtsi channel\n", __func__);
+	return -EINVAL;
 }
 
 static int ni_rtsi_insn_config(struct comedi_device *dev,
Signature · 1 line
2.20.1
author maintainer
#52 lore raw

PATCH 49/639 netfilter: nft_osf: usage from output path is not valid

In reply to Greg Kroah-Hartman

From: Fernando Fernandez Mancera <[email protected]>

[ Upstream commit 4a3e71b7b7dbaf3562be9d508260935aa13cb48b ]

The nft_osf extension, like xt_osf, is not supported from the output path.

Fixes b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf")
---
 net/netfilter/nft_osf.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
net/netfilter/nft_osf.c +10 -0
index a35fb59ace732..df4e3e0412ed3 100644
@@ -69,6 +69,15 @@ nla_put_failure:
 	return -1;
 }
 
+static int nft_osf_validate(const struct nft_ctx *ctx,
+			    const struct nft_expr *expr,
+			    const struct nft_data **data)
+{
+	return nft_chain_validate_hooks(ctx->chain, (1 << NF_INET_LOCAL_IN) |
+						    (1 << NF_INET_PRE_ROUTING) |
+						    (1 << NF_INET_FORWARD));
+}
+
 static struct nft_expr_type nft_osf_type;
 static const struct nft_expr_ops nft_osf_op = {
 	.eval		= nft_osf_eval,
@@ -76,6 +85,7 @@ static const struct nft_expr_ops nft_osf_op = {
 	.init		= nft_osf_init,
 	.dump		= nft_osf_dump,
 	.type		= &nft_osf_type,
+	.validate	= nft_osf_validate,
 };
 
 static struct nft_expr_type nft_osf_type __read_mostly = {
Signature · 1 line
2.20.1
author maintainer
#53 lore raw

PATCH 50/639 pwm: lpss: Release runtime-pm reference from the drivers remove callback

In reply to Greg Kroah-Hartman

From: Hans de Goede <[email protected]>

[ Upstream commit 42885551cedb45961879d2fc3dc3c4dc545cc23e ]

For each pwm output which gets enabled through pwm_lpss_apply(), we do a pm_runtime_get_sync().

This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance these when the driver gets removed with some of the outputs still enabled.

Fixes f080be27d7d9 ("pwm: lpss: Add support for runtime PM")
---
 drivers/pwm/pwm-lpss.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/pwm/pwm-lpss.c +6 -0
index 1e69c1c9ec096..7a4a6406cf69a 100644
@@ -216,6 +216,12 @@ EXPORT_SYMBOL_GPL(pwm_lpss_probe);
 
 int pwm_lpss_remove(struct pwm_lpss_chip *lpwm)
 {
+	int i;
+
+	for (i = 0; i < lpwm->info->npwm; i++) {
+		if (pwm_is_enabled(&lpwm->chip.pwms[i]))
+			pm_runtime_put(lpwm->chip.dev);
+	}
 	return pwmchip_remove(&lpwm->chip);
 }
 EXPORT_SYMBOL_GPL(pwm_lpss_remove);
Signature · 1 line
2.20.1
author maintainer
#54 lore raw

PATCH 51/639 powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit b45e9d761ba2d60044b610297e3ef9f947ac157f ]

The variable 'aa_index' is defined as an unsigned value in update_lmb_associativity_index(), but find_aa_index() may return -1 when dlpar_clone_property() fails. So change find_aa_index() to return a bool, which indicates whether 'aa_index' was found or not.

Fixes c05a5a40969e ("powerpc/pseries: Dynamic add entires to associativity lookup array")
[mpe: Tweak changelog, rename is_found to just found]
---
 .../platforms/pseries/hotplug-memory.c        | 61 +++++++++----------
 1 file changed, 28 insertions(+), 33 deletions(-)
arch/powerpc/platforms/pseries/hotplug-memory.c +28 -33
index 7f86bc3eaadec..62d3c72cd9316 100644
@@ -101,11 +101,12 @@ static struct property *dlpar_clone_property(struct property *prop,
 	return new_prop;
 }
 
-static u32 find_aa_index(struct device_node *dr_node,
-			 struct property *ala_prop, const u32 *lmb_assoc)
+static bool find_aa_index(struct device_node *dr_node,
+			 struct property *ala_prop,
+			 const u32 *lmb_assoc, u32 *aa_index)
 {
-	u32 *assoc_arrays;
-	u32 aa_index;
+	u32 *assoc_arrays, new_prop_size;
+	struct property *new_prop;
 	int aa_arrays, aa_array_entries, aa_array_sz;
 	int i, index;
 
@@ -121,46 +122,39 @@ static u32 find_aa_index(struct device_node *dr_node,
 	aa_array_entries = be32_to_cpu(assoc_arrays[1]);
 	aa_array_sz = aa_array_entries * sizeof(u32);
 
-	aa_index = -1;
 	for (i = 0; i < aa_arrays; i++) {
 		index = (i * aa_array_entries) + 2;
 
 		if (memcmp(&assoc_arrays[index], &lmb_assoc[1], aa_array_sz))
 			continue;
 
-		aa_index = i;
-		break;
+		*aa_index = i;
+		return true;
 	}
 
-	if (aa_index == -1) {
-		struct property *new_prop;
-		u32 new_prop_size;
-
-		new_prop_size = ala_prop->length + aa_array_sz;
-		new_prop = dlpar_clone_property(ala_prop, new_prop_size);
-		if (!new_prop)
-			return -1;
-
-		assoc_arrays = new_prop->value;
+	new_prop_size = ala_prop->length + aa_array_sz;
+	new_prop = dlpar_clone_property(ala_prop, new_prop_size);
+	if (!new_prop)
+		return false;
 
-		/* increment the number of entries in the lookup array */
-		assoc_arrays[0] = cpu_to_be32(aa_arrays + 1);
+	assoc_arrays = new_prop->value;
 
-		/* copy the new associativity into the lookup array */
-		index = aa_arrays * aa_array_entries + 2;
-		memcpy(&assoc_arrays[index], &lmb_assoc[1], aa_array_sz);
+	/* increment the number of entries in the lookup array */
+	assoc_arrays[0] = cpu_to_be32(aa_arrays + 1);
 
-		of_update_property(dr_node, new_prop);
+	/* copy the new associativity into the lookup array */
+	index = aa_arrays * aa_array_entries + 2;
+	memcpy(&assoc_arrays[index], &lmb_assoc[1], aa_array_sz);
 
-		/*
-		 * The associativity lookup array index for this lmb is
-		 * number of entries - 1 since we added its associativity
-		 * to the end of the lookup array.
-		 */
-		aa_index = be32_to_cpu(assoc_arrays[0]) - 1;
-	}
+	of_update_property(dr_node, new_prop);
 
-	return aa_index;
+	/*
+	 * The associativity lookup array index for this lmb is
+	 * number of entries - 1 since we added its associativity
+	 * to the end of the lookup array.
+	 */
+	*aa_index = be32_to_cpu(assoc_arrays[0]) - 1;
+	return true;
 }
 
 static int update_lmb_associativity_index(struct drmem_lmb *lmb)
@@ -169,6 +163,7 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
 	struct property *ala_prop;
 	const u32 *lmb_assoc;
 	u32 aa_index;
+	bool found;
 
 	parent = of_find_node_by_path("/");
 	if (!parent)
@@ -200,12 +195,12 @@ static int update_lmb_associativity_index(struct drmem_lmb *lmb)
 		return -ENODEV;
 	}
 
-	aa_index = find_aa_index(dr_node, ala_prop, lmb_assoc);
+	found = find_aa_index(dr_node, ala_prop, lmb_assoc, &aa_index);
 
 	of_node_put(dr_node);
 	dlpar_free_cc_nodes(lmb_node);
 
-	if (aa_index < 0) {
+	if (!found) {
 		pr_err("Could not find LMB associativity\n");
 		return -1;
 	}
Signature · 1 line
2.20.1
author maintainer
#55 lore raw

PATCH 52/639 rtlwifi: rtl8821ae: replace _rtl8821ae_mrate_idx_to_arfr_id with generic version

In reply to Greg Kroah-Hartman

From: Colin Ian King <[email protected]>

[ Upstream commit c894696188d5c2af1e636e458190e80c53fb893d ]

Function _rtl8821ae_mrate_idx_to_arfr_id is functionally identical to the generic version rtl_mrate_idx_to_arfr_id, so remove _rtl8821ae_mrate_idx_to_arfr_id and use the generic one instead.

This also fixes a missing break statement found by CoverityScan in _rtl8821ae_mrate_idx_to_arfr_id, namely: CID#1167237 ("Missing break in switch")

Thanks to Joe Perches for spotting this when I submitted an earlier patch.

Fixes 3c05bedb5fef ("Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver")
---
 .../wireless/realtek/rtlwifi/rtl8821ae/hw.c   | 71 +------------------
 1 file changed, 1 insertion(+), 70 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +1 -70
index 317c1b3101dad..ba258318ee9f3 100644
@@ -3404,75 +3404,6 @@ static void rtl8821ae_update_hal_rate_table(struct ieee80211_hw *hw,
 		 "%x\n", rtl_read_dword(rtlpriv, REG_ARFR0));
 }
 
-static u8 _rtl8821ae_mrate_idx_to_arfr_id(
-	struct ieee80211_hw *hw, u8 rate_index,
-	enum wireless_mode wirelessmode)
-{
-	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_phy *rtlphy = &rtlpriv->phy;
-	u8 ret = 0;
-	switch (rate_index) {
-	case RATR_INX_WIRELESS_NGB:
-		if (rtlphy->rf_type == RF_1T1R)
-			ret = 1;
-		else
-			ret = 0;
-		; break;
-	case RATR_INX_WIRELESS_N:
-	case RATR_INX_WIRELESS_NG:
-		if (rtlphy->rf_type == RF_1T1R)
-			ret = 5;
-		else
-			ret = 4;
-		; break;
-	case RATR_INX_WIRELESS_NB:
-		if (rtlphy->rf_type == RF_1T1R)
-			ret = 3;
-		else
-			ret = 2;
-		; break;
-	case RATR_INX_WIRELESS_GB:
-		ret = 6;
-		break;
-	case RATR_INX_WIRELESS_G:
-		ret = 7;
-		break;
-	case RATR_INX_WIRELESS_B:
-		ret = 8;
-		break;
-	case RATR_INX_WIRELESS_MC:
-		if ((wirelessmode == WIRELESS_MODE_B)
-			|| (wirelessmode == WIRELESS_MODE_G)
-			|| (wirelessmode == WIRELESS_MODE_N_24G)
-			|| (wirelessmode == WIRELESS_MODE_AC_24G))
-			ret = 6;
-		else
-			ret = 7;
-	case RATR_INX_WIRELESS_AC_5N:
-		if (rtlphy->rf_type == RF_1T1R)
-			ret = 10;
-		else
-			ret = 9;
-		break;
-	case RATR_INX_WIRELESS_AC_24N:
-		if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) {
-			if (rtlphy->rf_type == RF_1T1R)
-				ret = 10;
-			else
-				ret = 9;
-		} else {
-			if (rtlphy->rf_type == RF_1T1R)
-				ret = 11;
-			else
-				ret = 12;
-		}
-		break;
-	default:
-		ret = 0; break;
-	}
-	return ret;
-}
-
 static u32 _rtl8821ae_rate_to_bitmap_2ssvht(__le16 vht_rate)
 {
 	u8 i, j, tmp_rate;
@@ -3761,7 +3692,7 @@ static void rtl8821ae_update_hal_rate_mask(struct ieee80211_hw *hw,
 		break;
 	}
 
-	ratr_index = _rtl8821ae_mrate_idx_to_arfr_id(hw, ratr_index, wirelessmode);
+	ratr_index = rtl_mrate_idx_to_arfr_id(hw, ratr_index, wirelessmode);
 	sta_entry->ratr_index = ratr_index;
 	ratr_bitmap = _rtl8821ae_set_ra_vht_ratr_bitmap(hw, wirelessmode,
 							ratr_bitmap);
Signature · 1 line
2.20.1
author maintainer
#56 lore raw

PATCH 53/639 RDMA/bnxt_re: Add missing spin lock initialization

In reply to Greg Kroah-Hartman

From: Selvin Xavier <[email protected]>

[ Upstream commit 5a23e0b1dd51fe0efae666b03fdb15e1301f437a ]

Add the missing initalization of the cq_lock and qplib.flush_lock.

Fixes 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing")
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 +
 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 +
 2 files changed, 2 insertions(+)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -0
index a69632f1fab0b..c9af2d139f5cb 100644
@@ -2664,6 +2664,7 @@ struct ib_cq *bnxt_re_create_cq(struct ib_device *ibdev,
 	nq->budget++;
 
 	atomic_inc(&rdev->cq_count);
+	spin_lock_init(&cq->cq_lock);
 
 	if (context) {
 		struct bnxt_re_cq_resp resp;
drivers/infiniband/hw/bnxt_re/qplib_fp.c +1 -0
index c15335dc8f614..60f2fb7e7dbfe 100644
@@ -1970,6 +1970,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
 	INIT_LIST_HEAD(&cq->sqf_head);
 	INIT_LIST_HEAD(&cq->rqf_head);
 	spin_lock_init(&cq->compl_lock);
+	spin_lock_init(&cq->flush_lock);
 
 	bnxt_qplib_arm_cq_enable(cq);
 	return 0;
Signature · 1 line
2.20.1
author maintainer
#57 lore raw

PATCH 54/639 netfilter: nf_flow_table: do not remove offload when other netnss interface is down

In reply to Greg Kroah-Hartman

From: Taehee Yoo <[email protected]>

[ Upstream commit a3fb3698cadf27dc142b24394c401625e14d80d0 ]

When interface is down, offload cleanup function(nf_flow_table_do_cleanup) is called and that checks whether interface index of offload and index of link down interface is same. but only interface index checking is not enough because flowtable is not pernet list.
So that, if other netns's interface that has index is same with offload is down, that offload will be removed.
This patch adds netns checking code to the offload cleanup routine.

Fixes 59c466dd68e7 ("netfilter: nf_flow_table: add a new flow state for tearing down offloading")
---
 net/netfilter/nf_flow_table_core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
net/netfilter/nf_flow_table_core.c +6 -3
index 70bd730ca0597..890799c16aa41 100644
@@ -491,14 +491,17 @@ EXPORT_SYMBOL_GPL(nf_flow_table_init);
 static void nf_flow_table_do_cleanup(struct flow_offload *flow, void *data)
 {
 	struct net_device *dev = data;
+	struct flow_offload_entry *e;
+
+	e = container_of(flow, struct flow_offload_entry, flow);
 
 	if (!dev) {
 		flow_offload_teardown(flow);
 		return;
 	}
-
-	if (flow->tuplehash[0].tuple.iifidx == dev->ifindex ||
-	    flow->tuplehash[1].tuple.iifidx == dev->ifindex)
+	if (net_eq(nf_ct_net(e->ct), dev_net(dev)) &&
+	    (flow->tuplehash[0].tuple.iifidx == dev->ifindex ||
+	     flow->tuplehash[1].tuple.iifidx == dev->ifindex))
 		flow_offload_dead(flow);
 }
 
Signature · 1 line
2.20.1
author maintainer
#58 lore raw

PATCH 55/639 powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()

In reply to Greg Kroah-Hartman

From: Christophe Leroy <[email protected]>

[ Upstream commit fb978ca207743badfe7efd9eebe68bcbb4969f79 ]

Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected:

[   13.251285] KGDB: BP remove failed: c001c338
[   13.259587] kgdbts: ERROR PUT: end of test buffer on 'do_fork_test' line 8 expected OK got $E14#aa
[   13.268969] KGDB: re-enter exception: ALL breakpoints killed
[   13.275099] CPU: 0 PID: 1 Comm: init Not tainted 4.18.0-g82bbb913ffd8 #860
[   13.282836] Call Trace:
[   13.285313] [c60e1ba0] [c0080ef0] kgdb_handle_exception+0x6f4/0x720 (unreliable)
[   13.292618] [c60e1c30] [c000e97c] kgdb_handle_breakpoint+0x3c/0x98
[   13.298709] [c60e1c40] [c000af54] program_check_exception+0x104/0x700
[   13.305083] [c60e1c60] [c000e45c] ret_from_except_full+0x0/0x4
[   13.310845] [c60e1d20] [c02a22ac] run_simple_test+0x2b4/0x2d4
[   13.316532] [c60e1d30] [c0081698] put_packet+0xb8/0x158
[   13.321694] [c60e1d60] [c00820b4] gdb_serial_stub+0x230/0xc4c
[   13.327374] [c60e1dc0] [c0080af8] kgdb_handle_exception+0x2fc/0x720
[   13.333573] [c60e1e50] [c000e928] kgdb_singlestep+0xb4/0xcc
[   13.339068] [c60e1e70] [c000ae1c] single_step_exception+0x90/0xac
[   13.345100] [c60e1e80] [c000e45c] ret_from_except_full+0x0/0x4
[   13.350865] [c60e1f40] [c000e11c] ret_from_syscall+0x0/0x38
[   13.356346] Kernel panic - not syncing: Recursive entry to debugger

This patch creates powerpc specific version of kgdb_arch_set_breakpoint() and kgdb_arch_remove_breakpoint() using patch_instruction()

Fixes 1e0fc9d1eb2b ("powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs")
---
 arch/powerpc/include/asm/kgdb.h |  5 +++-
 arch/powerpc/kernel/kgdb.c      | 43 +++++++++++++++++++++++++++------
 2 files changed, 39 insertions(+), 9 deletions(-)
arch/powerpc/include/asm/kgdb.h +4 -1
index 9db24e77b9f4b..a9e098a3b881f 100644
@@ -26,9 +26,12 @@
 #define BREAK_INSTR_SIZE	4
 #define BUFMAX			((NUMREGBYTES * 2) + 512)
 #define OUTBUFMAX		((NUMREGBYTES * 2) + 512)
+
+#define BREAK_INSTR		0x7d821008	/* twge r2, r2 */
+
 static inline void arch_kgdb_breakpoint(void)
 {
-	asm(".long 0x7d821008"); /* twge r2, r2 */
+	asm(stringify_in_c(.long BREAK_INSTR));
 }
 #define CACHE_FLUSH_IS_SAFE	1
 #define DBG_MAX_REG_NUM     70
arch/powerpc/kernel/kgdb.c +35 -8

64 lines not on this page · raw message

Signature · 1 line
2.20.1
author maintainer
#59 lore raw

PATCH 56/639 tipc: eliminate message disordering during binding table update

In reply to Greg Kroah-Hartman

From: Jon Maloy <[email protected]>

[ Upstream commit 988f3f1603d4650409db5334355cbf7b13ef50c3 ]

We have seen the following race scenario:
1) named_distribute() builds a "bulk" message, containing a PUBLISH item for a certain publication. This is based on the contents of the binding tables's 'cluster_scope' list.
2) tipc_named_withdraw() removes the same publication from the list, bulds a WITHDRAW message and distributes it to all cluster nodes.
3) tipc_named_node_up(), which was calling named_distribute(), sends out the bulk message built under 1)
4) The WITHDRAW message arrives at the just detected node, finds no corresponding publication, and is dropped.
5) The PUBLISH item arrives at the same node, is added to its binding table, and remains there forever.

This arrival disordering was earlier taken care of by the backlog queue, originally added for a different purpose, which was removed in the commit referred to below, but we now need a different solution. In this commit, we replace the rcu lock protecting the 'cluster_scope' list with a regular RW lock which comprises even the sending of the bulk message. This both guarantees both the list integrity and the message sending order. We will later add a commit which cleans up this code further.

Note that this commit needs recently added commit d3092b2efca1 ("tipc:
fix unsafe rcu locking when accessing publication list") to apply cleanly.

Fixes 37922ea4a310 ("tipc: permit overlapping service ranges in name table")
---
 net/tipc/name_distr.c | 18 ++++++++++--------
 net/tipc/name_table.c |  1 +
 net/tipc/name_table.h |  1 +
 3 files changed, 12 insertions(+), 8 deletions(-)
net/tipc/name_distr.c +10 -8
index e0a3dd424d8c2..836e629e8f4ab 100644
@@ -94,8 +94,9 @@ struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ)
 		list_add_tail_rcu(&publ->binding_node, &nt->node_scope);
 		return NULL;
 	}
-	list_add_tail_rcu(&publ->binding_node, &nt->cluster_scope);
-
+	write_lock_bh(&nt->cluster_scope_lock);
+	list_add_tail(&publ->binding_node, &nt->cluster_scope);
+	write_unlock_bh(&nt->cluster_scope_lock);
 	skb = named_prepare_buf(net, PUBLICATION, ITEM_SIZE, 0);
 	if (!skb) {
 		pr_warn("Publication distribution failure\n");
@@ -112,11 +113,13 @@ struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ)
  */
 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ)
 {
+	struct name_table *nt = tipc_name_table(net);
 	struct sk_buff *buf;
 	struct distr_item *item;
 
-	list_del_rcu(&publ->binding_node);
-
+	write_lock_bh(&nt->cluster_scope_lock);
+	list_del(&publ->binding_node);
+	write_unlock_bh(&nt->cluster_scope_lock);
 	if (publ->scope == TIPC_NODE_SCOPE)
 		return NULL;
 
@@ -147,7 +150,7 @@ static void named_distribute(struct net *net, struct sk_buff_head *list,
 			ITEM_SIZE) * ITEM_SIZE;
 	u32 msg_rem = msg_dsz;
 
-	list_for_each_entry_rcu(publ, pls, binding_node) {
+	list_for_each_entry(publ, pls, binding_node) {
 		/* Prepare next buffer: */
 		if (!skb) {
 			skb = named_prepare_buf(net, PUBLICATION, msg_rem,
@@ -189,11 +192,10 @@ void tipc_named_node_up(struct net *net, u32 dnode)
 
 	__skb_queue_head_init(&head);
 
-	rcu_read_lock();
+	read_lock_bh(&nt->cluster_scope_lock);
 	named_distribute(net, &head, dnode, &nt->cluster_scope);
-	rcu_read_unlock();
-
 	tipc_node_xmit(net, &head, dnode, 0);
+	read_unlock_bh(&nt->cluster_scope_lock);
 }
 
 /**
net/tipc/name_table.c +1 -0
index d72985ca1d555..89993afe0fbd3 100644
@@ -744,6 +744,7 @@ int tipc_nametbl_init(struct net *net)
 
 	INIT_LIST_HEAD(&nt->node_scope);
 	INIT_LIST_HEAD(&nt->cluster_scope);
+	rwlock_init(&nt->cluster_scope_lock);
 	tn->nametbl = nt;
 	spin_lock_init(&tn->nametbl_lock);
 	return 0;
net/tipc/name_table.h +1 -0
index 892bd750b85fa..f79066334cc8f 100644
@@ -100,6 +100,7 @@ struct name_table {
 	struct hlist_head services[TIPC_NAMETBL_SIZE];
 	struct list_head node_scope;
 	struct list_head cluster_scope;
+	rwlock_t cluster_scope_lock;
 	u32 local_publ_count;
 };
 
Signature · 1 line
2.20.1
author maintainer
#60 lore raw

PATCH 57/639 net: socionext: Add dummy PHY register read in phy_write()

In reply to Greg Kroah-Hartman

From: Masahisa Kojima <[email protected]>

[ Upstream commit a3241a91de6429051a211b5ce04d6946157caec7 ]

There is a compatibility issue between RTL8211E implemented in Developerbox and netsec ethernet controller IP.

Our MDIO controller stops MDC clock right after the write access, but RTL8211E expects MDC clock must be kept toggling for several clock cycle with MDIO high before entering the IDLE state. Without keeping clock after write access, write access is not correctly handled and register is not updated.

To meet this requirement, netsec driver needs to issue dummy read(e.g. read PHYID1(offset 0x2) register) right after write access, to keep MDC clock.

We think this compatibility issue is a problem specific to our MDIO controller and RTL8211E.

Fixes 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
---
 drivers/net/ethernet/socionext/netsec.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/net/ethernet/socionext/netsec.c +16 -2
index 28d582c18afb9..d9d0d03e4ce79 100644
@@ -432,9 +432,12 @@ static int netsec_mac_update_to_phy_state(struct netsec_priv *priv)
 	return 0;
 }
 
+static int netsec_phy_read(struct mii_bus *bus, int phy_addr, int reg_addr);
+
 static int netsec_phy_write(struct mii_bus *bus,
 			    int phy_addr, int reg, u16 val)
 {
+	int status;
 	struct netsec_priv *priv = bus->priv;
 
 	if (netsec_mac_write(priv, GMAC_REG_GDR, val))
@@ -447,8 +450,19 @@ static int netsec_phy_write(struct mii_bus *bus,
 			      GMAC_REG_SHIFT_CR_GAR)))
 		return -ETIMEDOUT;
 
-	return netsec_mac_wait_while_busy(priv, GMAC_REG_GAR,
-					  NETSEC_GMAC_GAR_REG_GB);
+	status = netsec_mac_wait_while_busy(priv, GMAC_REG_GAR,
+					    NETSEC_GMAC_GAR_REG_GB);
+
+	/* Developerbox implements RTL8211E PHY and there is
+	 * a compatibility problem with F_GMAC4.
+	 * RTL8211E expects MDC clock must be kept toggling for several
+	 * clock cycle with MDIO high before entering the IDLE state.
+	 * To meet this requirement, netsec driver needs to issue dummy
+	 * read(e.g. read PHYID1(offset 0x2) register) right after write.
+	 */
+	netsec_phy_read(bus, phy_addr, MII_PHYSID1);
+
+	return status;
 }
 
 static int netsec_phy_read(struct mii_bus *bus, int phy_addr, int reg_addr)
Signature · 1 line
2.20.1
author maintainer
#61 lore raw

PATCH 58/639 drm/sun4i: hdmi: Fix double flag assignation

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit 1e0ff648940e603cab6c52cf3723017d30d78f30 ]

The is_double flag is a boolean currently assigned to the value of the d variable, that is either 1 or 2. It means that this is_double variable is always set to true, even though the initial intent was to have it set to true when d is 2.

Fix this.

---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +1 -1
index 3ecffa52c8146..a74adec6c5dcd 100644
@@ -52,7 +52,7 @@ static unsigned long sun4i_tmds_calc_divider(unsigned long rate,
 			    (rate - tmp_rate) < (rate - best_rate)) {
 				best_rate = tmp_rate;
 				best_m = m;
-				is_double = d;
+				is_double = (d == 2) ? true : false;
 			}
 		}
 	}
Signature · 1 line
2.20.1
author maintainer
#62 lore raw

PATCH 59/639 net: hns3: add error handler for hns3_nic_init_vector_data()

In reply to Greg Kroah-Hartman

From: Huazhong Tan <[email protected]>

[ Upstream commit ece4bf46e98c9f3775a488f3932a531508d3b1a2 ]

When hns3_nic_init_vector_data() fails to map ring to vector, it should cancel the netif_napi_add() that has been successfully done and then exits.

Fixes 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +8 -2
index 1aaf6e2a3b39d..9df807ec8c840 100644
@@ -2642,7 +2642,7 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv)
 	struct hnae3_handle *h = priv->ae_handle;
 	struct hns3_enet_tqp_vector *tqp_vector;
 	int ret = 0;
-	u16 i;
+	int i;
 
 	for (i = 0; i < priv->vector_num; i++) {
 		tqp_vector = &priv->tqp_vector[i];
@@ -2687,13 +2687,19 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv)
 		hns3_free_vector_ring_chain(tqp_vector, &vector_ring_chain);
 
 		if (ret)
-			return ret;
+			goto map_ring_fail;
 
 		netif_napi_add(priv->netdev, &tqp_vector->napi,
 			       hns3_nic_common_poll, NAPI_POLL_WEIGHT);
 	}
 
 	return 0;
+
+map_ring_fail:
+	while (i--)
+		netif_napi_del(&priv->tqp_vector[i].napi);
+
+	return ret;
 }
 
 static int hns3_nic_alloc_vector_data(struct hns3_nic_priv *priv)
Signature · 1 line
2.20.1
author maintainer
#63 lore raw

PATCH 60/639 mlxsw: reg: QEEC: Add minimum shaper fields

In reply to Greg Kroah-Hartman

From: Petr Machata <[email protected]>

[ Upstream commit 8b931821aa04823e2e5df0ae93937baabbd23286 ]

Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper.

Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length.

Fixes b9b7cee40579 ("mlxsw: reg: Add QoS ETS Element Configuration register")
---
 drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +21 -1
index aee58b3892f20..c9895876a2317 100644
@@ -3215,7 +3215,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port,
  * Configures the ETS elements.
  */
 #define MLXSW_REG_QEEC_ID 0x400D
-#define MLXSW_REG_QEEC_LEN 0x1C
+#define MLXSW_REG_QEEC_LEN 0x20
 
 MLXSW_REG_DEFINE(qeec, MLXSW_REG_QEEC_ID, MLXSW_REG_QEEC_LEN);
 
@@ -3257,6 +3257,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8);
  */
 MLXSW_ITEM32(reg, qeec, next_element_index, 0x08, 0, 8);
 
+/* reg_qeec_mise
+ * Min shaper configuration enable. Enables configuration of the min
+ * shaper on this ETS element
+ * 0 - Disable
+ * 1 - Enable
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, qeec, mise, 0x0C, 31, 1);
+
 enum {
 	MLXSW_REG_QEEC_BYTES_MODE,
 	MLXSW_REG_QEEC_PACKETS_MODE,
@@ -3273,6 +3282,17 @@ enum {
  */
 MLXSW_ITEM32(reg, qeec, pb, 0x0C, 28, 1);
 
+/* The smallest permitted min shaper rate. */
+#define MLXSW_REG_QEEC_MIS_MIN	200000		/* Kbps */
+
+/* reg_qeec_min_shaper_rate
+ * Min shaper information rate.
+ * For CPU port, can only be configured for port hierarchy.
+ * When in bytes mode, value is specified in units of 1000bps.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, qeec, min_shaper_rate, 0x0C, 0, 28);
+
 /* reg_qeec_mase
  * Max shaper configuration enable. Enables configuration of the max
  * shaper on this ETS element.
Signature · 1 line
2.20.1
author maintainer
#64 lore raw

PATCH 61/639 mlxsw: spectrum: Set minimum shaper on MC TCs

In reply to Greg Kroah-Hartman

From: Petr Machata <[email protected]>

[ Upstream commit 0fe64023162aef123de2f1993ba13a35a786e1de ]

An MC-aware mode was introduced in commit 7b8195306694 ("mlxsw:
spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode, BUM traffic gets a special treatment by being assigned to a separate set of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then configured to strictly prioritize the lower-numbered ones. The intention is to prevent BUM traffic from flooding the switch and push out all UC traffic, which would otherwise happen, and instead give UC traffic precedence.

However strictly prioritizing UC traffic has the effect that UC overload pushes out all BUM traffic, such as legitimate ARP queries. These packets are kept in queues for a while, but under sustained UC overload, their lifetime eventually expires and these packets are dropped. That is detrimental to network performance as well.

Therefore configure the MC TCs (8..15) with minimum shaper of 200Mbps (a minimum permitted value) to allow a trickle of necessary control traffic to get through.

Fixes 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
---
 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +25 -0
index 30ef318b3d68d..5df9b25cab27d 100644
@@ -2753,6 +2753,21 @@ int mlxsw_sp_port_ets_maxrate_set(struct mlxsw_sp_port *mlxsw_sp_port,
 	return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(qeec), qeec_pl);
 }
 
+static int mlxsw_sp_port_min_bw_set(struct mlxsw_sp_port *mlxsw_sp_port,
+				    enum mlxsw_reg_qeec_hr hr, u8 index,
+				    u8 next_index, u32 minrate)
+{
+	struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
+	char qeec_pl[MLXSW_REG_QEEC_LEN];
+
+	mlxsw_reg_qeec_pack(qeec_pl, mlxsw_sp_port->local_port, hr, index,
+			    next_index);
+	mlxsw_reg_qeec_mise_set(qeec_pl, true);
+	mlxsw_reg_qeec_min_shaper_rate_set(qeec_pl, minrate);
+
+	return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(qeec), qeec_pl);
+}
+
 int mlxsw_sp_port_prio_tc_set(struct mlxsw_sp_port *mlxsw_sp_port,
 			      u8 switch_prio, u8 tclass)
 {
@@ -2830,6 +2845,16 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
 			return err;
 	}
 
+	/* Configure the min shaper for multicast TCs. */
+	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
+		err = mlxsw_sp_port_min_bw_set(mlxsw_sp_port,
+					       MLXSW_REG_QEEC_HIERARCY_TC,
+					       i + 8, i,
+					       MLXSW_REG_QEEC_MIS_MIN);
+		if (err)
+			return err;
+	}
+
 	/* Map all priorities to traffic class 0. */
 	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
 		err = mlxsw_sp_port_prio_tc_set(mlxsw_sp_port, i, 0);
Signature · 1 line
2.20.1
author maintainer
#65 lore raw

PATCH 62/639 NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks

In reply to Greg Kroah-Hartman

From: Gustavo A. R. Silva <[email protected]>

[ Upstream commit 1b7619828d0c341612f58683e73f279c37e70bbc ]

Both devm_kcalloc() and devm_kzalloc() return NULL on error. They never return error pointers.

The use of IS_ERR_OR_NULL is currently applied to the wrong context.

Fix this by replacing IS_ERR_OR_NULL with regular NULL checks.

Fixes bf2a952d31d2 ("NTB: Add IDT 89HPESxNTx PCIe-switches support")
---
 drivers/ntb/hw/idt/ntb_hw_idt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ntb/hw/idt/ntb_hw_idt.c +4 -4
index dbe72f116017a..a67ef23e81bca 100644
@@ -1105,9 +1105,9 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port,
 	}
 
 	/* Allocate memory for memory window descriptors */
-	ret_mws = devm_kcalloc(&ndev->ntb.pdev->dev, *mw_cnt,
-				sizeof(*ret_mws), GFP_KERNEL);
-	if (IS_ERR_OR_NULL(ret_mws))
+	ret_mws = devm_kcalloc(&ndev->ntb.pdev->dev, *mw_cnt, sizeof(*ret_mws),
+			       GFP_KERNEL);
+	if (!ret_mws)
 		return ERR_PTR(-ENOMEM);
 
 	/* Copy the info of detected memory windows */
@@ -2390,7 +2390,7 @@ static struct idt_ntb_dev *idt_create_dev(struct pci_dev *pdev,
 
 	/* Allocate memory for the IDT PCIe-device descriptor */
 	ndev = devm_kzalloc(&pdev->dev, sizeof(*ndev), GFP_KERNEL);
-	if (IS_ERR_OR_NULL(ndev)) {
+	if (!ndev) {
 		dev_err(&pdev->dev, "Memory allocation failed for descriptor");
 		return ERR_PTR(-ENOMEM);
 	}
Signature · 1 line
2.20.1
author maintainer
#66 lore raw

PATCH 63/639 ASoC: wm97xx: fix uninitialized regmap pointer problem

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 576ce4075bfa0f03e0e91a89eecc539b3b828b08 ]

gcc notices that without either the ac97 bus or the pdata, we never initialize the regmap pointer, which leads to an uninitialized variable access:

sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe':
sound/soc/codecs/wm9712.c:666:2: error: 'regmap' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Since that configuration is invalid, it's better to return an error here. I tried to avoid adding complexity to the conditions, and turned the #ifdef into a regular if(IS_ENABLED()) check for readability. This in turn requires moving some header file declarations out of an #ifdef.

The same code is used in three drivers, all of which I'm changing the same way.

Fixes 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support")
---
 include/sound/soc.h       |  2 +-
 sound/soc/codecs/wm9705.c | 10 ++++------
 sound/soc/codecs/wm9712.c | 10 ++++------
 sound/soc/codecs/wm9713.c | 10 ++++------
 4 files changed, 13 insertions(+), 19 deletions(-)
include/sound/soc.h +1 -1
index 41cec42fb456a..88aa48e5485f9 100644
@@ -548,12 +548,12 @@ static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
 }
 #endif
 
-#ifdef CONFIG_SND_SOC_AC97_BUS
 struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component);
 struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component,
 	unsigned int id, unsigned int id_mask);
 void snd_soc_free_ac97_component(struct snd_ac97 *ac97);
 
+#ifdef CONFIG_SND_SOC_AC97_BUS
 int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
 int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
 		struct platform_device *pdev);
sound/soc/codecs/wm9705.c +4 -6
index ccdf088461b7f..54c306707c02c 100644
@@ -325,8 +325,7 @@ static int wm9705_soc_probe(struct snd_soc_component *component)
 	if (wm9705->mfd_pdata) {
 		wm9705->ac97 = wm9705->mfd_pdata->ac97;
 		regmap = wm9705->mfd_pdata->regmap;
-	} else {
-#ifdef CONFIG_SND_SOC_AC97_BUS
+	} else if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS)) {
 		wm9705->ac97 = snd_soc_new_ac97_component(component, WM9705_VENDOR_ID,
 						      WM9705_VENDOR_ID_MASK);
 		if (IS_ERR(wm9705->ac97)) {
@@ -339,7 +338,8 @@ static int wm9705_soc_probe(struct snd_soc_component *component)
 			snd_soc_free_ac97_component(wm9705->ac97);
 			return PTR_ERR(regmap);
 		}
-#endif
+	} else {
+		return -ENXIO;
 	}
 
 	snd_soc_component_set_drvdata(component, wm9705->ac97);
@@ -350,14 +350,12 @@ static int wm9705_soc_probe(struct snd_soc_component *component)
 
 static void wm9705_soc_remove(struct snd_soc_component *component)
 {
-#ifdef CONFIG_SND_SOC_AC97_BUS
 	struct wm9705_priv *wm9705 = snd_soc_component_get_drvdata(component);
 
-	if (!wm9705->mfd_pdata) {
+	if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS) && !wm9705->mfd_pdata) {
 		snd_soc_component_exit_regmap(component);
 		snd_soc_free_ac97_component(wm9705->ac97);
 	}
-#endif
 }
 
 static const struct snd_soc_component_driver soc_component_dev_wm9705 = {
sound/soc/codecs/wm9712.c +4 -6
index e873baa9e7780..01949eaba4fd4 100644
@@ -642,8 +642,7 @@ static int wm9712_soc_probe(struct snd_soc_component *component)
 	if (wm9712->mfd_pdata) {
 		wm9712->ac97 = wm9712->mfd_pdata->ac97;
 		regmap = wm9712->mfd_pdata->regmap;
-	} else {
-#ifdef CONFIG_SND_SOC_AC97_BUS
+	} else if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS)) {
 		int ret;
 
 		wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID,
@@ -660,7 +659,8 @@ static int wm9712_soc_probe(struct snd_soc_component *component)
 			snd_soc_free_ac97_component(wm9712->ac97);
 			return PTR_ERR(regmap);
 		}
-#endif
+	} else {
+		return -ENXIO;
 	}
 
 	snd_soc_component_init_regmap(component, regmap);
@@ -673,14 +673,12 @@ static int wm9712_soc_probe(struct snd_soc_component *component)
 
 static void wm9712_soc_remove(struct snd_soc_component *component)
 {
-#ifdef CONFIG_SND_SOC_AC97_BUS
 	struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component);
 
-	if (!wm9712->mfd_pdata) {
+	if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS) && !wm9712->mfd_pdata) {
 		snd_soc_component_exit_regmap(component);
 		snd_soc_free_ac97_component(wm9712->ac97);
 	}
-#endif
 }
 
 static const struct snd_soc_component_driver soc_component_dev_wm9712 = {
sound/soc/codecs/wm9713.c +4 -6
index 643863bb32e0d..5a2fdf4f69bf3 100644
@@ -1214,8 +1214,7 @@ static int wm9713_soc_probe(struct snd_soc_component *component)
 	if (wm9713->mfd_pdata) {
 		wm9713->ac97 = wm9713->mfd_pdata->ac97;
 		regmap = wm9713->mfd_pdata->regmap;
-	} else {
-#ifdef CONFIG_SND_SOC_AC97_BUS
+	} else if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS)) {
 		wm9713->ac97 = snd_soc_new_ac97_component(component, WM9713_VENDOR_ID,
 						      WM9713_VENDOR_ID_MASK);
 		if (IS_ERR(wm9713->ac97))
@@ -1225,7 +1224,8 @@ static int wm9713_soc_probe(struct snd_soc_component *component)
 			snd_soc_free_ac97_component(wm9713->ac97);
 			return PTR_ERR(regmap);
 		}
-#endif
+	} else {
+		return -ENXIO;
 	}
 
 	snd_soc_component_init_regmap(component, regmap);
@@ -1238,14 +1238,12 @@ static int wm9713_soc_probe(struct snd_soc_component *component)
 
 static void wm9713_soc_remove(struct snd_soc_component *component)
 {
-#ifdef CONFIG_SND_SOC_AC97_BUS
 	struct wm9713_priv *wm9713 = snd_soc_component_get_drvdata(component);
 
-	if (!wm9713->mfd_pdata) {
+	if (IS_ENABLED(CONFIG_SND_SOC_AC97_BUS) && !wm9713->mfd_pdata) {
 		snd_soc_component_exit_regmap(component);
 		snd_soc_free_ac97_component(wm9713->ac97);
 	}
-#endif
 }
 
 static const struct snd_soc_component_driver soc_component_dev_wm9713 = {
Signature · 1 line
2.20.1
author maintainer
#67 lore raw

PATCH 64/639 ARM: dts: bcm283x: Correct mailbox register sizes

In reply to Greg Kroah-Hartman

From: Phil Elwell <[email protected]>

[ Upstream commit 227fa865061470a568858baa404a508f6c030fe4 ]

The size field in a Device Tree "reg" property is encoded in bytes, not words.

Fixes 614fa22119d6 ("ARM: dts: bcm2835: Add VCHIQ node to the Raspberry Pi boards. (v3)")
---
 arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm2835-rpi.dtsi +1 -1
index cb2d6d78a7fbf..c481eab1bd7c0 100644
@@ -32,7 +32,7 @@
 
 		mailbox@7e00b840 {
 			compatible = "brcm,bcm2835-vchiq";
-			reg = <0x7e00b840 0xf>;
+			reg = <0x7e00b840 0x3c>;
 			interrupts = <0 2>;
 		};
 	};
Signature · 1 line
2.20.1
author maintainer
#68 lore raw

PATCH 65/639 pcrypt: use format specifier in kobject_add

In reply to Greg Kroah-Hartman

From: Colin Ian King <[email protected]>

[ Upstream commit b1e3874c75ab15288f573b3532e507c37e8e7656 ]

Passing string 'name' as the format specifier is potentially hazardous because name could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" format string for the string 'name'.

Cleans up clang warning:
crypto/pcrypt.c:397:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

Fixes a3fb1e330dd2 ("pcrypt: Added sysfs interface to pcrypt")
---
 crypto/pcrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/pcrypt.c +1 -1
index f8ec3d4ba4a80..a5718c0a3dc4e 100644
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)
 	int ret;
 
 	pinst->kobj.kset = pcrypt_kset;
-	ret = kobject_add(&pinst->kobj, NULL, name);
+	ret = kobject_add(&pinst->kobj, NULL, "%s", name);
 	if (!ret)
 		kobject_uevent(&pinst->kobj, KOBJ_ADD);
 
Signature · 1 line
2.20.1
author maintainer
#69 lore raw

PATCH 66/639 ASoC: sun8i-codec: add missing route for ADC

In reply to Greg Kroah-Hartman

From: Vasily Khoruzhick <[email protected]>

[ Upstream commit 9ee325d029c4abb75716851ce38863845911d605 ]

sun8i-codec misses a route from ADC to AIF1 Slot 0 ADC. Add it to the driver to avoid adding it to every dts.

Fixes eda85d1fee05d ("ASoC: sun8i-codec: Add ADC support for a33")
---
 sound/soc/sunxi/sun8i-codec.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
sound/soc/sunxi/sun8i-codec.c +5 -1
index bf615fa16dc8a..a3db6a68dfe6d 100644
@@ -465,7 +465,11 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
 	{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
 	  "AIF1 Slot 0 Right"},
 
-	/* ADC routes */
+	/* ADC Routes */
+	{ "AIF1 Slot 0 Right ADC", NULL, "ADC" },
+	{ "AIF1 Slot 0 Left ADC", NULL, "ADC" },
+
+	/* ADC Mixer Routes */
 	{ "Left Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch",
 	  "AIF1 Slot 0 Left ADC" },
 	{ "Right Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch",
Signature · 1 line
2.20.1
author maintainer
#70 lore raw

PATCH 67/639 pinctrl: meson-gxl: remove invalid GPIOX tsin_a pins

In reply to Greg Kroah-Hartman

From: Neil Armstrong <[email protected]>

[ Upstream commit d801064cb871806e6843738ecad38993646f53f7 ]

The GPIOX tsin_a pins wrongly uses the SDCard pinctrl bits, this patch completely removes these pins entries until we find out what are the correct bits and registers to be used instead.

Fixes 5a6ae9b80139 ("pinctrl: meson-gxl: add tsin_a pins")
---
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/pinctrl/meson/pinctrl-meson-gxl.c +2 -10
index 158f618f16957..0c0a5018102b0 100644
@@ -239,13 +239,9 @@ static const unsigned int eth_link_led_pins[]	= { GPIOZ_14 };
 static const unsigned int eth_act_led_pins[]	= { GPIOZ_15 };
 
 static const unsigned int tsin_a_d0_pins[]	= { GPIODV_0 };
-static const unsigned int tsin_a_d0_x_pins[]	= { GPIOX_10 };
 static const unsigned int tsin_a_clk_pins[]	= { GPIODV_8 };
-static const unsigned int tsin_a_clk_x_pins[]	= { GPIOX_11 };
 static const unsigned int tsin_a_sop_pins[]	= { GPIODV_9 };
-static const unsigned int tsin_a_sop_x_pins[]	= { GPIOX_8 };
 static const unsigned int tsin_a_d_valid_pins[] = { GPIODV_10 };
-static const unsigned int tsin_a_d_valid_x_pins[] = { GPIOX_9 };
 static const unsigned int tsin_a_fail_pins[]	= { GPIODV_11 };
 static const unsigned int tsin_a_dp_pins[] = {
 	GPIODV_1, GPIODV_2, GPIODV_3, GPIODV_4, GPIODV_5, GPIODV_6, GPIODV_7,
@@ -432,10 +428,6 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
 	GROUP(spi_miso,		5,	2),
 	GROUP(spi_ss0,		5,	1),
 	GROUP(spi_sclk,		5,	0),
-	GROUP(tsin_a_sop_x,	6,	3),
-	GROUP(tsin_a_d_valid_x,	6,	2),
-	GROUP(tsin_a_d0_x,	6,	1),
-	GROUP(tsin_a_clk_x,	6,	0),
 
 	/* Bank Z */
 	GROUP(eth_mdio,		4,	23),
@@ -698,8 +690,8 @@ static const char * const eth_led_groups[] = {
 };
 
 static const char * const tsin_a_groups[] = {
-	"tsin_a_clk", "tsin_a_clk_x", "tsin_a_sop", "tsin_a_sop_x",
-	"tsin_a_d_valid", "tsin_a_d_valid_x", "tsin_a_d0", "tsin_a_d0_x",
+	"tsin_a_clk", "tsin_a_sop",
+	"tsin_a_d_valid", "tsin_a_d0",
 	"tsin_a_dp", "tsin_a_fail",
 };
 
Signature · 1 line
2.20.1
author maintainer
#71 lore raw

PATCH 68/639 bus: ti-sysc: Add mcasp optional clocks flag

In reply to Greg Kroah-Hartman

From: Tony Lindgren <[email protected]>

[ Upstream commit 2c63a833e4500b341a62bf97e67488909ae12086 ]

We have OPT_CLKS_NEEDED in legacy platform data, but it's missing from the ti-sysc driver for device tree based configuration.

In order to pass OPT_CLKS_NEEDED quirk flag we need to update omap4 module data and add a new compatible for dra7 as the module layout is different from sysc_regbits_omap4_mcasp.

Fixes 70a65240efb1 ("bus: ti-sysc: Add register bits for interconnect

target modules")

---
 Documentation/devicetree/bindings/bus/ti-sysc.txt |  1 +
 drivers/bus/ti-sysc.c                             | 11 +++++++++++
 2 files changed, 12 insertions(+)
Documentation/devicetree/bindings/bus/ti-sysc.txt +1 -0
index 91dc2333af012..85a23f551f024 100644
@@ -35,6 +35,7 @@ Required standard properties:
 		"ti,sysc-omap3-sham"
 		"ti,sysc-omap-aes"
 		"ti,sysc-mcasp"
+		"ti,sysc-dra7-mcasp"
 		"ti,sysc-usb-host-fs"
 		"ti,sysc-dra7-mcan"
 
drivers/bus/ti-sysc.c +11 -0
index b6f63e7620214..926c83398b27b 100644
@@ -1593,6 +1593,16 @@ static const struct sysc_regbits sysc_regbits_omap4_mcasp = {
 static const struct sysc_capabilities sysc_omap4_mcasp = {
 	.type = TI_SYSC_OMAP4_MCASP,
 	.regbits = &sysc_regbits_omap4_mcasp,
+	.mod_quirks = SYSC_QUIRK_OPT_CLKS_NEEDED,
+};
+
+/*
+ * McASP found on dra7 and later
+ */
+static const struct sysc_capabilities sysc_dra7_mcasp = {
+	.type = TI_SYSC_OMAP4_SIMPLE,
+	.regbits = &sysc_regbits_omap4_simple,
+	.mod_quirks = SYSC_QUIRK_OPT_CLKS_NEEDED,
 };
 
 /*
@@ -1821,6 +1831,7 @@ static const struct of_device_id sysc_match[] = {
 	{ .compatible = "ti,sysc-omap3-sham", .data = &sysc_omap3_sham, },
 	{ .compatible = "ti,sysc-omap-aes", .data = &sysc_omap3_aes, },
 	{ .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, },
+	{ .compatible = "ti,sysc-dra7-mcasp", .data = &sysc_dra7_mcasp, },
 	{ .compatible = "ti,sysc-usb-host-fs",
 	  .data = &sysc_omap4_usb_host_fs, },
 	{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
Signature · 1 line
2.20.1
author maintainer
#72 lore raw

PATCH 69/639 exportfs: fix passing zero to ERR_PTR() warning

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 909e22e05353a783c526829427e9a8de122fba9c ]

Fix a static code checker warning:
fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR'

The error path for lookup_one_len_unlocked failure should set err to PTR_ERR.

Fixes bbf7a8a3562f ("exportfs: move most of reconnect_path to helper function")
---
 fs/exportfs/expfs.c | 1 +
 1 file changed, 1 insertion(+)
fs/exportfs/expfs.c +1 -0
index 808cae6d5f50f..ae3248326c449 100644
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt,
 	tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf));
 	if (IS_ERR(tmp)) {
 		dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp));
+		err = PTR_ERR(tmp);
 		goto out_err;
 	}
 	if (tmp != dentry) {
Signature · 1 line
2.20.1
author maintainer
#73 lore raw

PATCH 70/639 drm: rcar-du: Fix the return value in case of error in rcar_du_crtc_set_crc_source()

In reply to Greg Kroah-Hartman

From: Christophe JAILLET <[email protected]>

[ Upstream commit 4d486f18d91b1876040bf87e9ad78981a08b15a6 ]

We return 0 unconditionally in 'rcar_du_crtc_set_crc_source()'. However, 'ret' is set to some error codes if some function calls fail.

Return 'ret' instead to propagate the error code.

Fixes 47a52d024e89 ("media: drm: rcar-du: Add support for CRC computation")
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
index 15dc9caa128ba..212e5e11e4b73 100644
@@ -837,7 +837,7 @@ unlock:
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
 
-	return 0;
+	return ret;
 }
 
 static const struct drm_crtc_funcs crtc_funcs_gen2 = {
Signature · 1 line
2.20.1
author maintainer
#74 lore raw

PATCH 71/639 drm: rcar-du: Fix vblank initialization

In reply to Greg Kroah-Hartman

From: Laurent Pinchart <[email protected]>

[ Upstream commit 3d61fe5f59dd3e6f96fc0772156d257cb04dc656 ]

The drm_vblank_init() takes the total number of CRTCs as an argument, but the rcar-du driver passes a bitmask of the CRTC indices. Fix it.

Fixes 4bf8e1962f91 ("drm: Renesas R-Car Display Unit DRM driver")
---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_kms.c +1 -1
index 0386b454e2218..6a9578159c2b5 100644
@@ -544,7 +544,7 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
 	 * Initialize vertical blanking interrupts handling. Start with vblank
 	 * disabled for all CRTCs.
 	 */
-	ret = drm_vblank_init(dev, (1 << rcdu->num_crtcs) - 1);
+	ret = drm_vblank_init(dev, rcdu->num_crtcs);
 	if (ret < 0)
 		return ret;
 
Signature · 1 line
2.20.1
author maintainer
#75 lore raw

PATCH 72/639 net: always initialize pagedlen

In reply to Greg Kroah-Hartman

From: Willem de Bruijn <[email protected]>

[ Upstream commit aba36930a35e7f1fe1319b203f25c05d6c119936 ]

In ip packet generation, pagedlen is initialized for each skb at the start of the loop in __ip(6)_append_data, before label alloc_new_skb.

Depending on compiler options, code can be generated that jumps to this label, triggering use of an an uninitialized variable.

In practice, at -O2, the generated code moves the initialization below the label. But the code should not rely on that for correctness.

Fixes 15e36f5b8e98 ("udp: paged allocation with gso")
---
 net/ipv4/ip_output.c  | 3 ++-
 net/ipv6/ip6_output.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
net/ipv4/ip_output.c +2 -1
index d63091812342f..fbf30122e8bf2 100644
@@ -940,7 +940,7 @@ static int __ip_append_data(struct sock *sk,
 			unsigned int fraglen;
 			unsigned int fraggap;
 			unsigned int alloclen;
-			unsigned int pagedlen = 0;
+			unsigned int pagedlen;
 			struct sk_buff *skb_prev;
 alloc_new_skb:
 			skb_prev = skb;
@@ -957,6 +957,7 @@ alloc_new_skb:
 			if (datalen > mtu - fragheaderlen)
 				datalen = maxfraglen - fragheaderlen;
 			fraglen = datalen + fragheaderlen;
+			pagedlen = 0;
 
 			if ((flags & MSG_MORE) &&
 			    !(rt->dst.dev->features&NETIF_F_SG))
net/ipv6/ip6_output.c +2 -1
index eed9231c90ad5..9886a84c25117 100644
@@ -1357,7 +1357,7 @@ emsgsize:
 			unsigned int fraglen;
 			unsigned int fraggap;
 			unsigned int alloclen;
-			unsigned int pagedlen = 0;
+			unsigned int pagedlen;
 alloc_new_skb:
 			/* There's no room in the current skb */
 			if (skb)
@@ -1381,6 +1381,7 @@ alloc_new_skb:
 			if (datalen > (cork->length <= mtu && !(cork->flags & IPCORK_ALLFRAG) ? mtu : maxfraglen) - fragheaderlen)
 				datalen = maxfraglen - fragheaderlen - rt->dst.trailer_len;
 			fraglen = datalen + fragheaderlen;
+			pagedlen = 0;
 
 			if ((flags & MSG_MORE) &&
 			    !(rt->dst.dev->features&NETIF_F_SG))
Signature · 1 line
2.20.1
author maintainer
#76 lore raw

PATCH 73/639 drm/dp_mst: Skip validating ports during destruction, just ref

In reply to Greg Kroah-Hartman

From: Lyude Paul <[email protected]>

[ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ]

Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago.

Pretend we have a topology like this:

|- DP-1: mst_primary

   |- DP-4: active display
   |- DP-5: disconnected
   |- DP-6: active hub
      |- DP-7: active display
      |- DP-8: disconnected
      |- DP-9: disconnected

If we unplug DP-6, the topology starting at DP-7 will be destroyed but it's payloads will live on in DP-1's VCPI allocations and thus require removal. However, this removal currently fails because drm_dp_update_payload_part1() will (rightly so) try to validate the port before accessing it, fail then abort. If we keep going, eventually we run the MST hub out of bandwidth and all new allocations will start to fail (or in my case; all new displays just start flickering a ton).

We could just teach drm_dp_update_payload_part1() not to drop the port ref in this case, but then we also need to teach drm_dp_destroy_payload_step1() to do the same thing, then hope no one ever adds anything to the that requires a validated port reference in drm_dp_destroy_connector_work(). Kind of sketchy.

So let's go with a more clever solution: any port that drm_dp_destroy_connector_work() interacts with is guaranteed to still exist in memory until we say so. While said port might not be valid we don't really care: that's the whole reason we're destroying it in the first place! So, teach drm_dp_get_validated_port_ref() to use the all mighty current_work() function to avoid attempting to validate ports from the context of mgr->destroy_connector_work. I can't see any situation where this wouldn't be safe, and this avoids having to play whack-a-mole in the future of trying to work around port validation.

Fixes 263efde31f97 ("drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1()")
Cc Jerry Zuo <[email protected]>
Cc Harry Wentland <[email protected]>
Cc <[email protected]> # v4.6+
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +13 -2
index 4d77158453060..58fe3945494cf 100644
@@ -1022,9 +1022,20 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_
 static struct drm_dp_mst_port *drm_dp_get_validated_port_ref(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
 {
 	struct drm_dp_mst_port *rport = NULL;
+
 	mutex_lock(&mgr->lock);
-	if (mgr->mst_primary)
-		rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary, port);
+	/*
+	 * Port may or may not be 'valid' but we don't care about that when
+	 * destroying the port and we are guaranteed that the port pointer
+	 * will be valid until we've finished
+	 */
+	if (current_work() == &mgr->destroy_connector_work) {
+		kref_get(&port->kref);
+		rport = port;
+	} else if (mgr->mst_primary) {
+		rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary,
+						       port);
+	}
 	mutex_unlock(&mgr->lock);
 	return rport;
 }
Signature · 1 line
2.20.1
author maintainer
#77 lore raw

PATCH 74/639 arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply

In reply to Greg Kroah-Hartman

From: Neil Armstrong <[email protected]>

[ Upstream commit e1f2163deac059ad39f07aba9e314ebe605d5a7a ]

The hdmi_5v regulator must be enabled to provide power to the physical HDMI PHY and enables the HDMI 5V presence loopback for the monitor.

Fixes b409f625a6d5 ("ARM64: dts: meson-gx: Add HDMI_5V regulator on selected boards")
---
 arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi          | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts        | 1 +
 5 files changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +1 -0
index 765247bc4f247..e14e0ce7e89fe 100644
@@ -125,6 +125,7 @@
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	hdmi-supply = <&hdmi_5v>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +1 -0
index 9d858eb193ca6..062e12aa46770 100644
@@ -76,6 +76,7 @@
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	hdmi-supply = <&hdmi_5v>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -0
index b4dfb9afdef86..db293440e4cae 100644
@@ -155,6 +155,7 @@
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	hdmi-supply = <&hdmi_5v>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts +1 -0
index 5896e8a5d86bc..2602940c2077b 100644
@@ -51,6 +51,7 @@
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	hdmi-supply = <&hdmi_5v>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -0
index 313f88f8759e1..782e9edac8051 100644
@@ -271,6 +271,7 @@
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	hdmi-supply = <&hdmi_5v>;
 };
 
 &hdmi_tx_tmds_port {
Signature · 1 line
2.20.1
author maintainer
#78 lore raw

PATCH 75/639 arm64: dts: renesas: r8a7795-es1: Add missing power domains to IPMMU nodes

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 41e30b515a003a90e336b7a456c7c82d8c3aa6a7 ]

While commit 3b7e7848f0e88b36 ("arm64: dts: renesas: r8a7795: Add IPMMU device nodes") for R-Car H3 ES2.0 did include power-domains properties, they were forgotten in the counterpart for older R-Car H3 ES1.x SoCs.

Fixes e4b9a493df45075b ("arm64: dts: renesas: r8a7795-es1: Add IPMMU device nodes")
---
 arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi +2 -0
index 7b2fbaec9aef8..3dc61b7e1d08a 100644
@@ -28,6 +28,7 @@
 		compatible = "renesas,ipmmu-r8a7795";
 		reg = <0 0xec680000 0 0x1000>;
 		renesas,ipmmu-main = <&ipmmu_mm 5>;
+		power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
 		#iommu-cells = <1>;
 	};
 
@@ -35,6 +36,7 @@
 		compatible = "renesas,ipmmu-r8a7795";
 		reg = <0 0xe7730000 0 0x1000>;
 		renesas,ipmmu-main = <&ipmmu_mm 8>;
+		power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
 		#iommu-cells = <1>;
 	};
 
Signature · 1 line
2.20.1
author maintainer
#79 lore raw

PATCH 76/639 net: phy: Fix not to call phy_resume() if PHY is not attached

In reply to Greg Kroah-Hartman

From: Yoshihiro Shimoda <[email protected]>

[ Upstream commit ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a ]

This patch fixes an issue that mdio_bus_phy_resume() doesn't call phy_resume() if the PHY is not attached.

Fixes 803dd9c77ac3 ("net: phy: avoid suspending twice a PHY")
---
 drivers/net/phy/phy_device.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/phy/phy_device.c +6 -5
index 43c4f358eeb8a..9c7e51443f6b6 100644
@@ -76,7 +76,7 @@ static LIST_HEAD(phy_fixup_list);
 static DEFINE_MUTEX(phy_fixup_lock);
 
 #ifdef CONFIG_PM
-static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)
+static bool mdio_bus_phy_may_suspend(struct phy_device *phydev, bool suspend)
 {
 	struct device_driver *drv = phydev->mdio.dev.driver;
 	struct phy_driver *phydrv = to_phy_driver(drv);
@@ -88,10 +88,11 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)
 	/* PHY not attached? May suspend if the PHY has not already been
 	 * suspended as part of a prior call to phy_disconnect() ->
 	 * phy_detach() -> phy_suspend() because the parent netdev might be the
-	 * MDIO bus driver and clock gated at this point.
+	 * MDIO bus driver and clock gated at this point. Also may resume if
+	 * PHY is not attached.
 	 */
 	if (!netdev)
-		return !phydev->suspended;
+		return suspend ? !phydev->suspended : phydev->suspended;
 
 	if (netdev->wol_enabled)
 		return false;
@@ -126,7 +127,7 @@ static int mdio_bus_phy_suspend(struct device *dev)
 	if (phydev->attached_dev && phydev->adjust_link)
 		phy_stop_machine(phydev);
 
-	if (!mdio_bus_phy_may_suspend(phydev))
+	if (!mdio_bus_phy_may_suspend(phydev, true))
 		return 0;
 
 	return phy_suspend(phydev);
@@ -137,7 +138,7 @@ static int mdio_bus_phy_resume(struct device *dev)
 	struct phy_device *phydev = to_phy_device(dev);
 	int ret;
 
-	if (!mdio_bus_phy_may_suspend(phydev))
+	if (!mdio_bus_phy_may_suspend(phydev, false))
 		goto no_resume;
 
 	ret = phy_resume(phydev);
Signature · 1 line
2.20.1
author maintainer
#80 lore raw

PATCH 77/639 IB/hfi1: Correctly process FECN and BECN in packets

In reply to Greg Kroah-Hartman

From: Mitko Haralanov <[email protected]>

[ Upstream commit fe4dd4239277486ca3a468e7bbeafd7ef3a5634e ]

A CA is supposed to ignore FECN bits in multicast, ACK, and CNP packets. This patch corrects the behavior of the HFI1 driver in this regard by ignoring FECNs in those packet types.

While fixing the above behavior, fix the extraction of the FECN and BECN bits from the packet headers for both 9B and 16B packets.

Furthermore, this patch corrects the driver's response to a FECN in RDMA READ RESPONSE packets. Instead of sending an "empty" ACK, the driver now sends a CNP packet. While editing that code path, add the missing trace for CNP packets.

Fixes 88733e3b8450 ("IB/hfi1: Add 16B UD support")
Fixes f59fb9e05109 ("IB/hfi1: Fix handling of FECN marked multicast packet")
---
 drivers/infiniband/hw/hfi1/driver.c | 70 ++++++++++++++++++++---------
 drivers/infiniband/hw/hfi1/hfi.h    | 35 ++++++++++-----
 drivers/infiniband/hw/hfi1/rc.c     | 30 +++++--------
 drivers/infiniband/hw/hfi1/uc.c     |  2 +-
 drivers/infiniband/hw/hfi1/ud.c     | 33 ++++++++------
 5 files changed, 104 insertions(+), 66 deletions(-)
drivers/infiniband/hw/hfi1/driver.c +48 -22
index a41f85558312e..d5277c23cba60 100644
@@ -430,40 +430,60 @@ static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
 	[HFI1_PKT_TYPE_16B] = &return_cnp_16B
 };
 
-void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
-			       bool do_cnp)
+/**
+ * hfi1_process_ecn_slowpath - Process FECN or BECN bits
+ * @qp: The packet's destination QP
+ * @pkt: The packet itself.
+ * @prescan: Is the caller the RXQ prescan
+ *
+ * Process the packet's FECN or BECN bits. By now, the packet
+ * has already been evaluated whether processing of those bit should
+ * be done.
+ * The significance of the @prescan argument is that if the caller
+ * is the RXQ prescan, a CNP will be send out instead of waiting for the
+ * normal packet processing to send an ACK with BECN set (or a CNP).
+ */
+bool hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
+			       bool prescan)
 {
 	struct hfi1_ibport *ibp = to_iport(qp->ibqp.device, qp->port_num);
 	struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
 	struct ib_other_headers *ohdr = pkt->ohdr;
 	struct ib_grh *grh = pkt->grh;
-	u32 rqpn = 0, bth1;
+	u32 rqpn = 0;
 	u16 pkey;
 	u32 rlid, slid, dlid = 0;
-	u8 hdr_type, sc, svc_type;
-	bool is_mcast = false;
+	u8 hdr_type, sc, svc_type, opcode;
+	bool is_mcast = false, ignore_fecn = false, do_cnp = false,
+		fecn, becn;
 
 	/* can be called from prescan */
 	if (pkt->etype == RHF_RCV_TYPE_BYPASS) {
-		is_mcast = hfi1_is_16B_mcast(dlid);
 		pkey = hfi1_16B_get_pkey(pkt->hdr);
 		sc = hfi1_16B_get_sc(pkt->hdr);
 		dlid = hfi1_16B_get_dlid(pkt->hdr);
 		slid = hfi1_16B_get_slid(pkt->hdr);
+		is_mcast = hfi1_is_16B_mcast(dlid);
+		opcode = ib_bth_get_opcode(ohdr);
 		hdr_type = HFI1_PKT_TYPE_16B;
+		fecn = hfi1_16B_get_fecn(pkt->hdr);
+		becn = hfi1_16B_get_becn(pkt->hdr);
 	} else {
-		is_mcast = (dlid > be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
-			   (dlid != be16_to_cpu(IB_LID_PERMISSIVE));
 		pkey = ib_bth_get_pkey(ohdr);
 		sc = hfi1_9B_get_sc5(pkt->hdr, pkt->rhf);
-		dlid = ib_get_dlid(pkt->hdr);
+		dlid = qp->ibqp.qp_type != IB_QPT_UD ? ib_get_dlid(pkt->hdr) :
+			ppd->lid;
 		slid = ib_get_slid(pkt->hdr);
+		is_mcast = (dlid > be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
+			   (dlid != be16_to_cpu(IB_LID_PERMISSIVE));
+		opcode = ib_bth_get_opcode(ohdr);
 		hdr_type = HFI1_PKT_TYPE_9B;
+		fecn = ib_bth_get_fecn(ohdr);
+		becn = ib_bth_get_becn(ohdr);
 	}
 
 	switch (qp->ibqp.qp_type) {
 	case IB_QPT_UD:
-		dlid = ppd->lid;
 		rlid = slid;
 		rqpn = ib_get_sqpn(pkt->ohdr);
 		svc_type = IB_CC_SVCTYPE_UD;
@@ -485,22 +505,31 @@ void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
 		svc_type = IB_CC_SVCTYPE_RC;
 		break;
 	default:
-		return;
+		return false;
 	}
 
-	bth1 = be32_to_cpu(ohdr->bth[1]);
+	ignore_fecn = is_mcast || (opcode == IB_OPCODE_CNP) ||
+		(opcode == IB_OPCODE_RC_ACKNOWLEDGE);
+	/*
+	 * ACKNOWLEDGE packets do not get a CNP but this will be
+	 * guarded by ignore_fecn above.
+	 */
+	do_cnp = prescan ||
+		(opcode >= IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST &&
+		 opcode <= IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE);
+
 	/* Call appropriate CNP handler */
-	if (do_cnp && (bth1 & IB_FECN_SMASK))
+	if (!ignore_fecn && do_cnp && fecn)
 		hfi1_handle_cnp_tbl[hdr_type](ibp, qp, rqpn, pkey,
 					      dlid, rlid, sc, grh);
 
-	if (!is_mcast && (bth1 & IB_BECN_SMASK)) {
-		u32 lqpn = bth1 & RVT_QPN_MASK;
+	if (becn) {
+		u32 lqpn = be32_to_cpu(ohdr->bth[1]) & RVT_QPN_MASK;
 		u8 sl = ibp->sc_to_sl[sc];
 
 		process_becn(ppd, sl, rlid, lqpn, rqpn, svc_type);
 	}
-
+	return !ignore_fecn && fecn;
 }
 
 struct ps_mdata {
@@ -599,7 +628,6 @@ static void __prescan_rxq(struct hfi1_packet *packet)
 		struct rvt_dev_info *rdi = &rcd->dd->verbs_dev.rdi;
 		u64 rhf = rhf_to_cpu(rhf_addr);
 		u32 etype = rhf_rcv_type(rhf), qpn, bth1;
-		int is_ecn = 0;
 		u8 lnh;
 
 		if (ps_done(&mdata, rhf, rcd))
@@ -625,12 +653,10 @@ static void __prescan_rxq(struct hfi1_packet *packet)
 			goto next; /* just in case */
 		}
 
-		bth1 = be32_to_cpu(packet->ohdr->bth[1]);
-		is_ecn = !!(bth1 & (IB_FECN_SMASK | IB_BECN_SMASK));
-
-		if (!is_ecn)
+		if (!hfi1_may_ecn(packet))
 			goto next;
 
+		bth1 = be32_to_cpu(packet->ohdr->bth[1]);
 		qpn = bth1 & RVT_QPN_MASK;
 		rcu_read_lock();
 		qp = rvt_lookup_qpn(rdi, &ibp->rvp, qpn);
@@ -640,7 +666,7 @@ static void __prescan_rxq(struct hfi1_packet *packet)
 			goto next;
 		}
 
-		process_ecn(qp, packet, true);
+		hfi1_process_ecn_slowpath(qp, packet, true);
 		rcu_read_unlock();
 
 		/* turn off BECN, FECN */
drivers/infiniband/hw/hfi1/hfi.h +25 -10
index 2ea42c04cfd25..232fc4b59a98c 100644
@@ -1797,13 +1797,20 @@ static inline struct hfi1_ibport *rcd_to_iport(struct hfi1_ctxtdata *rcd)
 	return &rcd->ppd->ibport_data;
 }
 
-void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
-			       bool do_cnp);
-static inline bool process_ecn(struct rvt_qp *qp, struct hfi1_packet *pkt,
-			       bool do_cnp)
+/**
+ * hfi1_may_ecn - Check whether FECN or BECN processing should be done
+ * @pkt: the packet to be evaluated
+ *
+ * Check whether the FECN or BECN bits in the packet's header are
+ * enabled, depending on packet type.
+ *
+ * This function only checks for FECN and BECN bits. Additional checks
+ * are done in the slowpath (hfi1_process_ecn_slowpath()) in order to
+ * ensure correct handling.
+ */
+static inline bool hfi1_may_ecn(struct hfi1_packet *pkt)
 {
-	bool becn;
-	bool fecn;
+	bool fecn, becn;
 
 	if (pkt->etype == RHF_RCV_TYPE_BYPASS) {
 		fecn = hfi1_16B_get_fecn(pkt->hdr);
@@ -1812,10 +1819,18 @@ static inline bool process_ecn(struct rvt_qp *qp, struct hfi1_packet *pkt,
 		fecn = ib_bth_get_fecn(pkt->ohdr);
 		becn = ib_bth_get_becn(pkt->ohdr);
 	}
-	if (unlikely(fecn || becn)) {
-		hfi1_process_ecn_slowpath(qp, pkt, do_cnp);
-		return fecn;
-	}
+	return fecn || becn;
+}
+
+bool hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
+			       bool prescan);
+static inline bool process_ecn(struct rvt_qp *qp, struct hfi1_packet *pkt)
+{
+	bool do_work;
+
+	do_work = hfi1_may_ecn(pkt);
+	if (unlikely(do_work))
+		return hfi1_process_ecn_slowpath(qp, pkt, false);
 	return false;
 }
 
drivers/infiniband/hw/hfi1/rc.c +10 -20
index 770c78c657306..980168a567071 100644
@@ -2049,8 +2049,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
 	struct ib_reth *reth;
 	unsigned long flags;
 	int ret;
-	bool is_fecn = false;
-	bool copy_last = false;
+	bool copy_last = false, fecn;
 	u32 rkey;
 	u8 extra_bytes = pad + packet->extra_byte + (SIZE_OF_CRC << 2);
 
@@ -2059,7 +2058,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
 	if (hfi1_ruc_check_hdr(ibp, packet))
 		return;
 
-	is_fecn = process_ecn(qp, packet, false);
+	fecn = process_ecn(qp, packet);
 
 	/*
 	 * Process responses (ACKs) before anything else.  Note that the
@@ -2070,8 +2069,6 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
 	if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) &&
 	    opcode <= OP(ATOMIC_ACKNOWLEDGE)) {
 		rc_rcv_resp(packet);
-		if (is_fecn)
-			goto send_ack;
 		return;
 	}
 
@@ -2347,11 +2344,11 @@ send_last:
 
 		/* Schedule the send engine. */
 		qp->s_flags |= RVT_S_RESP_PENDING;
+		if (fecn)
+			qp->s_flags |= RVT_S_ECN;
 		hfi1_schedule_send(qp);
 
 		spin_unlock_irqrestore(&qp->s_lock, flags);
-		if (is_fecn)
-			goto send_ack;
 		return;
 	}
 
@@ -2413,11 +2410,11 @@ send_last:
 
 		/* Schedule the send engine. */
 		qp->s_flags |= RVT_S_RESP_PENDING;
+		if (fecn)
+			qp->s_flags |= RVT_S_ECN;
 		hfi1_schedule_send(qp);
 
 		spin_unlock_irqrestore(&qp->s_lock, flags);
-		if (is_fecn)
-			goto send_ack;
 		return;
 	}
 
@@ -2430,16 +2427,9 @@ send_last:
 	qp->r_ack_psn = psn;
 	qp->r_nak_state = 0;
 	/* Send an ACK if requested or required. */
-	if (psn & IB_BTH_REQ_ACK) {
-		if (packet->numpkt == 0) {
-			rc_cancel_ack(qp);
-			goto send_ack;
-		}
-		if (qp->r_adefered >= HFI1_PSN_CREDIT) {
-			rc_cancel_ack(qp);
-			goto send_ack;
-		}
-		if (unlikely(is_fecn)) {
+	if (psn & IB_BTH_REQ_ACK || fecn) {
+		if (packet->numpkt == 0 || fecn ||
+		    qp->r_adefered >= HFI1_PSN_CREDIT) {
 			rc_cancel_ack(qp);
 			goto send_ack;
 		}
@@ -2480,7 +2470,7 @@ nack_acc:
 	qp->r_nak_state = IB_NAK_REMOTE_ACCESS_ERROR;
 	qp->r_ack_psn = qp->r_psn;
 send_ack:
-	hfi1_send_rc_ack(packet, is_fecn);
+	hfi1_send_rc_ack(packet, fecn);
 }
 
 void hfi1_rc_hdrerr(
drivers/infiniband/hw/hfi1/uc.c +1 -1
index e254dcec6f647..4121d1a93b1bb 100644
@@ -321,7 +321,7 @@ void hfi1_uc_rcv(struct hfi1_packet *packet)
 	if (hfi1_ruc_check_hdr(ibp, packet))
 		return;
 
-	process_ecn(qp, packet, true);
+	process_ecn(qp, packet);
 
 	psn = ib_bth_get_psn(ohdr);
 	/* Compare the PSN verses the expected PSN. */
drivers/infiniband/hw/hfi1/ud.c +20 -13
index 54eb695642649..ef5b3ffd3888b 100644
@@ -51,6 +51,7 @@
 #include "hfi.h"
 #include "mad.h"
 #include "verbs_txreq.h"
+#include "trace_ibhdrs.h"
 #include "qp.h"
 
 /* We support only two types - 9B and 16B for now */
@@ -656,18 +657,19 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 	u32 bth0, plen, vl, hwords = 7;
 	u16 len;
 	u8 l4;
-	struct hfi1_16b_header hdr;
+	struct hfi1_opa_header hdr;
 	struct ib_other_headers *ohdr;
 	struct pio_buf *pbuf;
 	struct send_context *ctxt = qp_to_send_context(qp, sc5);
 	struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
 	u32 nwords;
 
+	hdr.hdr_type = HFI1_PKT_TYPE_16B;
 	/* Populate length */
 	nwords = ((hfi1_get_16b_padding(hwords << 2, 0) +
 		   SIZE_OF_LT) >> 2) + SIZE_OF_CRC;
 	if (old_grh) {
-		struct ib_grh *grh = &hdr.u.l.grh;
+		struct ib_grh *grh = &hdr.opah.u.l.grh;
 
 		grh->version_tclass_flow = old_grh->version_tclass_flow;
 		grh->paylen = cpu_to_be16(
@@ -675,11 +677,11 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 		grh->hop_limit = 0xff;
 		grh->sgid = old_grh->dgid;
 		grh->dgid = old_grh->sgid;
-		ohdr = &hdr.u.l.oth;
+		ohdr = &hdr.opah.u.l.oth;
 		l4 = OPA_16B_L4_IB_GLOBAL;
 		hwords += sizeof(struct ib_grh) / sizeof(u32);
 	} else {
-		ohdr = &hdr.u.oth;
+		ohdr = &hdr.opah.u.oth;
 		l4 = OPA_16B_L4_IB_LOCAL;
 	}
 
@@ -693,7 +695,7 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 
 	/* Convert dwords to flits */
 	len = (hwords + nwords) >> 1;
-	hfi1_make_16b_hdr(&hdr, slid, dlid, len, pkey, 1, 0, l4, sc5);
+	hfi1_make_16b_hdr(&hdr.opah, slid, dlid, len, pkey, 1, 0, l4, sc5);
 
 	plen = 2 /* PBC */ + hwords + nwords;
 	pbc_flags |= PBC_PACKET_BYPASS | PBC_INSERT_BYPASS_ICRC;
@@ -701,9 +703,11 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 	pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen);
 	if (ctxt) {
 		pbuf = sc_buffer_alloc(ctxt, plen, NULL, NULL);
-		if (pbuf)
+		if (pbuf) {
+			trace_pio_output_ibhdr(ppd->dd, &hdr, sc5);
 			ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc,
 						 &hdr, hwords);
+		}
 	}
 }
 
@@ -715,14 +719,15 @@ void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
 	u32 bth0, plen, vl, hwords = 5;
 	u16 lrh0;
 	u8 sl = ibp->sc_to_sl[sc5];
-	struct ib_header hdr;
+	struct hfi1_opa_header hdr;
 	struct ib_other_headers *ohdr;
 	struct pio_buf *pbuf;
 	struct send_context *ctxt = qp_to_send_context(qp, sc5);
 	struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
 
+	hdr.hdr_type = HFI1_PKT_TYPE_9B;
 	if (old_grh) {
-		struct ib_grh *grh = &hdr.u.l.grh;
+		struct ib_grh *grh = &hdr.ibh.u.l.grh;
 
 		grh->version_tclass_flow = old_grh->version_tclass_flow;
 		grh->paylen = cpu_to_be16(
@@ -730,11 +735,11 @@ void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
 		grh->hop_limit = 0xff;
 		grh->sgid = old_grh->dgid;
 		grh->dgid = old_grh->sgid;
-		ohdr = &hdr.u.l.oth;
+		ohdr = &hdr.ibh.u.l.oth;
 		lrh0 = HFI1_LRH_GRH;
 		hwords += sizeof(struct ib_grh) / sizeof(u32);
 	} else {
-		ohdr = &hdr.u.oth;
+		ohdr = &hdr.ibh.u.oth;
 		lrh0 = HFI1_LRH_BTH;
 	}
 
@@ -746,16 +751,18 @@ void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
 	ohdr->bth[1] = cpu_to_be32(remote_qpn | (1 << IB_BECN_SHIFT));
 	ohdr->bth[2] = 0; /* PSN 0 */
 
-	hfi1_make_ib_hdr(&hdr, lrh0, hwords + SIZE_OF_CRC, dlid, slid);
+	hfi1_make_ib_hdr(&hdr.ibh, lrh0, hwords + SIZE_OF_CRC, dlid, slid);
 	plen = 2 /* PBC */ + hwords;
 	pbc_flags |= (ib_is_sc5(sc5) << PBC_DC_INFO_SHIFT);
 	vl = sc_to_vlt(ppd->dd, sc5);
 	pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen);
 	if (ctxt) {
 		pbuf = sc_buffer_alloc(ctxt, plen, NULL, NULL);
-		if (pbuf)
+		if (pbuf) {
+			trace_pio_output_ibhdr(ppd->dd, &hdr, sc5);
 			ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc,
 						 &hdr, hwords);
+		}
 	}
 }
 
@@ -912,7 +919,7 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
 		src_qp = hfi1_16B_get_src_qpn(packet->mgmt);
 	}
 
-	process_ecn(qp, packet, (opcode != IB_OPCODE_CNP));
+	process_ecn(qp, packet);
 	/*
 	 * Get the number of bytes the message was padded by
 	 * and drop incomplete packets.
Signature · 1 line
2.20.1
author maintainer
#81 lore raw

PATCH 78/639 OPP: Fix missing debugfs supply directory for OPPs

In reply to Greg Kroah-Hartman

From: Viresh Kumar <[email protected]>

[ Upstream commit 46f48aca2e5aef3f430e95d1a5fb68227ec8ec85 ]

There is one case where we may end up with no "supply" directory for the OPPs in debugfs. That happens when the OPP core isn't managing the regulators for the device and the device's OPP do have microvolt property. It happens because the opp_table->regulator_count remains set to 0 and the debugfs routines don't add any supply directory in such a case.

This commit fixes that by setting opp_table->regulator_count to 1 in that particular case. But to make everything work nicely and not break other parts of the core, regulator_count is defined as "int" now instead of "unsigned int" and it can have different special values now. It is set to -1 initially to mark it "uninitialized" and later only we set it to 0 or positive values after checking how many supplies are there.

This also helps in finding the bugs where only few of the OPPs have the "opp-microvolt" property set and not all.

Fixes 1fae788ed640 ("PM / OPP: Don't create debugfs "supply-0" directory unnecessarily")
---
 drivers/opp/core.c | 12 +++++++++---
 drivers/opp/of.c   | 20 ++++++++++++++++----
 drivers/opp/opp.h  |  6 ++++--
 3 files changed, 29 insertions(+), 9 deletions(-)
drivers/opp/core.c +9 -3
index 1e80f9ec1aa6a..34515f4323755 100644
@@ -793,6 +793,9 @@ static struct opp_table *_allocate_opp_table(struct device *dev)
 
 	INIT_LIST_HEAD(&opp_table->dev_list);
 
+	/* Mark regulator count uninitialized */
+	opp_table->regulator_count = -1;
+
 	opp_dev = _add_opp_dev(dev, opp_table);
 	if (!opp_dev) {
 		kfree(opp_table);
@@ -955,7 +958,7 @@ struct dev_pm_opp *_opp_allocate(struct opp_table *table)
 	int count, supply_size;
 
 	/* Allocate space for at least one supply */
-	count = table->regulator_count ? table->regulator_count : 1;
+	count = table->regulator_count > 0 ? table->regulator_count : 1;
 	supply_size = sizeof(*opp->supplies) * count;
 
 	/* allocate new OPP node and supplies structures */
@@ -1363,7 +1366,7 @@ free_regulators:
 
 	kfree(opp_table->regulators);
 	opp_table->regulators = NULL;
-	opp_table->regulator_count = 0;
+	opp_table->regulator_count = -1;
 err:
 	dev_pm_opp_put_opp_table(opp_table);
 
@@ -1392,7 +1395,7 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table)
 
 	kfree(opp_table->regulators);
 	opp_table->regulators = NULL;
-	opp_table->regulator_count = 0;
+	opp_table->regulator_count = -1;
 
 put_opp_table:
 	dev_pm_opp_put_opp_table(opp_table);
@@ -1545,6 +1548,9 @@ int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt)
 	if (!opp_table)
 		return -ENOMEM;
 
+	/* Fix regulator count for dynamic OPPs */
+	opp_table->regulator_count = 1;
+
 	ret = _opp_add_v1(opp_table, dev, freq, u_volt, true);
 
 	dev_pm_opp_put_opp_table(opp_table);
drivers/opp/of.c +16 -4
index 20988c4266501..d64a13d7881b9 100644
@@ -113,12 +113,10 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 			      struct opp_table *opp_table)
 {
 	u32 *microvolt, *microamp = NULL;
-	int supplies, vcount, icount, ret, i, j;
+	int supplies = opp_table->regulator_count, vcount, icount, ret, i, j;
 	struct property *prop = NULL;
 	char name[NAME_MAX];
 
-	supplies = opp_table->regulator_count ? opp_table->regulator_count : 1;
-
 	/* Search for "opp-microvolt-<name>" */
 	if (opp_table->prop_name) {
 		snprintf(name, sizeof(name), "opp-microvolt-%s",
@@ -133,7 +131,13 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 
 		/* Missing property isn't a problem, but an invalid entry is */
 		if (!prop) {
-			if (!opp_table->regulator_count)
+			if (unlikely(supplies == -1)) {
+				/* Initialize regulator_count */
+				opp_table->regulator_count = 0;
+				return 0;
+			}
+
+			if (!supplies)
 				return 0;
 
 			dev_err(dev, "%s: opp-microvolt missing although OPP managing regulators\n",
@@ -142,6 +146,14 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
 		}
 	}
 
+	if (unlikely(supplies == -1)) {
+		/* Initialize regulator_count */
+		supplies = opp_table->regulator_count = 1;
+	} else if (unlikely(!supplies)) {
+		dev_err(dev, "%s: opp-microvolt wasn't expected\n", __func__);
+		return -EINVAL;
+	}
+
 	vcount = of_property_count_u32_elems(opp->np, name);
 	if (vcount < 0) {
 		dev_err(dev, "%s: Invalid %s property (%d)\n",
drivers/opp/opp.h +4 -2
index 7c540fd063b2d..c9e65964ed848 100644
@@ -136,7 +136,9 @@ enum opp_table_access {
  * @prop_name: A name to postfix to many DT properties, while parsing them.
  * @clk: Device's clock handle
  * @regulators: Supply regulators
- * @regulator_count: Number of power supply regulators
+ * @regulator_count: Number of power supply regulators. Its value can be -1
+ * (uninitialized), 0 (no opp-microvolt property) or > 0 (has opp-microvolt
+ * property).
  * @genpd_performance_state: Device's power domain support performance state.
  * @set_opp: Platform specific set_opp callback
  * @set_opp_data: Data to be passed to set_opp callback
@@ -172,7 +174,7 @@ struct opp_table {
 	const char *prop_name;
 	struct clk *clk;
 	struct regulator **regulators;
-	unsigned int regulator_count;
+	int regulator_count;
 	bool genpd_performance_state;
 
 	int (*set_opp)(struct dev_pm_set_opp_data *data);
Signature · 1 line
2.20.1
author maintainer
#82 lore raw

PATCH 79/639 IB/rxe: Fix incorrect cache cleanup in error flow

In reply to Greg Kroah-Hartman

From: Yuval Shaia <[email protected]>

[ Upstream commit 6db21d8986e14e2e86573a3b055b05296188bd2c ]

Array iterator stays at the same slot, fix it.

---
 drivers/infiniband/sw/rxe/rxe_pool.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/infiniband/sw/rxe/rxe_pool.c +14 -12
index b4a8acc7bb7d6..0e2425f282335 100644
@@ -112,6 +112,18 @@ static inline struct kmem_cache *pool_cache(struct rxe_pool *pool)
 	return rxe_type_info[pool->type].cache;
 }
 
+static void rxe_cache_clean(size_t cnt)
+{
+	int i;
+	struct rxe_type_info *type;
+
+	for (i = 0; i < cnt; i++) {
+		type = &rxe_type_info[i];
+		kmem_cache_destroy(type->cache);
+		type->cache = NULL;
+	}
+}
+
 int rxe_cache_init(void)
 {
 	int err;
@@ -136,24 +148,14 @@ int rxe_cache_init(void)
 	return 0;
 
 err1:
-	while (--i >= 0) {
-		kmem_cache_destroy(type->cache);
-		type->cache = NULL;
-	}
+	rxe_cache_clean(i);
 
 	return err;
 }
 
 void rxe_cache_exit(void)
 {
-	int i;
-	struct rxe_type_info *type;
-
-	for (i = 0; i < RXE_NUM_TYPES; i++) {
-		type = &rxe_type_info[i];
-		kmem_cache_destroy(type->cache);
-		type->cache = NULL;
-	}
+	rxe_cache_clean(RXE_NUM_TYPES);
 }
 
 static int rxe_pool_init_index(struct rxe_pool *pool, u32 max, u32 min)
Signature · 1 line
2.20.1
author maintainer
#83 lore raw

PATCH 80/639 mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit 78f3ff524fca63e7d2a57149a34ade23d2c12798 ]

The > comparison should be >= or we access one element beyond the end of the array.

(The inst->qinsts[] array is allocated in the ti_msgmgr_probe() function and it has ->num_valid_queues elements.)

Fixes a2b79838b891 ("mailbox: ti-msgmgr: Add support for Secure Proxy")
---
 drivers/mailbox/ti-msgmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/ti-msgmgr.c +1 -1
index 5bceafbf66993..01e9e462512b7 100644
@@ -547,7 +547,7 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox,
 	}
 
 	if (d->is_sproxy) {
-		if (req_pid > d->num_valid_queues)
+		if (req_pid >= d->num_valid_queues)
 			goto err;
 		qinst = &inst->qinsts[req_pid];
 		return qinst->chan;
Signature · 1 line
2.20.1
author maintainer
#84 lore raw

PATCH 81/639 staging: bcm2835-camera: Abort probe if there is no camera

In reply to Greg Kroah-Hartman

From: Stefan Wahren <[email protected]>

[ Upstream commit 7566f39dfdc11f8a97d5810c6e6295a88f97ef91 ]

Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload.

Fixes 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
---
 .../vc04_services/bcm2835-camera/bcm2835-camera.c        | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +9 -0
index 455082867246d..068e5b9ab2323 100644
@@ -1854,6 +1854,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 	num_cameras = get_num_cameras(instance,
 				      resolutions,
 				      MAX_BCM2835_CAMERAS);
+
+	if (num_cameras < 1) {
+		ret = -ENODEV;
+		goto cleanup_mmal;
+	}
+
 	if (num_cameras > MAX_BCM2835_CAMERAS)
 		num_cameras = MAX_BCM2835_CAMERAS;
 
@@ -1953,6 +1959,9 @@ cleanup_gdev:
 	pr_info("%s: error %d while loading driver\n",
 		BM2835_MMAL_MODULE_NAME, ret);
 
+cleanup_mmal:
+	vchiq_mmal_finalise(instance);
+
 	return ret;
 }
 
Signature · 1 line
2.20.1
author maintainer
#85 lore raw

PATCH 82/639 staging: bcm2835-camera: fix module autoloading

In reply to Greg Kroah-Hartman

From: Stefan Wahren <[email protected]>

[ Upstream commit 3a2c20024a2b47adbf514e7f3ab79342739c3926 ]

In order to make the module bcm2835-camera load automatically, we need to add a module alias.

Fixes 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
---
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1 -0
index 068e5b9ab2323..edf25922b12d6 100644
@@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
 MODULE_AUTHOR("Vincent Sanders");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_ALIAS("platform:bcm2835-camera");
 
 int bcm2835_v4l2_debug;
 module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
Signature · 1 line
2.20.1
author maintainer
#86 lore raw

PATCH 83/639 switchtec: Remove immediate status check after submitting MRPC command

In reply to Greg Kroah-Hartman

From: Kelvin Cao <[email protected]>

[ Upstream commit 526180408b815aa7b96fd48bd23cdd33ef04e38e ]

After submitting a Firmware Download MRPC command, Switchtec firmware will delay Management EP BAR MemRd TLP responses by more than 10ms. This is a firmware limitation. Delayed MemRd completions are a problem for systems with a low Completion Timeout (CTO).

The current driver checks the MRPC status immediately after submitting an MRPC command, which results in a delayed MemRd completion that may cause a Completion Timeout.

Remove the immediate status check and rely on the check after receiving an interrupt or timing out.

This is only a software workaround to the READ issue and a proper fix of this should be done in firmware.

Fixes 080b47def5e5 ("MicroSemi Switchtec management interface driver")
---
 drivers/pci/switch/switchtec.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/pci/switch/switchtec.c +0 -4
index 5aaa4ce04ec3d..ceb7ab3ba3d09 100644
@@ -134,10 +134,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev)
 		    stuser->data, stuser->data_len);
 	iowrite32(stuser->cmd, &stdev->mmio_mrpc->cmd);
 
-	stuser->status = ioread32(&stdev->mmio_mrpc->status);
-	if (stuser->status != SWITCHTEC_MRPC_STATUS_INPROGRESS)
-		mrpc_complete_cmd(stdev);
-
 	schedule_delayed_work(&stdev->mrpc_timeout,
 			      msecs_to_jiffies(500));
 }
Signature · 1 line
2.20.1
author maintainer
#87 lore raw

PATCH 84/639 ipv6: add missing tx timestamping on IPPROTO_RAW

In reply to Greg Kroah-Hartman

From: Willem de Bruijn <[email protected]>

[ Upstream commit fbfb2321e950918b430e7225546296b2dcadf725 ]

Raw sockets support tx timestamping, but one case is missing.

IPPROTO_RAW takes a separate packet construction path. raw_send_hdrinc has an explicit call to sock_tx_timestamp, but rawv6_send_hdrinc does not. Add it.

Fixes 11878b40ed5c ("net-timestamp: SOCK_RAW and PING timestamping")
---
 net/ipv6/raw.c | 2 ++
 1 file changed, 2 insertions(+)
net/ipv6/raw.c +2 -0
index 4856d9320b28e..a41156a00dd44 100644
@@ -660,6 +660,8 @@ static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,
 
 	skb->ip_summed = CHECKSUM_NONE;
 
+	sock_tx_timestamp(sk, sockc->tsflags, &skb_shinfo(skb)->tx_flags);
+
 	if (flags & MSG_CONFIRM)
 		skb_set_dst_pending_confirm(skb, 1);
 
Signature · 1 line
2.20.1
author maintainer
#88 lore raw

PATCH 85/639 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 ]

The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number.

Fixes bae11d30d0cafdc5 ("sh-pfc: r8a7740: Add GETHER pin groups and functions")
---
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
index 35f436bcb8491..d8077065636e3 100644
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pins[] = {
 	 */
 	185, 186, 187, 188, 189, 190, 191, 192, 174, 161, 204,
 	171, 170, 169, 168, 167, 166, 173, 172, 176, 184, 183, 203,
-	205, 163, 206, 207,
+	205, 163, 206, 207, 158,
 };
 static const unsigned int gether_gmii_mux[] = {
 	ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
Signature · 1 line
2.20.1
author maintainer
#89 lore raw

PATCH 86/639 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b ]

The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.

Fixes 06c7dd866da70f6c ("sh-pfc: r8a7740: Add LCDC0 and LCDC1 pin groups and functions")
---
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -0
index d8077065636e3..e9739dbcb356e 100644
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_mux[] = {
 	LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
 	LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
 	LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
+	LCD0_D12_MARK, LCD0_D13_MARK, LCD0_D14_MARK, LCD0_D15_MARK,
 	LCD0_D16_MARK, LCD0_D17_MARK, LCD0_D18_PORT163_MARK,
 	LCD0_D19_PORT162_MARK, LCD0_D20_PORT161_MARK, LCD0_D21_PORT158_MARK,
 	LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
Signature · 1 line
2.20.1
author maintainer
#90 lore raw

PATCH 87/639 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 884fa25fb6e5e63ab970d612a628313bb68f37cc ]

The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b).

Fixes 2d0c386f135e4186 ("pinctrl: sh-pfc: r8a7791: Add QSPI pin groups")
---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -2
index 5811784d88cb9..f5b4255570b28 100644
@@ -3220,8 +3220,7 @@ static const unsigned int qspi_data4_b_pins[] = {
 	RCAR_GP_PIN(6, 4),
 };
 static const unsigned int qspi_data4_b_mux[] = {
-	SPCLK_B_MARK, MOSI_IO0_B_MARK, MISO_IO1_B_MARK,
-	IO2_B_MARK, IO3_B_MARK, SSL_B_MARK,
+	MOSI_IO0_B_MARK, MISO_IO1_B_MARK, IO2_B_MARK, IO3_B_MARK,
 };
 /* - SCIF0 ------------------------------------------------------------------ */
 static const unsigned int scif0_data_pins[] = {
Signature · 1 line
2.20.1
author maintainer
#91 lore raw

PATCH 88/639 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 0d6256cb880166a4111bebce35790019e56b6e1b ]

The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component.

Fixes 8e32c9671f84acd8 ("pinctrl: sh-pfc: r8a7791: Add VIN pins")
---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +0 -3
index f5b4255570b28..6236ac55c65d3 100644
@@ -4374,17 +4374,14 @@ static const unsigned int vin1_b_data18_pins[] = {
 };
 static const unsigned int vin1_b_data18_mux[] = {
 	/* B */
-	VI1_DATA0_B_MARK, VI1_DATA1_B_MARK,
 	VI1_DATA2_B_MARK, VI1_DATA3_B_MARK,
 	VI1_DATA4_B_MARK, VI1_DATA5_B_MARK,
 	VI1_DATA6_B_MARK, VI1_DATA7_B_MARK,
 	/* G */
-	VI1_G0_B_MARK, VI1_G1_B_MARK,
 	VI1_G2_B_MARK, VI1_G3_B_MARK,
 	VI1_G4_B_MARK, VI1_G5_B_MARK,
 	VI1_G6_B_MARK, VI1_G7_B_MARK,
 	/* R */
-	VI1_R0_B_MARK, VI1_R1_B_MARK,
 	VI1_R2_B_MARK, VI1_R3_B_MARK,
 	VI1_R4_B_MARK, VI1_R5_B_MARK,
 	VI1_R6_B_MARK, VI1_R7_B_MARK,
Signature · 1 line
2.20.1
author maintainer
#92 lore raw

PATCH 89/639 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 124cde98f856b6206b804acbdec3b7c80f8c3427 ]

The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number.

Add the missing pin number, for non-GPIO pin F26.

Fixes 5da4eb049de803c7 ("sh-pfc: sh73a0: Add TPU pin groups and functions")
---
 drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -0
index d25e6f674d0ab..f8fbedb46585d 100644
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[] = {
 };
 static const unsigned int tpu4_to3_pins[] = {
 	/* TO */
+	PIN_NUMBER(6, 26),
 };
 static const unsigned int tpu4_to3_mux[] = {
 	TPU4TO3_MARK,
Signature · 1 line
2.20.1
author maintainer
#93 lore raw

PATCH 90/639 pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 6a6c195d98a1a5e70faa87f594d7564af1dd1bed ]

The Peripheral Function Select Register 9 contains 12 fields, but the variable field descriptor contains a 13th bogus field of 3 bits.

Fixes 43c4436e2f1890a7 ("pinctrl: sh-pfc: add R8A7794 PFC support")
---
 drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -1
index 1640024375946..24b9bb1ee1fe5 100644
@@ -5215,7 +5215,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 		FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, }
 	},
 	{ PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32,
-			     1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3) {
+			     1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3) {
 		/* IP9_31 [1] */
 		0, 0,
 		/* IP9_30_28 [3] */
Signature · 1 line
2.20.1
author maintainer
#94 lore raw

PATCH 91/639 pinctrl: sh-pfc: r8a77970: Add missing MOD_SEL0 field

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 67d7745bc78e16ec6b3af02bc1da6c8c868cbd89 ]

The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12 single-bit fields, but the variable field descriptor lacks a field of 4 reserved bits.

Fixes b92ac66a1819602b ("pinctrl: sh-pfc: Add R8A77970 PFC support")
---
 drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +1 -1
index eeb58b3bbc9a0..53fae9fd682b8 100644
@@ -2354,7 +2354,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 #define F_(x, y)	x,
 #define FM(x)		FN_##x,
 	{ PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
-			     4, 4, 4, 4,
+			     4, 4, 4, 4, 4,
 			     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) {
 		/* RESERVED 31, 30, 29, 28 */
 		0, 0, 0, 0, 0, 0, 0, 0,	0, 0, 0, 0, 0, 0, 0, 0,
Signature · 1 line
2.20.1
author maintainer
#95 lore raw

PATCH 92/639 pinctrl: sh-pfc: r8a77980: Add missing MOD_SEL0 field

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit b0f77269f6bba385f1f4dce44e7756cf8fbc0176 ]

The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12 single-bit fields, but the variable field descriptor lacks a field of 4 reserved bits.

Fixes f59125248a691dfe ("pinctrl: sh-pfc: Add R8A77980 PFC support")
---
 drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +1 -1
index 3f6967331f646..81a710bb8555e 100644
@@ -2751,7 +2751,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 #define F_(x, y)	x,
 #define FM(x)		FN_##x,
 	{ PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
-			     4, 4, 4, 4,
+			     4, 4, 4, 4, 4,
 			     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) {
 		/* RESERVED 31, 30, 29, 28 */
 		0, 0, 0, 0, 0, 0, 0, 0,	0, 0, 0, 0, 0, 0, 0, 0,
Signature · 1 line
2.20.1
author maintainer
#96 lore raw

PATCH 93/639 pinctrl: sh-pfc: sh7734: Add missing IPSR11 field

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 94482af7055e1ffa211c1135256b85590ebcac99 ]

The Peripheral Function Select Register 11 contains 3 reserved bits and 15 variable-width fields, but the variable field descriptor does not contain the 3-bit field IP11[25:23].

Fixes 856cb4bb337ee504 ("sh: Add support pinmux for SH7734")
---
 drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
index 3eccc9b3ca84a..05ccb27f77818 100644
@@ -2237,7 +2237,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 		FN_LCD_DATA15_B, 0, 0, 0 }
 	},
 	{ PINMUX_CFG_REG_VAR("IPSR11", 0xFFFC0048, 32,
-			3, 1, 2, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {
+			3, 1, 2, 3, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {
 	    /* IP11_31_29 [3] */
 	    0, 0, 0, 0, 0, 0, 0, 0,
 	    /* IP11_28 [1] */
Signature · 1 line
2.20.1
author maintainer
#97 lore raw

PATCH 94/639 pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit e28dc3f09c9d2555a9bd982f0847988591052226 ]

While the SEL_PWM[0-3] fields in the Module Select Register 0 support 4 possible configurations per PWM pin, only the first 3 are valid.

Replace the invalid and unused configurations for SEL_PWM[0-3]_3 by dummies.

Fixes 794a6711764658a1 ("pinctrl: sh-pfc: Initial R8A77995 PFC support")
---
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +4 -4
index adade5b7ffbc2..337c80bde8f93 100644
@@ -391,10 +391,10 @@ FM(IP12_31_28)	IP12_31_28 \
 #define MOD_SEL0_27		FM(SEL_MSIOF3_0)	FM(SEL_MSIOF3_1)
 #define MOD_SEL0_26		FM(SEL_HSCIF3_0)	FM(SEL_HSCIF3_1)
 #define MOD_SEL0_25		FM(SEL_SCIF4_0)		FM(SEL_SCIF4_1)
-#define MOD_SEL0_24_23		FM(SEL_PWM0_0)		FM(SEL_PWM0_1)		FM(SEL_PWM0_2)		FM(SEL_PWM0_3)
-#define MOD_SEL0_22_21		FM(SEL_PWM1_0)		FM(SEL_PWM1_1)		FM(SEL_PWM1_2)		FM(SEL_PWM1_3)
-#define MOD_SEL0_20_19		FM(SEL_PWM2_0)		FM(SEL_PWM2_1)		FM(SEL_PWM2_2)		FM(SEL_PWM2_3)
-#define MOD_SEL0_18_17		FM(SEL_PWM3_0)		FM(SEL_PWM3_1)		FM(SEL_PWM3_2)		FM(SEL_PWM3_3)
+#define MOD_SEL0_24_23		FM(SEL_PWM0_0)		FM(SEL_PWM0_1)		FM(SEL_PWM0_2)		F_(0, 0)
+#define MOD_SEL0_22_21		FM(SEL_PWM1_0)		FM(SEL_PWM1_1)		FM(SEL_PWM1_2)		F_(0, 0)
+#define MOD_SEL0_20_19		FM(SEL_PWM2_0)		FM(SEL_PWM2_1)		FM(SEL_PWM2_2)		F_(0, 0)
+#define MOD_SEL0_18_17		FM(SEL_PWM3_0)		FM(SEL_PWM3_1)		FM(SEL_PWM3_2)		F_(0, 0)
 #define MOD_SEL0_15		FM(SEL_IRQ_0_0)		FM(SEL_IRQ_0_1)
 #define MOD_SEL0_14		FM(SEL_IRQ_1_0)		FM(SEL_IRQ_1_1)
 #define MOD_SEL0_13		FM(SEL_IRQ_2_0)		FM(SEL_IRQ_2_1)
Signature · 1 line
2.20.1
author maintainer
#98 lore raw

PATCH 95/639 pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 9540cbdfcd861caf67a6f0e4bb7f46d41c4aad86 ]

The Port C I/O Register 0 contains 7 reserved bits, but the descriptor contains only dummy configuration values for 6 reserved bits, thus breaking the configuration of all subsequent fields in the register.

Fix this by adding the two missing configuration values.

Fixes f5e811f2a43117b2 ("sh-pfc: Add sh7269 pinmux support")
---
 drivers/pinctrl/sh-pfc/pfc-sh7269.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7269.c +1 -1
index a50d22bef1f44..cfdb4fc177c3e 100644
@@ -2119,7 +2119,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 	},
 
 	{ PINMUX_CFG_REG("PCIOR0", 0xfffe3852, 16, 1) {
-		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 		PC8_IN, PC8_OUT,
 		PC7_IN, PC7_OUT,
 		PC6_IN, PC6_OUT,
Signature · 1 line
2.20.1
author maintainer
#99 lore raw

PATCH 96/639 pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 4d374bacd7c9665179f9752a52d5d602c45d8190 ]

The IP10[5:3] field in Peripheral Function Select Register 10 has a width of 3 bits, i.e. it allows programming one out of 8 different configurations.
However, 9 values are provided instead of 8, overflowing into the subsequent field in the register, and thus breaking the configuration of the latter.

Fix this by dropping a bogus zero value.

Fixes ac1ebc2190f575fc ("sh-pfc: Add sh7734 pinmux support")
---
 drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
index 05ccb27f77818..c691e5e9d9dea 100644
@@ -2231,7 +2231,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
 		FN_LCD_CL1_B, 0, 0,
 	    /* IP10_5_3 [3] */
 		FN_SSI_WS23, FN_VI1_5_B, FN_TX1_D, FN_HSCK0_C, FN_FALE_B,
-		FN_LCD_DON_B, 0, 0, 0,
+		FN_LCD_DON_B, 0, 0,
 	    /* IP10_2_0 [3] */
 		FN_SSI_SCK23, FN_VI1_4_B, FN_RX1_D, FN_FCLE_B,
 		FN_LCD_DATA15_B, 0, 0, 0 }
Signature · 1 line
2.20.1
author maintainer
#100 lore raw

PATCH 97/639 net: hns3: fix error handling int the hns3_get_vector_ring_chain

In reply to Greg Kroah-Hartman

From: Huazhong Tan <[email protected]>

[ Upstream commit cda69d244585bc4497d3bb878c22fe2b6ad647c1 ]

When hns3_get_vector_ring_chain() failed in the hns3_nic_init_vector_data(), it should do the error handling instead of return directly.

Also, cur_chain should be freed instead of chain and head->next should be set to NULL in error handling of hns3_get_vector_ring_chain.

This patch fixes them.

Fixes 73b907a083b8 ("net: hns3: bugfix for buffer not free problem during resetting")
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +3 -2
index 9df807ec8c840..10fa7f5df57e7 100644
@@ -2605,9 +2605,10 @@ err_free_chain:
 	cur_chain = head->next;
 	while (cur_chain) {
 		chain = cur_chain->next;
-		devm_kfree(&pdev->dev, chain);
+		devm_kfree(&pdev->dev, cur_chain);
 		cur_chain = chain;
 	}
+	head->next = NULL;
 
 	return -ENOMEM;
 }
@@ -2679,7 +2680,7 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv)
 		ret = hns3_get_vector_ring_chain(tqp_vector,
 						 &vector_ring_chain);
 		if (ret)
-			return ret;
+			goto map_ring_fail;
 
 		ret = h->ae_algo->ops->map_ring_to_vector(h,
 			tqp_vector->vector_irq, &vector_ring_chain);
Signature · 1 line
2.20.1
author maintainer
#101 lore raw

PATCH 98/639 vxlan: changelink: Fix handling of default remotes

In reply to Greg Kroah-Hartman

From: Petr Machata <[email protected]>

[ Upstream commit ce5e098f7a10b4bf8e948c12fa350320c5c3afad ]

Default remotes are stored as FDB entries with an Ethernet address of 00:00:00:00:00:00. When a request is made to change a remote address of a VXLAN device, vxlan_changelink() first deletes the existing default remote, and then creates a new FDB entry.

This works well as long as the list of default remotes matches exactly the configuration of a VXLAN remote address. Thus when the VXLAN device has a remote of X, there should be exactly one default remote FDB entry X. If the VXLAN device has no remote address, there should be no such entry.

Besides using "ip link set", it is possible to manipulate the list of default remotes by using the "bridge fdb". It is therefore easy to break the above condition. Under such circumstances, the __vxlan_fdb_delete() call doesn't delete the FDB entry itself, but just one remote. The following vxlan_fdb_create() then creates a new FDB entry, leading to a situation where two entries exist for the address 00:00:00:00:00:00, each with a different subset of default remotes.

An even more obvious breakage rooted in the same cause can be observed when a remote address is configured for a VXLAN device that did not have one before. In that case vxlan_changelink() doesn't remove any remote, and just creates a new FDB entry for the new address:

$ ip link add name vx up type vxlan id 2000 dstport 4789
$ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent
$ bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent
$ ip link set dev vx type vxlan remote 192.0.2.30
$ bridge fdb sh dev vx | grep 00:00:00:00:00:00
00:00:00:00:00:00 dst 192.0.2.30 self permanent <- new entry, 1 rdst
00:00:00:00:00:00 dst 192.0.2.20 self permanent <- orig. entry, 2 rdsts
00:00:00:00:00:00 dst 192.0.2.30 self permanent

To fix this, instead of calling vxlan_fdb_create() directly, defer to vxlan_fdb_update(). That has logic to handle the duplicates properly. Additionally, it also handles notifications, so drop that call from changelink as well.

Fixes 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create")
---
 drivers/net/vxlan.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/vxlan.c +3 -4
index 613f366818536..df88981e796a4 100644
@@ -3496,7 +3496,6 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
 	struct vxlan_rdst *dst = &vxlan->default_dst;
 	struct vxlan_rdst old_dst;
 	struct vxlan_config conf;
-	struct vxlan_fdb *f = NULL;
 	int err;
 
 	err = vxlan_nl2conf(tb, data,
@@ -3522,19 +3521,19 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
 					   old_dst.remote_ifindex, 0);
 
 		if (!vxlan_addr_any(&dst->remote_ip)) {
-			err = vxlan_fdb_create(vxlan, all_zeros_mac,
+			err = vxlan_fdb_update(vxlan, all_zeros_mac,
 					       &dst->remote_ip,
 					       NUD_REACHABLE | NUD_PERMANENT,
+					       NLM_F_APPEND | NLM_F_CREATE,
 					       vxlan->cfg.dst_port,
 					       dst->remote_vni,
 					       dst->remote_vni,
 					       dst->remote_ifindex,
-					       NTF_SELF, &f);
+					       NTF_SELF);
 			if (err) {
 				spin_unlock_bh(&vxlan->hash_lock);
 				return err;
 			}
-			vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_NEWNEIGH);
 		}
 		spin_unlock_bh(&vxlan->hash_lock);
 	}
Signature · 1 line
2.20.1
author maintainer
#102 lore raw

PATCH 99/639 Input: nomadik-ske-keypad - fix a loop timeout test

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit 4d8f727b83bcd6702c2d210330872c9122d2d360 ]

The loop exits with "timeout" set to -1 not to 0.

Fixes 1158f0f16224 ("Input: add support for Nomadik SKE keypad controller")
---
 drivers/input/keyboard/nomadik-ske-keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/nomadik-ske-keypad.c +1 -1
index 8567ee47761e1..ae3b045570740 100644
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)
 	while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--)
 		cpu_relax();
 
-	if (!timeout)
+	if (timeout == -1)
 		return -EINVAL;
 
 	/*
Signature · 1 line
2.20.1
author maintainer
#103 lore raw

PATCH 100/639 fork,memcg: fix crash in free_thread_stack on memcg charge fail

In reply to Greg Kroah-Hartman

From: Rik van Riel <[email protected]>

[ Upstream commit 5eed6f1dff87bfb5e545935def3843edf42800f2 ]

Commit 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") will result in fork failing if allocating a kernel stack for a task in dup_task_struct exceeds the kernel memory allowance for that cgroup.

Unfortunately, it also results in a crash.

This is due to the code jumping to free_stack and calling free_thread_stack when the memcg kernel stack charge fails, but without tsk->stack pointing at the freshly allocated stack.

This in turn results in the vfree_atomic in free_thread_stack oopsing with a backtrace like this:

#5 [ffffc900244efc88] die at ffffffff8101f0ab
#6 [ffffc900244efcb8] do_general_protection at ffffffff8101cb86 #7 [ffffc900244efce0] general_protection at ffffffff818ff082

    [exception RIP: llist_add_batch+7]
    RIP: ffffffff8150d487  RSP: ffffc900244efd98  RFLAGS: 00010282
    RAX: 0000000000000000  RBX: ffff88085ef55980  RCX: 0000000000000000
    RDX: ffff88085ef55980  RSI: 343834343531203a  RDI: 343834343531203a
    RBP: ffffc900244efd98   R8: 0000000000000001   R9: ffff8808578c3600
    R10: 0000000000000000  R11: 0000000000000001  R12: ffff88029f6c21c0
    R13: 0000000000000286  R14: ffff880147759b00  R15: 0000000000000000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018

#8 [ffffc900244efda0] vfree_atomic at ffffffff811df2c7 #9 [ffffc900244efdb8] copy_process at ffffffff81086e37
#10 [ffffc900244efe98] _do_fork at ffffffff810884e0 #11 [ffffc900244eff10] sys_vfork at ffffffff810887ff #12 [ffffc900244eff20] do_syscall_64 at ffffffff81002a43

    RIP: 000000000049b948  RSP: 00007ffcdb307830  RFLAGS: 00000246
    RAX: ffffffffffffffda  RBX: 0000000000896030  RCX: 000000000049b948
    RDX: 0000000000000000  RSI: 00007ffcdb307790  RDI: 00000000005d7421
    RBP: 000000000067370f   R8: 00007ffcdb3077b0   R9: 000000000001ed00
    R10: 0000000000000008  R11: 0000000000000246  R12: 0000000000000040
    R13: 000000000000000f  R14: 0000000000000000  R15: 000000000088d018
    ORIG_RAX: 000000000000003a  CS: 0033  SS: 002b

The simplest fix is to assign tsk->stack right where it is allocated.

---
 kernel/fork.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
kernel/fork.c +7 -2
index 8cb5cd7c97e19..5718c5decc55b 100644
@@ -230,8 +230,10 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
 	 * free_thread_stack() can be called in interrupt context,
 	 * so cache the vm_struct.
 	 */
-	if (stack)
+	if (stack) {
 		tsk->stack_vm_area = find_vm_area(stack);
+		tsk->stack = stack;
+	}
 	return stack;
 #else
 	struct page *page = alloc_pages_node(node, THREADINFO_GFP,
@@ -268,7 +270,10 @@ static struct kmem_cache *thread_stack_cache;
 static unsigned long *alloc_thread_stack_node(struct task_struct *tsk,
 						  int node)
 {
-	return kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);
+	unsigned long *stack;
+	stack = kmem_cache_alloc_node(thread_stack_cache, THREADINFO_GFP, node);
+	tsk->stack = stack;
+	return stack;
 }
 
 static void free_thread_stack(struct task_struct *tsk)
Signature · 1 line
2.20.1
author maintainer
#104 lore raw

PATCH 101/639 clk: highbank: fix refcount leak in hb_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 5eb8ba90958de1285120dae5d3a5d2b1a360b3b4 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 26cae166cff9 ("ARM: highbank: remove custom .init_time hook")
---
 drivers/clk/clk-highbank.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/clk-highbank.c +1 -0
index 727ed8e1bb726..8e4581004695c 100644
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
 	/* Map system registers */
 	srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
 	hb_clk->reg = of_iomap(srnp, 0);
+	of_node_put(srnp);
 	BUG_ON(!hb_clk->reg);
 	hb_clk->reg += reg;
 
Signature · 1 line
2.20.1
author maintainer
#105 lore raw

PATCH 102/639 clk: qoriq: fix refcount leak in clockgen_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 70af6c5b5270e8101f318c4b69cc98a726edfab9 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 0dfc86b3173f ("clk: qoriq: Move chip-specific knowledge into driver")
---
 drivers/clk/clk-qoriq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/clk-qoriq.c +1 -0
index 8abc5c8cb8b8c..a0713b2a12f37 100644
@@ -1389,6 +1389,7 @@ static void __init clockgen_init(struct device_node *np)
 				pr_err("%s: Couldn't map %pOF regs\n", __func__,
 				       guts);
 			}
+			of_node_put(guts);
 		}
 
 	}
Signature · 1 line
2.20.1
author maintainer
#106 lore raw

PATCH 103/639 clk: ti: fix refcount leak in ti_dt_clocks_register()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 2274d8001fbb5e1942fbcab5ad2eb15553b09ed2 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 5b385a45e001 ("clk: ti: add support for clkctrl aliases")
---
 drivers/clk/ti/clk.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/clk/ti/clk.c +6 -2
index 27e0979b31586..0cc87c6ae91c9 100644
@@ -188,9 +188,13 @@ void __init ti_dt_clocks_register(struct ti_dt_clk oclks[])
 			clkdev_add(&c->lk);
 		} else {
 			if (num_args && !has_clkctrl_data) {
-				if (of_find_compatible_node(NULL, NULL,
-							    "ti,clkctrl")) {
+				struct device_node *np;
+
+				np = of_find_compatible_node(NULL, NULL,
+							     "ti,clkctrl");
+				if (np) {
 					has_clkctrl_data = true;
+					of_node_put(np);
 				} else {
 					clkctrl_nodes_missing = true;
 
Signature · 1 line
2.20.1
author maintainer
#107 lore raw

PATCH 104/639 clk: socfpga: fix refcount leak

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 7f9705beeb3759e69165e7aff588f6488ff6c1ac ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 5343325ff3dd ("clk: socfpga: add a clock driver for the Arria 10 platform")
Fixes a30d27ed739b ("clk: socfpga: fix clock driver for 3.15")
---
 drivers/clk/socfpga/clk-pll-a10.c | 1 +
 drivers/clk/socfpga/clk-pll.c     | 1 +
 2 files changed, 2 insertions(+)
drivers/clk/socfpga/clk-pll-a10.c +1 -0
index 35fabe1a32c30..269467e8e07e1 100644
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll_init(struct device_node *node,
 
 	clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
 	clk_mgr_a10_base_addr = of_iomap(clkmgr_np, 0);
+	of_node_put(clkmgr_np);
 	BUG_ON(!clk_mgr_a10_base_addr);
 	pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
 
drivers/clk/socfpga/clk-pll.c +1 -0
index c7f463172e4b9..b4b44e9b59011 100644
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node,
 
 	clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
 	clk_mgr_base_addr = of_iomap(clkmgr_np, 0);
+	of_node_put(clkmgr_np);
 	BUG_ON(!clk_mgr_base_addr);
 	pll_clk->hw.reg = clk_mgr_base_addr + reg;
 
Signature · 1 line
2.20.1
author maintainer
#108 lore raw

PATCH 105/639 clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit cee82eb9532090cd1dc953e845d71f9b1445c84e ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes e062b571777f ("clk: exynos4: register clocks using common clock framework")
---
 drivers/clk/samsung/clk-exynos4.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos4.c +1 -0
index 0421960eb9633..442309b569203 100644
@@ -1226,6 +1226,7 @@ static unsigned long __init exynos4_get_xom(void)
 			xom = readl(chipid_base + 8);
 
 		iounmap(chipid_base);
+		of_node_put(np);
 	}
 
 	return xom;
Signature · 1 line
2.20.1
author maintainer
#109 lore raw

PATCH 106/639 clk: imx6q: fix refcount leak in imx6q_clocks_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 2acd1b6f889c ("ARM: i.MX6: implement clocks using common clock framework")
---
 drivers/clk/imx/clk-imx6q.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6q.c +1 -0
index c509324f63385..8ddf9b1f1677c 100644
@@ -424,6 +424,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
 	anatop_base = base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */
 	if (clk_on_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) {
Signature · 1 line
2.20.1
author maintainer
#110 lore raw

PATCH 107/639 clk: imx6sx: fix refcount leak in imx6sx_clocks_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes d55135689019 ("ARM: imx: add clock driver for imx6sx")
---
 drivers/clk/imx/clk-imx6sx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6sx.c +1 -0
index d9f2890ffe62b..57ab96a477756 100644
@@ -151,6 +151,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	clks[IMX6SX_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
 	clks[IMX6SX_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
Signature · 1 line
2.20.1
author maintainer
#111 lore raw

PATCH 108/639 clk: imx7d: fix refcount leak in imx7d_clocks_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 5f8c183a996b76bb09748073c856e4246fd4ce95 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 8f6d8094b215 ("ARM: imx: add imx7d clk tree support")
---
 drivers/clk/imx/clk-imx7d.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx7d.c +1 -0
index 881b772c4ac97..83412bc36ebfb 100644
@@ -413,6 +413,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx7d-anatop");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	clks[IMX7D_PLL_ARM_MAIN_SRC]  = imx_clk_mux("pll_arm_main_src", base + 0x60, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
 	clks[IMX7D_PLL_DRAM_MAIN_SRC] = imx_clk_mux("pll_dram_main_src", base + 0x70, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
Signature · 1 line
2.20.1
author maintainer
#112 lore raw

PATCH 109/639 clk: vf610: fix refcount leak in vf610_clocks_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 1f2c5fd5f048 ("ARM: imx: add VF610 clock support")
---
 drivers/clk/imx/clk-vf610.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-vf610.c +1 -0
index 6dae54325a91d..a334667c450a1 100644
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 	np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
 	anatop_base = of_iomap(np, 0);
 	BUG_ON(!anatop_base);
+	of_node_put(np);
 
 	np = ccm_node;
 	ccm_base = of_iomap(np, 0);
Signature · 1 line
2.20.1
author maintainer
#113 lore raw

PATCH 110/639 clk: armada-370: fix refcount leak in a370_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit a3c24050bdf70c958a8d98c2823b66ea761e6a31 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 07ad6836fa21 ("clk: mvebu: armada-370: maintain clock init order")
---
 drivers/clk/mvebu/armada-370.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-370.c +3 -1
index 2c7c1085f8830..8fdfa97900cd8 100644
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct device_node *np)
 
 	mvebu_coreclk_setup(np, &a370_coreclks);
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, a370_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(a370_clk, "marvell,armada-370-core-clock", a370_clk_init);
 
Signature · 1 line
2.20.1
author maintainer
#114 lore raw

PATCH 111/639 clk: kirkwood: fix refcount leak in kirkwood_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit e7beeab9c61591cd0e690d8733d534c3f4278ff8 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 58d516ae95cb ("clk: mvebu: kirkwood: maintain clock init order")
---
 drivers/clk/mvebu/kirkwood.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/mvebu/kirkwood.c +2 -0
index a2a8d614039da..890ebf623261b 100644
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(struct device_node *np)
 	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, kirkwood_gating_desc);
 		kirkwood_clk_muxing_setup(cgnp, kirkwood_mux_desc);
+
+		of_node_put(cgnp);
 	}
 }
 CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
Signature · 1 line
2.20.1
author maintainer
#115 lore raw

PATCH 112/639 clk: armada-xp: fix refcount leak in axp_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit db20a90a4b6745dad62753f8bd2f66afdd5abc84 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 0a11a6ae9437 ("clk: mvebu: armada-xp: maintain clock init order")
---
 drivers/clk/mvebu/armada-xp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-xp.c +3 -1
index 0ec44ae9a2a26..df529982adc97 100644
@@ -228,7 +228,9 @@ static void __init axp_clk_init(struct device_node *np)
 
 	mvebu_coreclk_setup(np, &axp_coreclks);
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, axp_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init);
Signature · 1 line
2.20.1
author maintainer
#116 lore raw

PATCH 113/639 clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 9b4eedf627045ae5ddcff60a484200cdd554c413 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 337072604224 ("clk: mvebu: Expand mv98dx3236-core-clock support")
---
 drivers/clk/mvebu/mv98dx3236.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/mv98dx3236.c +3 -1
index 6e203af73cac1..c8a0d03d2cd60 100644
@@ -174,7 +174,9 @@ static void __init mv98dx3236_clk_init(struct device_node *np)
 
 	mvebu_coreclk_setup(np, &mv98dx3236_core_clocks);
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, mv98dx3236_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(mv98dx3236_clk, "marvell,mv98dx3236-core-clock", mv98dx3236_clk_init);
Signature · 1 line
2.20.1
author maintainer
#117 lore raw

PATCH 114/639 clk: dove: fix refcount leak in dove_clk_init()

In reply to Greg Kroah-Hartman

From: Yangtao Li <[email protected]>

[ Upstream commit 8d726c5128298386b907963033be93407b0c4275 ]

The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.

Fixes 8f7fc5450b64 ("clk: mvebu: dove: maintain clock init order")
Fixes 63b8d92c793f ("clk: add Dove PLL divider support for GPU, VMeta and AXI clocks")
---
 drivers/clk/mvebu/dove.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/clk/mvebu/dove.c +6 -2
index 59fad9546c847..5f258c9bb68bf 100644
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np)
 
 	mvebu_coreclk_setup(np, &dove_coreclks);
 
-	if (ddnp)
+	if (ddnp) {
 		dove_divider_clk_init(ddnp);
+		of_node_put(ddnp);
+	}
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, dove_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(dove_clk, "marvell,dove-core-clock", dove_clk_init);
Signature · 1 line
2.20.1
author maintainer
#118 lore raw

PATCH 115/639 MIPS: BCM63XX: drop unused and broken DSP platform device

In reply to Greg Kroah-Hartman

From: Jonas Gorski <[email protected]>

[ Upstream commit 682fee802843b332f9c51ffc8e062de5ff773f2e ]

Trying to register the DSP platform device results in a null pointer access:

[    0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20
[    0.135208] Oops[#1]:
[    0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87
...
[    0.197117] epc   : 804e305c bcm63xx_dsp_register+0x80/0xa4
[    0.202838] ra    : 804e6f20 board_register_devices+0x258/0x390

...

This happens because it tries to copy the passed platform data over the platform_device's unpopulated platform_data.

Since this code has been broken since its submission, no driver was ever submitted for it, and apparently nobody was using it, just remove it instead of trying to fix it.

Fixes e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.")
Cc Ralf Baechle <[email protected]>
Cc James Hogan <[email protected]>
---
 arch/mips/bcm63xx/Makefile                    |  6 +-
 arch/mips/bcm63xx/boards/board_bcm963xx.c     | 20 -------
 arch/mips/bcm63xx/dev-dsp.c                   | 56 -------------------
 .../asm/mach-bcm63xx/bcm63xx_dev_dsp.h        | 14 -----
 .../include/asm/mach-bcm63xx/board_bcm963xx.h |  5 --
 5 files changed, 3 insertions(+), 98 deletions(-)
 delete mode 100644 arch/mips/bcm63xx/dev-dsp.c
 delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
arch/mips/bcm63xx/Makefile +3 -3
index c69f297fc1df3..d89651e538f64 100644
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-y		+= clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
-		   setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
-		   dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
-		   dev-wdt.o dev-usb-usbd.o
+		   setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
+		   dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \
+		   dev-usb-usbd.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 obj-y		+= boards/
arch/mips/bcm63xx/boards/board_bcm963xx.c +0 -20
index b2097c0d2ed78..36ec3dc2c999a 100644
@@ -23,7 +23,6 @@
 #include <bcm63xx_nvram.h>
 #include <bcm63xx_dev_pci.h>
 #include <bcm63xx_dev_enet.h>
-#include <bcm63xx_dev_dsp.h>
 #include <bcm63xx_dev_flash.h>
 #include <bcm63xx_dev_hsspi.h>
 #include <bcm63xx_dev_pcmcia.h>
@@ -289,14 +288,6 @@ static struct board_info __initdata board_96348gw_10 = {
 	.has_pccard			= 1,
 	.has_ehci0			= 1,
 
-	.has_dsp			= 1,
-	.dsp = {
-		.gpio_rst		= 6,
-		.gpio_int		= 34,
-		.cs			= 2,
-		.ext_irq		= 2,
-	},
-
 	.leds = {
 		{
 			.name		= "adsl-fail",
@@ -401,14 +392,6 @@ static struct board_info __initdata board_96348gw = {
 
 	.has_ohci0 = 1,
 
-	.has_dsp			= 1,
-	.dsp = {
-		.gpio_rst		= 6,
-		.gpio_int		= 34,
-		.ext_irq		= 2,
-		.cs			= 2,
-	},
-
 	.leds = {
 		{
 			.name		= "adsl-fail",
@@ -898,9 +881,6 @@ int __init board_register_devices(void)
 	if (board.has_usbd)
 		bcm63xx_usbd_register(&board.usbd);
 
-	if (board.has_dsp)
-		bcm63xx_dsp_register(&board.dsp);
-
 	/* Generate MAC address for WLAN and register our SPROM,
 	 * do this after registering enet devices
 	 */
arch/mips/bcm63xx/dev-dsp.c deleted +0 -56

56 lines not on this page · raw message

arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h deleted +0 -14
deleted file mode 100644
index 4e4970787371a..0000000000000
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __BCM63XX_DSP_H
-#define __BCM63XX_DSP_H
-
-struct bcm63xx_dsp_platform_data {
-	unsigned gpio_rst;
-	unsigned gpio_int;
-	unsigned cs;
-	unsigned ext_irq;
-};
-
-int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd);
-
-#endif /* __BCM63XX_DSP_H */
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +0 -5
index 5e5b1bc4a3247..830f53f28e3f7 100644
@@ -7,7 +7,6 @@
 #include <linux/leds.h>
 #include <bcm63xx_dev_enet.h>
 #include <bcm63xx_dev_usb_usbd.h>
-#include <bcm63xx_dev_dsp.h>
 
 /*
  * flash mapping
@@ -31,7 +30,6 @@ struct board_info {
 	unsigned int	has_ohci0:1;
 	unsigned int	has_ehci0:1;
 	unsigned int	has_usbd:1;
-	unsigned int	has_dsp:1;
 	unsigned int	has_uart0:1;
 	unsigned int	has_uart1:1;
 
@@ -43,9 +41,6 @@ struct board_info {
 	/* USB config */
 	struct bcm63xx_usbd_platform_data usbd;
 
-	/* DSP config */
-	struct bcm63xx_dsp_platform_data dsp;
-
 	/* GPIO LEDs */
 	struct gpio_led leds[5];
 
Signature · 1 line
2.20.1
author maintainer
#119 lore raw

PATCH 116/639 arm64: defconfig: Re-enable bcm2835-thermal driver

In reply to Greg Kroah-Hartman

From: Stefan Wahren <[email protected]>

[ Upstream commit 4d9226fd9a0d747030575d7cb184b30c6e64f155 ]

The bcm2835-thermal driver was added with commit ac178e4280e6 ("ARM64: bcm2835: add thermal driver to default config"). Unfortunately this was accidentally dropped by commit eb1e6716cc9c
("arm64: defconfig: sync with savedefconfig"). So enable the driver again.

Fixes eb1e6716cc9c ("arm64: defconfig: sync with savedefconfig")
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index db8d364f84768..1a4f8b67bbe80 100644
@@ -365,6 +365,7 @@ CONFIG_THERMAL_EMULATION=y
 CONFIG_ROCKCHIP_THERMAL=m
 CONFIG_RCAR_GEN3_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
+CONFIG_BCM2835_THERMAL=m
 CONFIG_BRCMSTB_THERMAL=m
 CONFIG_EXYNOS_THERMAL=y
 CONFIG_TEGRA_BPMP_THERMAL=m
Signature · 1 line
2.20.1
author maintainer
#120 lore raw

PATCH 117/639 remoteproc: qcom: q6v5-mss: Add missing clocks for MSM8996

In reply to Greg Kroah-Hartman

From: Sibi Sankar <[email protected]>

[ Upstream commit 80ec419c3404106c563aaf56aa6b516a59c4cdfb ]

Proxy vote for QDSS clock and remove vote on handover interrupt to provide MSS PBL with access to STM hardware registers during boot. Add "snoc_axi" and "mnoc_axi" to the active clock list. Rename "gpll0_mss_clk" to "gpll0_mss" for consistency across SoCs.

Fixes 9f058fa2efb1 ("remoteproc: qcom: Add support for mss remoteproc on msm8996")
---
 drivers/remoteproc/qcom_q6v5_pil.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/remoteproc/qcom_q6v5_pil.c +4 -1
index 6a84b6372897d..073747ba80002 100644
@@ -1271,13 +1271,16 @@ static const struct rproc_hexagon_res msm8996_mss = {
 	.proxy_clk_names = (char*[]){
 			"xo",
 			"pnoc",
+			"qdss",
 			NULL
 	},
 	.active_clk_names = (char*[]){
 			"iface",
 			"bus",
 			"mem",
-			"gpll0_mss_clk",
+			"gpll0_mss",
+			"snoc_axi",
+			"mnoc_axi",
 			NULL
 	},
 	.need_mem_protection = true,
Signature · 1 line
2.20.1
author maintainer
#121 lore raw

PATCH 118/639 remoteproc: qcom: q6v5-mss: Add missing regulator for MSM8996

In reply to Greg Kroah-Hartman

From: Sibi Sankar <[email protected]>

[ Upstream commit 47b874748d500020026ee43b386b5598e20f3a68 ]

Add proxy vote for pll supply on MSM8996 SoC.

Fixes 9f058fa2efb1 ("remoteproc: qcom: Add support for mss remoteproc on msm8996")
---
 drivers/remoteproc/qcom_q6v5_pil.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/remoteproc/qcom_q6v5_pil.c +7 -0
index 073747ba80002..cc475dcbf27f3 100644
@@ -1268,6 +1268,13 @@ static const struct rproc_hexagon_res sdm845_mss = {
 
 static const struct rproc_hexagon_res msm8996_mss = {
 	.hexagon_mba_image = "mba.mbn",
+	.proxy_supply = (struct qcom_mss_reg_res[]) {
+		{
+			.supply = "pll",
+			.uA = 100000,
+		},
+		{}
+	},
 	.proxy_clk_names = (char*[]){
 			"xo",
 			"pnoc",
Signature · 1 line
2.20.1
author maintainer
#122 lore raw

PATCH 119/639 drm: Fix error handling in drm_legacy_addctx

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit c39191feed4540fed98badeb484833dcf659bb96 ]

'ctx->handle' is unsigned, it never less than zero. This patch use int 'tmp_handle' to handle the err condition.

Fixes 62968144e673 ("drm: convert drm context code to use Linux idr")
---
 drivers/gpu/drm/drm_context.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_context.c +9 -6
index f973d287696a6..da5abf24f59ff 100644
@@ -361,23 +361,26 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
 {
 	struct drm_ctx_list *ctx_entry;
 	struct drm_ctx *ctx = data;
+	int tmp_handle;
 
 	if (!drm_core_check_feature(dev, DRIVER_KMS_LEGACY_CONTEXT) &&
 	    !drm_core_check_feature(dev, DRIVER_LEGACY))
 		return -EINVAL;
 
-	ctx->handle = drm_legacy_ctxbitmap_next(dev);
-	if (ctx->handle == DRM_KERNEL_CONTEXT) {
+	tmp_handle = drm_legacy_ctxbitmap_next(dev);
+	if (tmp_handle == DRM_KERNEL_CONTEXT) {
 		/* Skip kernel's context and get a new one. */
-		ctx->handle = drm_legacy_ctxbitmap_next(dev);
+		tmp_handle = drm_legacy_ctxbitmap_next(dev);
 	}
-	DRM_DEBUG("%d\n", ctx->handle);
-	if (ctx->handle < 0) {
+	DRM_DEBUG("%d\n", tmp_handle);
+	if (tmp_handle < 0) {
 		DRM_DEBUG("Not enough free contexts.\n");
 		/* Should this return -EBUSY instead? */
-		return -ENOMEM;
+		return tmp_handle;
 	}
 
+	ctx->handle = tmp_handle;
+
 	ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL);
 	if (!ctx_entry) {
 		DRM_DEBUG("out of memory\n");
Signature · 1 line
2.20.1
author maintainer
#123 lore raw

PATCH 120/639 ARM: dts: r8a7743: Remove generic compatible string from iic3

In reply to Greg Kroah-Hartman

From: Biju Das <[email protected]>

[ Upstream commit 072b817589b17660ef19c31d89f7b981dbed3fd2 ]

The iic3 block on RZ/G1M does not support automatic transmission, unlike other R-Car SoC's. So dropping the compatibility with the generic version.

Fixes f523405f2a22cc0c307 ("ARM: dts: r8a7743: Add IIC cores to dtsi")
---
 arch/arm/boot/dts/r8a7743.dtsi | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/boot/dts/r8a7743.dtsi +1 -3
index 24715f74ae08c..5015e2273d82f 100644
@@ -565,9 +565,7 @@
 			/* doesn't need pinmux */
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "renesas,iic-r8a7743",
-				     "renesas,rcar-gen2-iic",
-				     "renesas,rmobile-iic";
+			compatible = "renesas,iic-r8a7743";
 			reg = <0 0xe60b0000 0 0x425>;
 			interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cpg CPG_MOD 926>;
Signature · 1 line
2.20.1
author maintainer
#124 lore raw

PATCH 121/639 drm/etnaviv: fix some off by one bugs

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit f5fd9fd4000984f19db689282054953981a50534 ]

The ->nr_signal is the supposed to be the number of elements in the ->signal array. There was one place where it was 5 but it was supposed to be 4. That looks like a copy and paste bug. There were also two checks that were off by one.

Fixes 9e2c2e273012 ("drm/etnaviv: add infrastructure to query perf counter")
---
 drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c +3 -3
index 9980d81a26e3c..4227a4006c349 100644
@@ -113,7 +113,7 @@ static const struct etnaviv_pm_domain doms_3d[] = {
 		.name = "PE",
 		.profile_read = VIVS_MC_PROFILE_PE_READ,
 		.profile_config = VIVS_MC_PROFILE_CONFIG0,
-		.nr_signals = 5,
+		.nr_signals = 4,
 		.signal = (const struct etnaviv_pm_signal[]) {
 			{
 				"PIXEL_COUNT_KILLED_BY_COLOR_PIPE",
@@ -435,7 +435,7 @@ int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu,
 
 	dom = meta->domains + signal->domain;
 
-	if (signal->iter > dom->nr_signals)
+	if (signal->iter >= dom->nr_signals)
 		return -EINVAL;
 
 	sig = &dom->signal[signal->iter];
@@ -461,7 +461,7 @@ int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr *r,
 
 	dom = meta->domains + r->domain;
 
-	if (r->signal > dom->nr_signals)
+	if (r->signal >= dom->nr_signals)
 		return -EINVAL;
 
 	return 0;
Signature · 1 line
2.20.1
author maintainer
#125 lore raw

PATCH 122/639 drm/fb-helper: generic: Fix setup error path

In reply to Greg Kroah-Hartman

From: Noralf Trønnes <[email protected]>

[ Upstream commit 6e1490cf439aa86b104e5124c36275b964238e1f ]

If register_framebuffer() fails during fbdev setup we will leak the framebuffer, the GEM buffer and the shadow buffer for defio. This is because drm_fb_helper_fbdev_setup() just calls drm_fb_helper_fini() on error not taking into account that register_framebuffer() can fail.

Since the generic emulation uses DRM client for its framebuffer and backing buffer in addition to a shadow buffer, it's necessary to open code drm_fb_helper_fbdev_setup() to properly handle the error path.

Error cleanup is removed from .fb_probe and is handled by one function for all paths.

---
 drivers/gpu/drm/drm_fb_helper.c | 98 +++++++++++++++++++--------------
 1 file changed, 58 insertions(+), 40 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +58 -40
index f57fc1450b613..1c87ad6667e73 100644
@@ -2979,18 +2979,16 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user)
 	return 0;
 }
 
-/*
- * fb_ops.fb_destroy is called by the last put_fb_info() call at the end of
- * unregister_framebuffer() or fb_release().
- */
-static void drm_fbdev_fb_destroy(struct fb_info *info)
+static void drm_fbdev_cleanup(struct drm_fb_helper *fb_helper)
 {
-	struct drm_fb_helper *fb_helper = info->par;
 	struct fb_info *fbi = fb_helper->fbdev;
 	struct fb_ops *fbops = NULL;
 	void *shadow = NULL;
 
-	if (fbi->fbdefio) {
+	if (!fb_helper->dev)
+		return;
+
+	if (fbi && fbi->fbdefio) {
 		fb_deferred_io_cleanup(fbi);
 		shadow = fbi->screen_buffer;
 		fbops = fbi->fbops;
@@ -3004,6 +3002,12 @@ static void drm_fbdev_fb_destroy(struct fb_info *info)
 	}
 
 	drm_client_framebuffer_delete(fb_helper->buffer);
+}
+
+static void drm_fbdev_release(struct drm_fb_helper *fb_helper)
+{
+	drm_fbdev_cleanup(fb_helper);
+
 	/*
 	 * FIXME:
 	 * Remove conditional when all CMA drivers have been moved over to using
@@ -3015,6 +3019,15 @@ static void drm_fbdev_fb_destroy(struct fb_info *info)
 	}
 }
 
+/*
+ * fb_ops.fb_destroy is called by the last put_fb_info() call at the end of
+ * unregister_framebuffer() or fb_release().
+ */
+static void drm_fbdev_fb_destroy(struct fb_info *info)
+{
+	drm_fbdev_release(info->par);
+}
+
 static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
 	struct drm_fb_helper *fb_helper = info->par;
@@ -3065,7 +3078,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 	struct drm_framebuffer *fb;
 	struct fb_info *fbi;
 	u32 format;
-	int ret;
 
 	DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d)\n",
 		      sizes->surface_width, sizes->surface_height,
@@ -3082,10 +3094,8 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 	fb = buffer->fb;
 
 	fbi = drm_fb_helper_alloc_fbi(fb_helper);
-	if (IS_ERR(fbi)) {
-		ret = PTR_ERR(fbi);
-		goto err_free_buffer;
-	}
+	if (IS_ERR(fbi))
+		return PTR_ERR(fbi);
 
 	fbi->par = fb_helper;
 	fbi->fbops = &drm_fbdev_fb_ops;
@@ -3116,8 +3126,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 		if (!fbops || !shadow) {
 			kfree(fbops);
 			vfree(shadow);
-			ret = -ENOMEM;
-			goto err_fb_info_destroy;
+			return -ENOMEM;
 		}
 
 		*fbops = *fbi->fbops;
@@ -3129,13 +3138,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
 	}
 
 	return 0;
-
-err_fb_info_destroy:
-	drm_fb_helper_fini(fb_helper);
-err_free_buffer:
-	drm_client_framebuffer_delete(buffer);
-
-	return ret;
 }
 EXPORT_SYMBOL(drm_fb_helper_generic_probe);
 
@@ -3147,18 +3149,11 @@ static void drm_fbdev_client_unregister(struct drm_client_dev *client)
 {
 	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
 
-	if (fb_helper->fbdev) {
-		drm_fb_helper_unregister_fbi(fb_helper);
+	if (fb_helper->fbdev)
 		/* drm_fbdev_fb_destroy() takes care of cleanup */
-		return;
-	}
-
-	/* Did drm_fb_helper_fbdev_setup() run? */
-	if (fb_helper->dev)
-		drm_fb_helper_fini(fb_helper);
-
-	drm_client_release(client);
-	kfree(fb_helper);
+		drm_fb_helper_unregister_fbi(fb_helper);
+	else
+		drm_fbdev_release(fb_helper);
 }
 
 static int drm_fbdev_client_restore(struct drm_client_dev *client)
@@ -3174,7 +3169,7 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
 	struct drm_device *dev = client->dev;
 	int ret;
 
-	/* If drm_fb_helper_fbdev_setup() failed, we only try once */
+	/* Setup is not retried if it has failed */
 	if (!fb_helper->dev && fb_helper->funcs)
 		return 0;
 
@@ -3184,15 +3179,34 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
 	if (!dev->mode_config.num_connector)
 		return 0;
 
-	ret = drm_fb_helper_fbdev_setup(dev, fb_helper, &drm_fb_helper_generic_funcs,
-					fb_helper->preferred_bpp, 0);
-	if (ret) {
-		fb_helper->dev = NULL;
-		fb_helper->fbdev = NULL;
-		return ret;
-	}
+	drm_fb_helper_prepare(dev, fb_helper, &drm_fb_helper_generic_funcs);
+
+	ret = drm_fb_helper_init(dev, fb_helper, dev->mode_config.num_connector);
+	if (ret)
+		goto err;
+
+	ret = drm_fb_helper_single_add_all_connectors(fb_helper);
+	if (ret)
+		goto err_cleanup;
+
+	if (!drm_drv_uses_atomic_modeset(dev))
+		drm_helper_disable_unused_functions(dev);
+
+	ret = drm_fb_helper_initial_config(fb_helper, fb_helper->preferred_bpp);
+	if (ret)
+		goto err_cleanup;
 
 	return 0;
+
+err_cleanup:
+	drm_fbdev_cleanup(fb_helper);
+err:
+	fb_helper->dev = NULL;
+	fb_helper->fbdev = NULL;
+
+	DRM_DEV_ERROR(dev->dev, "fbdev: Failed to setup generic emulation (ret=%d)\n", ret);
+
+	return ret;
 }
 
 static const struct drm_client_funcs drm_fbdev_client_funcs = {
@@ -3245,6 +3259,10 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
 
 	drm_client_add(&fb_helper->client);
 
+	if (!preferred_bpp)
+		preferred_bpp = dev->mode_config.preferred_depth;
+	if (!preferred_bpp)
+		preferred_bpp = 32;
 	fb_helper->preferred_bpp = preferred_bpp;
 
 	drm_fbdev_client_hotplug(&fb_helper->client);
Signature · 1 line
2.20.1
author maintainer
#126 lore raw

PATCH 123/639 fork, memcg: fix cached_stacks case

In reply to Greg Kroah-Hartman

From: Shakeel Butt <[email protected]>

[ Upstream commit ba4a45746c362b665e245c50b870615f02f34781 ]

Commit 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on memcg charge fail") fixes a crash caused due to failed memcg charge of the kernel stack. However the fix misses the cached_stacks case which this patch fixes. So, the same crash can happen if the memcg charge of a cached stack is failed.

Fixes 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on memcg charge fail")
Cc Rik van Riel <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Tejun Heo <[email protected]>
---
 kernel/fork.c | 1 +
 1 file changed, 1 insertion(+)
kernel/fork.c +1 -0
index 5718c5decc55b..1bd119530a492 100644
@@ -216,6 +216,7 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
 		memset(s->addr, 0, THREAD_SIZE);
 
 		tsk->stack_vm_area = s;
+		tsk->stack = s->addr;
 		return s->addr;
 	}
 
Signature · 1 line
2.20.1
author maintainer
#127 lore raw

PATCH 124/639 IB/usnic: Fix out of bounds index check in query pkey

In reply to Greg Kroah-Hartman

From: Gal Pressman <[email protected]>

[ Upstream commit 4959d5da5737dd804255c75b8cea0a2929ce279a ]

The pkey table size is one element, index should be tested for > 0 instead of > 1.

Fixes e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver")
---
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
index 3db232429630e..e611f133aa97b 100644
@@ -447,7 +447,7 @@ struct net_device *usnic_get_netdev(struct ib_device *device, u8 port_num)
 int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
 				u16 *pkey)
 {
-	if (index > 1)
+	if (index > 0)
 		return -EINVAL;
 
 	*pkey = 0xffff;
Signature · 1 line
2.20.1
author maintainer
#128 lore raw

PATCH 125/639 RDMA/ocrdma: Fix out of bounds index check in query pkey

In reply to Greg Kroah-Hartman

From: Gal Pressman <[email protected]>

[ Upstream commit b188940796c7be31c1b8c25a9a0e0842c2e7a49e ]

The pkey table size is one element, index should be tested for > 0 instead of > 1.

Fixes fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
index c158ca9fde6dc..08271fce0b9e4 100644
@@ -55,7 +55,7 @@
 
 int ocrdma_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey)
 {
-	if (index > 1)
+	if (index > 0)
 		return -EINVAL;
 
 	*pkey = 0xffff;
Signature · 1 line
2.20.1
author maintainer
#129 lore raw

PATCH 126/639 RDMA/qedr: Fix out of bounds index check in query pkey

In reply to Greg Kroah-Hartman

From: Gal Pressman <[email protected]>

[ Upstream commit dbe30dae487e1a232158c24b432d45281c2805b7 ]

The pkey table size is QEDR_ROCE_PKEY_TABLE_LEN, index should be tested for >= QEDR_ROCE_PKEY_TABLE_LEN instead of > QEDR_ROCE_PKEY_TABLE_LEN.

Fixes a7efd7773e31 ("qedr: Add support for PD,PKEY and CQ verbs")
---
 drivers/infiniband/hw/qedr/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/qedr/verbs.c +1 -1
index 9167a1c40bcf5..8fd8b97348bfe 100644
@@ -67,7 +67,7 @@ static inline int qedr_ib_copy_to_udata(struct ib_udata *udata, void *src,
 
 int qedr_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey)
 {
-	if (index > QEDR_ROCE_PKEY_TABLE_LEN)
+	if (index >= QEDR_ROCE_PKEY_TABLE_LEN)
 		return -EINVAL;
 
 	*pkey = QEDR_ROCE_PKEY_DEFAULT;
Signature · 1 line
2.20.1
author maintainer
#130 lore raw

PATCH 127/639 drm/shmob: Fix return value check in shmob_drm_probe

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 06c3bbd3c12737a50c2e981821b5585e1786e73d ]

In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().

Fixes 8f1597c8f1a5 ("drm: shmobile: Perform initialization/cleanup at probe/remove time")
---
 drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/shmobile/shmob_drm_drv.c +2 -2
index 592572554eb0e..58d8a98c749b4 100644
@@ -233,8 +233,8 @@ static int shmob_drm_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	sdev->mmio = devm_ioremap_resource(&pdev->dev, res);
-	if (sdev->mmio == NULL)
-		return -ENOMEM;
+	if (IS_ERR(sdev->mmio))
+		return PTR_ERR(sdev->mmio);
 
 	ret = shmob_drm_setup_clocks(sdev, pdata->clk_source);
 	if (ret < 0)
Signature · 1 line
2.20.1
author maintainer
#131 lore raw

PATCH 128/639 arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD

In reply to Greg Kroah-Hartman

From: Loic Poulain <[email protected]>

[ Upstream commit af61bef513ba179559e56908b8c465e587bc3890 ]

In the same way as for msm8974-hammerhead, l11 load, used for SDCARD VMMC, needs to be increased in order to prevent any voltage drop issues (due to limited current) happening with some SDCARDS or during specific operations (e.g. write).

Tested on Dragonboard-410c and DART-SD410 boards.

Fixes 4c7d53d16d77 (arm64: dts: apq8016-sbc: add regulators support)
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +2 -0
index 78ce3979ef096..f38b815e696d8 100644
@@ -630,6 +630,8 @@
 	l11 {
 		regulator-min-microvolt = <1750000>;
 		regulator-max-microvolt = <3337000>;
+		regulator-allow-set-load;
+		regulator-system-load = <200000>;
 	};
 
 	l12 {
Signature · 1 line
2.20.1
author maintainer
#132 lore raw

PATCH 129/639 spi: cadence: Correct initialisation of runtime PM

In reply to Greg Kroah-Hartman

From: Charles Keepax <[email protected]>

[ Upstream commit 734882a8bf984c2ac8a57d8ac3ee53230bd0bed8 ]

Currently the driver calls pm_runtime_put_autosuspend but without ever having done a pm_runtime_get, this causes the reference count in the pm runtime core to become -1. The bad reference count causes the core to sometimes suspend whilst an active SPI transfer is in progress.

arizona spi0.1: SPI transfer timed out
spi_master spi0: failed to transfer one message from queue

The correct proceedure is to do all the initialisation that requires the hardware to be powered up before enabling the PM runtime, then enable the PM runtime having called pm_runtime_set_active to inform it that the hardware is currently powered up. The core will then power it down at it's leisure and no explicit pm_runtime_put is required.

Fixes d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
---
 drivers/spi/spi-cadence.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/spi/spi-cadence.c +4 -7
index 7c88f74f7f470..94cc0a152449f 100644
@@ -584,11 +584,6 @@ static int cdns_spi_probe(struct platform_device *pdev)
 		goto clk_dis_apb;
 	}
 
-	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
-	pm_runtime_set_active(&pdev->dev);
-	pm_runtime_enable(&pdev->dev);
-
 	ret = of_property_read_u32(pdev->dev.of_node, "num-cs", &num_cs);
 	if (ret < 0)
 		master->num_chipselect = CDNS_SPI_DEFAULT_NUM_CS;
@@ -603,8 +598,10 @@ static int cdns_spi_probe(struct platform_device *pdev)
 	/* SPI controller initializations */
 	cdns_spi_init_hw(xspi);
 
-	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	pm_runtime_set_active(&pdev->dev);
+	pm_runtime_enable(&pdev->dev);
+	pm_runtime_use_autosuspend(&pdev->dev);
+	pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq <= 0) {
Signature · 1 line
2.20.1
author maintainer
#133 lore raw

PATCH 130/639 RDMA/iw_cxgb4: Fix the unchecked ep dereference

In reply to Greg Kroah-Hartman

From: Raju Rangoju <[email protected]>

[ Upstream commit 3352976c892301fd576a2e9ff0ac7337b2e2ca48 ]

The patch 944661dd97f4: "RDMA/iw_cxgb4: atomically lookup ep and get a reference" from May 6, 2016, leads to the following Smatch complaint:

drivers/infiniband/hw/cxgb4/cm.c:2953 terminate()
error: we previously assumed 'ep' could be null (see line 2945)

Fixes 944661dd97f4 ("RDMA/iw_cxgb4: atomically lookup ep and get a reference")
---
 drivers/infiniband/hw/cxgb4/cm.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +10 -7
index 4dcc92d116097..1b3d014fa1d6e 100644
@@ -2947,15 +2947,18 @@ static int terminate(struct c4iw_dev *dev, struct sk_buff *skb)
 
 	ep = get_ep_from_tid(dev, tid);
 
-	if (ep && ep->com.qp) {
-		pr_warn("TERM received tid %u qpid %u\n",
-			tid, ep->com.qp->wq.sq.qid);
-		attrs.next_state = C4IW_QP_STATE_TERMINATE;
-		c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
-			       C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
+	if (ep) {
+		if (ep->com.qp) {
+			pr_warn("TERM received tid %u qpid %u\n", tid,
+				ep->com.qp->wq.sq.qid);
+			attrs.next_state = C4IW_QP_STATE_TERMINATE;
+			c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
+				       C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
+		}
+
+		c4iw_put_ep(&ep->com);
 	} else
 		pr_warn("TERM received tid %u no ep/qp\n", tid);
-	c4iw_put_ep(&ep->com);
 
 	return 0;
 }
Signature · 1 line
2.20.1
author maintainer
#134 lore raw

PATCH 131/639 net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ9031

In reply to Greg Kroah-Hartman

From: Heiner Kallweit <[email protected]>

[ Upstream commit 1d16073a326891c2a964e4cb95bc18fbcafb5f74 ]

So far genphy_soft_reset was used automatically if the PHY driver didn't implement the soft_reset callback. This changed with the mentioned commit and broke KSZ9031. To fix this configure the KSZ9031 PHY driver to use genphy_soft_reset.

---
 drivers/net/phy/micrel.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/micrel.c +1 -0
index 05a6ae32ff652..b4c67c3a928b5 100644
@@ -977,6 +977,7 @@ static struct phy_driver ksphy_driver[] = {
 	.driver_data	= &ksz9021_type,
 	.probe		= kszphy_probe,
 	.config_init	= ksz9031_config_init,
+	.soft_reset	= genphy_soft_reset,
 	.read_status	= ksz9031_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
Signature · 1 line
2.20.1
author maintainer
#135 lore raw

PATCH 132/639 memory: tegra: Dont invoke Tegra30+ specific memory timing setup on Tegra20

In reply to Greg Kroah-Hartman

From: Dmitry Osipenko <[email protected]>

[ Upstream commit be4dbdec2bab8635c7a41573668624ee13d83022 ]

This fixes irrelevant "tegra-mc 7000f000.memory-controller: no memory timings for RAM code 0 registered" warning message during of kernels boot-up on Tegra20.

Fixes a8d502fd3348 ("memory: tegra: Squash tegra20-mc into common tegra-mc driver")
---
 drivers/memory/tegra/mc.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/memory/tegra/mc.c +6 -5
index c8f16666256cc..346d8eadb44b1 100644
@@ -664,12 +664,13 @@ static int tegra_mc_probe(struct platform_device *pdev)
 		}
 
 		isr = tegra_mc_irq;
-	}
 
-	err = tegra_mc_setup_timings(mc);
-	if (err < 0) {
-		dev_err(&pdev->dev, "failed to setup timings: %d\n", err);
-		return err;
+		err = tegra_mc_setup_timings(mc);
+		if (err < 0) {
+			dev_err(&pdev->dev, "failed to setup timings: %d\n",
+				err);
+			return err;
+		}
 	}
 
 	mc->irq = platform_get_irq(pdev, 0);
Signature · 1 line
2.20.1
author maintainer
#136 lore raw

PATCH 133/639 drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit f8261c376e7f8cb9024af5a6c54be540c7f9108e ]

The etnaviv_gem_get_pages() never returns NULL. It returns error pointers on error.

Fixes a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver")
---
 drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_dump.c +1 -1
index 468dff2f79040..9d839b4fd8f78 100644
@@ -217,7 +217,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)
 		mutex_lock(&obj->lock);
 		pages = etnaviv_gem_get_pages(obj);
 		mutex_unlock(&obj->lock);
-		if (pages) {
+		if (!IS_ERR(pages)) {
 			int j;
 
 			iter.hdr->data[0] = bomap - bomap_start;
Signature · 1 line
2.20.1
author maintainer
#137 lore raw

PATCH 134/639 media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL

In reply to Greg Kroah-Hartman

From: Pawe? Chmiel <[email protected]>

[ Upstream commit 19c624c6b29e244c418f8b44a711cbf5e82e3cd4 ]

This commit corrects max and step values for v4l2 control for V4L2_CID_JPEG_RESTART_INTERVAL. Max should be 0xffff and step should be 1. It was found by using v4l2-compliance tool and checking result of VIDIOC_QUERY_EXT_CTRL/QUERYMENU test.
Previously it was complaining that step was bigger than difference between max and min.

Fixes 15f4bc3b1f42 ("[media] s5p-jpeg: Add JPEG controls support")
---
 drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/s5p-jpeg/jpeg-core.c +1 -1
index 350afaa29a620..fa7c42cf4b4ef 100644
@@ -2005,7 +2005,7 @@ static int s5p_jpeg_controls_create(struct s5p_jpeg_ctx *ctx)
 
 		v4l2_ctrl_new_std(&ctx->ctrl_handler, &s5p_jpeg_ctrl_ops,
 				  V4L2_CID_JPEG_RESTART_INTERVAL,
-				  0, 3, 0xffff, 0);
+				  0, 0xffff, 1, 0);
 		if (ctx->jpeg->variant->version == SJPEG_S5P)
 			mask = ~0x06; /* 422, 420 */
 	}
Signature · 1 line
2.20.1
author maintainer
#138 lore raw

PATCH 135/639 kbuild: mark prepare0 as PHONY to fix external module build

In reply to Greg Kroah-Hartman

From: Masahiro Yamada <[email protected]>

[ Upstream commit e00d8880481497474792d28c14479a9fb6752046 ]

Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC when an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build.

Commit e07db28eea38 ("kbuild: fix single target build for external module") turned it into a build error because the 'prepare' target is now executed but the 'prepare0' target is missing for the external module build.

External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is also broken in the same way.

Move 'PHONY += prepare0' to the common place. GNU Make is fine with missing rule for phony targets. I also removed the comment which is wrong irrespective of this commit.

I minimize the change so it can be easily backported to 4.20.x

To fix v4.20, please backport e07db28eea38 ("kbuild: fix single target build for external module"), and then this commit.

Fixes e07db28eea38 ("kbuild: fix single target build for external module")
Fixes c3ff2a5193fa ("powerpc/32: add stack protector support")
Fixes 189af4657186 ("ARM: smp: add support for per-task stack canaries")
Fixes 0a1213fa7432 ("arm64: enable per-task stack canaries")
Cc linux-stable <[email protected]> # v4.20
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 48dbafb790ff1..9ceecb038356d 100644
@@ -964,6 +964,7 @@ ifdef CONFIG_STACK_VALIDATION
   endif
 endif
 
+PHONY += prepare0
 
 ifeq ($(KBUILD_EXTMOD),)
 core-y		+= kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -1072,8 +1073,7 @@ scripts: scripts_basic asm-generic gcc-plugins $(autoksyms_h)
 # archprepare is used in arch Makefiles and when processed asm symlink,
 # version.h and scripts_basic is processed / created.
 
-# Listed in dependency order
-PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
+PHONY += prepare archprepare prepare1 prepare2 prepare3
 
 # prepare3 is used to check if we are building in a separate output directory,
 # and if so do:
Signature · 1 line
2.20.1
author maintainer
#139 lore raw

PATCH 136/639 crypto: brcm - Fix some set-but-not-used warning

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit 707d0cf8f7cff6dfee9197002859912310532c4f ]

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/crypto/bcm/cipher.c: In function 'handle_ahash_req':
drivers/crypto/bcm/cipher.c:720:15: warning:
variable 'chunk_start' set but not used [-Wunused-but-set-variable]

drivers/crypto/bcm/cipher.c: In function 'spu_rx_callback':
drivers/crypto/bcm/cipher.c:1679:31: warning:
variable 'areq' set but not used [-Wunused-but-set-variable]

drivers/crypto/bcm/cipher.c:1678:22: warning:
variable 'ctx' set but not used [-Wunused-but-set-variable]

Fixes 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
---
 drivers/crypto/bcm/cipher.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/crypto/bcm/cipher.c +1 -5
index 49c0097fa4749..0b1fc5664b1d8 100644
@@ -717,7 +717,7 @@ static int handle_ahash_req(struct iproc_reqctx_s *rctx)
 	 */
 	unsigned int new_data_len;
 
-	unsigned int chunk_start = 0;
+	unsigned int __maybe_unused chunk_start = 0;
 	u32 db_size;	 /* Length of data field, incl gcm and hash padding */
 	int pad_len = 0; /* total pad len, including gcm, hash, stat padding */
 	u32 data_pad_len = 0;	/* length of GCM/CCM padding */
@@ -1675,8 +1675,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg)
 	struct spu_hw *spu = &iproc_priv.spu;
 	struct brcm_message *mssg = msg;
 	struct iproc_reqctx_s *rctx;
-	struct iproc_ctx_s *ctx;
-	struct crypto_async_request *areq;
 	int err = 0;
 
 	rctx = mssg->ctx;
@@ -1686,8 +1684,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg)
 		err = -EFAULT;
 		goto cb_finish;
 	}
-	areq = rctx->parent;
-	ctx = rctx->ctx;
 
 	/* process the SPU status */
 	err = spu->spu_status_process(rctx->msg_buf.rx_stat);
Signature · 1 line
2.20.1
author maintainer
#140 lore raw

PATCH 137/639 crypto: tgr192 - fix unaligned memory access

In reply to Greg Kroah-Hartman

From: Eric Biggers <[email protected]>

[ Upstream commit f990f7fb58ac8ac9a43316f09a48cff1a49dda42 ]

Fix an unaligned memory access in tgr192_transform() by using the unaligned access helpers.

Fixes 06ace7a9bafe ("[CRYPTO] Use standard byte order macros wherever possible")
---
 crypto/tgr192.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
crypto/tgr192.c +3 -3
index 022d3dd76c3b2..f8e1d9f9938f5 100644
@@ -25,8 +25,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <asm/byteorder.h>
 #include <linux/types.h>
+#include <asm/byteorder.h>
+#include <asm/unaligned.h>
 
 #define TGR192_DIGEST_SIZE 24
 #define TGR160_DIGEST_SIZE 20
@@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)
 	u64 a, b, c, aa, bb, cc;
 	u64 x[8];
 	int i;
-	const __le64 *ptr = (const __le64 *)data;
 
 	for (i = 0; i < 8; i++)
-		x[i] = le64_to_cpu(ptr[i]);
+		x[i] = get_unaligned_le64(data + i * sizeof(__le64));
 
 	/* save */
 	a = aa = tctx->a;
Signature · 1 line
2.20.1
author maintainer
#141 lore raw

PATCH 138/639 ASoC: imx-sgtl5000: put of nodes if finding codec fails

In reply to Greg Kroah-Hartman

From: Stefan Agner <[email protected]>

[ Upstream commit d9866572486802bc598a3e8576a5231378d190de ]

Make sure to properly put the of node in case finding the codec fails.

Fixes 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
---
 sound/soc/fsl/imx-sgtl5000.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/fsl/imx-sgtl5000.c +2 -1
index 9b9a7ec529055..4bd8da3a5f5b8 100644
@@ -112,7 +112,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
 		dev_err(&pdev->dev, "failed to find codec platform device\n");
-		return -EPROBE_DEFER;
+		ret = -EPROBE_DEFER;
+		goto fail;
 	}
 
 	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
Signature · 1 line
2.20.1
author maintainer
#142 lore raw

PATCH 139/639 IB/iser: Pass the correct number of entries for dma mapped SGL

In reply to Greg Kroah-Hartman

From: Israel Rukshin <[email protected]>

[ Upstream commit 57b26497fabe1b9379b59fbc7e35e608e114df16 ]

ib_dma_map_sg() augments the SGL into a 'dma mapped SGL'. This process may change the number of entries and the lengths of each entry.

Code that touches dma_address is iterating over the 'dma mapped SGL' and must use dma_nents which returned from ib_dma_map_sg().

ib_sg_to_pages() and ib_map_mr_sg() are using dma_address so they must use dma_nents.

Fixes 39405885005a ("IB/iser: Port to new fast registration API")
Fixes bfe066e256d5 ("IB/iser: Reuse ib_sg_to_pages")
---
 drivers/infiniband/ulp/iser/iser_memory.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/infiniband/ulp/iser/iser_memory.c +5 -5
index 009be8889d71d..379bc0dfc3885 100644
@@ -240,8 +240,8 @@ int iser_fast_reg_fmr(struct iscsi_iser_task *iser_task,
 	page_vec->npages = 0;
 	page_vec->fake_mr.page_size = SIZE_4K;
 	plen = ib_sg_to_pages(&page_vec->fake_mr, mem->sg,
-			      mem->size, NULL, iser_set_page);
-	if (unlikely(plen < mem->size)) {
+			      mem->dma_nents, NULL, iser_set_page);
+	if (unlikely(plen < mem->dma_nents)) {
 		iser_err("page vec too short to hold this SG\n");
 		iser_data_buf_dump(mem, device->ib_device);
 		iser_dump_page_vec(page_vec);
@@ -451,10 +451,10 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task,
 
 	ib_update_fast_reg_key(mr, ib_inc_rkey(mr->rkey));
 
-	n = ib_map_mr_sg(mr, mem->sg, mem->size, NULL, SIZE_4K);
-	if (unlikely(n != mem->size)) {
+	n = ib_map_mr_sg(mr, mem->sg, mem->dma_nents, NULL, SIZE_4K);
+	if (unlikely(n != mem->dma_nents)) {
 		iser_err("failed to map sg (%d/%d)\n",
-			 n, mem->size);
+			 n, mem->dma_nents);
 		return n < 0 ? n : -EINVAL;
 	}
 
Signature · 1 line
2.20.1
author maintainer
#143 lore raw

PATCH 140/639 net: hns3: fix wrong combined count returned by ethtool -l

In reply to Greg Kroah-Hartman

From: Huazhong Tan <[email protected]>

[ Upstream commit c3b9c50d1567aa12be4448fe85b09626eba2499c ]

The current code returns the number of all queues that can be used and the number of queues that have been allocated, which is incorrect. What should be returned is the number of queues allocated for each enabled TC and the number of queues that can be allocated.

This patch fixes it.

Fixes 482d2e9c1cc7 ("net: hns3: add support to query tqps number")
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +3 -4
index f8cc8d1f0b209..4b9f898a1620c 100644
@@ -5922,18 +5922,17 @@ static u32 hclge_get_max_channels(struct hnae3_handle *handle)
 	struct hclge_vport *vport = hclge_get_vport(handle);
 	struct hclge_dev *hdev = vport->back;
 
-	return min_t(u32, hdev->rss_size_max * kinfo->num_tc, hdev->num_tqps);
+	return min_t(u32, hdev->rss_size_max,
+		     vport->alloc_tqps / kinfo->num_tc);
 }
 
 static void hclge_get_channels(struct hnae3_handle *handle,
 			       struct ethtool_channels *ch)
 {
-	struct hclge_vport *vport = hclge_get_vport(handle);
-
 	ch->max_combined = hclge_get_max_channels(handle);
 	ch->other_count = 1;
 	ch->max_other = 1;
-	ch->combined_count = vport->alloc_tqps;
+	ch->combined_count = handle->kinfo.rss_size;
 }
 
 static void hclge_get_tqps_and_rss_info(struct hnae3_handle *handle,
Signature · 1 line
2.20.1
author maintainer
#144 lore raw

PATCH 141/639 media: tw9910: Unregister subdevice with v4l2-async

In reply to Greg Kroah-Hartman

From: Jacopo Mondi <[email protected]>

[ Upstream commit 341fe1d301f587c930509f6b9153436b957f649c ]

As the tw9910 subdevice is registered through the v4l2-async framework, use the v4l2-async provided function to register it.

Fixes 7b20f325a566 ("media: i2c: tw9910: Remove soc_camera dependencies")
---
 drivers/media/i2c/tw9910.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/tw9910.c +1 -1
index a54548cc42857..c7321a70e3ed0 100644
@@ -1000,7 +1000,7 @@ static int tw9910_remove(struct i2c_client *client)
 	if (priv->pdn_gpio)
 		gpiod_put(priv->pdn_gpio);
 	clk_put(priv->clk);
-	v4l2_device_unregister_subdev(&priv->subdev);
+	v4l2_async_unregister_subdev(&priv->subdev);
 
 	return 0;
 }
Signature · 1 line
2.20.1
author maintainer
#145 lore raw

PATCH 142/639 IB/mlx5: Dont override existing ip_protocol

In reply to Greg Kroah-Hartman

From: Maor Gottlieb <[email protected]>

[ Upstream commit 6113cc44015b41ca51c0a76fed82522b68108dac ]

Two flow specifications can set the ip protocol field in the flow table entry:

1) IB_FLOW_SPEC_TCP/UDP/GRE - set the ip protocol accordingly.
2) IB_FLOW_SPEC_IPV4/6 - has ip_protocol field for users who want to receive specific L4 packets.

We need to avoid overriding of the ip_protocol with zeros, in case that the user first put the L4 specification and only then the L3.

Fixes ca0d47538528b ('IB/mlx5: Add support in TOS and protocol to flow steering')
---
 drivers/infiniband/hw/mlx5/main.c | 53 +++++++++++++++++++++----------
 1 file changed, 37 insertions(+), 16 deletions(-)
drivers/infiniband/hw/mlx5/main.c +37 -16
index df5be462dd281..2db34f7b5ced1 100644
@@ -2390,10 +2390,29 @@ static u8 get_match_criteria_enable(u32 *match_criteria)
 	return match_criteria_enable;
 }
 
-static void set_proto(void *outer_c, void *outer_v, u8 mask, u8 val)
+static int set_proto(void *outer_c, void *outer_v, u8 mask, u8 val)
 {
-	MLX5_SET(fte_match_set_lyr_2_4, outer_c, ip_protocol, mask);
-	MLX5_SET(fte_match_set_lyr_2_4, outer_v, ip_protocol, val);
+	u8 entry_mask;
+	u8 entry_val;
+	int err = 0;
+
+	if (!mask)
+		goto out;
+
+	entry_mask = MLX5_GET(fte_match_set_lyr_2_4, outer_c,
+			      ip_protocol);
+	entry_val = MLX5_GET(fte_match_set_lyr_2_4, outer_v,
+			     ip_protocol);
+	if (!entry_mask) {
+		MLX5_SET(fte_match_set_lyr_2_4, outer_c, ip_protocol, mask);
+		MLX5_SET(fte_match_set_lyr_2_4, outer_v, ip_protocol, val);
+		goto out;
+	}
+	/* Don't override existing ip protocol */
+	if (mask != entry_mask || val != entry_val)
+		err = -EINVAL;
+out:
+	return err;
 }
 
 static void set_flow_label(void *misc_c, void *misc_v, u32 mask, u32 val,
@@ -2597,8 +2616,10 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c,
 		set_tos(headers_c, headers_v,
 			ib_spec->ipv4.mask.tos, ib_spec->ipv4.val.tos);
 
-		set_proto(headers_c, headers_v,
-			  ib_spec->ipv4.mask.proto, ib_spec->ipv4.val.proto);
+		if (set_proto(headers_c, headers_v,
+			      ib_spec->ipv4.mask.proto,
+			      ib_spec->ipv4.val.proto))
+			return -EINVAL;
 		break;
 	case IB_FLOW_SPEC_IPV6:
 		if (FIELDS_NOT_SUPPORTED(ib_spec->ipv6.mask, LAST_IPV6_FIELD))
@@ -2637,9 +2658,10 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c,
 			ib_spec->ipv6.mask.traffic_class,
 			ib_spec->ipv6.val.traffic_class);
 
-		set_proto(headers_c, headers_v,
-			  ib_spec->ipv6.mask.next_hdr,
-			  ib_spec->ipv6.val.next_hdr);
+		if (set_proto(headers_c, headers_v,
+			      ib_spec->ipv6.mask.next_hdr,
+			      ib_spec->ipv6.val.next_hdr))
+			return -EINVAL;
 
 		set_flow_label(misc_params_c, misc_params_v,
 			       ntohl(ib_spec->ipv6.mask.flow_label),
@@ -2660,10 +2682,8 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c,
 					 LAST_TCP_UDP_FIELD))
 			return -EOPNOTSUPP;
 
-		MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol,
-			 0xff);
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
-			 IPPROTO_TCP);
+		if (set_proto(headers_c, headers_v, 0xff, IPPROTO_TCP))
+			return -EINVAL;
 
 		MLX5_SET(fte_match_set_lyr_2_4, headers_c, tcp_sport,
 			 ntohs(ib_spec->tcp_udp.mask.src_port));
@@ -2680,10 +2700,8 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c,
 					 LAST_TCP_UDP_FIELD))
 			return -EOPNOTSUPP;
 
-		MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol,
-			 0xff);
-		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
-			 IPPROTO_UDP);
+		if (set_proto(headers_c, headers_v, 0xff, IPPROTO_UDP))
+			return -EINVAL;
 
 		MLX5_SET(fte_match_set_lyr_2_4, headers_c, udp_sport,
 			 ntohs(ib_spec->tcp_udp.mask.src_port));
@@ -2699,6 +2717,9 @@ static int parse_flow_attr(struct mlx5_core_dev *mdev, u32 *match_c,
 		if (ib_spec->gre.mask.c_ks_res0_ver)
 			return -EOPNOTSUPP;
 
+		if (set_proto(headers_c, headers_v, 0xff, IPPROTO_GRE))
+			return -EINVAL;
+
 		MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol,
 			 0xff);
 		MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
Signature · 1 line
2.20.1
author maintainer
#146 lore raw

PATCH 143/639 rtc: cmos: ignore bogus century byte

In reply to Greg Kroah-Hartman

From: Eric Wong <[email protected]>

[ Upstream commit 2a4daadd4d3e507138f8937926e6a4df49c6bfdc ]

Older versions of Libreboot and Coreboot had an invalid value (`3' in my case) in the century byte affecting the GM45 in the Thinkpad X200. Not everybody's updated their firmwares, and Linux <= 4.2 was able to read the RTC without problems, so workaround this by ignoring invalid values.

Fixes 3c217e51d8a272b9 ("rtc: cmos: century support")
Cc Alexandre Belloni <[email protected]>
Cc Alessandro Zummo <[email protected]>
Cc Sylvain Chouleur <[email protected]>
Cc Patrick McDermott <[email protected]>
---
 drivers/rtc/rtc-mc146818-lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-mc146818-lib.c +1 -1
index 2f1772a358ca5..18a6f15e313d8 100644
@@ -82,7 +82,7 @@ unsigned int mc146818_get_time(struct rtc_time *time)
 	time->tm_year += real_year - 72;
 #endif
 
-	if (century)
+	if (century > 20)
 		time->tm_year += (century - 19) * 100;
 
 	/*
Signature · 1 line
2.20.1
#147 lore raw

Re: [PATCH 4.19 143/639] rtc: cmos: ignore bogus century byte

Hi!

Quoted 9 lines

From: Eric Wong <[email protected]>

[ Upstream commit 2a4daadd4d3e507138f8937926e6a4df49c6bfdc ]

Older versions of Libreboot and Coreboot had an invalid value (`3' in my case) in the century byte affecting the GM45 in the Thinkpad X200. Not everybody's updated their firmwares, and Linux <= 4.2 was able to read the RTC without problems, so workaround this by ignoring invalid values.

Should it print a warning so that wrong BIOSes are eventually fixed?

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#148 lore raw

PATCH 144/639 spi/topcliff_pch: Fix potential NULL dereference on allocation error

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit e902cdcb5112b89ee445588147964723fd69ffb4 ]

In pch_spi_handle_dma, it doesn't check for NULL returns of kcalloc so it would result in an Oops.

Fixes c37f3c2749b5 ("spi/topcliff_pch: DMA support")
---
 drivers/spi/spi-topcliff-pch.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/spi/spi-topcliff-pch.c +6 -0
index 4389ab80c23e6..fa730a871d252 100644
@@ -1008,6 +1008,9 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
 
 	/* RX */
 	dma->sg_rx_p = kcalloc(num, sizeof(*dma->sg_rx_p), GFP_ATOMIC);
+	if (!dma->sg_rx_p)
+		return;
+
 	sg_init_table(dma->sg_rx_p, num); /* Initialize SG table */
 	/* offset, length setting */
 	sg = dma->sg_rx_p;
@@ -1068,6 +1071,9 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
 	}
 
 	dma->sg_tx_p = kcalloc(num, sizeof(*dma->sg_tx_p), GFP_ATOMIC);
+	if (!dma->sg_tx_p)
+		return;
+
 	sg_init_table(dma->sg_tx_p, num); /* Initialize SG table */
 	/* offset, length setting */
 	sg = dma->sg_tx_p;
Signature · 1 line
2.20.1
author maintainer
#149 lore raw

PATCH 145/639 net: hns3: fix bug of ethtool_ops.get_channels for VF

In reply to Greg Kroah-Hartman

From: Huazhong Tan <[email protected]>

[ Upstream commit 8be7362186bd5ccb5f6f72be49751ad2778e2636 ]

The current code returns the number of all queues that can be used and the number of queues that have been allocated, which is incorrect. What should be returned is the number of queues allocated for each enabled TC and the number of queues that can be allocated.

This patch fixes it.

Fixes 849e46077689 ("net: hns3: add ethtool_ops.get_channels support for VF")
---
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +3 -2
index 67db19709deaa..fd5375b5991bb 100644
@@ -1957,7 +1957,8 @@ static u32 hclgevf_get_max_channels(struct hclgevf_dev *hdev)
 	struct hnae3_handle *nic = &hdev->nic;
 	struct hnae3_knic_private_info *kinfo = &nic->kinfo;
 
-	return min_t(u32, hdev->rss_size_max * kinfo->num_tc, hdev->num_tqps);
+	return min_t(u32, hdev->rss_size_max,
+		     hdev->num_tqps / kinfo->num_tc);
 }
 
 /**
@@ -1978,7 +1979,7 @@ static void hclgevf_get_channels(struct hnae3_handle *handle,
 	ch->max_combined = hclgevf_get_max_channels(hdev);
 	ch->other_count = 0;
 	ch->max_other = 0;
-	ch->combined_count = hdev->num_tqps;
+	ch->combined_count = handle->kinfo.rss_size;
 }
 
 static void hclgevf_get_tqps_and_rss_info(struct hnae3_handle *handle,
Signature · 1 line
2.20.1
author maintainer
#150 lore raw

PATCH 146/639 ARM: dts: sun8i-a23-a33: Move NAND controller device node to sort by address

In reply to Greg Kroah-Hartman

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit d027521497592773cd23d016d36975574d3452db ]

The NAND controller device node was inserted into the wrong position, probably due to a rebase or merge, as the file's structure does not provide enough context for git to accurately match the previous device node block.

Fixes d7b843df13ea ("ARM: dts: sun8i: add NAND controller node for A23/A33")
---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
arch/arm/boot/dts/sun8i-a23-a33.dtsi +13 -15
index c16ffcc4db7da..a272a69519a26 100644
@@ -155,6 +155,19 @@
 			#dma-cells = <1>;
 		};
 
+		nfc: nand@1c03000 {
+			compatible = "allwinner,sun4i-a10-nand";
+			reg = <0x01c03000 0x1000>;
+			interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>;
+			clock-names = "ahb", "mod";
+			resets = <&ccu RST_BUS_NAND>;
+			reset-names = "ahb";
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
 		mmc0: mmc@1c0f000 {
 			compatible = "allwinner,sun7i-a20-mmc";
 			reg = <0x01c0f000 0x1000>;
@@ -212,21 +225,6 @@
 			#size-cells = <0>;
 		};
 
-		nfc: nand@1c03000 {
-			compatible = "allwinner,sun4i-a10-nand";
-			reg = <0x01c03000 0x1000>;
-			interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>;
-			clock-names = "ahb", "mod";
-			resets = <&ccu RST_BUS_NAND>;
-			reset-names = "ahb";
-			pinctrl-names = "default";
-			pinctrl-0 = <&nand_pins &nand_pins_cs0 &nand_pins_rb0>;
-			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-
 		usb_otg: usb@1c19000 {
 			/* compatible gets set in SoC specific dtsi file */
 			reg = <0x01c19000 0x0400>;
Signature · 1 line
2.20.1
author maintainer
#151 lore raw

PATCH 147/639 clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it

In reply to Greg Kroah-Hartman

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 108a459ef4cd17a28711d81092044e597b5c7618 ]

The PLL-MIPI clock is somewhat special as it has its own LDOs which need to be turned on for this PLL to actually work and output a clock signal.

Add the 2 LDO enable bits to the gate bits.

Fixes 5690879d93e8 ("clk: sunxi-ng: Add A23 CCU")
---
 drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun8i-a23.c +1 -1
index a4fa2945f2302..4b5f8f4e4ab8c 100644
@@ -144,7 +144,7 @@ static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_mipi_clk, "pll-mipi",
 				    8, 4,		/* N */
 				    4, 2,		/* K */
 				    0, 4,		/* M */
-				    BIT(31),		/* gate */
+				    BIT(31) | BIT(23) | BIT(22), /* gate */
 				    BIT(28),		/* lock */
 				    CLK_SET_RATE_UNGATE);
 
Signature · 1 line
2.20.1
author maintainer
#152 lore raw

PATCH 148/639 iwlwifi: mvm: avoid possible access out of array.

In reply to Greg Kroah-Hartman

From: Mordechay Goodstein <[email protected]>

[ Upstream commit b0d795a9ae558209656b18930c2b4def5f8fdfb8 ]

The value in txq_id can be out of array scope,
validate it before accessing the array.

Fixes cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue")
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +13 -6
index e850aa504b608..69057701641e0 100644
@@ -2462,7 +2462,7 @@ int iwl_mvm_sta_tx_agg_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 	struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 	struct iwl_mvm_tid_data *tid_data;
 	u16 normalized_ssn;
-	int txq_id;
+	u16 txq_id;
 	int ret;
 
 	if (WARN_ON_ONCE(tid >= IWL_MAX_TID_COUNT))
@@ -2506,17 +2506,24 @@ int iwl_mvm_sta_tx_agg_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 	 */
 	txq_id = mvmsta->tid_data[tid].txq_id;
 	if (txq_id == IWL_MVM_INVALID_QUEUE) {
-		txq_id = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id,
-						 IWL_MVM_DQA_MIN_DATA_QUEUE,
-						 IWL_MVM_DQA_MAX_DATA_QUEUE);
-		if (txq_id < 0) {
-			ret = txq_id;
+		ret = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id,
+					      IWL_MVM_DQA_MIN_DATA_QUEUE,
+					      IWL_MVM_DQA_MAX_DATA_QUEUE);
+		if (ret < 0) {
 			IWL_ERR(mvm, "Failed to allocate agg queue\n");
 			goto release_locks;
 		}
 
+		txq_id = ret;
+
 		/* TXQ hasn't yet been enabled, so mark it only as reserved */
 		mvm->queue_info[txq_id].status = IWL_MVM_QUEUE_RESERVED;
+	} else if (WARN_ON(txq_id >= IWL_MAX_HW_QUEUES)) {
+		ret = -ENXIO;
+		IWL_ERR(mvm, "tid_id %d out of range (0, %d)!\n",
+			tid, IWL_MAX_HW_QUEUES - 1);
+		goto out;
+
 	} else if (unlikely(mvm->queue_info[txq_id].status ==
 			    IWL_MVM_QUEUE_SHARED)) {
 		ret = -ENXIO;
Signature · 1 line
2.20.1