Skip to contentSkip to conversation

5.14.19-rc1 review

PATCH In review Greg Kroah-Hartman 8 participants 859 messages Nov 15, 2021 – Nov 16, 2021 Page 1 of 6

Subsystems (13)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 5.14.19-rc1 review

This is the start of the stable review cycle for the 5.14.19 release. There are 849 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 Wed, 17 Nov 2021 16:52:23 +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/v5.x/stable-review/patch-5.14.19-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-5.14.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <[email protected]>

    Linux 5.14.19-rc1

Mario Limonciello <[email protected]>
drm/amd/display: Look at firmware version to determine using dmub on dcn21

Basavaraj Natikar <[email protected]>
pinctrl: amd: Handle wake-up interrupt

Basavaraj Natikar <[email protected]>
pinctrl: amd: Add irq field data

Trond Myklebust <[email protected]>
SUNRPC: Partial revert of commit 6f9f17287e78

Pali Rohár <[email protected]>
PCI: aardvark: Fix PCIe Max Payload Size setting

Pali Rohár <[email protected]>
PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros

Jernej Skrabec <[email protected]>
drm/sun4i: Fix macros in sun8i_csc.h

Xiaoming Ni <[email protected]>
powerpc/85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n

Nathan Lynch <[email protected]>
powerpc/pseries/mobility: ignore ibm, platform-facilities updates

Nicholas Piggin <[email protected]>
powerpc/64s/interrupt: Fix check_return_regs_valid() false positive

Russell Currey <[email protected]>
powerpc/security: Use a mutex for interrupt exit code patching

Vasant Hegde <[email protected]>
powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload

Nicholas Piggin <[email protected]>
powerpc/32e: Ignore ESR in instruction storage interrupt handler

Hari Bathini <[email protected]>
powerpc/bpf: Fix write protecting JIT code

Gustavo A. R. Silva <[email protected]>
powerpc/vas: Fix potential NULL pointer dereference

Miquel Raynal <[email protected]>
mtd: rawnand: au1550nd: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: plat_nand: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: orion: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: pasemi: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: gpio: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: mpc5121: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: xway: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: ams-delta: Keep the driver compatible with on-die ECC engines

Miquel Raynal <[email protected]>
mtd: rawnand: fsmc: Fix use of SM ORDER

Dong Aisheng <[email protected]>
remoteproc: imx_rproc: Fix rsc-table name

Dong Aisheng <[email protected]>
remoteproc: imx_rproc: Fix ignoring mapping vdev regions

Dong Aisheng <[email protected]>
remoteproc: Fix the wrong default value of is_iomem

Peng Fan <[email protected]>
remoteproc: elf_loader: Fix loading segment when is_iomem true

Halil Pasic <[email protected]>
s390/cio: make ccw_device_dma_* more robust

Harald Freudenberger <[email protected]>
s390/ap: Fix hanging ioctl caused by orphaned replies

Sven Schnelle <[email protected]>
s390/tape: fix timer initialization in tape_std_assign()

Vineeth Vijayan <[email protected]>
s390/cio: check the subchannel validity for dev_busid

Thomas Richter <[email protected]>
s390/cpumf: cpum_cf PMU displays invalid value after hotplug remove

Rafael J. Wysocki <[email protected]>
PM: sleep: Avoid calling put_device() under dpm_list_mtx

Marek Vasut <[email protected]>
video: backlight: Drop maximum brightness override for brightness zero

Jack Andersen <[email protected]>
mfd: dln2: Add cell for initializing DLN2 ADC

Michal Hocko <[email protected]>
mm, oom: do not trigger out_of_memory from the #PF

Vasily Averin <[email protected]>
mm, oom: pagefault_out_of_memory: don't force global OOM for dying tasks

Jens Axboe <[email protected]>
io-wq: serialize hash clear with wakeup

Jens Axboe <[email protected]>
io-wq: fix queue stalling race

Jens Axboe <[email protected]>
io-wq: ensure that hash wait lock is IRQ disabling

Vasily Averin <[email protected]>
memcg: prohibit unconditional exceeding the limit of dying tasks

Matthew Wilcox (Oracle) <[email protected]>
mm/filemap.c: remove bogus VM_BUG_ON

Dominique Martinet <[email protected]>
9p/net: fix missing error check in p9_check_errors

Daniel Borkmann <[email protected]>
bpf, cgroup: Assign cgroup in cgroup_sk_alloc when called from interrupt

Daniel Borkmann <[email protected]>
bpf, cgroups: Fix cgroup v2 fallback on v1/v2 mixed mode

Daniel Borkmann <[email protected]>
net, neigh: Enable state migration between NUD_PERMANENT and NTF_USE

Anatolij Gustschin <[email protected]>
dmaengine: bestcomm: fix system boot lockups

Kishon Vijay Abraham I <[email protected]>
dmaengine: ti: k3-udma: Set r/tchan or rflow to NULL if request fail

Kishon Vijay Abraham I <[email protected]>
dmaengine: ti: k3-udma: Set bchan to NULL if a channel request fail

Gao Xiang <[email protected]>
erofs: fix unsafe pagevec reuse of hooked pclusters

Dongliang Mu <[email protected]>
f2fs: fix UAF in f2fs_available_free_memory

Daeho Jeong <[email protected]>
f2fs: include non-compressed blocks in compr_written_block

Jaegeuk Kim <[email protected]>
f2fs: should use GFP_NOFS for directory inodes

Guo Ren <[email protected]>
irqchip/sifive-plic: Fixup EOI failed when masked

Michael Pratt <[email protected]>
posix-cpu-timers: Clear task::posix_cputimers_work in copy_process()

Paolo Bonzini <[email protected]>
KVM: x86: move guest_pv_has out of user_access section

Dave Jones <[email protected]>
x86/mce: Add errata workaround for Skylake SKX37

Maciej W. Rozycki <[email protected]>
MIPS: Fix assembly error from MIPSr2 code used within MIPS_ISA_ARCH_LEVEL

Masahiro Yamada <[email protected]>
MIPS: fix duplicated slashes for Platform file path

John David Anglin <[email protected]>
parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page

Helge Deller <[email protected]>
parisc: Fix backtrace to always include init funtion names

Arnd Bergmann <[email protected]>
ARM: 9156/1: drop cc-option fallbacks for architecture selection

Michał Mirosław <[email protected]>

    ARM: 9155/1: fix early early_iounmap()

Steve French <[email protected]>
smb3: do not error on fsync when readonly

Willem de Bruijn <[email protected]>
selftests/net: udpgso_bench_rx: fix port argument

Rahul Lakkireddy <[email protected]>
cxgb4: fix eeprom len when diagnostics not implemented

Dust Li <[email protected]>
net/smc: fix sk_refcnt underflow on linkdown and fallback

Eiichi Tsukata <[email protected]>
vsock: prevent unnecessary refcnt inc for nonblocking connect

Marek Behún <[email protected]>
net: marvell: mvpp2: Fix wrong SerDes reconfiguration order

Christophe JAILLET <[email protected]>
net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory

Vladimir Oltean <[email protected]>
net: stmmac: allow a tc-taprio base-time of zero

Guangbin Huang <[email protected]>
net: hns3: allow configure ETS bandwidth of all TCs

Yufeng Mo <[email protected]>
net: hns3: fix kernel crash when unload VF while it is being reset

Jie Wang <[email protected]>
net: hns3: fix pfc packet number incorrect after querying pfc parameters

Jie Wang <[email protected]>
net: hns3: fix ROCE base interrupt vector initialization bug

Eric Dumazet <[email protected]>
net/sched: sch_taprio: fix undefined behavior in ktime_mono_to_any

Marek Behún <[email protected]>
net: dsa: mv88e6xxx: Don't support >1G speeds on 6191X on ports other than 10

Muchun Song <[email protected]>
seq_file: fix passing wrong private data

Imre Deak <[email protected]>
drm/i915/fb: Fix rounding error in subsampled plane size calculation

Dan Carpenter <[email protected]>
gve: Fix off by one in gve_tx_timeout()

Arnd Bergmann <[email protected]>
dmaengine: stm32-dma: avoid 64-bit division in stm32_dma_get_max_width

Amelie Delaunay <[email protected]>
dmaengine: stm32-dma: fix burst in case of unaligned memory address

Jussi Maki <[email protected]>
bpf, sockmap: sk_skb data_end access incorrect when src_reg = dst_reg

John Fastabend <[email protected]>
bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding

John Fastabend <[email protected]>
bpf, sockmap: Fix race in ingress receive verdict with redirect to self

John Fastabend <[email protected]>
bpf, sockmap: Remove unhash handler for BPF sockmap usage

Arnd Bergmann <[email protected]>
arm64: pgtable: make __pte_to_phys/__phys_to_pte_val inline functions

Reiji Watanabe <[email protected]>

    arm64: arm64_ftr_reg->name may not be a human-readable string

Chengfeng Ye <[email protected]>
nfc: pn533: Fix double free when pn533_fill_fragment_skbs() fails

Eric Dumazet <[email protected]>
llc: fix out-of-bound array index in llc_sk_dev_hash()

Ian Rogers <[email protected]>
perf bpf: Add missing free to bpf_event__print_bpf_prog_info()

Dan Carpenter <[email protected]>
zram: off by one in read_block_state()

Miaohe Lin <[email protected]>
mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration()

Marc Kleine-Budde <[email protected]>
can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable()

Vincent Mailhol <[email protected]>
can: etas_es58x: es58x_rx_err_msg(): fix memory leak in error path

Fabio Estevam <[email protected]>
Revert "drm/imx: Annotate dma-fence critical section in commit path"

Arnd Bergmann <[email protected]>
drm: fb_helper: improve CONFIG_FB dependency

Hangbin Liu <[email protected]>
selftests/bpf/xdp_redirect_multi: Limit the tests in netns

Hangbin Liu <[email protected]>
selftests/bpf/xdp_redirect_multi: Give tcpdump a chance to terminate cleanly

Hangbin Liu <[email protected]>
selftests/bpf/xdp_redirect_multi: Use arping to accurate the arp number

Hangbin Liu <[email protected]>
selftests/bpf/xdp_redirect_multi: Put the logs to tmp folder

Mehrdad Arshad Rad <[email protected]>
libbpf: Fix lookup_and_delete_elem_flags error reporting

Rafael J. Wysocki <[email protected]>
ACPI: PM: Fix device wakeup power reference counting error

Kai Song <[email protected]>
mfd: altera-sysmgr: Fix a mistake caused by resource_size conversion

Mark Brown <[email protected]>
mfd: sprd: Add SPI device ID table

Mark Brown <[email protected]>
mfd: cpcap: Add SPI device ID table

Krzysztof Kozlowski <[email protected]>
mfd: core: Add missing of_node_put for loop iteration

Takashi Iwai <[email protected]>
ALSA: memalloc: Catch call with NULL snd_dma_buffer pointer

Huang Guobin <[email protected]>
bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed

Jason Gunthorpe <[email protected]>
drm/ttm: remove ttm_bo_vm_insert_huge()

Heiner Kallweit <[email protected]>
net: phy: fix duplex out of sync problem while changing settings

Rafael J. Wysocki <[email protected]>
cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline

Selvin Xavier <[email protected]>
PCI: Do not enable AtomicOps on VFs

Tetsuo Handa <[email protected]>
ataflop: remove ataflop_probe_lock mutex

Luis Chamberlain <[email protected]>
block/ataflop: provide a helper for cleanup up an atari disk

Luis Chamberlain <[email protected]>
block/ataflop: add registration bool before calling del_gendisk()

Luis Chamberlain <[email protected]>
block/ataflop: use the blk_cleanup_disk() helper

Chenyuan Mi <[email protected]>
drm/nouveau/svm: Fix refcount leak bug and missing check against null bug

Luis Chamberlain <[email protected]>
nvdimm/btt: do not call del_gendisk() if not needed

Christophe JAILLET <[email protected]>

    PCI: j721e: Fix j721e_pcie_probe() error path

Hans de Goede <[email protected]>
ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses

Brett Creeley <[email protected]>
ice: Fix not stopping Tx queues for VFs

Sylwester Dziedziuch <[email protected]>
ice: Fix replacing VF hardware MAC to existing MAC filter

Vladimir Oltean <[email protected]>
net: dsa: felix: fix broken VLAN-tagged PTP under VLAN-aware bridge

Vladimir Oltean <[email protected]>
net: dsa: tag_ocelot: break circular dependency with ocelot switch lib driver

Ziyang Xuan <[email protected]>
net: vlan: fix a UAF in vlan_dev_real_dev()

Stafford Horne <[email protected]>
openrisc: fix SMP tlb flush NULL pointer dereference

Jakub Kicinski <[email protected]>
ethtool: fix ethtool msg len calculation for pause stats

Hangbin Liu <[email protected]>
kselftests/net: add missed icmp.sh test to Makefile

Maxim Kiselev <[email protected]>
net: davinci_emac: Fix interrupt pacing disable

Yu Kuai <[email protected]>
nbd: fix possible overflow for 'first_minor' in nbd_dev_add()

Yu Kuai <[email protected]>
nbd: fix max value for 'first_minor'

YueHaibing <[email protected]>
xen-pciback: Fix return in pm_ctrl_init()

Sander Vanheule <[email protected]>
gpio: realtek-otto: fix GPIO line IRQ offset

Christophe JAILLET <[email protected]>
i2c: xlr: Fix a resource leak in the error handling path of 'xlr_i2c_probe()'

Trond Myklebust <[email protected]>
NFSv4: Fix a regression in nfs_set_open_stateid_locked()

Quinn Tran <[email protected]>
scsi: qla2xxx: Turn off target reset during issue_lip

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix gnl list corruption

Dmitry Bogdanov <[email protected]>
scsi: target: core: Remove from tmr_list during LUN unlink

Jackie Liu <[email protected]>
ar7: fix kernel builds for compiler test

Ahmad Fatoum <[email protected]>
watchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT

Randy Dunlap <[email protected]>
m68k: set a default value for MEMORY_RESERVE

Eric W. Biederman <[email protected]>
signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)

Lars-Peter Clausen <[email protected]>
dmaengine: dmaengine_desc_callback_valid(): Check for callback_result

Florian Westphal <[email protected]>
netfilter: nfnetlink_queue: fix OOB when mac header was cleared

Robert-Ionut Alexa <[email protected]>
soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read

Geert Uytterhoeven <[email protected]>
auxdisplay: ht16k33: Fix frame buffer device blanking

Geert Uytterhoeven <[email protected]>
auxdisplay: ht16k33: Connect backlight to fbdev

Geert Uytterhoeven <[email protected]>
auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty string

Alexey Gladkov <[email protected]>
Fix user namespace leak

Trond Myklebust <[email protected]>
NFS: Fix an Oops in pnfs_mark_request_commit()

Trond Myklebust <[email protected]>
NFS: Fix up commit deadlocks

Amelie Delaunay <[email protected]>
dmaengine: stm32-dma: fix stm32_dma_get_max_width

Claudiu Beznea <[email protected]>
dmaengine: at_xdmac: fix AT_XDMAC_CC_PERID() macro

Claudiu Beznea <[email protected]>
dmaengine: at_xdmac: call at_xdmac_axi_config() on resume path

Dan Carpenter <[email protected]>

    rtc: rv3032: fix error handling in rv3032_clkout_set_rate()

Christophe JAILLET <[email protected]>
remoteproc: Fix a memory leak in an error handling path in 'rproc_handle_vdev()'

Zev Weiss <[email protected]>
mtd: core: don't remove debugfs directory if device is in use

Miquel Raynal <[email protected]>
mtd: rawnand: arasan: Prevent an unsupported configuration

Kunihiko Hayashi <[email protected]>
PCI: uniphier: Serialize INTx masking/unmasking and fix the bit operation

Evgeny Novikov <[email protected]>
mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()

John Keeping <[email protected]>
Input: st1232 - increase "wait ready" timeout

Jia-Ju Bai <[email protected]>
fs: orangefs: fix error return code of orangefs_revalidate_lookup()

Trond Myklebust <[email protected]>
NFS: Fix deadlocks in nfs_scan_commit_list()

YueHaibing <[email protected]>
opp: Fix return in _opp_add_static_v2()

Pali Rohár <[email protected]>
PCI: aardvark: Fix preserving PCI_EXP_RTCTL_CRSSVE flag on emulated bridge

Marek Behún <[email protected]>
PCI: aardvark: Don't spam about PIO Response Status

Alex Xu (Hello71) <[email protected]>
drm/plane-helper: fix uninitialized variable reference

Dmitry Baryshkov <[email protected]>
drm/bridge/lontium-lt9611uxc: fix provided connector suport

Baptiste Lepers <[email protected]>
pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds

Trond Myklebust <[email protected]>
NFS: Fix dentry verifier races

Trond Myklebust <[email protected]>
NFS: Ignore the directory size when marking for revalidation

Trond Myklebust <[email protected]>
NFS: Don't set NFS_INO_DATA_INVAL_DEFER and NFS_INO_INVALID_DATA

Trond Myklebust <[email protected]>
NFS: Default change_attr_type to NFS4_CHANGE_TYPE_IS_UNDEFINED

Kewei Xu <[email protected]>
i2c: mediatek: fixing the incorrect register offset

Mark Brown <[email protected]>
Input: ariel-pwrbutton - add SPI device ID table

Mark Brown <[email protected]>
rtc: mcp795: Add SPI ID table

Dong Aisheng <[email protected]>
remoteproc: imx_rproc: Fix TCM io memory type

Mark Brown <[email protected]>
rtc: pcf2123: Add SPI ID table

Mark Brown <[email protected]>
rtc: ds1390: Add SPI ID table

Mark Brown <[email protected]>
rtc: ds1302: Add SPI ID table

J. Bruce Fields <[email protected]>
nfsd: don't alloc under spinlock in rpc_parse_scope_id

Evgeny Novikov <[email protected]>
mtd: rawnand: intel: Fix potential buffer overflow in probe

Arnaud Pouliquen <[email protected]>
rpmsg: Fix rpmsg_create_ept return when RPMSG config is not defined

Tom Rix <[email protected]>
apparmor: fix error check

Aharon Landau <[email protected]>
RDMA/core: Require the driver to set the IOVA correctly during rereg_mr

Hans de Goede <[email protected]>
power: supply: bq27xxx: Fix kernel crash on IRQ handler register error

Geert Uytterhoeven <[email protected]>
mips: cm: Convert to bitfield API to fix out-of-bounds access

Xuan Zhuo <[email protected]>

    virtio_ring: check desc == NULL when using indirect with packed

Geert Uytterhoeven <[email protected]>
serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE

Christophe JAILLET <[email protected]>
ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()'

Yixing Liu <[email protected]>
RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility

Haoyue Xu <[email protected]>
RDMA/hns: Fix initial arm_st of CQ

Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Correct configuring of switch inversion from ts-inv

Christophe Leroy <[email protected]>
powerpc: Don't provide __kernel_map_pages() without ARCH_SUPPORTS_DEBUG_PAGEALLOC

Takashi Sakamoto <[email protected]>
ALSA: oxfw: fix functional regression for Mackie Onyx 1640i in v5.14 or later

Denis Kirjanov <[email protected]>
powerpc/xmon: fix task state output

Bixuan Cui <[email protected]>
powerpc/44x/fsp2: add missing of_node_put

Christophe Leroy <[email protected]>
powerpc/book3e: Fix set_memory_x() and set_memory_nx()

Christophe Leroy <[email protected]>
powerpc/nohash: Fix __ptep_set_access_flags() and ptep_set_wrprotect()

Andrej Shadura <[email protected]>
HID: u2fzero: properly handle timeouts in usb_submit_urb

Andrej Shadura <[email protected]>
HID: u2fzero: clarify error check and length calculations

Claudiu Beznea <[email protected]>
clk: at91: clk-master: fix prescaler logic

Claudiu Beznea <[email protected]>
clk: at91: clk-master: check if div or pres is zero

Claudiu Beznea <[email protected]>
clk: at91: sam9x60-pll: use DIV_ROUND_CLOSEST_ULL

Anssi Hannula <[email protected]>
serial: xilinx_uartps: Fix race condition causing stuck TX

Yang Yingliang <[email protected]>
phy: Sparx5 Eth SerDes: Fix return value check in sparx5_serdes_probe()

Sandeep Maheswaram <[email protected]>
phy: qcom-snps: Correct the FSEL_MASK

Dan Carpenter <[email protected]>
phy: ti: gmii-sel: check of_get_address() for failure

Vladimir Zapolskiy <[email protected]>
phy: qcom-qusb2: Fix a memory leak on probe

Mark Brown <[email protected]>
ASoC: topology: Fix stub for snd_soc_tplg_component_remove()

Rahul Tanwar <[email protected]>
pinctrl: equilibrium: Fix function addition in multiple groups

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sdm845: Fix Qualcomm crypto engine bus clock

Bhupesh Sharma <[email protected]>
arm64: dts: qcom: sdm845: Use RPMH_CE_CLK macro directly

Marijn Suijten <[email protected]>

    arm64: dts: qcom: pmi8994: Fix "eternal"->"external" typo in WLED node

Wan Jiabing <[email protected]>
soc: qcom: apr: Add of_node_put() before return

Dmitry Baryshkov <[email protected]>
soc: qcom: rpmhpd: fix sm8350_mxc's peer domain

Guru Das Srinagesh <[email protected]>
firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available()

Christophe Leroy <[email protected]>
powerpc/booke: Disable STRICT_KERNEL_RWX, DEBUG_PAGEALLOC and KFENCE

Amelie Delaunay <[email protected]>
usb: dwc2: drd: reset current session before setting the new one

Amelie Delaunay <[email protected]>
usb: dwc2: drd: fix dwc2_drd_role_sw_set when clock could be disabled

Amelie Delaunay <[email protected]>
usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init

Stefan Agner <[email protected]>
serial: imx: fix detach/attach of serial console

James Smart <[email protected]>
scsi: lpfc: Wait for successful restart of SLI3 adapter during host sg_reset

Srinivas Kandagatla <[email protected]>
scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer

Srinivas Kandagatla <[email protected]>
soundwire: bus: stop dereferencing invalid slave pointer

Nuno Sá <[email protected]>
iio: adis: do not disabe IRQs in 'adis_init()'

Randy Dunlap <[email protected]>
usb: typec: STUSB160X should select REGMAP_I2C

Yang Yingliang <[email protected]>
iio: buffer: Fix double-free in iio_buffers_alloc_sysfs_and_mask()

Dmitry Baryshkov <[email protected]>
soc: qcom: socinfo: add two missing PMIC IDs

Bjorn Andersson <[email protected]>
soc: qcom: rpmhpd: Make power_on actually enable the domain

Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Defer probe if request_threaded_irq() returns EPROBE_DEFER

Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Correct some register default values

Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Always configure both ASP TX channels

Olivier Moysan <[email protected]>
ARM: dts: stm32: fix AV96 board SAI2 pin muxing on stm32mp15

Olivier Moysan <[email protected]>
ARM: dts: stm32: fix SAI sub nodes register range

Fabrice Gasnier <[email protected]>
ARM: dts: stm32: fix STUSB1600 Type-C irq level on stm32mp15xx-dkx

Marek Vasut <[email protected]>
ARM: dts: stm32: Reduce DHCOR SPI NOR frequency to 50 MHz

Geert Uytterhoeven <[email protected]>
pinctrl: renesas: checker: Fix off-by-one bug in drive register check

Athira Rajeev <[email protected]>
powerpc/perf: Fix cycles/instructions as PM_CYC/PM_INST_CMPL in power10

Andrew Halaney <[email protected]>
dyndbg: make dyndbg a known cli param

Vegard Nossum <[email protected]>
staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC

Nikita Yushchenko <[email protected]>
staging: most: dim2: do not double-register the same device

Randy Dunlap <[email protected]>
usb: musb: select GENERIC_PHY instead of depending on it

Leon Romanovsky <[email protected]>
RDMA/mlx4: Return missed an error if device doesn't support steering

Dan Carpenter <[email protected]>
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()

Yang Yingliang <[email protected]>

    power: supply: max17040: fix null-ptr-deref in max17040_probe()

Jakob Hauser <[email protected]>
power: supply: rt5033_battery: Change voltage values to µV

Dan Carpenter <[email protected]>
usb: gadget: hid: fix error code in do_config()

Andy Shevchenko <[email protected]>
serial: 8250_dw: Drop wrong use of ACPI_PTR()

Nathan Lynch <[email protected]>
powerpc/paravirt: correct preempt debug splat in vcpu_is_preempted()

Nathan Lynch <[email protected]>
powerpc: fix unbalanced node refcount in check_kvm_guest()

Christophe Leroy <[email protected]>
video: fbdev: chipsfb: use memset_io() instead of memset()

Christophe Leroy <[email protected]>
powerpc/mem: Fix arch/powerpc/mm/mem.c:53:12: error: no previous prototype for 'create_section_mapping'

Clément Léger <[email protected]>
clk: at91: check pmc node status before registering syscore ops

Dongliang Mu <[email protected]>
memory: fsl_ifc: fix leak of irq and nand_irq in fsl_ifc_ctrl_probe

Christophe JAILLET <[email protected]>
soc/tegra: Fix an error handling path in tegra_powergate_power_up()

Mark Brown <[email protected]>
iio: st_pressure_spi: Add missing entries SPI to device ID table

Ranjani Sridharan <[email protected]>
ASoC: SOF: topology: do not power down primary core during topology removal

Andreas Kemnade <[email protected]>
arm: dts: omap3-gta04a4: accelerometer irq fix

Yang Yingliang <[email protected]>
driver core: Fix possible memory leak in device_link_add()

Igor Pylypiv <[email protected]>

    scsi: pm80xx: Fix misleading log statement in pm8001_mpi_get_nvmd_resp()

Sumit Saxena <[email protected]>
scsi: megaraid_sas: Fix concurrent access to ISR between IRQ polling and real interrupt

Claudiu Beznea <[email protected]>
power: reset: at91-reset: check properly the return value of devm_of_iomap

Srinivas Kandagatla <[email protected]>
soundwire: debugfs: use controller id and link_id for debugfs

Takashi Iwai <[email protected]>
ALSA: hda: Use position buffer for SKL+ again

Takashi Iwai <[email protected]>
ALSA: hda: Reduce udelay() at SKL+ position reporting

David Stevens <[email protected]>
iommu/dma: Fix arch_sync_dma for map

Stephan Gerhold <[email protected]>

    arm64: dts: qcom: pm8916: Remove wrong reg-names for rtc@6000

Arnd Bergmann <[email protected]>
iommu/mediatek: Fix out-of-range warning with clang

Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: beacon: Fix Ethernet PHY mode

Stephan Gerhold <[email protected]>
arm64: dts: qcom: msm8916: Fix Secondary MI2S bit clock

Yassine Oudjana <[email protected]>
ASoC: wcd9335: Use correct version to initialize Class H

Dongliang Mu <[email protected]>
JFS: fix memleak in jfs_mount

Jackie Liu <[email protected]>
MIPS: loongson64: make CPU_LOONGSON64 depends on MIPS_FP_SUPPORT

Tong Zhang <[email protected]>
scsi: dc395: Fix error case unwinding

Naina Mehta <[email protected]>
soc: qcom: llcc: Disable MMUHWT retention

Douglas Anderson <[email protected]>
arm64: dts: qcom: sc7180: Base dynamic CPU power coefficients in reality

Peter Rosin <[email protected]>

    ARM: dts: at91: tse850: the emac<->phy interface is rmii

Tony Lindgren <[email protected]>
bus: ti-sysc: Fix timekeeping_suspended warning on resume

Anand Moon <[email protected]>
arm64: dts: meson-sm1: Fix the pwm regulator supply properties

Anand Moon <[email protected]>
arm64: dts: meson-g12b: Fix the pwm regulator supply properties

Anand Moon <[email protected]>
arm64: dts: meson-g12a: Fix the pwm regulator supply properties

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j7200-main: Fix "bus-range" upto 256 bus number for PCIe

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j7200-main: Fix "vendor-id"/"device-id" properties of pcie node

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: k3-j721e-main: Fix "bus-range" upto 256 bus number for PCIe

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: k3-j721e-main: Fix "max-virtual-functions" in PCIe EP nodes

Selvin Xavier <[email protected]>
RDMA/bnxt_re: Fix query SRQ failure

Marijn Suijten <[email protected]>
ARM: dts: qcom: msm8974: Add xo_board reference clock to DSI0 PHY

Alex Bee <[email protected]>
arm64: dts: rockchip: Fix GPU register width for RK3328

Peter Geis <[email protected]>
arm64: dts: rockchip: fix rk3568 mbi-alias

Jackie Liu <[email protected]>
ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc()

Ajish Koshy <[email protected]>

    scsi: pm80xx: Fix lockup in outbound queue management

Christophe JAILLET <[email protected]>
clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths

Rafał Miłecki <[email protected]>
arm64: dts: broadcom: bcm4908: Fix UART clock name

Rafał Miłecki <[email protected]>
ARM: dts: BCM5301X: Fix memory nodes names

Junji Wei <[email protected]>
RDMA/rxe: Fix wrong port_cap_flags

Alexandru Ardelean <[email protected]>
iio: st_sensors: disable regulators after device unregistration

Dongjin Kim <[email protected]>
arm64: dts: meson: sm1: add Ethernet PHY reset line for ODROID-C4/HC4

Frank Rowand <[email protected]>
of: unittest: fix EXPECT text for gpio hog errors

Alexei Starovoitov <[email protected]>
bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit.

Alexei Starovoitov <[email protected]>
bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off.

Dan Schatzberg <[email protected]>
cgroup: Fix rootcg cpu.stat guest double counting

Liu Jian <[email protected]>
skmsg: Lose offset info in sk_psock_skb_ingress

Sukadev Bhattiprolu <[email protected]>
ibmvnic: delay complete()

Sukadev Bhattiprolu <[email protected]>
ibmvnic: Process crqs after enabling interrupts

Sukadev Bhattiprolu <[email protected]>
ibmvnic: don't stop queue in xmit

Jakub Kicinski <[email protected]>
udp6: allow SO_MARK ctrl msg to affect routing

Andrea Righi <[email protected]>
selftests/bpf: Fix fclose/pclose mismatch in test_progs

Daniel Jordan <[email protected]>

    crypto: pcrypt - Delay write to padata->info

Nikolay Aleksandrov <[email protected]>
selftests: net: bridge: update IGMP/MLD membership interval value

Ivan Vecera <[email protected]>
net: bridge: fix uninitialized variables when BRIDGE_CFM is disabled

Russell King (Oracle) <[email protected]>
net: phylink: avoid mvneta warning when setting pause parameters

Christophe JAILLET <[email protected]>
ipmi: kcs_bmc: Fix a memory leak in the error handling path of 'kcs_bmc_serio_add_device()'

Shyam Sundar S K <[email protected]>
net: amd-xgbe: Toggle PLL settings during rate change

Xin Long <[email protected]>
sctp: return true only for pathmtu update in sctp_transport_pl_toobig

Xin Long <[email protected]>
sctp: subtract sctphdr len in sctp_transport_pl_hlen

Xin Long <[email protected]>
sctp: reset probe_timer in sctp_transport_pl_update

Xin Long <[email protected]>
sctp: allow IP fragmentation when PLPMTUD enters Error state

Kumar Kartikeya Dwivedi <[email protected]>
selftests/bpf: Fix memory leak in test_ima

Kumar Kartikeya Dwivedi <[email protected]>
selftests/bpf: Fix fd cleanup in sk_lookup test

Alex Deucher <[email protected]>
drm/amdgpu/gmc6: fix DMA mask from 44 to 40 bits

Lang Yu <[email protected]>
drm/amdgpu: fix a potential memory leak in amdgpu_device_fini_sw()

Loic Poulain <[email protected]>
wcn36xx: Channel list update before hardware scan

Eric Dumazet <[email protected]>
bpf: Fixes possible race in update_prog_stats() for 32bit arches

Loic Poulain <[email protected]>
wcn36xx: Fix discarded frames due to wrong sequence number

Benjamin Li <[email protected]>
wcn36xx: add proper DMA memory barriers in rx path

Wang Hai <[email protected]>
libertas: Fix possible memory leak in probe and disconnect

Wang Hai <[email protected]>
libertas_tf: Fix possible memory leak in probe and disconnect

Janis Schoetterl-Glausch <[email protected]>
KVM: s390: Fix handle_sske page fault handling

Tiezhu Yang <[email protected]>
samples/kretprobes: Fix return value if register_kretprobe() failed

Peter Zijlstra <[email protected]>
x86: Fix __get_wchan() for !STACKTRACE

Kees Cook <[email protected]>
sched: Add wrapper for get_wchan() to keep task blocked

Lad Prabhakar <[email protected]>
spi: spi-rpc-if: Check return value of rpcif_sw_init()

Zhang Rui <[email protected]>

    cpufreq: intel_pstate: Fix cpu->pstate.turbo_freq initialization

Jon Maxwell <[email protected]>
tcp: don't free a FIN sk_buff in tcp_remove_empty_skb()

Ilya Leoshkevich <[email protected]>
libbpf: Fix endianness detection in BPF_CORE_READ_BITFIELD_PROBED()

Mark Brown <[email protected]>
tpm_tis_spi: Add missing SPI ID

Hao Wu <[email protected]>
tpm: fix Atmel TPM crash caused by too frequent queries

Yu Kuai <[email protected]>
blk-cgroup: synchronize blkg creation against policy deactivation

Michael Schmitz <[email protected]>
block: ataflop: more blk-mq refactoring fixes

Abinaya Kalaiselvan <[email protected]>
ath10k: fix module load regression with iram-recovery feature

Arnd Bergmann <[email protected]>
ARM: 9142/1: kasan: work around LPAE build warning

Vladimir Oltean <[email protected]>

    net: dsa: avoid refcount warnings when ->port_{fdb,mdb}_del returns error

Mark Rutland <[email protected]>
irq: mips: avoid nested irq_enter()

Claudio Imbrenda <[email protected]>

    KVM: s390: pv: avoid stalls for kvm_s390_pv_init_vm

Claudio Imbrenda <[email protected]>
KVM: s390: pv: avoid double free of sida page

David Hildenbrand <[email protected]>
s390/uv: fully validate the VMA before calling follow_page()

David Hildenbrand <[email protected]>
s390/mm: fix VMA and page table handling code in storage key handling functions

David Hildenbrand <[email protected]>
s390/mm: validate VMA in PGSTE manipulation functions

David Hildenbrand <[email protected]>
s390/gmap: don't unconditionally call pte_unmap_unlock() in __gmap_zap()

David Hildenbrand <[email protected]>

    s390/gmap: validate VMA in __gmap_zap()

Nick Hainke <[email protected]>

    mt76: mt7615: mt7622: fix ibss and meshpoint

Andrii Nakryiko <[email protected]>
libbpf: Fix BTF header parsing checks

Andrii Nakryiko <[email protected]>
libbpf: Fix overflow in BTF sanity checks

Quentin Monnet <[email protected]>
bpftool: Avoid leaking the JSON writer prepared for program metadata

Mauricio Vásquez <[email protected]>
libbpf: Fix memory leak in btf__dedup()

Jim Mattson <[email protected]>
KVM: selftests: Fix nested SVM tests when built with clang

Tetsuo Handa <[email protected]>
smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi

Horia Geantă <[email protected]>
crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks

Jessica Zhang <[email protected]>
drm/msm: Fix potential NULL dereference in DPU SSPP

Joerg Roedel <[email protected]>
x86/sev: Fix stack type check in vc_switch_off_ist()

Kees Cook <[email protected]>
clocksource/drivers/timer-ti-dm: Select TIMER_OF

Anders Roxell <[email protected]>
PM: hibernate: fix sparse warnings

Max Gurtovoy <[email protected]>
nvme-rdma: fix error code in nvme_rdma_setup_ctrl

Ye Bin <[email protected]>
nbd: Fix use-after-free in pid_show

Stefan Agner <[email protected]>
phy: micrel: ksz8041nl: do not use power down mode

Tim Gardner <[email protected]>
net: enetc: unmap DMA in enetc_send_cmd()

Johannes Berg <[email protected]>
iwlwifi: pnvm: read EFI data only if long enough

Johannes Berg <[email protected]>
iwlwifi: pnvm: don't kmemdup() more than we have

Johannes Berg <[email protected]>
iwlwifi: mvm: reset PM state on unsuccessful resume

Jonas Dreßler <[email protected]>
mwifiex: Send DELBA requests according to spec

Ziyang Xuan <[email protected]>
rsi: stop thread firstly in rsi_91x_init() error handling

Shayne Chen <[email protected]>

    mt76: mt7915: fix muar_idx in mt7915_mcu_alloc_sta_req()

Shayne Chen <[email protected]>

    mt76: mt7915: fix sta_rec_wtbl tag len

Lorenzo Bianconi <[email protected]>
mt76: connac: fix possible NULL pointer dereference in mt76_connac_get_phy_mode_v2

Ryder Lee <[email protected]>
mt76: mt7615: fix monitor mode tear down crash

Sean Wang <[email protected]>
mt76: mt7921: fix retrying release semaphore without end

Lorenzo Bianconi <[email protected]>
mt76: mt7915: fix possible infinite loop release semaphore

Ryder Lee <[email protected]>
mt76: mt7615: fix hwmon temp sensor mem use-after-free

Ben Greear <[email protected]>
mt76: mt7915: fix hwmon temp sensor mem use-after-free

Lorenzo Bianconi <[email protected]>
mt76: mt7921: always wake device if necessary in debugfs

Sean Wang <[email protected]>
mt76: mt7921: fix kernel warning from cfg80211_calculate_bitrate

Sean Wang <[email protected]>
mt76: mt7921: fix firmware usage of RA info using legacy rates

Sean Wang <[email protected]>
mt76: mt7921: report HE MU radiotap

Lorenzo Bianconi <[email protected]>
mt76: overwrite default reg_ops if necessary

Leon Yen <[email protected]>
mt76: connac: fix GTK rekey offload failure on WPA mixed mode

Deren Wu <[email protected]>
mt76: mt7921: fix dma hang in rmmod

Shayne Chen <[email protected]>
mt76: mt7915: fix bit fields for HT rate idx

Shayne Chen <[email protected]>
mt76: mt7915: fix potential overflow of eeprom page index

Deren Wu <[email protected]>
mt76: mt7921: Fix out of order process by invalid event pkt

Lorenzo Bianconi <[email protected]>

    mt76: mt76x02: fix endianness warnings in mt76x02_mac.c

Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix survey-dump reporting

Sean Wang <[email protected]>
mt76: fix build error implicit enumeration conversion

Leon Yen <[email protected]>
mt76: connac: fix mt76_connac_gtk_rekey_tlv usage

Dan Carpenter <[email protected]>

    mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()

Lorenzo Bianconi <[email protected]>
mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi

Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix endianness warning in mt7921_update_txs

Lorenzo Bianconi <[email protected]>

    mt76: mt7915: fix endianness warning in mt7915_mac_add_txs_skb

Lorenzo Bianconi <[email protected]>

    mt76: mt7921: fix endianness in mt7921_mcu_tx_done_event

Lang Yu <[email protected]>
drm/amdkfd: Fix an inappropriate error handling in allloc memory of gpu

Rafael J. Wysocki <[email protected]>
ACPI: PM: Fix sharing of wakeup power resources

Rafael J. Wysocki <[email protected]>
ACPI: PM: Turn off unused wakeup power resources

Nathan Chancellor <[email protected]>
platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning

Michael Schmitz <[email protected]>
block: ataflop: fix breakage introduced at blk-mq refactoring

Christophe JAILLET <[email protected]>
mmc: mxs-mmc: disable regulator on error and in the remove function

Sean Young <[email protected]>
media: ir_toy: assignment to be16 should be of correct type

Randy Dunlap <[email protected]>
media: ivtv: fix build for UML

jason-jh.lin <[email protected]>
mailbox: Remove WARN_ON for async_cb.cb in cmdq_exec_done

Jakub Kicinski <[email protected]>
net: stream: don't purge sk_error_queue in sk_stream_kill_queues()

Dan Carpenter <[email protected]>
drm/msm: uninitialized variable in msm_gem_import()

Dan Carpenter <[email protected]>
drm/msm: fix potential NULL dereference in cleanup

Dan Carpenter <[email protected]>
drm/msm: potential error pointer dereference in init()

Dan Carpenter <[email protected]>
drm/msm: Fix potential Oops in a6xx_gmu_rpmh_init()

Ziyang Xuan <[email protected]>
thermal/core: fix a UAF bug in __thermal_cooling_device_register()

Ovidiu Panait <[email protected]>
crypto: octeontx2 - set assoclen in aead_do_fallback()

Eric Dumazet <[email protected]>
tcp: switch orphan_count to bare per-cpu counters

Qi Zheng <[email protected]>
x86: Fix get_wchan() to support the ORC unwinder

Randy Dunlap <[email protected]>
net: tulip: winbond-840: fix build for UML

Randy Dunlap <[email protected]>
net: fealnx: fix build for UML

Zhang Qiao <[email protected]>
kernel/sched: Fix sched_fork() access an invalid sched_task_group

Sven Eckelmann <[email protected]>
ath10k: fix max antenna gain unit

Zev Weiss <[email protected]>
hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff

Yang Yingliang <[email protected]>
hwmon: Fix possible memleak in __hwmon_device_register()

Daniel Borkmann <[email protected]>
net, neigh: Fix NTF_EXT_LEARNED in combination with NTF_USE

Dan Carpenter <[email protected]>
memstick: jmb38x_ms: use appropriate free function in jmb38x_ms_alloc_host()

Arnd Bergmann <[email protected]>
memstick: avoid out-of-range warning

Tony Lindgren <[email protected]>
mmc: sdhci-omap: Fix context restore

Tony Lindgren <[email protected]>
mmc: sdhci-omap: Fix NULL pointer exception if regulator is not configured

Catherine Sullivan <[email protected]>
gve: Track RX buffer allocation failures

John Fraker <[email protected]>
gve: Recover from queue stall due to missed IRQ

Dan Carpenter <[email protected]>
b43: fix a lower bounds test

Dan Carpenter <[email protected]>
b43legacy: fix a lower bounds test

THOBY Simon <[email protected]>
IMA: block writes of the security.ima xattr with unsupported algorithms

Markus Schneider-Pargmann <[email protected]>
hwrng: mtk - Force runtime pm ops for sleep ops

Giovanni Cabiddu <[email protected]>
crypto: qat - disregard spurious PFVF interrupts

Giovanni Cabiddu <[email protected]>
crypto: qat - detect PFVF collision after ACK

Arnd Bergmann <[email protected]>
crypto: ccree - avoid out-of-range warnings from clang

Evgeny Novikov <[email protected]>
media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable()

Mansur Alisha Shaik <[email protected]>
media: venus: fix vpp frequency calculation for decoder

Pablo Neira Ayuso <[email protected]>
netfilter: nft_dynset: relax superfluous check on set updates

Peter Zijlstra <[email protected]>
rcu: Always inline rcu_dynticks_task*_{enter,exit}()

Yazen Ghannam <[email protected]>
EDAC/amd64: Handle three rank interleaving mode

Borislav Petkov <[email protected]>
x86/insn: Use get_unaligned() instead of memcpy()

Vincent Donnefort <[email protected]>
PM: EM: Fix inefficient states detection

Linus Lüssing <[email protected]>
ath9k: Fix potential interrupt storm on queue reset

Stephen Boyd <[email protected]>
ath10k: Don't always treat modem stop events as crashes

Colin Ian King <[email protected]>

    media: em28xx: Don't use ops->suspend if it is NULL

Anel Orazgaliyeva <[email protected]>
cpuidle: Fix kobject memory leaks in error paths

Arnd Bergmann <[email protected]>
drm: fb_helper: fix CONFIG_FB dependency

Arnd Bergmann <[email protected]>
crypto: ecc - fix CRYPTO_DEFAULT_RNG dependency

Punit Agrawal <[email protected]>
kprobes: Do not use local variable when creating debugfs file

Yee Lee <[email protected]>
scs: Release kasan vmalloc poison in scs_free process

Eugen Hristev <[email protected]>
media: atmel: fix the ispck initialization

Colin Ian King <[email protected]>
media: cx23885: Fix snd_card_free call on null card pointer

Kees Cook <[email protected]>
media: tm6000: Avoid card name truncation

Kees Cook <[email protected]>

    media: si470x: Avoid card name truncation

Kees Cook <[email protected]>
media: radio-wl1273: Avoid card name truncation

Ondrej Jirman <[email protected]>
media: sun6i-csi: Allow the video device to be open multiple times

Randy Dunlap <[email protected]>

    media: i2c: ths8200 needs V4L2_ASYNC

Christophe JAILLET <[email protected]>
media: imx-jpeg: Fix the error handling path of 'mxc_jpeg_probe()'

Christophe JAILLET <[email protected]>
media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()'

Tom Rix <[email protected]>
media: TDA1997x: handle short reads of hdmi info frame.

Dafna Hirschfeld <[email protected]>
media: mtk-vcodec: venc: fix return value when start_streaming fails

Ricardo Ribalda <[email protected]>
media: v4l2-ioctl: S_CTRL output the right value

Sakari Ailus <[email protected]>
media: imx258: Fix getting clock frequency

Pavel Skripkin <[email protected]>
media: dvb-usb: fix ununit-value in az6027_rc_query

Evgeny Novikov <[email protected]>
media: ttusb-dec: avoid release of non-acquired mutex

Colin Ian King <[email protected]>
media: cxd2880-spi: Fix a null pointer dereference on error handling path

Christophe JAILLET <[email protected]>
media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()'

Pavel Skripkin <[email protected]>
media: em28xx: add missing em28xx_close_extension

Kumar Kartikeya Dwivedi <[email protected]>
libbpf: Fix skel_internal.h to set errno on loader retval < 0

Arnd Bergmann <[email protected]>
drm/amdgpu: fix warning for overflow check

Sudarshan Rajagopalan <[email protected]>
arm64: mm: update max_pfn after memory hotplug

Matthew Auld <[email protected]>
drm/ttm: stop calling tt_swapin in vm_access

Fabio Estevam <[email protected]>
ath10k: sdio: Add missing BH locking around napi_schdule()

Loic Poulain <[email protected]>
ath10k: Fix missing frame timestamp for beacon/probe-resp

Arnd Bergmann <[email protected]>
gve: DQO: avoid unused variable warnings

Baochen Qiang <[email protected]>
ath11k: Fix memory leak in ath11k_qmi_driver_event_work

Pradeep Kumar Chitrapu <[email protected]>
ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status

Sriram R <[email protected]>
ath11k: Avoid race during regd updates

Dan Carpenter <[email protected]>
ath11k: fix some sleeping in atomic bugs

Linus Walleij <[email protected]>
net: dsa: rtl8366: Fix a bug in deleting VLANs

Linus Walleij <[email protected]>
net: dsa: rtl8366rb: Fix off-by-one bug

Johannes Berg <[email protected]>
cfg80211: always free wiphy specific regdomain

Kees Cook <[email protected]>
fortify: Fix dropped strcpy() compile-time write overflow check

Jiasheng Jiang <[email protected]>
rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies()

Leon Romanovsky <[email protected]>
qed: Don't ignore devlink allocation failures

Leon Romanovsky <[email protected]>
bnxt_en: Check devlink allocation and registration status

Michael Walle <[email protected]>
crypto: caam - disable pkc for non-E SoCs

Guchun Chen <[email protected]>
drm/amdgpu: move amdgpu_virt_release_full_gpu to fini_early stage

Dinghao Liu <[email protected]>
Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync

Ajay Singh <[email protected]>
wilc1000: fix possible memory leak in cfg_scan_result()

Bryan O'Donoghue <[email protected]>
wcn36xx: Fix Antenna Diversity Switching

Waiman Long <[email protected]>
cgroup: Make rebind_subsystems() disable v2 controllers all at once

Yoshitaka Ikeda <[email protected]>
spi: Fixed division by zero warning

Alex Bee <[email protected]>

    drm: bridge: it66121: Fix return value it66121_probe

Russell King (Oracle) <[email protected]>
net: phylink: don't call netif_carrier_off() with NULL netdev

Yajun Deng <[email protected]>
net: net_namespace: Fix undefined member in key_remove_domain()

Sebastian Andrzej Siewior <[email protected]>
lockdep: Let lock_is_held_type() detect recursive read as read

liuyuntao <[email protected]>
virtio-gpu: fix possible memory allocation failure

Iago Toral Quiroga <[email protected]>
drm/v3d: fix wait for TMU write combiner flush

Peter Zijlstra <[email protected]>
objtool: Handle __sanitize_cov*() tail calls

Peter Zijlstra <[email protected]>
x86/xen: Mark cpu_bringup_and_idle() as dead_end_function

Aleksander Jan Bajkowski <[email protected]>
MIPS: lantiq: dma: fix burst length for DEU

Neeraj Upadhyay <[email protected]>
rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()

Toke Høiland-Jørgensen <[email protected]>
libbpf: Don't crash on object files with no symbol tables

Desmond Cheong Zhi Xi <[email protected]>
Bluetooth: fix init and cleanup of sco_conn.timeout_work

Paul Cercueil <[email protected]>
drm/bridge: it66121: Wait for next bridge to be probed

Paul Cercueil <[email protected]>
drm/bridge: it66121: Initialize {device,vendor}_ids

Robert Foss <[email protected]>
drm/bridge: anx7625: Propagate errors from sp_tx_rst_aux()

Imre Deak <[email protected]>
fbdev/efifb: Release PCI device's runtime PM ref during FB destroy

Andrii Nakryiko <[email protected]>
selftests/bpf: Fix strobemeta selftest regression

Pablo Neira Ayuso <[email protected]>
netfilter: conntrack: set on IPS_ASSURED if flows enters internal stream state

Sven Schnelle <[email protected]>
parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling

Sven Schnelle <[email protected]>
parisc/unwind: fix unwinder when CONFIG_64BIT is enabled

Gao Xiang <[email protected]>
erofs: don't trigger WARN() when decompression fails

Helge Deller <[email protected]>
task_stack: Fix end_of_stack() for architectures with upwards-growing stack

Sven Schnelle <[email protected]>
parisc: fix warning in flush_tlb_all

Stephane Eranian <[email protected]>
perf/x86/intel: Fix ICL/SPR INST_RETIRED.PREC_DIST encodings

Shuah Khan <[email protected]>
selftests/core: fix conflicting types compile error for close_range()

Anson Jacob <[email protected]>
drm/amd/display: dcn20_resource_construct reduce scope of FPU enabled

Vitaly Kuznetsov <[email protected]>
x86/hyperv: Protect set_hv_tscchange_cb() against getting preempted

王贇 <[email protected]>
ftrace: do CPU checking after preemption disabled

Bryan O'Donoghue <[email protected]>
Revert "wcn36xx: Enable firmware link monitoring"

Loic Poulain <[email protected]>
wcn36xx: Fix packet drop on resume

Loic Poulain <[email protected]>
wcn36xx: Correct band/freq reporting on RX

Yang Yingliang <[email protected]>
spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe()

Josef Bacik <[email protected]>
btrfs: do not take the uuid_mutex in btrfs_rm_device

Sidong Yang <[email protected]>
btrfs: reflink: initialize return value to 0 in btrfs_extent_same()

Hui Wang <[email protected]>
ACPI: resources: Add one more Medion model in IRQ override quirk

Stefan Schaeckeler <[email protected]>
ACPI: AC: Quirk GK45 to skip reading _PSR

Eric Dumazet <[email protected]>
net: annotate data-race in neigh_output()

Florian Westphal <[email protected]>
vrf: run conntrack only in context of lower/physdev for locally generated packets

Viktor Rosendahl <[email protected]>
tools/latency-collector: Use correct size when writing queue_full_warning

Arnd Bergmann <[email protected]>

    ARM: 9136/1: ARMv7-M uses BE-8, not BE-32

Andreas Gruenbacher <[email protected]>
gfs2: Fix glock_hash_walk bugs

Andreas Gruenbacher <[email protected]>
gfs2: Cancel remote delete work asynchronously

Marc Kleine-Budde <[email protected]>
can: bittiming: can_fixup_bittiming(): change type of tseg1 and alltseg to unsigned int

Vladimir Oltean <[email protected]>
net: dsa: lantiq_gswip: serialize access to the PCE table

Stephen Suryaputra <[email protected]>
gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE

Masami Hiramatsu <[email protected]>
ARM: clang: Do not rely on lr register for stacktrace

Tetsuo Handa <[email protected]>
smackfs: use __GFP_NOFAIL for smk_cipso_doi()

Johannes Berg <[email protected]>
iwlwifi: mvm: disable RX-diversity in powersave

Jiri Olsa <[email protected]>
selftests/bpf: Fix perf_buffer test on system with offline cpus

Shuah Khan <[email protected]>
selftests: kvm: fix mismatched fclose() after popen()

Ye Bin <[email protected]>
PM: hibernate: Get block device exclusively in swsusp_check()

Nick Desaulniers <[email protected]>
arm64: vdso32: suppress error message for 'make mrproper'

Hannes Reinecke <[email protected]>
nvme: drop scan_lock and always kick requeue list when removing namespaces

Israel Rukshin <[email protected]>
nvmet-tcp: fix use-after-free when a port is removed

Israel Rukshin <[email protected]>
nvmet-rdma: fix use-after-free when a port is removed

Israel Rukshin <[email protected]>
nvmet: fix use-after-free when a port is removed

Alex Deucher <[email protected]>
drm/amdgpu/pm: properly handle sclk for profiling modes on vangogh

Michael Tretter <[email protected]>
media: allegro: ignore interrupt if mailbox is not initialized

Jens Axboe <[email protected]>
block: remove inaccurate requeue check

Yaara Baruch <[email protected]>
iwlwifi: change all JnP to NO-160 configuration

Zheyu Ma <[email protected]>
mwl8k: Fix use-after-free in mwl8k_fw_state_machine()

Ryder Lee <[email protected]>
mt76: mt7915: fix an off-by-one bound check

Kalesh Singh <[email protected]>
tracing/cfi: Fix cmp_entries_* functions signature mismatch

Menglong Dong <[email protected]>
workqueue: make sysfs of unbound kworker cpumask more clever

Lasse Collin <[email protected]>
lib/xz: Validate the value before assigning it to an enum variable

Lasse Collin <[email protected]>
lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression

Yanfei Xu <[email protected]>
locking/rwsem: Disable preemption for spinning region

Zheyu Ma <[email protected]>
memstick: r592: Fix a UAF bug when removing the driver

Xiao Ni <[email protected]>
md: update superblock after changing rdev flags in state_store

Luis Chamberlain <[email protected]>
floppy: fix calling platform_device_unregister() on invalid drives

Jens Axboe <[email protected]>
block: bump max plugged deferred size from 16 to 32

Ansuel Smith <[email protected]>
thermal/drivers/tsens: Add timeout to get_temp_tsens_valid

Tim Gardner <[email protected]>
drm/msm: prevent NULL dereference in msm_gpu_crashstate_capture()

Yuanzheng Song <[email protected]>
thermal/core: Fix null pointer dereference in thermal_release()

Kees Cook <[email protected]>
leaking_addresses: Always print a trailing newline

Matthias Schiffer <[email protected]>
net: phy: micrel: make *-skew-ps check more lenient

Yifan Zhang <[email protected]>
drm/amdkfd: fix resume error when iommu disabled in Picasso

Aurabindo Pillai <[email protected]>
drm/amd/display: fix null pointer deref when plugging in display

Rafael J. Wysocki <[email protected]>
ACPI: scan: Release PM resources blocked by unused objects

André Almeida <[email protected]>
ACPI: battery: Accept charges over the design capacity as full

Andreas Gruenbacher <[email protected]>
iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value

Xin Xiong <[email protected]>
mmc: moxart: Fix reference count leaks in moxart_probe

Tuo Li <[email protected]>
ath: dfs_pattern_detector: Fix possible null-pointer dereference in channel_detector_create()

Steven Rostedt (VMware) <[email protected]>
tracing: Disable "other" permission bits in the tracefs files

Steven Rostedt (VMware) <[email protected]>
tracefs: Have tracefs directories not set OTH permission bits by default

Alex Sierra <[email protected]>
drm/amdkfd: rm BO resv on validation to avoid deadlock

Antoine Tenart <[email protected]>
net-sysfs: try not to restart the syscall if it will fail eventually

Anant Thazhemadam <[email protected]>
media: usb: dvd-usb: fix uninit-value bug in dibusb_read_eeprom_byte()

Ricardo Ribalda <[email protected]>
media: ipu3-imgu: VIDIOC_QUERYCAP: Fix bus_info

Ricardo Ribalda <[email protected]>
media: ipu3-imgu: imgu_fmt: Handle properly try

Mirela Rabulea <[email protected]>
media: imx-jpeg: Fix possible null pointer dereference

Wojciech Drewek <[email protected]>
ice: Move devlink port to PF/VF struct

Vincent Donnefort <[email protected]>
cpufreq: Make policy min/max hard requirements

Rafael J. Wysocki <[email protected]>
ACPICA: Avoid evaluating methods too early during system resume

Li Zhijian <[email protected]>
kselftests/sched: cleanup the child processes

Josh Don <[email protected]>
fs/proc/uptime.c: Fix idle time reporting in /proc/uptime

Corey Minyard <[email protected]>
ipmi: Disable some operations during a panic

Nadezda Lutovinova <[email protected]>
media: rcar-csi2: Add checking to rcsi2_start_receiver()

Hans de Goede <[email protected]>
brcmfmac: Add DMI nvram filename quirk for Cyberbook T116 tablet

Zong-Zhe Yang <[email protected]>
rtw88: fix RX clock gate setting while fifo dump

Randy Dunlap <[email protected]>
ia64: don't do IA64_CMPXCHG_DEBUG without CONFIG_PRINTK

Rajat Asthana <[email protected]>
media: mceusb: return without resubmitting URB in case of -EPROTO error.

Niklas Söderlund <[email protected]>
media: rcar-vin: Use user provided buffers when starting

Martin Kepplinger <[email protected]>
media: imx: set a media_device bus_info string

Sergey Senozhatsky <[email protected]>
media: videobuf2: rework vb2_mem_ops API

Nadezda Lutovinova <[email protected]>
media: s5p-mfc: Add checking to s5p_mfc_probe().

Tuo Li <[email protected]>
media: s5p-mfc: fix possible null-pointer dereference in s5p_mfc_probe()

Evgeny Novikov <[email protected]>
media: vidtv: Fix memory leak in remove

Ricardo Ribalda <[email protected]>
media: uvcvideo: Set unique vdev name based in type

Ricardo Ribalda <[email protected]>
media: uvcvideo: Return -EIO for control errors

Ricardo Ribalda <[email protected]>
media: uvcvideo: Set capability in s_param

Dmitriy Ulitin <[email protected]>
media: stm32: Potential NULL pointer dereference in dcmi_irq_thread()

Evgeny Novikov <[email protected]>
media: atomisp: Fix error handling in probe

Zheyu Ma <[email protected]>
media: netup_unidvb: handle interrupt properly according to the firmware

Dirk Bender <[email protected]>
media: mt9p031: Fix corrupted frame after restarting stream

Rakesh Babu <[email protected]>
octeontx2-pf: Enable promisc/allmulti match MCAM entries.

Alagu Sankar <[email protected]>
ath10k: high latency fixes for beacon buffer

Baochen Qiang <[email protected]>
ath11k: Change DMA_FROM_DEVICE to DMA_TO_DEVICE when map reinjected packets

Wen Gong <[email protected]>
ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED

Sriram R <[email protected]>
ath11k: Avoid reg rules update during firmware recovery

Johannes Berg <[email protected]>
leds: trigger: use RCU to protect the led_cdevs list

Petr Machata <[email protected]>
selftests: net: fib_nexthops: Wait before checking reported idle time

Jimmy Kizito <[email protected]>
drm/amd/display: Fix null pointer dereference for encoders

Andrey Grodzovsky <[email protected]>
drm/amdgpu: Fix MMIO access page fault

Eric Biggers <[email protected]>
fscrypt: allow 256-bit master keys with AES-256-XTS

Mark Brown <[email protected]>
spi: Check we have a spi_device_id for each DT compatible

Jonas Dreßler <[email protected]>
mwifiex: Properly initialize private structure on interface type changes

Jonas Dreßler <[email protected]>
mwifiex: Run SET_BSS_MODE when changing from P2P to STATION vif-type

Peter Zijlstra <[email protected]>
x86: Increase exception stack sizes

Peter Zijlstra <[email protected]>
x86/mm/64: Improve stack overflow warnings

Shreyansh Chouhan <[email protected]>
crypto: aesni - check walk.nbytes instead of err

Seevalamuthu Mariappan <[email protected]>
ath11k: Align bss_chan_info structure with firmware

Pawan Gupta <[email protected]>
smackfs: Fix use-after-free in netlbl_catmap_walk()

Paul E. McKenney <[email protected]>
rcu-tasks: Move RTGS_WAIT_CBS to beginning of rcu_tasks_kthread() loop

Hui Wang <[email protected]>
ACPI: resources: Add DMI-based legacy IRQ override quirk

Jakub Kicinski <[email protected]>
net: sched: update default qdisc visibility after Tx queue cnt changes

Peter Zijlstra <[email protected]>
locking/lockdep: Avoid RCU-induced noinstr fail

Aleksander Jan Bajkowski <[email protected]>
MIPS: lantiq: dma: reset correct number of channel

Aleksander Jan Bajkowski <[email protected]>
MIPS: lantiq: dma: add small delay after reset

Barnabás Pőcze <[email protected]>
platform/x86: wmi: do not fail if disabling fails

Scott Wood <[email protected]>
rcutorture: Avoid problematic critical section nesting on PREEMPT_RT

Simon Ser <[email protected]>
drm/panel-orientation-quirks: add Valve Steam Deck

Wang ShaoBo <[email protected]>
Bluetooth: fix use-after-free error in lock_sock_nested()

Takashi Iwai <[email protected]>
Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg()

Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Add quirk for the Samsung Galaxy Book 10.6

Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Add quirk for KD Kurio Smart C15200 2-in-1

Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Update the Lenovo Ideapad D330 quirk (v2)

Charan Teja Reddy <[email protected]>
dma-buf: WARN on dmabuf release with pending attachments

Kai Vehmanen <[email protected]>
component: do not leave master devres group open after bind

Sebastian Krzyszkowiak <[email protected]>
power: supply: max17042_battery: Clear status bits in interrupt handler

Johan Hovold <[email protected]>
USB: chipidea: fix interrupt deadlock

Johan Hovold <[email protected]>
USB: iowarrior: fix control-message timeouts

Johan Hovold <[email protected]>
most: fix control-message timeouts

Johan Hovold <[email protected]>
serial: 8250: fix racy uartclk update

Wang Hai <[email protected]>
USB: serial: keyspan: fix memleak on probe errors

Mihail Chindris <[email protected]>
Documentation:devicetree:bindings:iio:dac: Fix val

Nuno Sá <[email protected]>
iio: ad5770r: make devicetree property reading consistent

Pekka Korpinen <[email protected]>

    iio: dac: ad5446: Fix ad5622_write() return value

Mihail Chindris <[email protected]>
drivers: iio: dac: ad5766: Fix dt property name

Yang Yingliang <[email protected]>
iio: buffer: Fix memory leak in iio_buffer_register_legacy_sysfs_groups()

Yang Yingliang <[email protected]>
iio: buffer: Fix memory leak in __iio_buffer_alloc_sysfs_and_mask()

Yang Yingliang <[email protected]>
iio: buffer: Fix memory leak in iio_buffers_alloc_sysfs_and_mask()

Yang Yingliang <[email protected]>
iio: buffer: check return value of kstrdup_const()

Suzuki K Poulose <[email protected]>
coresight: trbe: Defer the probe on offline CPUs

Suzuki K Poulose <[email protected]>
coresight: trbe: Fix incorrect access of the sink specific data

Tao Zhang <[email protected]>
coresight: cti: Correct the parameter for pm_runtime_put

Yang Yingliang <[email protected]>
pinctrl: core: fix possible memory leak in pinctrl_enable()

Paulo Alcantara <[email protected]>
cifs: set a minimum of 120s for next dns resolution

Shyam Prasad N <[email protected]>
cifs: To match file servers, make sure the server hostname matches

Zhang Yi <[email protected]>
quota: correct error number in free_dqentry()

Zhang Yi <[email protected]>
quota: check block number when reading the block in quota file

Pali Rohár <[email protected]>
PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated bridge

Pali Rohár <[email protected]>
PCI: aardvark: Set PCI Bridge Class Code to PCI Bridge

Pali Rohár <[email protected]>
PCI: aardvark: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge

Pali Rohár <[email protected]>
PCI: aardvark: Fix support for bus mastering and PCI_COMMAND on emulated bridge

Marek Behún <[email protected]>
PCI: aardvark: Read all 16-bits from PCIE_MSI_PAYLOAD_REG

Marek Behún <[email protected]>
PCI: aardvark: Fix return value of MSI domain .alloc() method

Pali Rohár <[email protected]>
PCI: aardvark: Fix configuring Reference clock

Pali Rohár <[email protected]>
PCI: aardvark: Fix reporting Data Link Layer Link Active

Pali Rohár <[email protected]>
PCI: aardvark: Do not unmask unused interrupts

Pali Rohár <[email protected]>
PCI: aardvark: Fix checking for link up via LTSSM state

Pali Rohár <[email protected]>
PCI: aardvark: Do not clear status bits of masked interrupts

Dan Williams <[email protected]>
cxl/pci: Fix NULL vs ERR_PTR confusion

Li Chen <[email protected]>
PCI: cadence: Add cdns_plat_pcie_probe() missing return

Marek Behún <[email protected]>
PCI: pci-bridge-emul: Fix emulation of W1C bits

yangerkun <[email protected]>
ovl: fix use after free in struct ovl_aio_req

Juergen Gross <[email protected]>
xen/balloon: add late_initcall_sync() for initial ballooning done

Arnd Bergmann <[email protected]>
ifb: fix building without CONFIG_NET_CLS_ACT

Pali Rohár <[email protected]>
serial: core: Fix initializing and restoring termios speed

Steven Rostedt (VMware) <[email protected]>
ring-buffer: Protect ring_buffer_reset() from reentrancy

Xiaoming Ni <[email protected]>
powerpc/85xx: Fix oops when mpc85xx_smp_guts_ids node cannot be found

Oleksij Rempel <[email protected]>
iio: adc: tsc2046: fix scan interval warning

Zhang Changzhong <[email protected]>
can: j1939: j1939_can_recv(): ignore messages with invalid source address

Zhang Changzhong <[email protected]>
can: j1939: j1939_tp_cmd_recv(): ignore abort message in the BAM transport

Sean Christopherson <[email protected]>
KVM: nVMX: Handle dynamic MSR intercept toggling

Sean Christopherson <[email protected]>
KVM: nVMX: Query current VMCS when determining if MSR bitmaps are in use

Sean Christopherson <[email protected]>
KVM: x86: Add helper to consolidate core logic of SET_CPUID{2} flows

David Woodhouse <[email protected]>
KVM: x86: Fix recording of guest steal time / preempted status

Mark Rutland <[email protected]>
KVM: arm64: Extract ESR_ELx.EC only

Yang Yingliang <[email protected]>
iio: core: check return value when calling dev_set_name()

Yang Yingliang <[email protected]>
iio: core: fix double free in iio_device_unregister_sysfs()

Henrik Grimler <[email protected]>
power: supply: max17042_battery: use VFSOC for capacity when no rsns

Sebastian Krzyszkowiak <[email protected]>
power: supply: max17042_battery: Prevent int underflow in set_soc_threshold

Miquel Raynal <[email protected]>
mtd: rawnand: socrates: Keep the driver compatible with on-die ECC engines

Meng Li <[email protected]>
soc: fsl: dpio: use the combined functions to protect critical zone

Meng Li <[email protected]>
soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id

David Virag <[email protected]>
soc: samsung: exynos-pmu: Fix compilation when nothing selects CONFIG_MFD_CORE

Eric W. Biederman <[email protected]>
signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT

Wolfram Sang <[email protected]>
memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode

Eric W. Biederman <[email protected]>
signal: Remove the bogus sigkill_pending in ptrace_stop

Dmitry Osipenko <[email protected]>
ASoC: tegra: Restore AC97 support

Dmitry Osipenko <[email protected]>
ASoC: tegra: Set default card name for Trimslice

Alok Prasad <[email protected]>
RDMA/qedr: Fix NULL deref for query_qp on the GSI QP

Kan Liang <[email protected]>
perf/x86/intel/uncore: Fix Intel ICX IIO event constraints

Kan Liang <[email protected]>
perf/x86/intel/uncore: Fix invalid unit check

Kan Liang <[email protected]>
perf/x86/intel/uncore: Support extra IMC channel on Ice Lake server

Marek Vasut <[email protected]>
rsi: Fix module dev_oper_mode parameter description

Martin Fuzzey <[email protected]>
rsi: fix rate mask set leading to P2P failure

Martin Fuzzey <[email protected]>
rsi: fix key enabled check causing unwanted encryption for vap_id > 0

Martin Fuzzey <[email protected]>
rsi: fix occasional initialisation failure with BT coex

Benjamin Li <[email protected]>
wcn36xx: handle connection loss indication

Reimar Döffinger <[email protected]>
libata: fix checking of DMA state

Jonas Dreßler <[email protected]>
mwifiex: Try waking the firmware until we get an interrupt

Jonas Dreßler <[email protected]>
mwifiex: Read a PCI register after writing the TX ring write pointer

Rafael J. Wysocki <[email protected]>
PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions

Loic Poulain <[email protected]>
wcn36xx: Fix (QoS) null data frame bitrate/modulation

Loic Poulain <[email protected]>
wcn36xx: Fix tx_status mechanism

Loic Poulain <[email protected]>
wcn36xx: Fix HT40 capability for 2Ghz band

Maximilian Luz <[email protected]>
HID: surface-hid: Allow driver matching for target ID 1 devices

Maximilian Luz <[email protected]>
HID: surface-hid: Use correct event registry for managing HID events

Felix Fietkau <[email protected]>
mt76: mt7615: fix skb use-after-free on mac reset

Maximilian Luz <[email protected]>
platform/surface: aggregator_registry: Add support for Surface Laptop Studio

Lukas Wunner <[email protected]>
ifb: Depend on netfilter alternatively to tc

Austin Kim <[email protected]>
evm: mark evm_fixmode as __ro_after_init

Johan Hovold <[email protected]>
rtl8187: fix control-message timeouts

Ingmar Klein <[email protected]>
PCI: Mark Atheros QCA6174 to avoid bus reset

Johan Hovold <[email protected]>
ath10k: fix division by zero in send path

Johan Hovold <[email protected]>
ath10k: fix control-message timeout

Johan Hovold <[email protected]>
ath6kl: fix control-message timeout

Johan Hovold <[email protected]>
ath6kl: fix division by zero in send path

Johan Hovold <[email protected]>
mwifiex: fix division by zero in fw download path

Eric Badger <[email protected]>
EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell

Krzysztof Kozlowski <[email protected]>
regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property

Krzysztof Kozlowski <[email protected]>
regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled

Zev Weiss <[email protected]>
hwmon: (pmbus/lm25066) Add offset coefficients

Guoqing Jiang <[email protected]>
md/raid1: only allocate write behind bio for WriteMostly device

Corey Minyard <[email protected]>
ipmi:watchdog: Set panic count to proper value on a panic

Ondrej Mosnacek <[email protected]>
selinux: fix race condition when computing ocontext SIDs

Masami Hiramatsu <[email protected]>
ia64: kprobes: Fix to pass correct trampoline address to the handler

Laurent Vivier <[email protected]>
KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling

Andreas Gruenbacher <[email protected]>
powerpc/kvm: Fix kvm_use_magic_page

Sean Christopherson <[email protected]>
KVM: VMX: Unregister posted interrupt wakeup handler on hardware unsetup

Anand Jain <[email protected]>
btrfs: call btrfs_check_rw_degradable only if there is a missing device

Filipe Manana <[email protected]>
btrfs: fix lost error handling when replaying directory deletes

Li Zhang <[email protected]>
btrfs: clear MISSING device status bit in btrfs_close_one_device

David Yang <[email protected]>
tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer

Wen Gu <[email protected]>
net/smc: Correct spelling mistake to TCPF_SYN_RECV

Tony Lu <[email protected]>

    net/smc: Fix smc_link->llc_testlink_time overflow

Yu Xiao <[email protected]>
nfp: bpf: relax prog rejection for mtu check through max_pkt_offset

Dongli Zhang <[email protected]>
vmxnet3: do not stop tx queues after netif_device_detach()

Janghyub Seo <[email protected]>

    r8169: Add device 10ec:8162 to driver r8169

Guangbin Huang <[email protected]>
net: hns3: ignore reset event before initialization process is done

Yufeng Mo <[email protected]>
net: hns3: change hclge/hclgevf workqueue to WQ_UNBOUND mode

Amit Engel <[email protected]>
nvmet-tcp: fix header digest verification

Naohiro Aota <[email protected]>
block: schedule queue restart after BLK_STS_ZONE_RESOURCE

Mario <[email protected]>
drm: panel-orientation-quirks: Add quirk for GPD Win3

Walter Stoll <[email protected]>
watchdog: Fix OMAP watchdog early handling

Cyril Strejc <[email protected]>
net: multicast: calculate csum of looped-back and forwarded packets

Thomas Perrot <[email protected]>
spi: spl022: fix Microwire full duplex mode

Maurizio Lombardi <[email protected]>
nvmet-tcp: fix a memory leak when releasing a queue

Dongli Zhang <[email protected]>
xen/netfront: stop tx queues during live migration

Asmaa Mnebhi <[email protected]>
gpio: mlxbf2.c: Add check for bgpio_init failure

Lorenz Bauer <[email protected]>
bpf: Prevent increasing bpf_jit_limit above max

Lorenz Bauer <[email protected]>
bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT

Lorenz Bauer <[email protected]>
bpf: Define bpf_jit_alloc_exec_limit for riscv JIT

Florian Westphal <[email protected]>
fcnal-test: kill hanging ping/nettest binaries on cleanup

Bryant Mairs <[email protected]>
drm: panel-orientation-quirks: Add quirk for Aya Neo 2021

Russ Weight <[email protected]>
spi: altera: Change to dynamic allocation of spi id

Randy Dunlap <[email protected]>
mmc: winbond: don't build on M68K

Paweł Anikiel <[email protected]>
reset: socfpga: add empty driver allowing consumers to probe

Mikko Perttunen <[email protected]>
reset: tegra-bpmp: Handle errors in BPMP response

Bastien Roucariès <[email protected]>
ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode

Arnd Bergmann <[email protected]>
hyperv/vmbus: include linux/bitops.h

Erik Ekman <[email protected]>
sfc: Don't use netif_info before net_device setup

Erik Ekman <[email protected]>
sfc: Export fibre-specific supported link modes

Zheyu Ma <[email protected]>
cavium: Fix return values of the probe function

Zheyu Ma <[email protected]>
mISDN: Fix return values of the probe function

Dmitry Bogdanov <[email protected]>
scsi: qla2xxx: Fix unmap of already freed sgl

Zheyu Ma <[email protected]>
scsi: qla2xxx: Return -ENOMEM if kzalloc() fails

Zheyu Ma <[email protected]>
cavium: Return negative value when pci_alloc_irq_vectors() fails

Wan Jiabing <[email protected]>
net: mscc: ocelot: Add of_node_put() before goto

Wan Jiabing <[email protected]>
net: sparx5: Add of_node_put() before goto

Kele Huang <[email protected]>
ptp: fix error print of ptp_kvm on X86_64 platform

Davide Baldo <[email protected]>
ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers

Stefan Binding <[email protected]>
ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets

Yang Yingliang <[email protected]>
ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked()

Quentin Perret <[email protected]>
KVM: arm64: Report corrupted refcount at EL2

Peter Zijlstra <[email protected]>
x86/iopl: Fake iopl(3) CLI/STI usage

Sean Christopherson <[email protected]>
x86/irq: Ensure PI wakeup handler is unregistered before module unload

Jane Malalane <[email protected]>
x86/cpu: Fix migration safety with X86_BUG_NULL_SEL

Tom Lendacky <[email protected]>
x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c

Miklos Szeredi <[email protected]>
fuse: fix page stealing

yangerkun <[email protected]>
ext4: refresh the ext4_ext_path struct after dropping i_data_sem.

yangerkun <[email protected]>
ext4: ensure enough credits in ext4_ext_shift_path_extents

Shaoying Xu <[email protected]>
ext4: fix lazy initialization next schedule time computation in more granular unit

Takashi Iwai <[email protected]>
ALSA: timer: Unconditionally unlink slave instances, too

Wang Wensheng <[email protected]>
ALSA: timer: Fix use-after-free problem

Takashi Iwai <[email protected]>
ALSA: PCM: Fix NULL dereference at mmap checks

Austin Kim <[email protected]>
ALSA: synth: missing check for possible NULL after the call to kstrdup

Takashi Iwai <[email protected]>
ALSA: hda: Free card instance properly at probe errors

Alexander Tsoy <[email protected]>
ALSA: usb-audio: Add registration quirk for JBL Quantum 400

Jason Ormes <[email protected]>
ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk

Pavel Skripkin <[email protected]>
ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume

Takashi Iwai <[email protected]>
ALSA: mixer: oss: Fix racy access to slots

Johan Hovold <[email protected]>
ALSA: line6: fix control and interrupt message timeouts

Johan Hovold <[email protected]>
ALSA: 6fire: fix control and bulk message timeouts

Johan Hovold <[email protected]>
ALSA: ua101: fix division by zero at probe

Kai-Heng Feng <[email protected]>
ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED

Takashi Iwai <[email protected]>
ALSA: hda/realtek: Add quirk for ASUS UX550VE

Jaroslav Kysela <[email protected]>
ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N

Jeremy Soller <[email protected]>
ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ

Tim Crawford <[email protected]>
ALSA: hda/realtek: Add quirk for Clevo PC70HS

Takashi Iwai <[email protected]>
ALSA: hda/realtek: Add a quirk for HP OMEN 15 mute LED

Johnathon Clark <[email protected]>
ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14

Ricardo Ribalda <[email protected]>
media: v4l2-ioctl: Fix check_ext_ctrls

Sean Young <[email protected]>
media: ir-kbd-i2c: improve responsiveness of hauppauge zilog receivers

Chen-Yu Tsai <[email protected]>
media: rkvdec: Support dynamic resolution changes

Sean Young <[email protected]>
media: ite-cir: IR receiver stop working after receive overflow

Chen-Yu Tsai <[email protected]>
media: rkvdec: Do not override sizeimage for output format

Tang Bin <[email protected]>
crypto: s5p-sss - Add error handling in s5p_aes_probe()

jing yangyang <[email protected]>
firmware/psci: fix application of sizeof to pointer

Dan Carpenter <[email protected]>
tpm: Check for integer overflow in tpm2_map_response_body()

Helge Deller <[email protected]>
parisc: Fix ptrace check on syscall return

Helge Deller <[email protected]>
parisc: Fix set_fixmap() on PA1.x CPUs

Sungjong Seo <[email protected]>
exfat: fix incorrect loading of i_blocks for large files

Christian Löhle <[email protected]>
mmc: dw_mmc: Dont wait for DRTO on Write RSP error

Derong Liu <[email protected]>
mmc: mtk-sd: Add wait dma stop done flow

Ziyang Xuan <[email protected]>
char: xillybus: fix msg_ep UAF in xillyusb_probe()

Ben Skeggs <[email protected]>
ce/gf100: fix incorrect CE0 address calculation on some GPUs

Quinn Tran <[email protected]>
scsi: qla2xxx: Fix use after free in eh_abort path

Arun Easi <[email protected]>
scsi: qla2xxx: Fix kernel crash when accessing port_speed sysfs file

James Smart <[email protected]>
scsi: lpfc: Fix FCP I/O flush functionality for TMF routines

James Smart <[email protected]>
scsi: lpfc: Don't release final kref on Fport node while ABTS outstanding

Tadeusz Struk <[email protected]>
scsi: core: Remove command size deduction from scsi_setup_scsi_cmnd()

Ewan D. Milne <[email protected]>

    scsi: core: Avoid leaving shost->last_reset with stale value if EH does not run

Jan Kara <[email protected]>
ocfs2: fix data corruption on truncate

Damien Le Moal <[email protected]>
libata: fix read log timeout value

Takashi Iwai <[email protected]>
Input: i8042 - Add quirk for Fujitsu Lifebook T725

Phoenix Huang <[email protected]>
Input: elantench - fix misreporting trackpoint coordinates

Johan Hovold <[email protected]>
Input: iforce - fix control-message timeout

Nehal Bakulchandra Shah <[email protected]>
usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

Mathias Nyman <[email protected]>
xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

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

Diffstat:

 Documentation/admin-guide/kernel-parameters.txt    |   7 +
 .../devicetree/bindings/iio/dac/adi,ad5766.yaml    |   2 +-
 .../bindings/regulator/samsung,s5m8767.txt         |  23 +-
 Documentation/filesystems/fscrypt.rst              |  10 +-
 Makefile                                           |   4 +-
 arch/alpha/include/asm/processor.h                 |   2 +-
 arch/alpha/kernel/process.c                        |   5 +-
 arch/arc/include/asm/processor.h                   |   2 +-
 arch/arc/kernel/stacktrace.c                       |   4 +-
 arch/arm/Makefile                                  |  22 +-
 arch/arm/boot/dts/at91-tse850-3.dts                |   2 +-
 arch/arm/boot/dts/bcm4708-netgear-r6250.dts        |   2 +-
 arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts        |   2 +-
 arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts  |   2 +-
 arch/arm/boot/dts/bcm4709-linksys-ea9200.dts       |   2 +-
 arch/arm/boot/dts/bcm4709-netgear-r7000.dts        |   2 +-
 arch/arm/boot/dts/bcm4709-netgear-r8000.dts        |   2 +-
 arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts  |   2 +-
 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts      |   2 +-
 arch/arm/boot/dts/bcm53016-meraki-mr32.dts         |   2 +-
 arch/arm/boot/dts/bcm94708.dts                     |   2 +-
 arch/arm/boot/dts/bcm94709.dts                     |   2 +-
 arch/arm/boot/dts/omap3-gta04.dtsi                 |   2 +-
 arch/arm/boot/dts/qcom-msm8974.dtsi                |   4 +-
 arch/arm/boot/dts/stm32mp15-pinctrl.dtsi           |   8 +-
 arch/arm/boot/dts/stm32mp151.dtsi                  |  16 +-
 arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi       |   2 +-
 arch/arm/boot/dts/stm32mp15xx-dkx.dtsi             |   2 +-
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts    |   2 +-
 arch/arm/include/asm/processor.h                   |   2 +-
 arch/arm/kernel/process.c                          |   4 +-
 arch/arm/kernel/stacktrace.c                       |   3 +-
 arch/arm/mach-s3c/irq-s3c24xx.c                    |  22 +-
 arch/arm/mm/Kconfig                                |   2 +-
 arch/arm/mm/kasan_init.c                           |   2 +-
 arch/arm/mm/mmu.c                                  |   4 +-
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts  |   2 +-
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts    |   2 +-
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts |   2 +-
 .../boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi   |   4 +-
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi     |   4 +-
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi   |   4 +-
 .../boot/dts/amlogic/meson-sm1-bananapi-m5.dts     |   2 +-
 .../boot/dts/amlogic/meson-sm1-khadas-vim3l.dts    |   2 +-
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi  |   6 +-
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts   |   2 +-
 arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi  |   2 +-
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |   8 +-
 arch/arm64/boot/dts/qcom/pm8916.dtsi               |   1 -
 arch/arm64/boot/dts/qcom/pmi8994.dtsi              |   2 +-
 .../arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi |   2 +-
 .../arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi |   8 +-
 arch/arm64/boot/dts/qcom/sc7180.dtsi               |  52 ++---
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |   6 +-
 .../arm64/boot/dts/renesas/beacon-renesom-som.dtsi |   1 +
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           |   2 +-
 arch/arm64/boot/dts/rockchip/rk3568.dtsi           |   2 +-
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi          |   6 +-
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi          |  16 +-
 arch/arm64/include/asm/esr.h                       |   1 +
 arch/arm64/include/asm/pgtable.h                   |  12 +-
 arch/arm64/include/asm/processor.h                 |   2 +-
 arch/arm64/kernel/cpufeature.c                     |  10 +-
 arch/arm64/kernel/process.c                        |   4 +-
 arch/arm64/kernel/vdso32/Makefile                  |   3 +-
 arch/arm64/kvm/hyp/hyp-entry.S                     |   2 +-
 arch/arm64/kvm/hyp/nvhe/host.S                     |   2 +-
 arch/arm64/kvm/hyp/nvhe/page_alloc.c               |   1 +
 arch/arm64/mm/mmu.c                                |   5 +
 arch/arm64/net/bpf_jit_comp.c                      |   5 +
 arch/csky/include/asm/processor.h                  |   2 +-
 arch/csky/kernel/stacktrace.c                      |   5 +-
 arch/h8300/include/asm/processor.h                 |   2 +-
 arch/h8300/kernel/process.c                        |   5 +-
 arch/hexagon/include/asm/processor.h               |   2 +-
 arch/hexagon/kernel/process.c                      |   4 +-
 arch/ia64/Kconfig.debug                            |   2 +-
 arch/ia64/include/asm/processor.h                  |   2 +-
 arch/ia64/kernel/kprobes.c                         |   9 +-
 arch/ia64/kernel/process.c                         |   5 +-
 arch/m68k/Kconfig.machine                          |   1 +
 arch/m68k/include/asm/processor.h                  |   2 +-
 arch/m68k/kernel/process.c                         |   4 +-
 arch/microblaze/include/asm/processor.h            |   2 +-
 arch/microblaze/kernel/process.c                   |   2 +-
 arch/mips/Kconfig                                  |   1 +
 arch/mips/Makefile                                 |   2 +
 arch/mips/include/asm/cmpxchg.h                    |   5 +-
 arch/mips/include/asm/mips-cm.h                    |  12 +-
 arch/mips/include/asm/processor.h                  |   2 +-
 arch/mips/kernel/mips-cm.c                         |  21 +-
 arch/mips/kernel/process.c                         |   8 +-
 arch/mips/kernel/r2300_fpu.S                       |   4 +-
 arch/mips/kernel/syscall.c                         |   9 -
 arch/mips/lantiq/xway/dma.c                        |  23 +-
 arch/nds32/include/asm/processor.h                 |   2 +-
 arch/nds32/kernel/process.c                        |   7 +-
 arch/nios2/include/asm/processor.h                 |   2 +-
 arch/nios2/kernel/process.c                        |   5 +-
 arch/openrisc/include/asm/processor.h              |   2 +-
 arch/openrisc/kernel/dma.c                         |   4 +-
 arch/openrisc/kernel/process.c                     |   2 +-
 arch/openrisc/kernel/smp.c                         |   6 +-
 arch/parisc/include/asm/pgtable.h                  |  10 +-
 arch/parisc/include/asm/processor.h                |   2 +-
 arch/parisc/kernel/cache.c                         |   4 +-
 arch/parisc/kernel/entry.S                         |   2 +-
 arch/parisc/kernel/process.c                       |   5 +-
 arch/parisc/kernel/smp.c                           |  19 +-
 arch/parisc/kernel/unwind.c                        |  21 +-
 arch/parisc/kernel/vmlinux.lds.S                   |   3 +-
 arch/parisc/mm/fixmap.c                            |   5 +-
 arch/parisc/mm/init.c                              |   4 +-
 arch/powerpc/Kconfig                               |   6 +-
 arch/powerpc/include/asm/nohash/32/pgtable.h       |  19 +-
 arch/powerpc/include/asm/nohash/32/pte-8xx.h       |  22 ++
 arch/powerpc/include/asm/nohash/64/pgtable.h       |   5 -
 arch/powerpc/include/asm/nohash/pte-book3e.h       |  18 +-
 arch/powerpc/include/asm/paravirt.h                |  18 +-
 arch/powerpc/include/asm/processor.h               |   2 +-
 arch/powerpc/kernel/firmware.c                     |   7 +-
 arch/powerpc/kernel/head_booke.h                   |  15 +-
 arch/powerpc/kernel/interrupt.c                    |   2 +-
 arch/powerpc/kernel/kvm.c                          |   2 +-
 arch/powerpc/kernel/process.c                      |   9 +-
 arch/powerpc/kvm/book3s_hv.c                       |  30 ++-
 arch/powerpc/kvm/booke.c                           |  16 +-
 arch/powerpc/lib/feature-fixups.c                  |  11 +
 arch/powerpc/mm/mem.c                              |   2 +-
 arch/powerpc/mm/nohash/tlb_low_64e.S               |   8 +-
 arch/powerpc/mm/pgtable_32.c                       |   2 +-
 arch/powerpc/net/bpf_jit_comp.c                    |   2 +-
 arch/powerpc/perf/power10-events-list.h            |   8 +-
 arch/powerpc/perf/power10-pmu.c                    |  44 ++--
 arch/powerpc/platforms/44x/fsp2.c                  |   2 +
 arch/powerpc/platforms/85xx/Makefile               |   4 +-
 arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c       |   7 +-
 arch/powerpc/platforms/85xx/smp.c                  |  12 +-
 arch/powerpc/platforms/book3s/vas-api.c            |   4 +-
 arch/powerpc/platforms/powernv/opal-prd.c          |  12 +-
 arch/powerpc/platforms/pseries/mobility.c          |  34 +++
 arch/powerpc/xmon/xmon.c                           |   3 +-
 arch/riscv/include/asm/processor.h                 |   2 +-
 arch/riscv/kernel/stacktrace.c                     |  12 +-
 arch/riscv/net/bpf_jit_core.c                      |   5 +
 arch/s390/include/asm/processor.h                  |   2 +-
 arch/s390/kernel/perf_cpum_cf.c                    |   4 +-
 arch/s390/kernel/process.c                         |   4 +-
 arch/s390/kernel/uv.c                              |   2 +-
 arch/s390/kvm/priv.c                               |   2 +
 arch/s390/kvm/pv.c                                 |  21 +-
 arch/s390/mm/gmap.c                                |  11 +-
 arch/s390/mm/pgtable.c                             |  70 ++++--
 arch/sh/include/asm/processor_32.h                 |   2 +-
 arch/sh/kernel/cpu/fpu.c                           |  10 +-
 arch/sh/kernel/process_32.c                        |   5 +-
 arch/sparc/include/asm/processor_32.h              |   2 +-
 arch/sparc/include/asm/processor_64.h              |   2 +-
 arch/sparc/kernel/process_32.c                     |   5 +-
 arch/sparc/kernel/process_64.c                     |   5 +-
 arch/um/include/asm/processor-generic.h            |   2 +-
 arch/um/kernel/process.c                           |   5 +-
 arch/x86/crypto/aesni-intel_glue.c                 |   2 +-
 arch/x86/events/intel/core.c                       |   5 +-
 arch/x86/events/intel/ds.c                         |   5 +-
 arch/x86/events/intel/uncore_discovery.h           |   2 +-
 arch/x86/events/intel/uncore_snbep.c               |   6 +-
 arch/x86/hyperv/hv_init.c                          |   5 +-
 arch/x86/include/asm/insn-eval.h                   |   1 +
 arch/x86/include/asm/irq_stack.h                   |  37 ++-
 arch/x86/include/asm/kvm_host.h                    |   2 +-
 arch/x86/include/asm/page_64_types.h               |   2 +-
 arch/x86/include/asm/processor.h                   |   3 +-
 arch/x86/include/asm/stacktrace.h                  |  10 +
 arch/x86/include/asm/traps.h                       |   6 +-
 arch/x86/kernel/cpu/amd.c                          |   2 +
 arch/x86/kernel/cpu/common.c                       |  44 +++-
 arch/x86/kernel/cpu/cpu.h                          |   1 +
 arch/x86/kernel/cpu/hygon.c                        |   2 +
 arch/x86/kernel/cpu/mce/intel.c                    |   5 +-
 arch/x86/kernel/dumpstack_64.c                     |   6 +
 arch/x86/kernel/irq.c                              |   4 +-
 arch/x86/kernel/process.c                          |  66 ++----
 arch/x86/kernel/traps.c                            |  60 +++--
 arch/x86/kvm/cpuid.c                               |  47 ++--
 arch/x86/kvm/vmx/nested.c                          | 103 ++++-----
 arch/x86/kvm/vmx/vmx.c                             |  68 +-----
 arch/x86/kvm/vmx/vmx.h                             |  63 ++++++
 arch/x86/kvm/x86.c                                 | 108 ++++++---
 arch/x86/lib/insn-eval.c                           |   2 +-
 arch/x86/lib/insn.c                                |   5 +-
 arch/x86/mm/fault.c                                |  20 +-
 arch/x86/mm/mem_encrypt_identity.c                 |   9 +
 arch/xtensa/include/asm/processor.h                |   2 +-
 arch/xtensa/kernel/process.c                       |   5 +-
 block/blk-cgroup.c                                 |  10 +
 block/blk-mq.c                                     |  18 +-
 block/blk.h                                        |   6 +
 crypto/Kconfig                                     |   2 +-
 crypto/pcrypt.c                                    |  12 +-
 crypto/tcrypt.c                                    |   5 +-
 drivers/acpi/ac.c                                  |  19 ++
 drivers/acpi/acpica/acglobal.h                     |   2 +
 drivers/acpi/acpica/hwesleep.c                     |   8 +-
 drivers/acpi/acpica/hwsleep.c                      |  11 +-
 drivers/acpi/acpica/hwxfsleep.c                    |   7 +
 drivers/acpi/battery.c                             |   2 +-
 drivers/acpi/glue.c                                |  25 ++
 drivers/acpi/internal.h                            |   1 +
 drivers/acpi/pmic/intel_pmic.c                     |  51 +++--
 drivers/acpi/power.c                               |  86 +++----
 drivers/acpi/resource.c                            |  56 ++++-
 drivers/acpi/scan.c                                |   6 +
 drivers/ata/libata-core.c                          |   2 +-
 drivers/ata/libata-eh.c                            |   8 +
 drivers/auxdisplay/ht16k33.c                       |  66 +++---
 drivers/auxdisplay/img-ascii-lcd.c                 |  10 +
 drivers/base/component.c                           |   5 +-
 drivers/base/core.c                                |   4 +-
 drivers/base/power/main.c                          |  93 +++++---
 drivers/block/ataflop.c                            | 141 +++++++-----
 drivers/block/floppy.c                             |   9 +-
 drivers/block/nbd.c                                |  24 +-
 drivers/block/zram/zram_drv.c                      |   2 +-
 drivers/bluetooth/btmtkuart.c                      |  13 +-
 drivers/bus/ti-sysc.c                              |  65 +++++-
 drivers/char/hw_random/mtk-rng.c                   |   9 +-
 drivers/char/ipmi/ipmi_msghandler.c                |  10 +-
 drivers/char/ipmi/ipmi_watchdog.c                  |  25 +-
 drivers/char/ipmi/kcs_bmc_serio.c                  |   4 +-
 drivers/char/tpm/tpm2-space.c                      |   3 +
 drivers/char/tpm/tpm_tis_core.c                    |  26 ++-
 drivers/char/tpm/tpm_tis_core.h                    |   4 +
 drivers/char/tpm/tpm_tis_spi_main.c                |   1 +
 drivers/char/xillybus/xillyusb.c                   |   1 +
 drivers/clk/at91/clk-master.c                      |   6 +-
 drivers/clk/at91/clk-sam9x60-pll.c                 |   4 +-
 drivers/clk/at91/pmc.c                             |   5 +
 drivers/clk/mvebu/ap-cpu-clk.c                     |  14 +-
 drivers/clocksource/Kconfig                        |   1 +
 drivers/cpufreq/cpufreq.c                          |   7 +
 drivers/cpufreq/intel_pstate.c                     |  37 ++-
 drivers/cpuidle/sysfs.c                            |   5 +-
 drivers/crypto/caam/caampkc.c                      |  19 +-
 drivers/crypto/caam/regs.h                         |   3 +
 drivers/crypto/ccree/cc_driver.c                   |   3 +-
 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c |   1 +
 drivers/crypto/qat/qat_common/adf_pf2vf_msg.c      |  13 ++
 drivers/crypto/qat/qat_common/adf_vf_isr.c         |   6 +
 drivers/crypto/s5p-sss.c                           |   2 +
 drivers/cxl/pci.c                                  |   2 +-
 drivers/dma-buf/dma-buf.c                          |   1 +
 drivers/dma/at_xdmac.c                             |  53 +++--
 drivers/dma/bestcomm/ata.c                         |   2 +-
 drivers/dma/bestcomm/bestcomm.c                    |  22 +-
 drivers/dma/bestcomm/fec.c                         |   4 +-
 drivers/dma/bestcomm/gen_bd.c                      |   4 +-
 drivers/dma/dmaengine.h                            |   2 +-
 drivers/dma/stm32-dma.c                            |  23 +-
 drivers/dma/ti/k3-udma.c                           |  32 ++-
 drivers/edac/amd64_edac.c                          |  22 +-
 drivers/edac/sb_edac.c                             |   2 +-
 drivers/firmware/psci/psci_checker.c               |   2 +-
 drivers/firmware/qcom_scm.c                        |   2 +-
 drivers/gpio/gpio-mlxbf2.c                         |   5 +
 drivers/gpio/gpio-realtek-otto.c                   |   2 +-
 drivers/gpu/drm/Kconfig                            |   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c        |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h        |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         |  11 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c            |   2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c              |   4 +-
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c              |   8 +-
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c              |  17 +-
 drivers/gpu/drm/amd/amdkfd/kfd_device.c            |   1 +
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               |   7 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   9 +-
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c   |   2 +-
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |   2 +-
 .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c  |  16 +-
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c |   3 +-
 drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c   |  89 +++-----
 drivers/gpu/drm/bridge/analogix/anx7625.c          |  12 +-
 drivers/gpu/drm/bridge/ite-it66121.c               |  21 +-
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c         |   9 +-
 drivers/gpu/drm/drm_panel_orientation_quirks.c     |  47 +++-
 drivers/gpu/drm/drm_plane_helper.c                 |   1 -
 drivers/gpu/drm/i915/display/intel_fb.c            |   5 +-
 drivers/gpu/drm/imx/imx-drm-core.c                 |   2 -
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              |   6 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |   8 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |   4 +
 drivers/gpu/drm/msm/msm_gem.c                      |   5 +-
 drivers/gpu/drm/msm/msm_gpu.c                      |   2 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c              |   2 +-
 drivers/gpu/drm/nouveau/nouveau_svm.c              |   4 +
 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c     |   2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c  |   3 +-
 drivers/gpu/drm/radeon/radeon_gem.c                |   2 +-
 drivers/gpu/drm/sun4i/sun8i_csc.h                  |   4 +-
 drivers/gpu/drm/ttm/ttm_bo_vm.c                    |  99 +-------
 drivers/gpu/drm/v3d/v3d_gem.c                      |   4 +-
 drivers/gpu/drm/virtio/virtgpu_vq.c                |   8 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h                |   4 -
 drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c         |  72 +-----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c           |   3 -
 drivers/hid/hid-u2fzero.c                          |  10 +-
 drivers/hid/surface-hid/surface_hid.c              |   4 +-
 drivers/hv/hyperv_vmbus.h                          |   1 +
 drivers/hwmon/hwmon.c                              |   6 +-
 drivers/hwmon/pmbus/lm25066.c                      |  25 +-
 drivers/hwtracing/coresight/coresight-cti-core.c   |   2 +-
 drivers/hwtracing/coresight/coresight-trbe.c       |  10 +-
 drivers/i2c/busses/i2c-mt65xx.c                    |   2 +-
 drivers/i2c/busses/i2c-xlr.c                       |   6 +-
 drivers/iio/accel/st_accel_i2c.c                   |   4 +-
 drivers/iio/accel/st_accel_spi.c                   |   4 +-
 drivers/iio/adc/ti-tsc2046.c                       |   2 +-
 drivers/iio/dac/ad5446.c                           |   9 +-
 drivers/iio/dac/ad5766.c                           |   6 +-
 drivers/iio/dac/ad5770r.c                          |   2 +-
 drivers/iio/gyro/st_gyro_i2c.c                     |   4 +-
 drivers/iio/gyro/st_gyro_spi.c                     |   4 +-
 drivers/iio/imu/adis.c                             |   4 +-
 drivers/iio/industrialio-buffer.c                  |  28 ++-
 drivers/iio/industrialio-core.c                    |   9 +-
 drivers/iio/magnetometer/st_magn_i2c.c             |   4 +-
 drivers/iio/magnetometer/st_magn_spi.c             |   4 +-
 drivers/iio/pressure/st_pressure_i2c.c             |   4 +-
 drivers/iio/pressure/st_pressure_spi.c             |   8 +-
 drivers/infiniband/core/uverbs_cmd.c               |   3 -
 drivers/infiniband/hw/bnxt_re/qplib_fp.c           |   3 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c         |   6 +-
 drivers/infiniband/hw/mlx4/qp.c                    |   4 +-
 drivers/infiniband/hw/qedr/verbs.c                 |  15 +-
 drivers/infiniband/sw/rxe/rxe_param.h              |   2 +-
 drivers/input/joystick/iforce/iforce-usb.c         |   2 +-
 drivers/input/misc/ariel-pwrbutton.c               |   7 +
 drivers/input/mouse/elantech.c                     |  13 ++
 drivers/input/serio/i8042-x86ia64io.h              |  14 ++
 drivers/input/touchscreen/st1232.c                 |   2 +-
 drivers/iommu/dma-iommu.c                          |  16 +-
 drivers/iommu/mtk_iommu.c                          |   4 +-
 drivers/irqchip/irq-bcm6345-l1.c                   |   2 +-
 drivers/irqchip/irq-sifive-plic.c                  |   8 +-
 drivers/isdn/hardware/mISDN/hfcpci.c               |   8 +-
 drivers/leds/led-triggers.c                        |  41 ++--
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   1 -
 drivers/md/md.c                                    |  11 +-
 drivers/md/raid1.c                                 |   2 +-
 drivers/media/common/videobuf2/videobuf2-core.c    |  42 ++--
 .../media/common/videobuf2/videobuf2-dma-contig.c  |  36 +--
 drivers/media/common/videobuf2/videobuf2-dma-sg.c  |  33 +--
 drivers/media/common/videobuf2/videobuf2-vmalloc.c |  30 +--
 drivers/media/dvb-frontends/mn88443x.c             |  18 +-
 drivers/media/i2c/Kconfig                          |   1 +
 drivers/media/i2c/imx258.c                         |  12 +-
 drivers/media/i2c/ir-kbd-i2c.c                     |   1 +
 drivers/media/i2c/mt9p031.c                        |  28 ++-
 drivers/media/i2c/tda1997x.c                       |   8 +-
 drivers/media/pci/cx23885/cx23885-alsa.c           |   3 +-
 drivers/media/pci/ivtv/ivtvfb.c                    |   4 +-
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c |  27 ++-
 drivers/media/platform/allegro-dvt/allegro-core.c  |   9 +
 drivers/media/platform/atmel/atmel-isc-base.c      |  25 +-
 drivers/media/platform/atmel/atmel-isc.h           |   2 +
 drivers/media/platform/atmel/atmel-sama5d2-isc.c   |  39 ++--
 drivers/media/platform/atmel/atmel-sama7g5-isc.c   |  22 +-
 drivers/media/platform/imx-jpeg/mxc-jpeg.c         |   6 +
 drivers/media/platform/meson/ge2d/ge2d.c           |   6 +-
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c |   8 +-
 drivers/media/platform/mtk-vpu/mtk_vpu.c           |   5 +-
 drivers/media/platform/qcom/venus/pm_helpers.c     |   8 +-
 drivers/media/platform/rcar-vin/rcar-csi2.c        |   2 +
 drivers/media/platform/rcar-vin/rcar-dma.c         |   3 +-
 drivers/media/platform/s5p-mfc/s5p_mfc.c           |   6 +-
 drivers/media/platform/stm32/stm32-dcmi.c          |  19 +-
 .../media/platform/sunxi/sun6i-csi/sun6i_video.c   |   6 +-
 drivers/media/radio/radio-wl1273.c                 |   2 +-
 drivers/media/radio/si470x/radio-si470x-i2c.c      |   2 +-
 drivers/media/radio/si470x/radio-si470x-usb.c      |   2 +-
 drivers/media/rc/ir_toy.c                          |   2 +-
 drivers/media/rc/ite-cir.c                         |   2 +-
 drivers/media/rc/mceusb.c                          |   1 +
 drivers/media/spi/cxd2880-spi.c                    |   2 +-
 drivers/media/test-drivers/vidtv/vidtv_bridge.c    |   1 +
 drivers/media/usb/dvb-usb/az6027.c                 |   1 +
 drivers/media/usb/dvb-usb/dibusb-common.c          |   2 +-
 drivers/media/usb/em28xx/em28xx-cards.c            |   5 +-
 drivers/media/usb/em28xx/em28xx-core.c             |   5 +-
 drivers/media/usb/tm6000/tm6000-video.c            |   3 +-
 drivers/media/usb/ttusb-dec/ttusb_dec.c            |  10 +-
 drivers/media/usb/uvc/uvc_driver.c                 |   7 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   |   7 +-
 drivers/media/usb/uvc/uvc_video.c                  |   5 +
 drivers/media/v4l2-core/v4l2-ioctl.c               |  67 ++++--
 drivers/memory/fsl_ifc.c                           |  13 +-
 drivers/memory/renesas-rpc-if.c                    | 113 +++++++---
 drivers/memstick/core/ms_block.c                   |   2 +-
 drivers/memstick/host/jmb38x_ms.c                  |   2 +-
 drivers/memstick/host/r592.c                       |   8 +-
 drivers/mfd/altera-sysmgr.c                        |   2 +-
 drivers/mfd/dln2.c                                 |  18 ++
 drivers/mfd/mfd-core.c                             |   2 +
 drivers/mfd/motorola-cpcap.c                       |   8 +
 drivers/mfd/sprd-sc27xx-spi.c                      |   7 +
 drivers/mmc/host/Kconfig                           |   2 +-
 drivers/mmc/host/dw_mmc.c                          |   3 +-
 drivers/mmc/host/moxart-mmc.c                      |  16 +-
 drivers/mmc/host/mtk-sd.c                          |   5 +
 drivers/mmc/host/mxs-mmc.c                         |  10 +
 drivers/mmc/host/sdhci-omap.c                      |  18 +-
 drivers/most/most_usb.c                            |   5 +-
 drivers/mtd/mtdcore.c                              |   4 +-
 drivers/mtd/nand/raw/ams-delta.c                   |  12 +-
 drivers/mtd/nand/raw/arasan-nand-controller.c      |  15 ++
 drivers/mtd/nand/raw/au1550nd.c                    |  12 +-
 drivers/mtd/nand/raw/fsmc_nand.c                   |   4 +-
 drivers/mtd/nand/raw/gpio.c                        |  12 +-
 drivers/mtd/nand/raw/intel-nand-controller.c       |   5 +
 drivers/mtd/nand/raw/mpc5121_nfc.c                 |  12 +-
 drivers/mtd/nand/raw/orion_nand.c                  |  12 +-
 drivers/mtd/nand/raw/pasemi_nand.c                 |  12 +-
 drivers/mtd/nand/raw/plat_nand.c                   |  12 +-
 drivers/mtd/nand/raw/socrates_nand.c               |  12 +-
 drivers/mtd/nand/raw/xway_nand.c                   |  12 +-
 drivers/mtd/spi-nor/controllers/hisi-sfc.c         |   1 -
 drivers/net/Kconfig                                |   2 +-
 drivers/net/bonding/bond_sysfs_slave.c             |  36 +--
 drivers/net/can/dev/bittiming.c                    |   2 +-
 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c     |   2 +-
 drivers/net/can/usb/etas_es58x/es58x_core.c        |   6 +-
 drivers/net/dsa/lantiq_gswip.c                     |  28 ++-
 drivers/net/dsa/mv88e6xxx/chip.c                   |   5 +-
 drivers/net/dsa/ocelot/felix.c                     |   9 +-
 drivers/net/dsa/rtl8366.c                          |   2 +-
 drivers/net/dsa/rtl8366rb.c                        |   2 +-
 drivers/net/ethernet/amd/xgbe/xgbe-common.h        |   8 +
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c        |  20 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |   5 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c  |  13 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h  |  13 --
 drivers/net/ethernet/cavium/thunder/nic_main.c     |   2 +-
 drivers/net/ethernet/cavium/thunder/nicvf_main.c   |   4 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c |   7 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.h         |   2 +
 .../chelsio/inline_crypto/chtls/chtls_cm.c         |   2 +-
 .../chelsio/inline_crypto/chtls/chtls_cm.h         |   2 +-
 drivers/net/ethernet/dec/tulip/winbond-840.c       |   2 +-
 drivers/net/ethernet/fealnx.c                      |   2 +-
 drivers/net/ethernet/freescale/enetc/enetc_qos.c   |  18 +-
 drivers/net/ethernet/google/gve/gve.h              |  17 +-
 drivers/net/ethernet/google/gve/gve_adminq.h       |   1 +
 drivers/net/ethernet/google/gve/gve_main.c         |  48 +++-
 drivers/net/ethernet/google/gve/gve_rx.c           |   7 +-
 drivers/net/ethernet/google/gve/gve_tx.c           |  23 +-
 drivers/net/ethernet/google/gve/gve_tx_dqo.c       |  84 ++++---
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c |  20 +-
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |  45 +---
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h    |   7 +-
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c  |  77 +++----
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h  |   4 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c  |  15 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h  |   5 +-
 drivers/net/ethernet/ibm/ibmvnic.c                 |  21 +-
 drivers/net/ethernet/intel/ice/ice.h               |   7 +-
 drivers/net/ethernet/intel/ice/ice_base.c          |   2 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c       | 109 ++++++---
 drivers/net/ethernet/intel/ice/ice_devlink.h       |   6 +-
 drivers/net/ethernet/intel/ice/ice_lib.c           |   3 +-
 drivers/net/ethernet/intel/ice/ice_main.c          |   4 +-
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c   |  22 +-
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h   |   9 +
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c    |  38 ++--
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  78 ++++---
 .../net/ethernet/microchip/sparx5/sparx5_main.c    |   1 +
 drivers/net/ethernet/mscc/ocelot.c                 |  17 --
 drivers/net/ethernet/mscc/ocelot_net.c             |   1 +
 drivers/net/ethernet/mscc/ocelot_vsc7514.c         |   1 +
 drivers/net/ethernet/netronome/nfp/bpf/main.c      |  16 +-
 drivers/net/ethernet/netronome/nfp/bpf/main.h      |   2 +
 drivers/net/ethernet/netronome/nfp/bpf/offload.c   |  17 +-
 drivers/net/ethernet/qlogic/qede/qede_main.c       |  12 +-
 drivers/net/ethernet/realtek/r8169_main.c          |   1 +
 drivers/net/ethernet/sfc/mcdi_port_common.c        |  37 ++-
 drivers/net/ethernet/sfc/ptp.c                     |   4 +-
 drivers/net/ethernet/sfc/siena_sriov.c             |   2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c    |   2 -
 drivers/net/ethernet/ti/cpsw_ale.c                 |   6 +-
 drivers/net/ethernet/ti/davinci_emac.c             |  16 +-
 drivers/net/ifb.c                                  |   2 +
 drivers/net/phy/micrel.c                           |   9 +-
 drivers/net/phy/phy.c                              |   7 +-
 drivers/net/phy/phylink.c                          |   7 +-
 drivers/net/vmxnet3/vmxnet3_drv.c                  |   1 -
 drivers/net/vrf.c                                  |  28 ++-
 drivers/net/wireless/ath/ath10k/core.c             |  11 +-
 drivers/net/wireless/ath/ath10k/coredump.c         |  11 +-
 drivers/net/wireless/ath/ath10k/coredump.h         |   7 +
 drivers/net/wireless/ath/ath10k/mac.c              |  37 ++-
 drivers/net/wireless/ath/ath10k/qmi.c              |   3 +-
 drivers/net/wireless/ath/ath10k/sdio.c             |   5 +-
 drivers/net/wireless/ath/ath10k/snoc.c             |  77 +++++++
 drivers/net/wireless/ath/ath10k/snoc.h             |   5 +
 drivers/net/wireless/ath/ath10k/usb.c              |   7 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |   4 +
 drivers/net/wireless/ath/ath10k/wmi.h              |   3 +
 drivers/net/wireless/ath/ath11k/dbring.c           |  16 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c            |  13 +-
 drivers/net/wireless/ath/ath11k/mac.c              |   2 +-
 drivers/net/wireless/ath/ath11k/qmi.c              |   4 +-
 drivers/net/wireless/ath/ath11k/reg.c              |  11 +-
 drivers/net/wireless/ath/ath11k/reg.h              |   2 +-
 drivers/net/wireless/ath/ath11k/wmi.c              |  40 ++--
 drivers/net/wireless/ath/ath11k/wmi.h              |   3 +-
 drivers/net/wireless/ath/ath6kl/usb.c              |   7 +-
 drivers/net/wireless/ath/ath9k/main.c              |   4 +-
 drivers/net/wireless/ath/dfs_pattern_detector.c    |  10 +-
 drivers/net/wireless/ath/wcn36xx/dxe.c             |  49 ++--
 drivers/net/wireless/ath/wcn36xx/hal.h             |  32 +++
 drivers/net/wireless/ath/wcn36xx/main.c            |  21 +-
 drivers/net/wireless/ath/wcn36xx/smd.c             | 126 ++++++++++-
 drivers/net/wireless/ath/wcn36xx/smd.h             |   1 +
 drivers/net/wireless/ath/wcn36xx/txrx.c            |  64 +++---
 drivers/net/wireless/ath/wcn36xx/txrx.h            |   3 +-
 drivers/net/wireless/broadcom/b43/phy_g.c          |   2 +-
 drivers/net/wireless/broadcom/b43legacy/radio.c    |   2 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/dmi.c |  10 +
 drivers/net/wireless/intel/iwlwifi/fw/pnvm.c       |  13 +-
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c        |   5 +-
 drivers/net/wireless/intel/iwlwifi/mvm/utils.c     |   3 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   6 +-
 drivers/net/wireless/marvell/libertas/if_usb.c     |   2 +
 drivers/net/wireless/marvell/libertas_tf/if_usb.c  |   2 +
 drivers/net/wireless/marvell/mwifiex/11n.c         |   5 +-
 drivers/net/wireless/marvell/mwifiex/cfg80211.c    |  32 +--
 drivers/net/wireless/marvell/mwifiex/pcie.c        |  36 ++-
 drivers/net/wireless/marvell/mwifiex/usb.c         |  16 ++
 drivers/net/wireless/marvell/mwl8k.c               |   2 +-
 drivers/net/wireless/mediatek/mt76/debugfs.c       |  10 +-
 drivers/net/wireless/mediatek/mt76/mt76.h          |   8 +-
 .../net/wireless/mediatek/mt76/mt7615/debugfs.c    |  29 ++-
 drivers/net/wireless/mediatek/mt76/mt7615/init.c   |   6 +-
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c    |  60 ++---
 drivers/net/wireless/mediatek/mt76/mt7615/main.c   |   4 +-
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c    |  18 +-
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.c   |  30 ++-
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.h   |   8 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c   |  13 +-
 drivers/net/wireless/mediatek/mt76/mt7915/init.c   |  10 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c    |   2 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mac.h    |   3 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c    |  22 +-
 .../net/wireless/mediatek/mt76/mt7921/debugfs.c    |  36 ++-
 drivers/net/wireless/mediatek/mt76/mt7921/init.c   |  13 ++
 drivers/net/wireless/mediatek/mt76/mt7921/mac.c    |  68 +++++-
 drivers/net/wireless/mediatek/mt76/mt7921/mac.h    |   8 +
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c    |  22 +-
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.h    |  10 +-
 drivers/net/wireless/mediatek/mt76/mt7921/regs.h   |   8 +-
 drivers/net/wireless/microchip/wilc1000/cfg80211.c |   3 +-
 .../net/wireless/realtek/rtl818x/rtl8187/rtl8225.c |  14 +-
 drivers/net/wireless/realtek/rtw88/fw.c            |   7 +-
 drivers/net/wireless/realtek/rtw88/reg.h           |   1 +
 drivers/net/wireless/rsi/rsi_91x_core.c            |   2 +
 drivers/net/wireless/rsi/rsi_91x_hal.c             |  10 +-
 drivers/net/wireless/rsi/rsi_91x_mac80211.c        |  74 ++----
 drivers/net/wireless/rsi/rsi_91x_main.c            |  17 +-
 drivers/net/wireless/rsi/rsi_91x_mgmt.c            |  24 +-
 drivers/net/wireless/rsi/rsi_91x_sdio.c            |   5 +-
 drivers/net/wireless/rsi/rsi_91x_usb.c             |   5 +-
 drivers/net/wireless/rsi/rsi_hal.h                 |  11 +
 drivers/net/wireless/rsi/rsi_main.h                |  15 +-
 drivers/net/xen-netfront.c                         |   8 +
 drivers/nfc/pn533/pn533.c                          |   6 +-
 drivers/nvdimm/btt.c                               |   1 -
 drivers/nvme/host/multipath.c                      |   9 +-
 drivers/nvme/host/rdma.c                           |   2 +
 drivers/nvme/target/configfs.c                     |   2 +
 drivers/nvme/target/rdma.c                         |  24 ++
 drivers/nvme/target/tcp.c                          |  21 +-
 drivers/of/unittest.c                              |  16 +-
 drivers/opp/of.c                                   |   2 +-
 drivers/pci/controller/cadence/pci-j721e.c         |   2 +-
 drivers/pci/controller/cadence/pcie-cadence-plat.c |   2 +
 drivers/pci/controller/dwc/pcie-uniphier.c         |  26 +--
 drivers/pci/controller/pci-aardvark.c              | 251 ++++++++++++++++++---
 drivers/pci/pci-bridge-emul.c                      |  13 ++
 drivers/pci/pci.c                                  |   8 +
 drivers/pci/quirks.c                               |   1 +
 drivers/phy/microchip/sparx5_serdes.c              |   4 +-
 drivers/phy/qualcomm/phy-qcom-qusb2.c              |  16 +-
 drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c      |   2 +-
 drivers/phy/ti/phy-gmii-sel.c                      |   2 +
 drivers/pinctrl/core.c                             |   2 +
 drivers/pinctrl/pinctrl-amd.c                      |  19 +-
 drivers/pinctrl/pinctrl-amd.h                      |   1 +
 drivers/pinctrl/pinctrl-equilibrium.c              |   7 +-
 drivers/pinctrl/renesas/core.c                     |   2 +-
 .../platform/surface/surface_aggregator_registry.c |  54 +++++
 drivers/platform/x86/thinkpad_acpi.c               |   2 +-
 drivers/platform/x86/wmi.c                         |   9 +-
 drivers/power/reset/at91-reset.c                   |   4 +-
 drivers/power/supply/bq27xxx_battery_i2c.c         |   3 +-
 drivers/power/supply/max17040_battery.c            |   2 +
 drivers/power/supply/max17042_battery.c            |  12 +-
 drivers/power/supply/rt5033_battery.c              |   2 +-
 drivers/ptp/ptp_kvm_x86.c                          |   4 +-
 drivers/regulator/s5m8767.c                        |  21 +-
 drivers/remoteproc/imx_rproc.c                     |  41 ++--
 drivers/remoteproc/remoteproc_core.c               |   8 +-
 drivers/remoteproc/remoteproc_coredump.c           |   2 +-
 drivers/remoteproc/remoteproc_elf_loader.c         |   4 +-
 drivers/reset/reset-socfpga.c                      |  26 +++
 drivers/reset/tegra/reset-bpmp.c                   |   9 +-
 drivers/rtc/rtc-ds1302.c                           |   7 +
 drivers/rtc/rtc-ds1390.c                           |   7 +
 drivers/rtc/rtc-mcp795.c                           |   7 +
 drivers/rtc/rtc-pcf2123.c                          |   9 +
 drivers/rtc/rtc-rv3032.c                           |   4 +-
 drivers/s390/char/tape_std.c                       |   3 +-
 drivers/s390/cio/css.c                             |   4 +-
 drivers/s390/cio/device_ops.c                      |  12 +-
 drivers/s390/crypto/ap_queue.c                     |   2 +
 drivers/scsi/csiostor/csio_lnode.c                 |   2 +-
 drivers/scsi/dc395x.c                              |   1 +
 drivers/scsi/hosts.c                               |   1 +
 drivers/scsi/lpfc/lpfc_els.c                       |  11 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c                   |  10 +-
 drivers/scsi/lpfc/lpfc_nvme.c                      |   5 +-
 drivers/scsi/lpfc/lpfc_scsi.c                      |   7 +
 drivers/scsi/lpfc/lpfc_sli.c                       | 101 +++++++--
 drivers/scsi/megaraid/megaraid_sas_fusion.c        |  11 +-
 drivers/scsi/pm8001/pm8001_hwi.c                   |   2 +-
 drivers/scsi/pm8001/pm8001_sas.h                   |   3 +-
 drivers/scsi/pm8001/pm80xx_hwi.c                   |  53 ++++-
 drivers/scsi/qedf/qedf_main.c                      |   2 +
 drivers/scsi/qla2xxx/qla_attr.c                    |  24 +-
 drivers/scsi/qla2xxx/qla_gbl.h                     |   2 -
 drivers/scsi/qla2xxx/qla_init.c                    |   4 +-
 drivers/scsi/qla2xxx/qla_mr.c                      |  23 --
 drivers/scsi/qla2xxx/qla_os.c                      |  37 +--
 drivers/scsi/qla2xxx/qla_target.c                  |  14 +-
 drivers/scsi/scsi_error.c                          |  25 ++
 drivers/scsi/scsi_lib.c                            |   3 +-
 drivers/scsi/ufs/ufshcd-pltfrm.c                   |   4 +-
 drivers/soc/fsl/dpaa2-console.c                    |   1 +
 drivers/soc/fsl/dpio/dpio-service.c                |   2 +-
 drivers/soc/fsl/dpio/qbman-portal.c                |   9 +-
 drivers/soc/qcom/apr.c                             |   2 +
 drivers/soc/qcom/llcc-qcom.c                       |   2 +-
 drivers/soc/qcom/rpmhpd.c                          |  20 +-
 drivers/soc/qcom/socinfo.c                         |   4 +-
 drivers/soc/samsung/Kconfig                        |   1 +
 drivers/soc/tegra/pmc.c                            |   2 +-
 drivers/soundwire/bus.c                            |   2 +-
 drivers/soundwire/debugfs.c                        |   2 +-
 drivers/spi/atmel-quadspi.c                        |   2 +-
 drivers/spi/spi-altera-dfl.c                       |   2 +-
 drivers/spi/spi-altera-platform.c                  |   2 +-
 drivers/spi/spi-bcm-qspi.c                         |   8 +-
 drivers/spi/spi-mtk-nor.c                          |   2 +-
 drivers/spi/spi-pl022.c                            |   5 +-
 drivers/spi/spi-rpc-if.c                           |   4 +-
 drivers/spi/spi-stm32-qspi.c                       |   2 +-
 drivers/spi/spi.c                                  |  41 ++++
 drivers/staging/ks7010/Kconfig                     |   3 +
 drivers/staging/media/atomisp/i2c/atomisp-lm3554.c |  37 +--
 drivers/staging/media/imx/imx-media-dev-common.c   |   2 +
 drivers/staging/media/ipu3/ipu3-v4l2.c             |   7 +-
 drivers/staging/media/rkvdec/rkvdec-h264.c         |   5 +-
 drivers/staging/media/rkvdec/rkvdec.c              |  40 ++--
 drivers/staging/most/dim2/Makefile                 |   2 +-
 drivers/staging/most/dim2/dim2.c                   |  24 +-
 drivers/staging/most/dim2/sysfs.c                  |  49 ----
 drivers/staging/most/dim2/sysfs.h                  |  11 -
 drivers/target/target_core_tmr.c                   |  17 +-
 drivers/target/target_core_transport.c             |  30 ++-
 drivers/thermal/qcom/tsens.c                       |  29 ++-
 drivers/thermal/thermal_core.c                     |  16 +-
 drivers/tty/serial/8250/8250_dw.c                  |   2 +-
 drivers/tty/serial/8250/8250_port.c                |  21 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c        |   2 +
 drivers/tty/serial/imx.c                           |   4 +-
 drivers/tty/serial/serial_core.c                   |  16 +-
 drivers/tty/serial/xilinx_uartps.c                 |   3 +-
 drivers/usb/chipidea/core.c                        |  23 +-
 drivers/usb/dwc2/drd.c                             |  24 +-
 drivers/usb/gadget/legacy/hid.c                    |   4 +-
 drivers/usb/host/xhci-hub.c                        |   3 +-
 drivers/usb/host/xhci-pci.c                        |  16 ++
 drivers/usb/misc/iowarrior.c                       |   8 +-
 drivers/usb/musb/Kconfig                           |   2 +-
 drivers/usb/serial/keyspan.c                       |  15 +-
 drivers/usb/typec/Kconfig                          |   4 +-
 drivers/video/backlight/backlight.c                |   6 -
 drivers/video/fbdev/chipsfb.c                      |   2 +-
 drivers/video/fbdev/efifb.c                        |  21 +-
 drivers/virtio/virtio_ring.c                       |  14 +-
 drivers/watchdog/Kconfig                           |   2 +-
 drivers/watchdog/f71808e_wdt.c                     |   4 +-
 drivers/watchdog/omap_wdt.c                        |   6 +-
 drivers/xen/balloon.c                              |  86 +++++--
 drivers/xen/xen-pciback/conf_space_capability.c    |   2 +-
 fs/btrfs/disk-io.c                                 |   3 +-
 fs/btrfs/reflink.c                                 |   2 +-
 fs/btrfs/tree-log.c                                |   4 +-
 fs/btrfs/volumes.c                                 |  14 +-
 fs/cifs/cifsglob.h                                 |   3 +-
 fs/cifs/connect.c                                  |  21 +-
 fs/cifs/file.c                                     |  35 ++-
 fs/cifs/fs_context.c                               |   8 +
 fs/cifs/fs_context.h                               |   1 +
 fs/crypto/fscrypt_private.h                        |   5 +-
 fs/crypto/hkdf.c                                   |  11 +-
 fs/crypto/keysetup.c                               |  57 ++++-
 fs/erofs/decompressor.c                            |   1 -
 fs/erofs/zdata.c                                   |  13 +-
 fs/erofs/zpvec.h                                   |  13 +-
 fs/exfat/inode.c                                   |   2 +-
 fs/ext4/extents.c                                  |  63 +++---
 fs/ext4/super.c                                    |   9 +-
 fs/f2fs/compress.c                                 |   1 +
 fs/f2fs/inode.c                                    |   2 +-
 fs/f2fs/namei.c                                    |   2 +-
 fs/f2fs/super.c                                    |   2 +
 fs/fuse/dev.c                                      |  14 +-
 fs/gfs2/glock.c                                    |  24 +-
 fs/io-wq.c                                         |  38 ++--
 fs/jfs/jfs_mount.c                                 |  51 ++---
 fs/nfs/dir.c                                       |   9 +-
 fs/nfs/direct.c                                    |   2 +-
 fs/nfs/flexfilelayout/flexfilelayoutdev.c          |   4 +-
 fs/nfs/inode.c                                     |  13 +-
 fs/nfs/nfs3xdr.c                                   |   2 +-
 fs/nfs/nfs4idmap.c                                 |   2 +-
 fs/nfs/nfs4proc.c                                  |  15 +-
 fs/nfs/pnfs.h                                      |   2 +-
 fs/nfs/pnfs_nfs.c                                  |   6 +-
 fs/nfs/proc.c                                      |   2 +-
 fs/nfs/write.c                                     |  26 +--
 fs/ocfs2/file.c                                    |   8 +-
 fs/orangefs/dcache.c                               |   4 +-
 fs/overlayfs/file.c                                |  16 +-
 fs/proc/stat.c                                     |   4 +-
 fs/proc/uptime.c                                   |  14 +-
 fs/quota/quota_tree.c                              |  15 ++
 fs/tracefs/inode.c                                 |   3 +-
 include/drm/ttm/ttm_bo_api.h                       |   3 +-
 include/linux/blkdev.h                             |   2 -
 include/linux/cgroup-defs.h                        | 107 +++------
 include/linux/cgroup.h                             |  22 +-
 include/linux/console.h                            |   2 +
 include/linux/dsa/ocelot.h                         |  38 ++++
 include/linux/ethtool_netlink.h                    |   3 +
 include/linux/filter.h                             |   1 +
 include/linux/fortify-string.h                     |   5 +-
 include/linux/kernel_stat.h                        |   1 +
 include/linux/leds.h                               |   2 +-
 include/linux/libata.h                             |   2 +-
 include/linux/nfs_fs.h                             |   1 +
 include/linux/posix-timers.h                       |   2 +
 include/linux/rpmsg.h                              |   2 +-
 include/linux/sched.h                              |   1 +
 include/linux/sched/task.h                         |   3 +-
 include/linux/sched/task_stack.h                   |   4 +
 include/linux/seq_file.h                           |   2 +-
 include/linux/skmsg.h                              |  18 +-
 include/linux/surface_aggregator/controller.h      |   4 +-
 include/linux/tpm.h                                |   1 +
 include/media/videobuf2-core.h                     |  37 +--
 include/memory/renesas-rpc-if.h                    |   1 +
 include/net/inet_connection_sock.h                 |   2 +-
 include/net/llc.h                                  |   4 +-
 include/net/neighbour.h                            |  12 +-
 include/net/sch_generic.h                          |   4 +
 include/net/sctp/sctp.h                            |   7 +-
 include/net/sock.h                                 |   2 +-
 include/net/strparser.h                            |  20 +-
 include/net/tcp.h                                  |  17 +-
 include/net/udp.h                                  |   5 +-
 include/scsi/scsi_cmnd.h                           |   2 +-
 include/scsi/scsi_host.h                           |   1 +
 include/soc/mscc/ocelot.h                          |  24 --
 include/sound/soc-topology.h                       |   3 +-
 include/uapi/linux/ethtool_netlink.h               |   4 +-
 include/uapi/linux/pci_regs.h                      |   6 +
 kernel/bpf/core.c                                  |   4 +-
 kernel/bpf/trampoline.c                            |   6 +-
 kernel/bpf/verifier.c                              |   4 +-
 kernel/cgroup/cgroup.c                             |  94 ++++----
 kernel/cgroup/rstat.c                              |   2 -
 kernel/fork.c                                      |   3 +-
 kernel/kprobes.c                                   |   3 +-
 kernel/locking/lockdep.c                           |   4 +-
 kernel/locking/rwsem.c                             |  53 +++--
 kernel/power/energy_model.c                        |  23 +-
 kernel/power/swap.c                                |   7 +-
 kernel/rcu/rcutorture.c                            |  48 +++-
 kernel/rcu/tasks.h                                 |   3 +-
 kernel/rcu/tree_exp.h                              |   2 +-
 kernel/rcu/tree_plugin.h                           |   8 +-
 kernel/sched/core.c                                |  62 +++--
 kernel/scs.c                                       |   1 +
 kernel/signal.c                                    |  18 +-
 kernel/time/posix-cpu-timers.c                     |  19 +-
 kernel/trace/ftrace.c                              |  23 +-
 kernel/trace/ring_buffer.c                         |   5 +
 kernel/trace/trace.c                               |  73 +++---
 kernel/trace/trace.h                               |   3 +
 kernel/trace/trace_dynevent.c                      |   2 +-
 kernel/trace/trace_event_perf.c                    |   6 +-
 kernel/trace/trace_events.c                        |  42 ++--
 kernel/trace/trace_events_synth.c                  |   4 +-
 kernel/trace/trace_functions_graph.c               |   2 +-
 kernel/trace/trace_hwlat.c                         |   6 +-
 kernel/trace/trace_kprobe.c                        |   8 +-
 kernel/trace/trace_osnoise.c                       |  14 +-
 kernel/trace/trace_printk.c                        |   2 +-
 kernel/trace/trace_recursion_record.c              |   4 +-
 kernel/trace/trace_stack.c                         |   6 +-
 kernel/trace/trace_stat.c                          |   6 +-
 kernel/trace/trace_uprobe.c                        |   4 +-
 kernel/trace/tracing_map.c                         |  40 ++--
 kernel/workqueue.c                                 |  15 +-
 lib/decompress_unxz.c                              |   2 +-
 lib/dynamic_debug.c                                |  12 +
 lib/iov_iter.c                                     |   5 +-
 lib/xz/xz_dec_lzma2.c                              |  21 +-
 lib/xz/xz_dec_stream.c                             |   6 +-
 mm/filemap.c                                       |   1 -
 mm/memcontrol.c                                    |  27 +--
 mm/oom_kill.c                                      |  23 +-
 mm/zsmalloc.c                                      |   7 +-
 net/8021q/vlan.c                                   |   3 -
 net/8021q/vlan_dev.c                               |   3 +
 net/9p/client.c                                    |   2 +
 net/bluetooth/l2cap_sock.c                         |  10 +-
 net/bluetooth/sco.c                                |  33 +--
 net/bridge/br_private.h                            |   2 +
 net/can/j1939/main.c                               |   7 +
 net/can/j1939/transport.c                          |   6 +
 net/core/dev.c                                     |   5 +-
 net/core/filter.c                                  |  58 ++++-
 net/core/neighbour.c                               |  48 ++--
 net/core/net-sysfs.c                               |  55 +++++
 net/core/net_namespace.c                           |   4 +
 net/core/netclassid_cgroup.c                       |   7 +-
 net/core/netprio_cgroup.c                          |  10 +-
 net/core/skmsg.c                                   |  43 +++-
 net/core/stream.c                                  |   3 -
 net/core/sysctl_net_core.c                         |   2 +-
 net/dccp/dccp.h                                    |   2 +-
 net/dccp/proto.c                                   |  14 +-
 net/dsa/Kconfig                                    |   2 -
 net/dsa/switch.c                                   |   4 +-
 net/dsa/tag_ocelot.c                               |   4 +-
 net/dsa/tag_ocelot_8021q.c                         |   1 +
 net/ethtool/pause.c                                |   3 +-
 net/ipv4/inet_connection_sock.c                    |   4 +-
 net/ipv4/inet_hashtables.c                         |   2 +-
 net/ipv4/proc.c                                    |   2 +-
 net/ipv4/tcp.c                                     |  40 +++-
 net/ipv4/tcp_bpf.c                                 |  48 +++-
 net/ipv6/addrconf.c                                |   3 +
 net/ipv6/udp.c                                     |   2 +-
 net/netfilter/nf_conntrack_proto_udp.c             |   7 +-
 net/netfilter/nfnetlink_queue.c                    |   2 +-
 net/netfilter/nft_dynset.c                         |  11 +-
 net/rxrpc/rtt.c                                    |   2 +-
 net/sched/sch_generic.c                            |   9 +
 net/sched/sch_mq.c                                 |  24 ++
 net/sched/sch_mqprio.c                             |  23 ++
 net/sched/sch_taprio.c                             |  27 ++-
 net/sctp/output.c                                  |  13 +-
 net/sctp/transport.c                               |  11 +-
 net/smc/af_smc.c                                   |  20 +-
 net/smc/smc_llc.c                                  |   2 +-
 net/strparser/strparser.c                          |  10 +-
 net/sunrpc/addr.c                                  |  40 ++--
 net/sunrpc/xprt.c                                  |  28 +--
 net/vmw_vsock/af_vsock.c                           |   2 +
 net/wireless/core.c                                |  10 +
 samples/kprobes/kretprobe_example.c                |   2 +-
 scripts/leaking_addresses.pl                       |   3 +-
 security/apparmor/label.c                          |   4 +-
 security/integrity/evm/evm_main.c                  |   2 +-
 security/integrity/ima/ima.h                       |   2 +-
 security/integrity/ima/ima_appraise.c              |  49 +++-
 security/selinux/ss/services.c                     | 162 +++++++------
 security/smack/smackfs.c                           |  11 +-
 sound/core/memalloc.c                              |   7 +-
 sound/core/oss/mixer_oss.c                         |  44 +++-
 sound/core/timer.c                                 |  17 +-
 sound/firewire/oxfw/oxfw-stream.c                  |   7 +-
 sound/firewire/oxfw/oxfw.c                         |   8 +
 sound/firewire/oxfw/oxfw.h                         |   5 +
 sound/pci/hda/hda_intel.c                          |  52 ++---
 sound/pci/hda/patch_realtek.c                      |  82 +++++++
 sound/soc/codecs/cs42l42.c                         |  43 ++--
 sound/soc/codecs/wcd9335.c                         |   2 +-
 sound/soc/sh/rcar/core.c                           |   1 +
 sound/soc/soc-core.c                               |   1 +
 sound/soc/sof/topology.c                           |   9 +
 sound/soc/tegra/tegra_asoc_machine.c               |  60 ++++-
 sound/soc/tegra/tegra_asoc_machine.h               |   1 +
 sound/synth/emux/emux.c                            |   2 +-
 sound/usb/6fire/comm.c                             |   2 +-
 sound/usb/6fire/firmware.c                         |   6 +-
 sound/usb/format.c                                 |   1 +
 sound/usb/line6/driver.c                           |  14 +-
 sound/usb/line6/driver.h                           |   2 +-
 sound/usb/line6/podhd.c                            |   6 +-
 sound/usb/line6/toneport.c                         |   2 +-
 sound/usb/misc/ua101.c                             |   4 +-
 sound/usb/quirks.c                                 |   1 +
 tools/arch/x86/lib/insn.c                          |   5 +-
 tools/bpf/bpftool/prog.c                           |  16 +-
 tools/include/asm-generic/unaligned.h              |  23 ++
 tools/lib/bpf/bpf.c                                |   4 +-
 tools/lib/bpf/bpf_core_read.h                      |   2 +-
 tools/lib/bpf/btf.c                                |  22 +-
 tools/lib/bpf/libbpf.c                             |   6 +
 tools/lib/bpf/skel_internal.h                      |   6 +-
 tools/objtool/arch/x86/decode.c                    |  20 ++
 tools/objtool/check.c                              | 159 +++++++------
 tools/objtool/include/objtool/arch.h               |   1 +
 tools/perf/util/bpf-event.c                        |   4 +-
 tools/perf/util/intel-pt-decoder/Build             |   2 +
 .../testing/selftests/bpf/prog_tests/perf_buffer.c |   4 +-
 tools/testing/selftests/bpf/prog_tests/sk_lookup.c |   4 +-
 tools/testing/selftests/bpf/prog_tests/test_ima.c  |   3 +-
 tools/testing/selftests/bpf/progs/strobemeta.h     |  11 +
 tools/testing/selftests/bpf/test_progs.c           |   4 +-
 .../selftests/bpf/test_xdp_redirect_multi.sh       |  62 ++---
 .../testing/selftests/bpf/verifier/array_access.c  |   2 +-
 tools/testing/selftests/bpf/xdp_redirect_multi.c   |   4 +-
 tools/testing/selftests/core/close_range_test.c    |   2 +-
 tools/testing/selftests/kvm/lib/x86_64/svm.c       |  14 +-
 .../selftests/kvm/x86_64/mmio_warning_test.c       |   2 +-
 tools/testing/selftests/net/Makefile               |   2 +-
 tools/testing/selftests/net/fcnal-test.sh          |   3 +
 tools/testing/selftests/net/fib_nexthops.sh        |   1 +
 .../selftests/net/forwarding/bridge_igmp.sh        |  12 +-
 .../testing/selftests/net/forwarding/bridge_mld.sh |  12 +-
 tools/testing/selftests/net/udpgso_bench_rx.c      |  11 +-
 tools/testing/selftests/sched/cs_prctl_test.c      |  28 ++-
 tools/testing/selftests/vm/split_huge_page_test.c  |   2 +-
 tools/tracing/latency/latency-collector.c          |   2 +-
 950 files changed, 7792 insertions(+), 4374 deletions(-)
author maintainer
#1 lore raw

PATCH 1/849 xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay

From: Mathias Nyman <[email protected]>

commit e1959faf085b004e6c3afaaaa743381f00e7c015 upstream.

Some USB 3.1 enumeration issues were reported after the hub driver removed the minimum 100ms limit for the power-on-good delay.

Since commit 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub") the hub driver sets the power-on-delay based on the bPwrOn2PwrGood value in the hub descriptor.

xhci driver has a 20ms bPwrOn2PwrGood value for both roothubs based on xhci spec section 5.4.8, but it's clearly not enough for the USB 3.1 devices, causing enumeration issues.

Tests indicate full 100ms delay is needed.

Fixes 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")
Cc stable <[email protected]>
---
 drivers/usb/host/xhci-hub.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-hub.c +2 -1
@@ -257,7 +257,6 @@ static void xhci_common_hub_descriptor(s
 {
 	u16 temp;
 
-	desc->bPwrOn2PwrGood = 10;	/* xhci section 5.4.9 says 20ms max */
 	desc->bHubContrCurrent = 0;
 
 	desc->bNbrPorts = ports;
@@ -292,6 +291,7 @@ static void xhci_usb2_hub_descriptor(str
 	desc->bDescriptorType = USB_DT_HUB;
 	temp = 1 + (ports / 8);
 	desc->bDescLength = USB_DT_HUB_NONVAR_SIZE + 2 * temp;
+	desc->bPwrOn2PwrGood = 10;	/* xhci section 5.4.8 says 20ms */
 
 	/* The Device Removable bits are reported on a byte granularity.
 	 * If the port doesn't exist within that byte, the bit is set to 0.
@@ -344,6 +344,7 @@ static void xhci_usb3_hub_descriptor(str
 	xhci_common_hub_descriptor(xhci, desc, ports);
 	desc->bDescriptorType = USB_DT_SS_HUB;
 	desc->bDescLength = USB_DT_SS_HUB_SIZE;
+	desc->bPwrOn2PwrGood = 50;	/* usb 3.1 may fail if less than 100ms */
 
 	/* header decode latency should be zero for roothubs,
 	 * see section 4.23.5.2.
author maintainer
#2 lore raw

PATCH 2/849 usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

In reply to Greg Kroah-Hartman

From: Nehal Bakulchandra Shah <[email protected]>

commit 660a92a59b9e831a0407e41ff62875656d30006e upstream.

AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers.

[ regrouped and aligned the PCI_DEVICE_ID definitions -Mathias]

---
 drivers/usb/host/xhci-pci.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/usb/host/xhci-pci.c +16 -0
@@ -65,6 +65,13 @@
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_2			0x43bb
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_1			0x43bc
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1		0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2		0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3		0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4		0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5		0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6		0x15d7
+
 #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI			0x1042
 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI		0x1142
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
@@ -317,6 +324,15 @@ static void xhci_pci_quirks(struct devic
 	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
 		xhci->quirks |= XHCI_NO_SOFT_RETRY;
 
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+	    (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
+		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+
 	if (xhci->quirks & XHCI_RESET_ON_RESUME)
 		xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
 				"QUIRK: Resetting on resume");
author maintainer
#3 lore raw

PATCH 3/849 Input: iforce - fix control-message timeout

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 744d0090a5f6dfa4c81b53402ccdf08313100429 upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 487358627825 ("Input: iforce - use DMA-safe buffer when getting IDs from USB")
---
 drivers/input/joystick/iforce/iforce-usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/iforce/iforce-usb.c +1 -1
@@ -92,7 +92,7 @@ static int iforce_usb_get_id(struct ifor
 				 id,
 				 USB_TYPE_VENDOR | USB_DIR_IN |
 					USB_RECIP_INTERFACE,
-				 0, 0, buf, IFORCE_MAX_LENGTH, HZ);
+				 0, 0, buf, IFORCE_MAX_LENGTH, 1000);
 	if (status < 0) {
 		dev_err(&iforce_usb->intf->dev,
 			"usb_submit_urb failed: %d\n", status);
author maintainer
#4 lore raw

PATCH 4/849 Input: elantench - fix misreporting trackpoint coordinates

In reply to Greg Kroah-Hartman

From: Phoenix Huang <[email protected]>

commit be896bd3b72b44126c55768f14c22a8729b0992e upstream.

Some firmwares occasionally report bogus data from trackpoint, with X or Y displacement being too large (outside of [-127, 127] range). Let's drop such packets so that we do not generate jumps.

---
 drivers/input/mouse/elantech.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/input/mouse/elantech.c +13 -0
@@ -517,6 +517,19 @@ static void elantech_report_trackpoint(s
 	case 0x16008020U:
 	case 0x26800010U:
 	case 0x36808000U:
+
+		/*
+		 * This firmware misreport coordinates for trackpoint
+		 * occasionally. Discard packets outside of [-127, 127] range
+		 * to prevent cursor jumps.
+		 */
+		if (packet[4] == 0x80 || packet[5] == 0x80 ||
+		    packet[1] >> 7 == packet[4] >> 7 ||
+		    packet[2] >> 7 == packet[5] >> 7) {
+			elantech_debug("discarding packet [%6ph]\n", packet);
+			break;
+
+		}
 		x = packet[4] - (int)((packet[1]^0x80) << 1);
 		y = (int)((packet[2]^0x80) << 1) - packet[5];
 
author maintainer
#5 lore raw

PATCH 5/849 Input: i8042 - Add quirk for Fujitsu Lifebook T725

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 16e28abb7290c4ca3b3a0f333ba067f34bb18c86 upstream.

Fujitsu Lifebook T725 laptop requires, like a few other similar models, the nomux and notimeout options to probe the touchpad properly. This patch adds the corresponding quirk entries.

---
 drivers/input/serio/i8042-x86ia64io.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/input/serio/i8042-x86ia64io.h +14 -0
@@ -273,6 +273,13 @@ static const struct dmi_system_id __init
 		},
 	},
 	{
+		/* Fujitsu Lifebook T725 laptop */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T725"),
+		},
+	},
+	{
 		/* Fujitsu Lifebook U745 */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
@@ -841,6 +848,13 @@ static const struct dmi_system_id __init
 		},
 	},
 	{
+		/* Fujitsu Lifebook T725 laptop */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T725"),
+		},
+	},
+	{
 		/* Fujitsu U574 laptop */
 		/* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
 		.matches = {
author maintainer
#6 lore raw

PATCH 6/849 libata: fix read log timeout value

In reply to Greg Kroah-Hartman

From: Damien Le Moal <[email protected]>

commit 68dbbe7d5b4fde736d104cbbc9a2fce875562012 upstream.

Some ATA drives are very slow to respond to READ_LOG_EXT and READ_LOG_DMA_EXT commands issued from ata_dev_configure() when the device is revalidated right after resuming a system or inserting the ATA adapter driver (e.g. ahci). The default 5s timeout (ATA_EH_CMD_DFL_TIMEOUT) used for these commands is too short, causing errors during the device configuration. Ex:

...
ata9: SATA max UDMA/133 abar m524288@0x9d200000 port 0x9d200400 irq 209
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300) ata9.00: ATA-9: XXX XXXXXXXXXXXXXXX, XXXXXXXX, max UDMA/133 ata9.00: qc timeout (cmd 0x2f)
ata9.00: Read log page 0x00 failed, Emask 0x4
ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: NCQ Send/Recv Log not supported
ata9.00: Read log page 0x08 failed, Emask 0x40
ata9.00: 27344764928 sectors, multi 16: LBA48 NCQ (depth 32), AA ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: ATA Identify Device Log not supported
ata9.00: failed to set xfermode (err_mask=0x40)
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300) ata9.00: configured for UDMA/133
...

The timeout error causes a soft reset of the drive link, followed in most cases by a successful revalidation as that give enough time to the drive to become fully ready to quickly process the read log commands. However, in some cases, this also fails resulting in the device being dropped.

Fix this by using adding the ata_eh_revalidate_timeouts entries for the READ_LOG_EXT and READ_LOG_DMA_EXT commands. This defines a timeout increased to 15s, retriable one time.

---
 drivers/ata/libata-eh.c |    8 ++++++++
 include/linux/libata.h  |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/ata/libata-eh.c +8 -0
@@ -93,6 +93,12 @@ static const unsigned long ata_eh_identi
 	ULONG_MAX,
 };
 
+static const unsigned long ata_eh_revalidate_timeouts[] = {
+	15000,	/* Some drives are slow to read log pages when waking-up */
+	15000,  /* combined time till here is enough even for media access */
+	ULONG_MAX,
+};
+
 static const unsigned long ata_eh_flush_timeouts[] = {
 	15000,	/* be generous with flush */
 	15000,  /* ditto */
@@ -129,6 +135,8 @@ static const struct ata_eh_cmd_timeout_e
 ata_eh_cmd_timeout_table[ATA_EH_CMD_TIMEOUT_TABLE_SIZE] = {
 	{ .commands = CMDS(ATA_CMD_ID_ATA, ATA_CMD_ID_ATAPI),
 	  .timeouts = ata_eh_identify_timeouts, },
+	{ .commands = CMDS(ATA_CMD_READ_LOG_EXT, ATA_CMD_READ_LOG_DMA_EXT),
+	  .timeouts = ata_eh_revalidate_timeouts, },
 	{ .commands = CMDS(ATA_CMD_READ_NATIVE_MAX, ATA_CMD_READ_NATIVE_MAX_EXT),
 	  .timeouts = ata_eh_other_timeouts, },
 	{ .commands = CMDS(ATA_CMD_SET_MAX, ATA_CMD_SET_MAX_EXT),
include/linux/libata.h +1 -1
@@ -390,7 +390,7 @@ enum {
 	/* This should match the actual table size of
 	 * ata_eh_cmd_timeout_table in libata-eh.c.
 	 */
-	ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6,
+	ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 7,
 
 	/* Horkage types. May be set by libata or controller on drives
 	   (some horkage may be drive/controller pair dependent */
author maintainer
#7 lore raw

PATCH 7/849 ocfs2: fix data corruption on truncate

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit 839b63860eb3835da165642923120d305925561d upstream.

Patch series "ocfs2: Truncate data corruption fix".

As further testing has shown, commit 5314454ea3f ("ocfs2: fix data corruption after conversion from inline format") didn't fix all the data corruption issues the customer started observing after 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()") This time I have tracked them down to two bugs in ocfs2 truncation code.

One bug (truncating page cache before clearing tail cluster and setting i_size) could cause data corruption even before 6dbf7bb55598, but before that commit it needed a race with page fault, after 6dbf7bb55598 it started to be pretty deterministic.

Another bug (zeroing pages beyond old i_size) used to be harmless inefficiency before commit 6dbf7bb55598. But after commit 6dbf7bb55598 in combination with the first bug it resulted in deterministic data corruption.

Although fixing only the first problem is needed to stop data corruption, I've fixed both issues to make the code more robust.

This patch (of 2):

ocfs2_truncate_file() did unmap invalidate page cache pages before zeroing partial tail cluster and setting i_size. Thus some pages could be left (and likely have left if the cluster zeroing happened) in the page cache beyond i_size after truncate finished letting user possibly see stale data once the file was extended again. Also the tail cluster zeroing was not guaranteed to finish before truncate finished causing possible stale data exposure. The problem started to be particularly easy to hit after commit 6dbf7bb55598 "fs: Don't invalidate page buffers in block_write_full_page()" stopped invalidation of pages beyond i_size from page writeback path.

Fix these problems by unmapping and invalidating pages in the page cache after the i_size is reduced and tail cluster is zeroed out.

---
 fs/ocfs2/file.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
fs/ocfs2/file.c +6 -2
@@ -476,10 +476,11 @@ int ocfs2_truncate_file(struct inode *in
 	 * greater than page size, so we have to truncate them
 	 * anyway.
 	 */
-	unmap_mapping_range(inode->i_mapping, new_i_size + PAGE_SIZE - 1, 0, 1);
-	truncate_inode_pages(inode->i_mapping, new_i_size);
 
 	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
+		unmap_mapping_range(inode->i_mapping,
+				    new_i_size + PAGE_SIZE - 1, 0, 1);
+		truncate_inode_pages(inode->i_mapping, new_i_size);
 		status = ocfs2_truncate_inline(inode, di_bh, new_i_size,
 					       i_size_read(inode), 1);
 		if (status)
@@ -498,6 +499,9 @@ int ocfs2_truncate_file(struct inode *in
 		goto bail_unlock_sem;
 	}
 
+	unmap_mapping_range(inode->i_mapping, new_i_size + PAGE_SIZE - 1, 0, 1);
+	truncate_inode_pages(inode->i_mapping, new_i_size);
+
 	status = ocfs2_commit_truncate(osb, inode, di_bh);
 	if (status < 0) {
 		mlog_errno(status);
author maintainer
#8 lore raw

PATCH 8/849 scsi: core: Avoid leaving shost->last_reset with stale value if EH does not run

In reply to Greg Kroah-Hartman

From: Ewan D. Milne <[email protected]>

commit 5ae17501bc62a49b0b193dcce003f16375f16654 upstream.

The changes to issue the abort from the scmd->abort_work instead of the EH thread introduced a problem if eh_deadline is used. If aborting the command(s) is successful, and there are never any scmds added to the shost->eh_cmd_q, there is no code path which will reset the ->last_reset value back to zero.

The effect of this is that after a successful abort with no EH thread activity, a subsequent timeout, perhaps a long time later, might immediately be considered past a user-set eh_deadline time, and the host will be reset with no attempt at recovery.

Fix this by resetting ->last_reset back to zero in scmd_eh_abort_handler() if it is determined that the EH thread will not run to do this.

Thanks to Gopinath Marappan for investigating this problem.

---
 drivers/scsi/hosts.c      |    1 +
 drivers/scsi/scsi_error.c |   25 +++++++++++++++++++++++++
 drivers/scsi/scsi_lib.c   |    1 +
 include/scsi/scsi_cmnd.h  |    2 +-
 include/scsi/scsi_host.h  |    1 +
 5 files changed, 29 insertions(+), 1 deletion(-)
drivers/scsi/hosts.c +1 -0
@@ -388,6 +388,7 @@ struct Scsi_Host *scsi_host_alloc(struct
 	shost->shost_state = SHOST_CREATED;
 	INIT_LIST_HEAD(&shost->__devices);
 	INIT_LIST_HEAD(&shost->__targets);
+	INIT_LIST_HEAD(&shost->eh_abort_list);
 	INIT_LIST_HEAD(&shost->eh_cmd_q);
 	INIT_LIST_HEAD(&shost->starved_list);
 	init_waitqueue_head(&shost->host_wait);
drivers/scsi/scsi_error.c +25 -0
@@ -135,6 +135,23 @@ static bool scsi_eh_should_retry_cmd(str
 	return true;
 }
 
+static void scsi_eh_complete_abort(struct scsi_cmnd *scmd, struct Scsi_Host *shost)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(shost->host_lock, flags);
+	list_del_init(&scmd->eh_entry);
+	/*
+	 * If the abort succeeds, and there is no further
+	 * EH action, clear the ->last_reset time.
+	 */
+	if (list_empty(&shost->eh_abort_list) &&
+	    list_empty(&shost->eh_cmd_q))
+		if (shost->eh_deadline != -1)
+			shost->last_reset = 0;
+	spin_unlock_irqrestore(shost->host_lock, flags);
+}
+
 /**
  * scmd_eh_abort_handler - Handle command aborts
  * @work:	command to be aborted.
@@ -152,6 +169,7 @@ scmd_eh_abort_handler(struct work_struct
 		container_of(work, struct scsi_cmnd, abort_work.work);
 	struct scsi_device *sdev = scmd->device;
 	enum scsi_disposition rtn;
+	unsigned long flags;
 
 	if (scsi_host_eh_past_deadline(sdev->host)) {
 		SCSI_LOG_ERROR_RECOVERY(3,
@@ -175,12 +193,14 @@ scmd_eh_abort_handler(struct work_struct
 				SCSI_LOG_ERROR_RECOVERY(3,
 					scmd_printk(KERN_WARNING, scmd,
 						    "retry aborted command\n"));
+				scsi_eh_complete_abort(scmd, sdev->host);
 				scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY);
 				return;
 			} else {
 				SCSI_LOG_ERROR_RECOVERY(3,
 					scmd_printk(KERN_WARNING, scmd,
 						    "finish aborted command\n"));
+				scsi_eh_complete_abort(scmd, sdev->host);
 				scsi_finish_command(scmd);
 				return;
 			}
@@ -193,6 +213,9 @@ scmd_eh_abort_handler(struct work_struct
 		}
 	}
 
+	spin_lock_irqsave(sdev->host->host_lock, flags);
+	list_del_init(&scmd->eh_entry);
+	spin_unlock_irqrestore(sdev->host->host_lock, flags);
 	scsi_eh_scmd_add(scmd);
 }
 
@@ -223,6 +246,8 @@ scsi_abort_command(struct scsi_cmnd *scm
 	spin_lock_irqsave(shost->host_lock, flags);
 	if (shost->eh_deadline != -1 && !shost->last_reset)
 		shost->last_reset = jiffies;
+	BUG_ON(!list_empty(&scmd->eh_entry));
+	list_add_tail(&scmd->eh_entry, &shost->eh_abort_list);
 	spin_unlock_irqrestore(shost->host_lock, flags);
 
 	scmd->eh_eflags |= SCSI_EH_ABORT_SCHEDULED;
drivers/scsi/scsi_lib.c +1 -0
@@ -1136,6 +1136,7 @@ void scsi_init_command(struct scsi_devic
 	cmd->sense_buffer = buf;
 	cmd->prot_sdb = prot;
 	cmd->flags = flags;
+	INIT_LIST_HEAD(&cmd->eh_entry);
 	INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler);
 	cmd->jiffies_at_alloc = jiffies_at_alloc;
 	cmd->retries = retries;
include/scsi/scsi_cmnd.h +1 -1
@@ -68,7 +68,7 @@ struct scsi_pointer {
 struct scsi_cmnd {
 	struct scsi_request req;
 	struct scsi_device *device;
-	struct list_head eh_entry; /* entry for the host eh_cmd_q */
+	struct list_head eh_entry; /* entry for the host eh_abort_list/eh_cmd_q */
 	struct delayed_work abort_work;
 
 	struct rcu_head rcu;
include/scsi/scsi_host.h +1 -0
@@ -556,6 +556,7 @@ struct Scsi_Host {
 
 	struct mutex		scan_mutex;/* serialize scanning activity */
 
+	struct list_head	eh_abort_list;
 	struct list_head	eh_cmd_q;
 	struct task_struct    * ehandler;  /* Error recovery thread. */
 	struct completion     * eh_action; /* Wait for specific actions on the
author maintainer
#9 lore raw

PATCH 9/849 scsi: core: Remove command size deduction from scsi_setup_scsi_cmnd()

In reply to Greg Kroah-Hartman

From: Tadeusz Struk <[email protected]>

commit 703535e6ae1e94c89a9c1396b4c7b6b41160ef0c upstream.

No need to deduce command size in scsi_setup_scsi_cmnd() anymore as appropriate checks have been added to scsi_fill_sghdr_rq() function and the cmd_len should never be zero here. The code to do that wasn't correct anyway, as it used uninitialized cmd->cmnd, which caused a null-ptr-deref if the command size was zero as in the trace below. Fix this by removing the unneeded code.

KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 1822 Comm: repro Not tainted 5.15.0 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-4.fc34 04/01/2014
Call Trace:
 blk_mq_dispatch_rq_list+0x7c7/0x12d0
 __blk_mq_sched_dispatch_requests+0x244/0x380
 blk_mq_sched_dispatch_requests+0xf0/0x160
 __blk_mq_run_hw_queue+0xe8/0x160
 __blk_mq_delay_run_hw_queue+0x252/0x5d0
 blk_mq_run_hw_queue+0x1dd/0x3b0
 blk_mq_sched_insert_request+0x1ff/0x3e0
 blk_execute_rq_nowait+0x173/0x1e0
 blk_execute_rq+0x15c/0x540
 sg_io+0x97c/0x1370
 scsi_ioctl+0xe16/0x28e0
 sd_ioctl+0x134/0x170
 blkdev_ioctl+0x362/0x6e0
 block_ioctl+0xb0/0xf0
 vfs_ioctl+0xa7/0xf0
 do_syscall_64+0x3d/0xb0
 entry_SYSCALL_64_after_hwframe+0x44/0xae
---[ end trace 8b086e334adef6d2 ]---
Kernel panic - not syncing: Fatal exception
Fixes 2ceda20f0a99 ("scsi: core: Move command size detection out of the fast path")
Cc Bart Van Assche <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Martin K. Petersen <[email protected]>
Cc <[email protected]> # 5.15, 5.14, 5.10
Reported-by [email protected]
---
 drivers/scsi/scsi_lib.c |    2 --
 1 file changed, 2 deletions(-)
drivers/scsi/scsi_lib.c +0 -2
@@ -1168,8 +1168,6 @@ static blk_status_t scsi_setup_scsi_cmnd
 	}
 
 	cmd->cmd_len = scsi_req(req)->cmd_len;
-	if (cmd->cmd_len == 0)
-		cmd->cmd_len = scsi_command_size(cmd->cmnd);
 	cmd->cmnd = scsi_req(req)->cmd;
 	cmd->transfersize = blk_rq_bytes(req);
 	cmd->allowed = scsi_req(req)->retries;
author maintainer
#10 lore raw

PATCH 10/849 scsi: lpfc: Dont release final kref on Fport node while ABTS outstanding

In reply to Greg Kroah-Hartman

From: James Smart <[email protected]>

commit 982fc3965d1350d3332e04046b0e101006184ba9 upstream.

In a rarely executed path, FLOGI failure, there is a refcounting error. If FLOGI completed with an error, typically a timeout, the initial completion handler would remove the job reference. However, the job completion isn't the actual end of the job/exchange as the timeout usually initiates an ABTS, and upon that ABTS completion, a final completion is sent. The driver removes the reference again in the final completion. Thus the imbalance.

In the buggy cases, if there was a link bounce while the delayed response is outstanding, the fport node may be referenced again but there was no additional reference as it is already present. The delayed completion then occurs and removes the last reference freeing the node and causing issues in the link up processed that is using the node.

Fix this scenario by removing the snippet that removed the reference in the initial FLOGI completion. The bad snippet was poorly trying to identify the FLOGI as OK to do so by realizing the node was not registered with either SCSI or NVMe transport.

Fixes 618e2ee146d4 ("scsi: lpfc: Fix FLOGI failure due to accessing a freed node")
Cc <[email protected]> # v5.13+
---
 drivers/scsi/lpfc/lpfc_els.c     |   11 +++++------
 drivers/scsi/lpfc/lpfc_hbadisc.c |   10 ++++++----
 drivers/scsi/lpfc/lpfc_nvme.c    |    5 +++--
 3 files changed, 14 insertions(+), 12 deletions(-)
drivers/scsi/lpfc/lpfc_els.c +5 -6
@@ -1056,9 +1056,10 @@ stop_rr_fcf_flogi:
 
 		lpfc_printf_vlog(vport, KERN_WARNING, LOG_TRACE_EVENT,
 				 "0150 FLOGI failure Status:x%x/x%x "
-				 "xri x%x TMO:x%x\n",
+				 "xri x%x TMO:x%x refcnt %d\n",
 				 irsp->ulpStatus, irsp->un.ulpWord[4],
-				 cmdiocb->sli4_xritag, irsp->ulpTimeout);
+				 cmdiocb->sli4_xritag, irsp->ulpTimeout,
+				 kref_read(&ndlp->kref));
 
 		/* If this is not a loop open failure, bail out */
 		if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT &&
@@ -1119,12 +1120,12 @@ stop_rr_fcf_flogi:
 	/* FLOGI completes successfully */
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
 			 "0101 FLOGI completes successfully, I/O tag:x%x, "
-			 "xri x%x Data: x%x x%x x%x x%x x%x x%x x%x\n",
+			 "xri x%x Data: x%x x%x x%x x%x x%x x%x x%x %d\n",
 			 cmdiocb->iotag, cmdiocb->sli4_xritag,
 			 irsp->un.ulpWord[4], sp->cmn.e_d_tov,
 			 sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution,
 			 vport->port_state, vport->fc_flag,
-			 sp->cmn.priority_tagging);
+			 sp->cmn.priority_tagging, kref_read(&ndlp->kref));
 
 	if (sp->cmn.priority_tagging)
 		vport->vmid_flag |= LPFC_VMID_ISSUE_QFPA;
@@ -1202,8 +1203,6 @@ flogifail:
 	phba->fcf.fcf_flag &= ~FCF_DISCOVERY;
 	spin_unlock_irq(&phba->hbalock);
 
-	if (!(ndlp->fc4_xpt_flags & (SCSI_XPT_REGD | NVME_XPT_REGD)))
-		lpfc_nlp_put(ndlp);
 	if (!lpfc_error_lost_link(irsp)) {
 		/* FLOGI failed, so just use loop map to make discovery list */
 		lpfc_disc_list_loopmap(vport);
drivers/scsi/lpfc/lpfc_hbadisc.c +6 -4
@@ -4429,8 +4429,9 @@ lpfc_register_remote_port(struct lpfc_vp
 		fc_remote_port_rolechg(rport, rport_ids.roles);
 
 	lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NODE,
-			 "3183 %s rport x%px DID x%x, role x%x\n",
-			 __func__, rport, rport->port_id, rport->roles);
+			 "3183 %s rport x%px DID x%x, role x%x refcnt %d\n",
+			 __func__, rport, rport->port_id, rport->roles,
+			 kref_read(&ndlp->kref));
 
 	if ((rport->scsi_target_id != -1) &&
 	    (rport->scsi_target_id < LPFC_MAX_TARGET)) {
@@ -4455,8 +4456,9 @@ lpfc_unregister_remote_port(struct lpfc_
 
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
 			 "3184 rport unregister x%06x, rport x%px "
-			 "xptflg x%x\n",
-			 ndlp->nlp_DID, rport, ndlp->fc4_xpt_flags);
+			 "xptflg x%x refcnt %d\n",
+			 ndlp->nlp_DID, rport, ndlp->fc4_xpt_flags,
+			 kref_read(&ndlp->kref));
 
 	fc_remote_port_delete(rport);
 	lpfc_nlp_put(ndlp);
drivers/scsi/lpfc/lpfc_nvme.c +3 -2
@@ -209,8 +209,9 @@ lpfc_nvme_remoteport_delete(struct nvme_
 	 * calling state machine to remove the node.
 	 */
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_DISC,
-			"6146 remoteport delete of remoteport x%px\n",
-			remoteport);
+			 "6146 remoteport delete of remoteport x%px, ndlp x%px "
+			 "DID x%x xflags x%x\n",
+			 remoteport, ndlp, ndlp->nlp_DID, ndlp->fc4_xpt_flags);
 	spin_lock_irq(&ndlp->lock);
 
 	/* The register rebind might have occurred before the delete
author maintainer
#11 lore raw

PATCH 11/849 scsi: lpfc: Fix FCP I/O flush functionality for TMF routines

In reply to Greg Kroah-Hartman

From: James Smart <[email protected]>

commit cd8a36a90babf958082b87bc6b4df5dd70901eba upstream.

A prior patch inadvertently caused lpfc_sli_sum_iocb() to exclude counting of outstanding aborted I/Os and ABORT IOCBs. Thus, lpfc_reset_flush_io_context() called from any TMF routine does not properly wait to flush all outstanding FCP IOCBs leading to a block layer crash on an invalid scsi_cmnd->request pointer.

kernel BUG at ../block/blk-core.c:1489!

  RIP: 0010:blk_requeue_request+0xaf/0xc0
  ...
  Call Trace:
  <IRQ>
  __scsi_queue_insert+0x90/0xe0 [scsi_mod]
  blk_done_softirq+0x7e/0x90
  __do_softirq+0xd2/0x280
  irq_exit+0xd5/0xe0
  do_IRQ+0x4c/0xd0
  common_interrupt+0x87/0x87
  </IRQ>

Fix by separating out the LPFC_IO_FCP, LPFC_IO_ON_TXCMPLQ, LPFC_DRIVER_ABORTED, and CMD_ABORT_XRI_CN || CMD_CLOSE_XRI_CN checks into a new lpfc_sli_validate_fcp_iocb_for_abort() routine when determining to build an ABORT iocb.

Restore lpfc_reset_flush_io_context() functionality by including counting of outstanding aborted IOCBs and ABORT IOCBs in lpfc_sli_sum_iocb().

Fixes e1364711359f ("scsi: lpfc: Fix illegal memory access on Abort IOCBs")
Cc <[email protected]> # v5.12+
---
 drivers/scsi/lpfc/lpfc_sli.c |  101 +++++++++++++++++++++++++++++++++----------
 1 file changed, 78 insertions(+), 23 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +78 -23
@@ -11806,15 +11806,54 @@ lpfc_sli_hba_iocb_abort(struct lpfc_hba
 }
 
 /**
- * lpfc_sli_validate_fcp_iocb - find commands associated with a vport or LUN
+ * lpfc_sli_validate_fcp_iocb_for_abort - filter iocbs appropriate for FCP aborts
+ * @iocbq: Pointer to iocb object.
+ * @vport: Pointer to driver virtual port object.
+ *
+ * This function acts as an iocb filter for functions which abort FCP iocbs.
+ *
+ * Return values
+ * -ENODEV, if a null iocb or vport ptr is encountered
+ * -EINVAL, if the iocb is not an FCP I/O, not on the TX cmpl queue, premarked as
+ *          driver already started the abort process, or is an abort iocb itself
+ * 0, passes criteria for aborting the FCP I/O iocb
+ **/
+static int
+lpfc_sli_validate_fcp_iocb_for_abort(struct lpfc_iocbq *iocbq,
+				     struct lpfc_vport *vport)
+{
+	IOCB_t *icmd = NULL;
+
+	/* No null ptr vports */
+	if (!iocbq || iocbq->vport != vport)
+		return -ENODEV;
+
+	/* iocb must be for FCP IO, already exists on the TX cmpl queue,
+	 * can't be premarked as driver aborted, nor be an ABORT iocb itself
+	 */
+	icmd = &iocbq->iocb;
+	if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
+	    !(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ) ||
+	    (iocbq->iocb_flag & LPFC_DRIVER_ABORTED) ||
+	    (icmd->ulpCommand == CMD_ABORT_XRI_CN ||
+	     icmd->ulpCommand == CMD_CLOSE_XRI_CN))
+		return -EINVAL;
+
+	return 0;
+}
+
+/**
+ * lpfc_sli_validate_fcp_iocb - validate commands associated with a SCSI target
  * @iocbq: Pointer to driver iocb object.
  * @vport: Pointer to driver virtual port object.
  * @tgt_id: SCSI ID of the target.
  * @lun_id: LUN ID of the scsi device.
  * @ctx_cmd: LPFC_CTX_LUN/LPFC_CTX_TGT/LPFC_CTX_HOST
  *
- * This function acts as an iocb filter for functions which abort or count
- * all FCP iocbs pending on a lun/SCSI target/SCSI host. It will return
+ * This function acts as an iocb filter for validating a lun/SCSI target/SCSI
+ * host.
+ *
+ * It will return
  * 0 if the filtering criteria is met for the given iocb and will return
  * 1 if the filtering criteria is not met.
  * If ctx_cmd == LPFC_CTX_LUN, the function returns 0 only if the
@@ -11833,22 +11872,8 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_i
 			   lpfc_ctx_cmd ctx_cmd)
 {
 	struct lpfc_io_buf *lpfc_cmd;
-	IOCB_t *icmd = NULL;
 	int rc = 1;
 
-	if (!iocbq || iocbq->vport != vport)
-		return rc;
-
-	if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
-	    !(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ) ||
-	      iocbq->iocb_flag & LPFC_DRIVER_ABORTED)
-		return rc;
-
-	icmd = &iocbq->iocb;
-	if (icmd->ulpCommand == CMD_ABORT_XRI_CN ||
-	    icmd->ulpCommand == CMD_CLOSE_XRI_CN)
-		return rc;
-
 	lpfc_cmd = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
 
 	if (lpfc_cmd->pCmd == NULL)
@@ -11903,17 +11928,33 @@ lpfc_sli_sum_iocb(struct lpfc_vport *vpo
 {
 	struct lpfc_hba *phba = vport->phba;
 	struct lpfc_iocbq *iocbq;
+	IOCB_t *icmd = NULL;
 	int sum, i;
+	unsigned long iflags;
 
-	spin_lock_irq(&phba->hbalock);
+	spin_lock_irqsave(&phba->hbalock, iflags);
 	for (i = 1, sum = 0; i <= phba->sli.last_iotag; i++) {
 		iocbq = phba->sli.iocbq_lookup[i];
 
-		if (lpfc_sli_validate_fcp_iocb (iocbq, vport, tgt_id, lun_id,
-						ctx_cmd) == 0)
+		if (!iocbq || iocbq->vport != vport)
+			continue;
+		if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
+		    !(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ))
+			continue;
+
+		/* Include counting outstanding aborts */
+		icmd = &iocbq->iocb;
+		if (icmd->ulpCommand == CMD_ABORT_XRI_CN ||
+		    icmd->ulpCommand == CMD_CLOSE_XRI_CN) {
+			sum++;
+			continue;
+		}
+
+		if (lpfc_sli_validate_fcp_iocb(iocbq, vport, tgt_id, lun_id,
+					       ctx_cmd) == 0)
 			sum++;
 	}
-	spin_unlock_irq(&phba->hbalock);
+	spin_unlock_irqrestore(&phba->hbalock, iflags);
 
 	return sum;
 }
@@ -11980,7 +12021,11 @@ lpfc_sli_abort_fcp_cmpl(struct lpfc_hba
  *
  * This function sends an abort command for every SCSI command
  * associated with the given virtual port pending on the ring
- * filtered by lpfc_sli_validate_fcp_iocb function.
+ * filtered by lpfc_sli_validate_fcp_iocb_for_abort and then
+ * lpfc_sli_validate_fcp_iocb function.  The ordering for validation before
+ * submitting abort iocbs must be lpfc_sli_validate_fcp_iocb_for_abort
+ * followed by lpfc_sli_validate_fcp_iocb.
+ *
  * When abort_cmd == LPFC_CTX_LUN, the function sends abort only to the
  * FCP iocbs associated with lun specified by tgt_id and lun_id
  * parameters
@@ -12012,6 +12057,9 @@ lpfc_sli_abort_iocb(struct lpfc_vport *v
 	for (i = 1; i <= phba->sli.last_iotag; i++) {
 		iocbq = phba->sli.iocbq_lookup[i];
 
+		if (lpfc_sli_validate_fcp_iocb_for_abort(iocbq, vport))
+			continue;
+
 		if (lpfc_sli_validate_fcp_iocb(iocbq, vport, tgt_id, lun_id,
 					       abort_cmd) != 0)
 			continue;
@@ -12044,7 +12092,11 @@ lpfc_sli_abort_iocb(struct lpfc_vport *v
  *
  * This function sends an abort command for every SCSI command
  * associated with the given virtual port pending on the ring
- * filtered by lpfc_sli_validate_fcp_iocb function.
+ * filtered by lpfc_sli_validate_fcp_iocb_for_abort and then
+ * lpfc_sli_validate_fcp_iocb function.  The ordering for validation before
+ * submitting abort iocbs must be lpfc_sli_validate_fcp_iocb_for_abort
+ * followed by lpfc_sli_validate_fcp_iocb.
+ *
  * When taskmgmt_cmd == LPFC_CTX_LUN, the function sends abort only to the
  * FCP iocbs associated with lun specified by tgt_id and lun_id
  * parameters
@@ -12082,6 +12134,9 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vpor
 	for (i = 1; i <= phba->sli.last_iotag; i++) {
 		iocbq = phba->sli.iocbq_lookup[i];
 
+		if (lpfc_sli_validate_fcp_iocb_for_abort(iocbq, vport))
+			continue;
+
 		if (lpfc_sli_validate_fcp_iocb(iocbq, vport, tgt_id, lun_id,
 					       cmd) != 0)
 			continue;
author maintainer
#12 lore raw

PATCH 12/849 scsi: qla2xxx: Fix kernel crash when accessing port_speed sysfs file

In reply to Greg Kroah-Hartman

From: Arun Easi <[email protected]>

commit 3ef68d4f0c9e7cb589ae8b70f07d77f528105331 upstream.

Kernel crashes when accessing port_speed sysfs file. The issue happens on a CNA when the local array was accessed beyond bounds. Fix this by changing the lookup.

BUG: unable to handle kernel paging request at 0000000000004000
PGD 0 P4D 0
Oops: 0000 [#1] SMP PTI
CPU: 15 PID: 455213 Comm: sosreport Kdump: loaded Not tainted
4.18.0-305.7.1.el8_4.x86_64 #1
RIP: 0010:string_nocheck+0x12/0x70
Code: 00 00 4c 89 e2 be 20 00 00 00 48 89 ef e8 86 9a 00 00 4c 01
e3 eb 81 90 49 89 f2 48 89 ce 48 89 f8 48 c1 fe 30 66 85 f6 74 4f <44> 0f b6 0a
45 84 c9 74 46 83 ee 01 41 b8 01 00 00 00 48 8d 7c 37
RSP: 0018:ffffb5141c1afcf0 EFLAGS: 00010286
RAX: ffff8bf4009f8000 RBX: ffff8bf4009f9000 RCX: ffff0a00ffffff04
RDX: 0000000000004000 RSI: ffffffffffffffff RDI: ffff8bf4009f8000
RBP: 0000000000004000 R08: 0000000000000001 R09: ffffb5141c1afb84
R10: ffff8bf4009f9000 R11: ffffb5141c1afce6 R12: ffff0a00ffffff04
R13: ffffffffc08e21aa R14: 0000000000001000 R15: ffffffffc08e21aa
FS:  00007fc4ebfff700(0000) GS:ffff8c717f7c0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000004000 CR3: 000000edfdee6006 CR4: 00000000001706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
  string+0x40/0x50
  vsnprintf+0x33c/0x520
  scnprintf+0x4d/0x90
  qla2x00_port_speed_show+0xb5/0x100 [qla2xxx]
  dev_attr_show+0x1c/0x40
  sysfs_kf_seq_show+0x9b/0x100
  seq_read+0x153/0x410
  vfs_read+0x91/0x140
  ksys_read+0x4f/0xb0
  do_syscall_64+0x5b/0x1a0
  entry_SYSCALL_64_after_hwframe+0x65/0xca
---
 drivers/scsi/qla2xxx/qla_attr.c |   24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +22 -2
@@ -1868,6 +1868,18 @@ qla2x00_port_speed_store(struct device *
 	return strlen(buf);
 }
 
+static const struct {
+	u16 rate;
+	char *str;
+} port_speed_str[] = {
+	{ PORT_SPEED_4GB, "4" },
+	{ PORT_SPEED_8GB, "8" },
+	{ PORT_SPEED_16GB, "16" },
+	{ PORT_SPEED_32GB, "32" },
+	{ PORT_SPEED_64GB, "64" },
+	{ PORT_SPEED_10GB, "10" },
+};
+
 static ssize_t
 qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,
     char *buf)
@@ -1875,7 +1887,8 @@ qla2x00_port_speed_show(struct device *d
 	struct scsi_qla_host *vha = shost_priv(dev_to_shost(dev));
 	struct qla_hw_data *ha = vha->hw;
 	ssize_t rval;
-	char *spd[7] = {"0", "0", "0", "4", "8", "16", "32"};
+	u16 i;
+	char *speed = "Unknown";
 
 	rval = qla2x00_get_data_rate(vha);
 	if (rval != QLA_SUCCESS) {
@@ -1884,7 +1897,14 @@ qla2x00_port_speed_show(struct device *d
 		return -EINVAL;
 	}
 
-	return scnprintf(buf, PAGE_SIZE, "%s\n", spd[ha->link_data_rate]);
+	for (i = 0; i < ARRAY_SIZE(port_speed_str); i++) {
+		if (port_speed_str[i].rate != ha->link_data_rate)
+			continue;
+		speed = port_speed_str[i].str;
+		break;
+	}
+
+	return scnprintf(buf, PAGE_SIZE, "%s\n", speed);
 }
 
 /* ----- */
author maintainer
#13 lore raw

PATCH 13/849 scsi: qla2xxx: Fix use after free in eh_abort path

In reply to Greg Kroah-Hartman

From: Quinn Tran <[email protected]>

commit 3d33b303d4f3b74a71bede5639ebba3cfd2a2b4d upstream.

In eh_abort path driver prematurely exits the call to upper layer. Check whether command is aborted / completed by firmware before exiting the call.

9 [ffff8b1ebf803c00] page_fault at ffffffffb0389778
[exception RIP: qla2x00_status_entry+0x48d]

  RIP: ffffffffc04fa62d  RSP: ffff8b1ebf803cb0  RFLAGS: 00010082
  RAX: 00000000ffffffff  RBX: 00000000000e0000  RCX: 0000000000000000
  RDX: 0000000000000000  RSI: 00000000000013d8  RDI: fffff3253db78440
  RBP: ffff8b1ebf803dd0   R8: ffff8b1ebcd9b0c0   R9: 0000000000000000
  R10: ffff8b1e38a30808  R11: 0000000000001000  R12: 00000000000003e9
  R13: 0000000000000000  R14: ffff8b1ebcd9d740  R15: 0000000000000028
  ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018

10 [ffff8b1ebf803cb0] enqueue_entity at ffffffffafce708f
11 [ffff8b1ebf803d00] enqueue_task_fair at ffffffffafce7b88 12 [ffff8b1ebf803dd8] qla24xx_process_response_queue at ffffffffc04fc9a6 [qla2xxx]
13 [ffff8b1ebf803e78] qla24xx_msix_rsp_q at ffffffffc04ff01b [qla2xxx] 14 [ffff8b1ebf803eb0] __handle_irq_event_percpu at ffffffffafd50714

---
 drivers/scsi/qla2xxx/qla_os.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +5 -3
@@ -1237,6 +1237,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 	uint32_t ratov_j;
 	struct qla_qpair *qpair;
 	unsigned long flags;
+	int fast_fail_status = SUCCESS;
 
 	if (qla2x00_isp_reg_stat(ha)) {
 		ql_log(ql_log_info, vha, 0x8042,
@@ -1245,9 +1246,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 		return FAILED;
 	}
 
+	/* Save any FAST_IO_FAIL value to return later if abort succeeds */
 	ret = fc_block_scsi_eh(cmd);
 	if (ret != 0)
-		return ret;
+		fast_fail_status = ret;
 
 	sp = scsi_cmd_priv(cmd);
 	qpair = sp->qpair;
@@ -1255,7 +1257,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 	vha->cmd_timeout_cnt++;
 
 	if ((sp->fcport && sp->fcport->deleted) || !qpair)
-		return SUCCESS;
+		return fast_fail_status != SUCCESS ? fast_fail_status : FAILED;
 
 	spin_lock_irqsave(qpair->qp_lock_ptr, flags);
 	sp->comp = &comp;
@@ -1290,7 +1292,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 			    __func__, ha->r_a_tov/10);
 			ret = FAILED;
 		} else {
-			ret = SUCCESS;
+			ret = fast_fail_status;
 		}
 		break;
 	default:
author maintainer
#14 lore raw

PATCH 14/849 ce/gf100: fix incorrect CE0 address calculation on some GPUs

In reply to Greg Kroah-Hartman

From: Ben Skeggs <[email protected]>

commit 93f43ed81abec8c805e1b77eb1d20dbc51a24dc4 upstream.

The code which constructs the modules for each engine present on the GPU passes -1 for 'instance' on non-instanced engines, which affects how the name for a sub-device is generated. This is then stored as 'instance 0' in nvkm_subdev.inst, so code can potentially be shared with earlier GPUs that only had a single instance of an engine.

However, GF100's CE constructor uses this value to calculate the address of its falcon before it's translated, resulting in CE0 getting the wrong address.

This slightly modifies the approach, always passing a valid instance for engines that *can* have multiple copies, and having the code for earlier GPUs explicitly ask for non-instanced name generation.

---
 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c    |    2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c +1 -1
@@ -78,6 +78,6 @@ int
 gt215_ce_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	     struct nvkm_engine **pengine)
 {
-	return nvkm_falcon_new_(&gt215_ce, device, type, inst,
+	return nvkm_falcon_new_(&gt215_ce, device, type, -1,
 				(device->chipset != 0xaf), 0x104000, pengine);
 }
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +1 -2
@@ -3147,8 +3147,7 @@ nvkm_device_ctor(const struct nvkm_devic
 	WARN_ON(device->chip->ptr.inst & ~((1 << ARRAY_SIZE(device->ptr)) - 1));             \
 	for (j = 0; device->chip->ptr.inst && j < ARRAY_SIZE(device->ptr); j++) {            \
 		if ((device->chip->ptr.inst & BIT(j)) && (subdev_mask & BIT_ULL(type))) {    \
-			int inst = (device->chip->ptr.inst == 1) ? -1 : (j);                 \
-			ret = device->chip->ptr.ctor(device, (type), inst, &device->ptr[j]); \
+			ret = device->chip->ptr.ctor(device, (type), (j), &device->ptr[j]);  \
 			subdev = nvkm_device_subdev(device, (type), (j));                    \
 			if (ret) {                                                           \
 				nvkm_subdev_del(&subdev);                                    \
author maintainer
#15 lore raw

PATCH 15/849 char: xillybus: fix msg_ep UAF in xillyusb_probe()

In reply to Greg Kroah-Hartman

From: Ziyang Xuan <[email protected]>

commit 15c9a359094ec6251578b02387436bc64f11a477 upstream.

When endpoint_alloc() return failed in xillyusb_setup_base_eps(), 'xdev->msg_ep' will be freed but not set to NULL. That lets program enter fail handling to cleanup_dev() in xillyusb_probe(). Check for 'xdev->msg_ep' is invalid in cleanup_dev() because 'xdev->msg_ep' did not set to NULL when was freed. So the UAF problem for 'xdev->msg_ep' is triggered.

==================================================================

BUG: KASAN: use-after-free in fifo_mem_release+0x1f4/0x210
CPU: 0 PID: 166 Comm: kworker/0:2 Not tainted 5.15.0-rc5+ #19
Call Trace:
 dump_stack_lvl+0xe2/0x152
 print_address_description.constprop.0+0x21/0x140
 ? fifo_mem_release+0x1f4/0x210
 kasan_report.cold+0x7f/0x11b
 ? xillyusb_probe+0x530/0x700
 ? fifo_mem_release+0x1f4/0x210
 fifo_mem_release+0x1f4/0x210
 ? __sanitizer_cov_trace_pc+0x1d/0x50
 endpoint_dealloc+0x35/0x2b0
 cleanup_dev+0x90/0x120
 xillyusb_probe+0x59a/0x700

...

Freed by task 166:
 kasan_save_stack+0x1b/0x40
 kasan_set_track+0x1c/0x30
 kasan_set_free_info+0x20/0x30
 __kasan_slab_free+0x109/0x140
 kfree+0x117/0x4c0
 xillyusb_probe+0x606/0x700

Set 'xdev->msg_ep' to NULL after being freed in xillyusb_setup_base_eps() to fix the UAF problem.

Fixes a53d1202aef1 ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)")
Cc stable <[email protected]>
---
 drivers/char/xillybus/xillyusb.c |    1 +
 1 file changed, 1 insertion(+)
drivers/char/xillybus/xillyusb.c +1 -0
@@ -1912,6 +1912,7 @@ static int xillyusb_setup_base_eps(struc
 
 dealloc:
 	endpoint_dealloc(xdev->msg_ep); /* Also frees FIFO mem if allocated */
+	xdev->msg_ep = NULL;
 	return -ENOMEM;
 }
 
author maintainer
#16 lore raw

PATCH 16/849 mmc: mtk-sd: Add wait dma stop done flow

In reply to Greg Kroah-Hartman

From: Derong Liu <[email protected]>

commit 43e5fee317f4b0a48992b8b07935b1a3ac20ce84 upstream.

We found this issue on a 5G platform, during CMDQ error handling, if DMA status is active when it call msdc_reset_hw(), it means mmc host hw reset and DMA transfer will be parallel, mmc host may access sram region unexpectedly. According to the programming guide of mtk-sd host, it needs to wait for dma stop done after set dma stop.

This change should be applied to all SoCs.

---
 drivers/mmc/host/mtk-sd.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/mmc/host/mtk-sd.c +5 -0
@@ -8,6 +8,7 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
+#include <linux/iopoll.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
 #include <linux/of_address.h>
@@ -2330,6 +2331,7 @@ static void msdc_cqe_enable(struct mmc_h
 static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery)
 {
 	struct msdc_host *host = mmc_priv(mmc);
+	unsigned int val = 0;
 
 	/* disable cmdq irq */
 	sdr_clr_bits(host->base + MSDC_INTEN, MSDC_INT_CMDQ);
@@ -2339,6 +2341,9 @@ static void msdc_cqe_disable(struct mmc_
 	if (recovery) {
 		sdr_set_field(host->base + MSDC_DMA_CTRL,
 			      MSDC_DMA_CTRL_STOP, 1);
+		if (WARN_ON(readl_poll_timeout(host->base + MSDC_DMA_CFG, val,
+			!(val & MSDC_DMA_CFG_STS), 1, 3000)))
+			return;
 		msdc_reset_hw(host);
 	}
 }
author maintainer
#17 lore raw

PATCH 17/849 mmc: dw_mmc: Dont wait for DRTO on Write RSP error

In reply to Greg Kroah-Hartman

From: Christian Löhle <[email protected]>

commit 43592c8736e84025d7a45e61a46c3fa40536a364 upstream.

Only wait for DRTO on reads, otherwise the driver hangs.

The driver prevents sending CMD12 on response errors like CRCs. According to the comment this is because some cards have problems with this during the UHS tuning sequence. Unfortunately this workaround currently also applies for any command with data. On reads this will set the drto timer, which then triggers after a while. On writes this will not set any timer and the tasklet will not be scheduled again.

I cannot test for the UHS workarounds need, but even if so, it should at most apply to reads. I have observed many hangs when CMD25 response contained a CRC error. This patch fixes this without touching the actual UHS tuning workaround.

---
 drivers/mmc/host/dw_mmc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +2 -1
@@ -2014,7 +2014,8 @@ static void dw_mci_tasklet_func(struct t
 				 * delayed. Allowing the transfer to take place
 				 * avoids races and keeps things simple.
 				 */
-				if (err != -ETIMEDOUT) {
+				if (err != -ETIMEDOUT &&
+				    host->dir_status == DW_MCI_RECV_STATUS) {
 					state = STATE_SENDING_DATA;
 					continue;
 				}
author maintainer
#18 lore raw

PATCH 18/849 exfat: fix incorrect loading of i_blocks for large files

In reply to Greg Kroah-Hartman

From: Sungjong Seo <[email protected]>

commit 0c336d6e33f4bedc443404c89f43c91c8bd9ee11 upstream.

When calculating i_blocks, there was a mistake that was masked with a 32-bit variable. So i_blocks for files larger than 4 GiB had incorrect values. Mask with a 64-bit variable instead of 32-bit one.

Fixes 5f2aa075070c ("exfat: add inode operations")
---
 fs/exfat/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/exfat/inode.c +1 -1
@@ -604,7 +604,7 @@ static int exfat_fill_inode(struct inode
 	exfat_save_attr(inode, info->attr);
 
 	inode->i_blocks = ((i_size_read(inode) + (sbi->cluster_size - 1)) &
-		~(sbi->cluster_size - 1)) >> inode->i_blkbits;
+		~((loff_t)sbi->cluster_size - 1)) >> inode->i_blkbits;
 	inode->i_mtime = info->mtime;
 	inode->i_ctime = info->mtime;
 	ei->i_crtime = info->crtime;
author maintainer
#19 lore raw

PATCH 19/849 parisc: Fix set_fixmap() on PA1.x CPUs

In reply to Greg Kroah-Hartman

From: Helge Deller <[email protected]>

commit 6e866a462867b60841202e900f10936a0478608c upstream.

Fix a kernel crash which happens on PA1.x CPUs while initializing the FTRACE/KPROBE breakpoints. The PTE table entries for the fixmap area were not created correctly.

Fixes ccfbc68d41c2 ("parisc: add set_fixmap()/clear_fixmap()")
---
 arch/parisc/mm/fixmap.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/parisc/mm/fixmap.c +1 -4
@@ -20,12 +20,9 @@ void notrace set_fixmap(enum fixed_addre
 	pte_t *pte;
 
 	if (pmd_none(*pmd))
-		pmd = pmd_alloc(NULL, pud, vaddr);
-
-	pte = pte_offset_kernel(pmd, vaddr);
-	if (pte_none(*pte))
 		pte = pte_alloc_kernel(pmd, vaddr);
 
+	pte = pte_offset_kernel(pmd, vaddr);
 	set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX));
 	flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
 }
author maintainer
#20 lore raw

PATCH 20/849 parisc: Fix ptrace check on syscall return

In reply to Greg Kroah-Hartman

From: Helge Deller <[email protected]>

commit 8779e05ba8aaffec1829872ef9774a71f44f6580 upstream.

The TIF_XXX flags are stored in the flags field in the thread_info struct (TI_FLAGS), not in the flags field of the task_struct structure (TASK_FLAGS).

It seems this bug didn't generate any important side-effects, otherwise it wouldn't have went unnoticed for 12 years (since v2.6.32).

Fixes ecd3d4bc06e48 ("parisc: stop using task->ptrace for {single,block}step flags")
Cc Kyle McMartin <[email protected]>
---
 arch/parisc/kernel/entry.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/parisc/kernel/entry.S +1 -1
@@ -1834,7 +1834,7 @@ syscall_restore:
 	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
 
 	/* Are we being ptraced? */
-	ldw	TASK_FLAGS(%r1),%r19
+	LDREG	TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
 	ldi	_TIF_SYSCALL_TRACE_MASK,%r2
 	and,COND(=)	%r19,%r2,%r0
 	b,n	syscall_restore_rfi
author maintainer
#21 lore raw

PATCH 21/849 tpm: Check for integer overflow in tpm2_map_response_body()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

commit a0bcce2b2a169e10eb265c8f0ebdd5ae4c875670 upstream.

The "4 * be32_to_cpu(data->count)" multiplication can potentially overflow which would lead to memory corruption. Add a check for that.

Fixes 745b361e989a ("tpm: infrastructure for TPM spaces")
---
 drivers/char/tpm/tpm2-space.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/char/tpm/tpm2-space.c +3 -0
@@ -455,6 +455,9 @@ static int tpm2_map_response_body(struct
 	if (be32_to_cpu(data->capability) != TPM2_CAP_HANDLES)
 		return 0;
 
+	if (be32_to_cpu(data->count) > (UINT_MAX - TPM_HEADER_SIZE - 9) / 4)
+		return -EFAULT;
+
 	if (len != TPM_HEADER_SIZE + 9 + 4 * be32_to_cpu(data->count))
 		return -EFAULT;
 
author maintainer
#22 lore raw

PATCH 22/849 firmware/psci: fix application of sizeof to pointer

In reply to Greg Kroah-Hartman

From: jing yangyang <[email protected]>

commit 2ac5fb35cd520ab1851c9a4816c523b65276052f upstream.

sizeof when applied to a pointer typed expression gives the size of the pointer.

./drivers/firmware/psci/psci_checker.c:158:41-47: ERROR application of sizeof to pointer

This issue was detected with the help of Coccinelle.

Fixes 7401056de5f8 ("drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests")
---
 drivers/firmware/psci/psci_checker.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci/psci_checker.c +1 -1
@@ -155,7 +155,7 @@ static int alloc_init_cpu_groups(cpumask
 	if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
 		return -ENOMEM;
 
-	cpu_groups = kcalloc(nb_available_cpus, sizeof(cpu_groups),
+	cpu_groups = kcalloc(nb_available_cpus, sizeof(*cpu_groups),
 			     GFP_KERNEL);
 	if (!cpu_groups) {
 		free_cpumask_var(tmp);
author maintainer
#23 lore raw

PATCH 23/849 crypto: s5p-sss - Add error handling in s5p_aes_probe()

In reply to Greg Kroah-Hartman

From: Tang Bin <[email protected]>

commit a472cc0dde3eb057db71c80f102556eeced03805 upstream.

The function s5p_aes_probe() does not perform sufficient error checking after executing platform_get_resource(), thus fix it.

Fixes c2afad6c6105 ("crypto: s5p-sss - Add HASH support for Exynos")
---
 drivers/crypto/s5p-sss.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/s5p-sss.c +2 -0
@@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform
 
 	variant = find_s5p_sss_version(pdev);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res)
+		return -EINVAL;
 
 	/*
 	 * Note: HASH and PRNG uses the same registers in secss, avoid
author maintainer
#24 lore raw

PATCH 24/849 media: rkvdec: Do not override sizeimage for output format

In reply to Greg Kroah-Hartman

From: Chen-Yu Tsai <[email protected]>

commit 298d8e8f7bcf023aceb60232d59b983255fec0df upstream.

The rkvdec H.264 decoder currently overrides sizeimage for the output format. This causes issues when userspace requires and requests a larger buffer, but ends up with one of insufficient size.

Instead, only provide a default size if none was requested. This fixes the video_decode_accelerator_tests from Chromium failing on the first frame due to insufficient buffer space. It also aligns the behavior of the rkvdec driver with the Hantro and Cedrus drivers.

---
 drivers/staging/media/rkvdec/rkvdec-h264.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/media/rkvdec/rkvdec-h264.c +3 -2
@@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct
 	struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
 
 	fmt->num_planes = 1;
-	fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
-				      RKVDEC_H264_MAX_DEPTH_IN_BYTES;
+	if (!fmt->plane_fmt[0].sizeimage)
+		fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
+					      RKVDEC_H264_MAX_DEPTH_IN_BYTES;
 	return 0;
 }
 
author maintainer
#25 lore raw

PATCH 25/849 media: ite-cir: IR receiver stop working after receive overflow

In reply to Greg Kroah-Hartman

From: Sean Young <[email protected]>

commit fdc881783099c6343921ff017450831c8766d12a upstream.

On an Intel NUC6iSYK, no IR is reported after a receive overflow.

When a receiver overflow occurs, this condition is only cleared by reading the fifo. Make sure we read anything in the fifo.

Fixes 28c7afb07ccf ("media: ite-cir: check for receive overflow")
---
 drivers/media/rc/ite-cir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ite-cir.c +1 -1
@@ -242,7 +242,7 @@ static irqreturn_t ite_cir_isr(int irq,
 	}
 
 	/* check for the receive interrupt */
-	if (iflags & ITE_IRQ_RX_FIFO) {
+	if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
 		/* read the FIFO bytes */
 		rx_bytes = dev->params->get_rx_bytes(dev, rx_buf,
 						    ITE_RX_FIFO_LEN);
author maintainer
#26 lore raw

PATCH 26/849 media: rkvdec: Support dynamic resolution changes

In reply to Greg Kroah-Hartman

From: Chen-Yu Tsai <[email protected]>

commit 0887e9e152efbd3601d6c907e90033d25067277d upstream.

The mem-to-mem stateless decoder API specifies support for dynamic resolution changes. In particular, the decoder should accept format changes on the OUTPUT queue even when buffers have been allocated, as long as it is not streaming.

Relax restrictions for S_FMT as described in the previous paragraph, and as long as the codec format remains the same. This aligns it with the Hantro and Cedrus decoders. This change was mostly based on commit ae02d49493b5 ("media: hantro: Fix s_fmt for dynamic resolution changes").

Since rkvdec_s_fmt() is now just a wrapper around the output/capture variants without any additional shared functionality, drop the wrapper and call the respective functions directly.

---
 drivers/staging/media/rkvdec/rkvdec.c |   40 +++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/staging/media/rkvdec/rkvdec.c +20 -20
@@ -280,31 +280,20 @@ static int rkvdec_try_output_fmt(struct
 	return 0;
 }
 
-static int rkvdec_s_fmt(struct file *file, void *priv,
-			struct v4l2_format *f,
-			int (*try_fmt)(struct file *, void *,
-				       struct v4l2_format *))
+static int rkvdec_s_capture_fmt(struct file *file, void *priv,
+				struct v4l2_format *f)
 {
 	struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
 	struct vb2_queue *vq;
+	int ret;
 
-	if (!try_fmt)
-		return -EINVAL;
-
-	vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
+	/* Change not allowed if queue is busy */
+	vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx,
+			     V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
 	if (vb2_is_busy(vq))
 		return -EBUSY;
 
-	return try_fmt(file, priv, f);
-}
-
-static int rkvdec_s_capture_fmt(struct file *file, void *priv,
-				struct v4l2_format *f)
-{
-	struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
-	int ret;
-
-	ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_capture_fmt);
+	ret = rkvdec_try_capture_fmt(file, priv, f);
 	if (ret)
 		return ret;
 
@@ -319,10 +308,21 @@ static int rkvdec_s_output_fmt(struct fi
 	struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
 	const struct rkvdec_coded_fmt_desc *desc;
 	struct v4l2_format *cap_fmt;
-	struct vb2_queue *peer_vq;
+	struct vb2_queue *peer_vq, *vq;
 	int ret;
 
 	/*
+	 * In order to support dynamic resolution change, the decoder admits
+	 * a resolution change, as long as the pixelformat remains. Can't be
+	 * done if streaming.
+	 */
+	vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+	if (vb2_is_streaming(vq) ||
+	    (vb2_is_busy(vq) &&
+	     f->fmt.pix_mp.pixelformat != ctx->coded_fmt.fmt.pix_mp.pixelformat))
+		return -EBUSY;
+
+	/*
 	 * Since format change on the OUTPUT queue will reset the CAPTURE
 	 * queue, we can't allow doing so when the CAPTURE queue has buffers
 	 * allocated.
@@ -331,7 +331,7 @@ static int rkvdec_s_output_fmt(struct fi
 	if (vb2_is_busy(peer_vq))
 		return -EBUSY;
 
-	ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt);
+	ret = rkvdec_try_output_fmt(file, priv, f);
 	if (ret)
 		return ret;
 
author maintainer
#27 lore raw

PATCH 27/849 media: ir-kbd-i2c: improve responsiveness of hauppauge zilog receivers

In reply to Greg Kroah-Hartman

From: Sean Young <[email protected]>

commit c73ba202a851c0b611ef2c25e568fadeff5e667f upstream.

The IR receiver has two issues:

- Sometimes there is no response to a button press
- Sometimes a button press is repeated when it should not have been

Hanging the polling interval fixes this behaviour.

---
 drivers/media/i2c/ir-kbd-i2c.c |    1 +
 1 file changed, 1 insertion(+)
drivers/media/i2c/ir-kbd-i2c.c +1 -0
@@ -791,6 +791,7 @@ static int ir_probe(struct i2c_client *c
 		rc_proto    = RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC6_MCE |
 							RC_PROTO_BIT_RC6_6A_32;
 		ir_codes    = RC_MAP_HAUPPAUGE;
+		ir->polling_interval = 125;
 		probe_tx = true;
 		break;
 	}
author maintainer
#28 lore raw

PATCH 28/849 media: v4l2-ioctl: Fix check_ext_ctrls

In reply to Greg Kroah-Hartman

From: Ricardo Ribalda <[email protected]>

commit 861f92cb9160b14beef0ada047384c2340701ee2 upstream.

Drivers that do not use the ctrl-framework use this function instead.

Fix the following issues:

- Do not check for multiple classes when getting the DEF_VAL.
- Return -EINVAL for request_api calls
- Default value cannot be changed, return EINVAL as soon as possible.
- Return the right error_idx
[If an error is found when validating the list of controls passed with VIDIOC_G_EXT_CTRLS, then error_idx shall be set to ctrls->count to indicate to userspace that no actual hardware was touched. It would have been much nicer of course if error_idx could point to the control index that failed the validation, but sadly that's not how the API was designed.]

Fixes v4l2-compliance:
Control ioctls (Input 0):
warn: v4l2-test-controls.cpp(834): error_idx should be equal to count
warn: v4l2-test-controls.cpp(855): error_idx should be equal to count
fail: v4l2-test-controls.cpp(813): doioctl(node, VIDIOC_G_EXT_CTRLS, &ctrls)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
Buffer ioctls (Input 0):

		fail: v4l2-test-buffers.cpp(1994): ret != EINVAL && ret != EBADR && ret != ENOTTY
	test Requests: FAIL
---
 drivers/media/v4l2-core/v4l2-ioctl.c |   60 ++++++++++++++++++++++-------------
 1 file changed, 39 insertions(+), 21 deletions(-)
drivers/media/v4l2-core/v4l2-ioctl.c +39 -21
@@ -869,7 +869,7 @@ static void v4l_print_default(const void
 	pr_cont("driver-specific ioctl\n");
 }
 
-static int check_ext_ctrls(struct v4l2_ext_controls *c, int allow_priv)
+static bool check_ext_ctrls(struct v4l2_ext_controls *c, unsigned long ioctl)
 {
 	__u32 i;
 
@@ -878,23 +878,41 @@ static int check_ext_ctrls(struct v4l2_e
 	for (i = 0; i < c->count; i++)
 		c->controls[i].reserved2[0] = 0;
 
-	/* V4L2_CID_PRIVATE_BASE cannot be used as control class
-	   when using extended controls.
-	   Only when passed in through VIDIOC_G_CTRL and VIDIOC_S_CTRL
-	   is it allowed for backwards compatibility.
-	 */
-	if (!allow_priv && c->which == V4L2_CID_PRIVATE_BASE)
-		return 0;
-	if (!c->which)
-		return 1;
+	switch (c->which) {
+	case V4L2_CID_PRIVATE_BASE:
+		/*
+		 * V4L2_CID_PRIVATE_BASE cannot be used as control class
+		 * when using extended controls.
+		 * Only when passed in through VIDIOC_G_CTRL and VIDIOC_S_CTRL
+		 * is it allowed for backwards compatibility.
+		 */
+		if (ioctl == VIDIOC_G_CTRL || ioctl == VIDIOC_S_CTRL)
+			return false;
+		break;
+	case V4L2_CTRL_WHICH_DEF_VAL:
+		/* Default value cannot be changed */
+		if (ioctl == VIDIOC_S_EXT_CTRLS ||
+		    ioctl == VIDIOC_TRY_EXT_CTRLS) {
+			c->error_idx = c->count;
+			return false;
+		}
+		return true;
+	case V4L2_CTRL_WHICH_CUR_VAL:
+		return true;
+	case V4L2_CTRL_WHICH_REQUEST_VAL:
+		c->error_idx = c->count;
+		return false;
+	}
+
 	/* Check that all controls are from the same control class. */
 	for (i = 0; i < c->count; i++) {
 		if (V4L2_CTRL_ID2WHICH(c->controls[i].id) != c->which) {
-			c->error_idx = i;
-			return 0;
+			c->error_idx = ioctl == VIDIOC_TRY_EXT_CTRLS ? i :
+								      c->count;
+			return false;
 		}
 	}
-	return 1;
+	return true;
 }
 
 static int check_fmt(struct file *file, enum v4l2_buf_type type)
@@ -2187,7 +2205,7 @@ static int v4l_g_ctrl(const struct v4l2_
 	ctrls.controls = &ctrl;
 	ctrl.id = p->id;
 	ctrl.value = p->value;
-	if (check_ext_ctrls(&ctrls, 1)) {
+	if (check_ext_ctrls(&ctrls, VIDIOC_G_CTRL)) {
 		int ret = ops->vidioc_g_ext_ctrls(file, fh, &ctrls);
 
 		if (ret == 0)
@@ -2221,7 +2239,7 @@ static int v4l_s_ctrl(const struct v4l2_
 	ctrls.controls = &ctrl;
 	ctrl.id = p->id;
 	ctrl.value = p->value;
-	if (check_ext_ctrls(&ctrls, 1))
+	if (check_ext_ctrls(&ctrls, VIDIOC_S_CTRL))
 		return ops->vidioc_s_ext_ctrls(file, fh, &ctrls);
 	return -EINVAL;
 }
@@ -2243,8 +2261,8 @@ static int v4l_g_ext_ctrls(const struct
 					vfd, vfd->v4l2_dev->mdev, p);
 	if (ops->vidioc_g_ext_ctrls == NULL)
 		return -ENOTTY;
-	return check_ext_ctrls(p, 0) ? ops->vidioc_g_ext_ctrls(file, fh, p) :
-					-EINVAL;
+	return check_ext_ctrls(p, VIDIOC_G_EXT_CTRLS) ?
+				ops->vidioc_g_ext_ctrls(file, fh, p) : -EINVAL;
 }
 
 static int v4l_s_ext_ctrls(const struct v4l2_ioctl_ops *ops,
@@ -2264,8 +2282,8 @@ static int v4l_s_ext_ctrls(const struct
 					vfd, vfd->v4l2_dev->mdev, p);
 	if (ops->vidioc_s_ext_ctrls == NULL)
 		return -ENOTTY;
-	return check_ext_ctrls(p, 0) ? ops->vidioc_s_ext_ctrls(file, fh, p) :
-					-EINVAL;
+	return check_ext_ctrls(p, VIDIOC_S_EXT_CTRLS) ?
+				ops->vidioc_s_ext_ctrls(file, fh, p) : -EINVAL;
 }
 
 static int v4l_try_ext_ctrls(const struct v4l2_ioctl_ops *ops,
@@ -2285,8 +2303,8 @@ static int v4l_try_ext_ctrls(const struc
 					  vfd, vfd->v4l2_dev->mdev, p);
 	if (ops->vidioc_try_ext_ctrls == NULL)
 		return -ENOTTY;
-	return check_ext_ctrls(p, 0) ? ops->vidioc_try_ext_ctrls(file, fh, p) :
-					-EINVAL;
+	return check_ext_ctrls(p, VIDIOC_TRY_EXT_CTRLS) ?
+			ops->vidioc_try_ext_ctrls(file, fh, p) : -EINVAL;
 }
 
 /*
author maintainer
#29 lore raw

PATCH 29/849 ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14

In reply to Greg Kroah-Hartman

From: Johnathon Clark <[email protected]>

commit 5fc462c3aaad601d5089fd5588a5799896a6937d upstream.

On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is controlled by GPIO 0x04. The speaker mute LED does not seem to be exposed by GPIO and is there not set.

[ a slight coding-style fix by tiwai ]

Fixes c3bb2b521944 ("ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup")
---
 sound/pci/hda/patch_realtek.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
sound/pci/hda/patch_realtek.c +17 -0
@@ -4367,6 +4367,16 @@ static void alc287_fixup_hp_gpio_led(str
 	alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
 }
 
+static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
+				const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		spec->micmute_led_polarity = 1;
+	alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
+}
+
 /* turn on/off mic-mute LED per capture hook via VREF change */
 static int vref_micmute_led_set(struct led_classdev *led_cdev,
 				enum led_brightness brightness)
@@ -6683,6 +6693,7 @@ enum {
 	ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
 	ALC287_FIXUP_HP_GPIO_LED,
 	ALC256_FIXUP_HP_HEADSET_MIC,
+	ALC245_FIXUP_HP_GPIO_LED,
 	ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
 	ALC282_FIXUP_ACER_DISABLE_LINEOUT,
 	ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
@@ -7307,6 +7318,8 @@ static const struct hda_fixup alc269_fix
 	[ALC245_FIXUP_HP_X360_AMP] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc245_fixup_hp_x360_amp,
+		.chained = true,
+		.chain_id = ALC245_FIXUP_HP_GPIO_LED
 	},
 	[ALC288_FIXUP_DELL_HEADSET_MODE] = {
 		.type = HDA_FIXUP_FUNC,
@@ -8402,6 +8415,10 @@ static const struct hda_fixup alc269_fix
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc256_fixup_tongfang_reset_persistent_settings,
 	},
+	[ALC245_FIXUP_HP_GPIO_LED] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc245_fixup_hp_gpio_led,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
author maintainer
#30 lore raw

PATCH 30/849 ALSA: hda/realtek: Add a quirk for HP OMEN 15 mute LED

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 375f8426ed994addd2be4d76febc946a6fdd8280 upstream.

HP OMEN 15 laptop requires the quirk to fiddle with COEF 0x0b bit 2 for toggling the mute LED. It's already implemented for other HP laptops, and we just need to add a proper fixup entry.

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8604,6 +8604,7 @@ static const struct snd_pci_quirk alc269
 		      ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
 		      ALC285_FIXUP_HP_GPIO_AMP_INIT),
+	SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
author maintainer
#31 lore raw

PATCH 31/849 ALSA: hda/realtek: Add quirk for Clevo PC70HS

In reply to Greg Kroah-Hartman

From: Tim Crawford <[email protected]>

commit dbfe83507cf4ea66ce4efee2ac14c5ad420e31d3 upstream.

Apply the PB51ED PCI quirk to the Clevo PC70HS. Fixes audio output from the internal speakers.

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -2551,6 +2551,7 @@ static const struct snd_pci_quirk alc882
 	SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
 	SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
 	SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
+	SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
 	SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
 	SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
 	SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED),
author maintainer
#32 lore raw

PATCH 32/849 ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ

In reply to Greg Kroah-Hartman

From: Jeremy Soller <[email protected]>

commit 1278cc5ac2f96bab50dd55c8c05e0a6a77ce323e upstream.

On Clevo NH77HJ, NH77HP, and their 15" variants, there is a headset microphone input attached to 0x19 that does not have a jack detect. In order to get it working, the pin configuration needs to be set correctly, and a new ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE fixup is applied. This is similar to the existing System76 quirk for ALC293, but for ALC256.

---
 sound/pci/hda/patch_realtek.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
sound/pci/hda/patch_realtek.c +14 -0
@@ -6713,6 +6713,7 @@ enum {
 	ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
 	ALC287_FIXUP_13S_GEN2_SPEAKERS,
 	ALC256_FIXUP_TONGFANG_RESET_PERSISTENT_SETTINGS,
+	ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -8420,6 +8421,15 @@ static const struct hda_fixup alc269_fix
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc245_fixup_hp_gpio_led,
 	},
+	[ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8718,11 +8728,15 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
author maintainer
#33 lore raw

PATCH 33/849 ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N

In reply to Greg Kroah-Hartman

From: Jaroslav Kysela <[email protected]>

commit 2a5bb694488bb6593066d46881bfd9d07edd1628 upstream.

Another model requires ALC255_FIXUP_ACER_MIC_NO_PRESENCE fixup.

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8466,6 +8466,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
author maintainer
#34 lore raw

PATCH 34/849 ALSA: hda/realtek: Add quirk for ASUS UX550VE

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 4fad4fb9871b43389e4f4bead18ec693064697bb upstream.

ASUS UX550VE (SSID 1043:1970) requires a similar workaround for managing the routing of the 4 speakers like some other ASUS models. Add a corresponding quirk entry for fixing it.

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8666,6 +8666,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
+	SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401),
 	SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
 	SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
 	SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
author maintainer
#35 lore raw

PATCH 35/849 ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED

In reply to Greg Kroah-Hartman

From: Kai-Heng Feng <[email protected]>

commit c058493df7edcef8f48c1494d9a84218519f966b upstream.

The mute and micmute LEDs don't work on HP EliteBook 840 G7. The same quirk for other HP laptops can let LEDs work, so apply it.

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -8606,6 +8606,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
 	SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
 	SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
author maintainer
#36 lore raw

PATCH 36/849 ALSA: ua101: fix division by zero at probe

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 55f261b73a7e1cb254577c3536cef8f415de220a upstream.

Add the missing endpoint max-packet sanity check to probe() to avoid division by zero in alloc_stream_buffers() in case a malicious device has broken descriptors (or when doing descriptor fuzz testing).

Note that USB core will reject URBs submitted for endpoints with zero wMaxPacketSize but that drivers doing packet-size calculations still need to handle this (cf. commit 2548288b4fb0 ("USB: Fix: Don't skip endpoint descriptors with maxpacket=0")).

---
 sound/usb/misc/ua101.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/usb/misc/ua101.c +2 -2
@@ -1000,7 +1000,7 @@ static int detect_usb_format(struct ua10
 		fmt_playback->bSubframeSize * ua->playback.channels;
 
 	epd = &ua->intf[INTF_CAPTURE]->altsetting[1].endpoint[0].desc;
-	if (!usb_endpoint_is_isoc_in(epd)) {
+	if (!usb_endpoint_is_isoc_in(epd) || usb_endpoint_maxp(epd) == 0) {
 		dev_err(&ua->dev->dev, "invalid capture endpoint\n");
 		return -ENXIO;
 	}
@@ -1008,7 +1008,7 @@ static int detect_usb_format(struct ua10
 	ua->capture.max_packet_bytes = usb_endpoint_maxp(epd);
 
 	epd = &ua->intf[INTF_PLAYBACK]->altsetting[1].endpoint[0].desc;
-	if (!usb_endpoint_is_isoc_out(epd)) {
+	if (!usb_endpoint_is_isoc_out(epd) || usb_endpoint_maxp(epd) == 0) {
 		dev_err(&ua->dev->dev, "invalid playback endpoint\n");
 		return -ENXIO;
 	}
author maintainer
#37 lore raw

PATCH 37/849 ALSA: 6fire: fix control and bulk message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 9b371c6cc37f954360989eec41c2ddc5a6b83917 upstream.

USB control and bulk message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes c6d43ba816d1 ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB")
Cc [email protected] # 2.6.39
---
 sound/usb/6fire/comm.c     |    2 +-
 sound/usb/6fire/firmware.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
sound/usb/6fire/comm.c +1 -1
@@ -95,7 +95,7 @@ static int usb6fire_comm_send_buffer(u8
 	int actual_len;
 
 	ret = usb_interrupt_msg(dev, usb_sndintpipe(dev, COMM_EP),
-			buffer, buffer[1] + 2, &actual_len, HZ);
+			buffer, buffer[1] + 2, &actual_len, 1000);
 	if (ret < 0)
 		return ret;
 	else if (actual_len != buffer[1] + 2)
sound/usb/6fire/firmware.c +3 -3
@@ -160,7 +160,7 @@ static int usb6fire_fw_ezusb_write(struc
 {
 	return usb_control_msg_send(device, 0, type,
 				    USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-				    value, 0, data, len, HZ, GFP_KERNEL);
+				    value, 0, data, len, 1000, GFP_KERNEL);
 }
 
 static int usb6fire_fw_ezusb_read(struct usb_device *device,
@@ -168,7 +168,7 @@ static int usb6fire_fw_ezusb_read(struct
 {
 	return usb_control_msg_recv(device, 0, type,
 				    USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-				    value, 0, data, len, HZ, GFP_KERNEL);
+				    value, 0, data, len, 1000, GFP_KERNEL);
 }
 
 static int usb6fire_fw_fpga_write(struct usb_device *device,
@@ -178,7 +178,7 @@ static int usb6fire_fw_fpga_write(struct
 	int ret;
 
 	ret = usb_bulk_msg(device, usb_sndbulkpipe(device, FPGA_EP), data, len,
-			&actual_len, HZ);
+			&actual_len, 1000);
 	if (ret < 0)
 		return ret;
 	else if (actual_len != len)
author maintainer
#38 lore raw

PATCH 38/849 ALSA: line6: fix control and interrupt message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit f4000b58b64344871d7b27c05e73932f137cfef6 upstream.

USB control and interrupt message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

---
 sound/usb/line6/driver.c   |   14 +++++++-------
 sound/usb/line6/driver.h   |    2 +-
 sound/usb/line6/podhd.c    |    6 +++---
 sound/usb/line6/toneport.c |    2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)
sound/usb/line6/driver.c +7 -7
@@ -113,12 +113,12 @@ int line6_send_raw_message(struct usb_li
 			retval = usb_interrupt_msg(line6->usbdev,
 						usb_sndintpipe(line6->usbdev, properties->ep_ctrl_w),
 						(char *)frag_buf, frag_size,
-						&partial, LINE6_TIMEOUT * HZ);
+						&partial, LINE6_TIMEOUT);
 		} else {
 			retval = usb_bulk_msg(line6->usbdev,
 						usb_sndbulkpipe(line6->usbdev, properties->ep_ctrl_w),
 						(char *)frag_buf, frag_size,
-						&partial, LINE6_TIMEOUT * HZ);
+						&partial, LINE6_TIMEOUT);
 		}
 
 		if (retval) {
@@ -347,7 +347,7 @@ int line6_read_data(struct usb_line6 *li
 	ret = usb_control_msg_send(usbdev, 0, 0x67,
 				   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
 				   (datalen << 8) | 0x21, address, NULL, 0,
-				   LINE6_TIMEOUT * HZ, GFP_KERNEL);
+				   LINE6_TIMEOUT, GFP_KERNEL);
 	if (ret) {
 		dev_err(line6->ifcdev, "read request failed (error %d)\n", ret);
 		goto exit;
@@ -360,7 +360,7 @@ int line6_read_data(struct usb_line6 *li
 		ret = usb_control_msg_recv(usbdev, 0, 0x67,
 					   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
 					   0x0012, 0x0000, &len, 1,
-					   LINE6_TIMEOUT * HZ, GFP_KERNEL);
+					   LINE6_TIMEOUT, GFP_KERNEL);
 		if (ret) {
 			dev_err(line6->ifcdev,
 				"receive length failed (error %d)\n", ret);
@@ -387,7 +387,7 @@ int line6_read_data(struct usb_line6 *li
 	/* receive the result: */
 	ret = usb_control_msg_recv(usbdev, 0, 0x67,
 				   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-				   0x0013, 0x0000, data, datalen, LINE6_TIMEOUT * HZ,
+				   0x0013, 0x0000, data, datalen, LINE6_TIMEOUT,
 				   GFP_KERNEL);
 	if (ret)
 		dev_err(line6->ifcdev, "read failed (error %d)\n", ret);
@@ -417,7 +417,7 @@ int line6_write_data(struct usb_line6 *l
 
 	ret = usb_control_msg_send(usbdev, 0, 0x67,
 				   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-				   0x0022, address, data, datalen, LINE6_TIMEOUT * HZ,
+				   0x0022, address, data, datalen, LINE6_TIMEOUT,
 				   GFP_KERNEL);
 	if (ret) {
 		dev_err(line6->ifcdev,
@@ -430,7 +430,7 @@ int line6_write_data(struct usb_line6 *l
 
 		ret = usb_control_msg_recv(usbdev, 0, 0x67,
 					   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-					   0x0012, 0x0000, status, 1, LINE6_TIMEOUT * HZ,
+					   0x0012, 0x0000, status, 1, LINE6_TIMEOUT,
 					   GFP_KERNEL);
 		if (ret) {
 			dev_err(line6->ifcdev,
sound/usb/line6/driver.h +1 -1
@@ -27,7 +27,7 @@
 #define LINE6_FALLBACK_INTERVAL 10
 #define LINE6_FALLBACK_MAXPACKETSIZE 16
 
-#define LINE6_TIMEOUT 1
+#define LINE6_TIMEOUT 1000
 #define LINE6_BUFSIZE_LISTEN 64
 #define LINE6_MIDI_MESSAGE_MAXLEN 256
 
sound/usb/line6/podhd.c +3 -3
@@ -190,7 +190,7 @@ static int podhd_dev_start(struct usb_li
 	ret = usb_control_msg_send(usbdev, 0,
 					0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
 					0x11, 0,
-					NULL, 0, LINE6_TIMEOUT * HZ, GFP_KERNEL);
+					NULL, 0, LINE6_TIMEOUT, GFP_KERNEL);
 	if (ret) {
 		dev_err(pod->line6.ifcdev, "read request failed (error %d)\n", ret);
 		goto exit;
@@ -200,7 +200,7 @@ static int podhd_dev_start(struct usb_li
 	ret = usb_control_msg_recv(usbdev, 0, 0x67,
 					USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
 					0x11, 0x0,
-					init_bytes, 3, LINE6_TIMEOUT * HZ, GFP_KERNEL);
+					init_bytes, 3, LINE6_TIMEOUT, GFP_KERNEL);
 	if (ret) {
 		dev_err(pod->line6.ifcdev,
 			"receive length failed (error %d)\n", ret);
@@ -220,7 +220,7 @@ static int podhd_dev_start(struct usb_li
 					USB_REQ_SET_FEATURE,
 					USB_TYPE_STANDARD | USB_RECIP_DEVICE | USB_DIR_OUT,
 					1, 0,
-					NULL, 0, LINE6_TIMEOUT * HZ, GFP_KERNEL);
+					NULL, 0, LINE6_TIMEOUT, GFP_KERNEL);
 exit:
 	return ret;
 }
sound/usb/line6/toneport.c +1 -1
@@ -128,7 +128,7 @@ static int toneport_send_cmd(struct usb_
 
 	ret = usb_control_msg_send(usbdev, 0, 0x67,
 				   USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-				   cmd1, cmd2, NULL, 0, LINE6_TIMEOUT * HZ,
+				   cmd1, cmd2, NULL, 0, LINE6_TIMEOUT,
 				   GFP_KERNEL);
 
 	if (ret) {
author maintainer
#39 lore raw

PATCH 39/849 ALSA: mixer: oss: Fix racy access to slots

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 411cef6adfb38a5bb6bd9af3941b28198e7fb680 upstream.

The OSS mixer can reassign the mapping slots dynamically via proc file. Although the addition and deletion of those slots are protected by mixer->reg_mutex, the access to slots aren't, hence this may cause UAF when the slots in use are deleted concurrently.

This patch applies the mixer->reg_mutex in all appropriate code paths (i.e. the ioctl functions) that may access slots.

---
 sound/core/oss/mixer_oss.c |   44 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 33 insertions(+), 11 deletions(-)
sound/core/oss/mixer_oss.c +33 -11
@@ -130,11 +130,13 @@ static int snd_mixer_oss_devmask(struct
 
 	if (mixer == NULL)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	for (chn = 0; chn < 31; chn++) {
 		pslot = &mixer->slots[chn];
 		if (pslot->put_volume || pslot->put_recsrc)
 			result |= 1 << chn;
 	}
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
@@ -146,11 +148,13 @@ static int snd_mixer_oss_stereodevs(stru
 
 	if (mixer == NULL)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	for (chn = 0; chn < 31; chn++) {
 		pslot = &mixer->slots[chn];
 		if (pslot->put_volume && pslot->stereo)
 			result |= 1 << chn;
 	}
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
@@ -161,6 +165,7 @@ static int snd_mixer_oss_recmask(struct
 
 	if (mixer == NULL)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	if (mixer->put_recsrc && mixer->get_recsrc) {	/* exclusive */
 		result = mixer->mask_recsrc;
 	} else {
@@ -172,6 +177,7 @@ static int snd_mixer_oss_recmask(struct
 				result |= 1 << chn;
 		}
 	}
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
@@ -182,12 +188,12 @@ static int snd_mixer_oss_get_recsrc(stru
 
 	if (mixer == NULL)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	if (mixer->put_recsrc && mixer->get_recsrc) {	/* exclusive */
-		int err;
 		unsigned int index;
-		err = mixer->get_recsrc(fmixer, &index);
-		if (err < 0)
-			return err;
+		result = mixer->get_recsrc(fmixer, &index);
+		if (result < 0)
+			goto unlock;
 		result = 1 << index;
 	} else {
 		struct snd_mixer_oss_slot *pslot;
@@ -202,7 +208,10 @@ static int snd_mixer_oss_get_recsrc(stru
 			}
 		}
 	}
-	return mixer->oss_recsrc = result;
+	mixer->oss_recsrc = result;
+ unlock:
+	mutex_unlock(&mixer->reg_mutex);
+	return result;
 }
 
 static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsrc)
@@ -215,6 +224,7 @@ static int snd_mixer_oss_set_recsrc(stru
 
 	if (mixer == NULL)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	if (mixer->get_recsrc && mixer->put_recsrc) {	/* exclusive input */
 		if (recsrc & ~mixer->oss_recsrc)
 			recsrc &= ~mixer->oss_recsrc;
@@ -240,6 +250,7 @@ static int snd_mixer_oss_set_recsrc(stru
 			}
 		}
 	}
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
@@ -251,6 +262,7 @@ static int snd_mixer_oss_get_volume(stru
 
 	if (mixer == NULL || slot > 30)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	pslot = &mixer->slots[slot];
 	left = pslot->volume[0];
 	right = pslot->volume[1];
@@ -258,15 +270,21 @@ static int snd_mixer_oss_get_volume(stru
 		result = pslot->get_volume(fmixer, pslot, &left, &right);
 	if (!pslot->stereo)
 		right = left;
-	if (snd_BUG_ON(left < 0 || left > 100))
-		return -EIO;
-	if (snd_BUG_ON(right < 0 || right > 100))
-		return -EIO;
+	if (snd_BUG_ON(left < 0 || left > 100)) {
+		result = -EIO;
+		goto unlock;
+	}
+	if (snd_BUG_ON(right < 0 || right > 100)) {
+		result = -EIO;
+		goto unlock;
+	}
 	if (result >= 0) {
 		pslot->volume[0] = left;
 		pslot->volume[1] = right;
 	 	result = (left & 0xff) | ((right & 0xff) << 8);
 	}
+ unlock:
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
@@ -279,6 +297,7 @@ static int snd_mixer_oss_set_volume(stru
 
 	if (mixer == NULL || slot > 30)
 		return -EIO;
+	mutex_lock(&mixer->reg_mutex);
 	pslot = &mixer->slots[slot];
 	if (left > 100)
 		left = 100;
@@ -289,10 +308,13 @@ static int snd_mixer_oss_set_volume(stru
 	if (pslot->put_volume)
 		result = pslot->put_volume(fmixer, pslot, left, right);
 	if (result < 0)
-		return result;
+		goto unlock;
 	pslot->volume[0] = left;
 	pslot->volume[1] = right;
- 	return (left & 0xff) | ((right & 0xff) << 8);
+	result = (left & 0xff) | ((right & 0xff) << 8);
+ unlock:
+	mutex_lock(&mixer->reg_mutex);
+	return result;
 }
 
 static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int cmd, unsigned long arg)
author maintainer
#40 lore raw

PATCH 40/849 ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume

In reply to Greg Kroah-Hartman

From: Pavel Skripkin <[email protected]>

commit 3ab7992018455ac63c33e9b3eaa7264e293e40f4 upstream.

In commit 411cef6adfb3 ("ALSA: mixer: oss: Fix racy access to slots") added mutex protection in snd_mixer_oss_set_volume(). Second mutex_lock() in same function looks like typo, fix it.

---
 sound/core/oss/mixer_oss.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/oss/mixer_oss.c +1 -1
@@ -313,7 +313,7 @@ static int snd_mixer_oss_set_volume(stru
 	pslot->volume[1] = right;
 	result = (left & 0xff) | ((right & 0xff) << 8);
  unlock:
-	mutex_lock(&mixer->reg_mutex);
+	mutex_unlock(&mixer->reg_mutex);
 	return result;
 }
 
author maintainer
#41 lore raw

PATCH 41/849 ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk

In reply to Greg Kroah-Hartman

From: Jason Ormes <[email protected]>

commit 8f27b689066113a3e579d4df171c980c54368c4e upstream.

Adding the Line6 HX-Stomp XL USB_ID as it needs this fixed frequency quirk as well.

The device is basically just the HX-Stomp with some more buttons on the face. I've done some recording with it after adding it, and it seems to function properly with this fix. The Midi features appear to be working as well.

[ a coding style fix and patch reformat by tiwai ]

---
 sound/usb/format.c |    1 +
 1 file changed, 1 insertion(+)
sound/usb/format.c +1 -0
@@ -414,6 +414,7 @@ static int line6_parse_audio_format_rate
 	case USB_ID(0x0e41, 0x4242): /* Line6 Helix Rack */
 	case USB_ID(0x0e41, 0x4244): /* Line6 Helix LT */
 	case USB_ID(0x0e41, 0x4246): /* Line6 HX-Stomp */
+	case USB_ID(0x0e41, 0x4253): /* Line6 HX-Stomp XL */
 	case USB_ID(0x0e41, 0x4247): /* Line6 Pod Go */
 	case USB_ID(0x0e41, 0x4248): /* Line6 Helix >= fw 2.82 */
 	case USB_ID(0x0e41, 0x4249): /* Line6 Helix Rack >= fw 2.82 */
author maintainer
#42 lore raw

PATCH 42/849 ALSA: usb-audio: Add registration quirk for JBL Quantum 400

In reply to Greg Kroah-Hartman

From: Alexander Tsoy <[email protected]>

commit 763d92ed5dece7d439fc28a88b2d2728d525ffd9 upstream.

Add another device ID for JBL Quantum 400. It requires the same quirk as other JBL Quantum devices.

---
 sound/usb/quirks.c |    1 +
 1 file changed, 1 insertion(+)
sound/usb/quirks.c +1 -0
@@ -1899,6 +1899,7 @@ static const struct registration_quirk r
 	REG_QUIRK_ENTRY(0x0951, 0x16ea, 2),	/* Kingston HyperX Cloud Flight S */
 	REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2),	/* JBL Quantum 600 */
 	REG_QUIRK_ENTRY(0x0ecb, 0x1f47, 2),	/* JBL Quantum 800 */
+	REG_QUIRK_ENTRY(0x0ecb, 0x1f4c, 2),	/* JBL Quantum 400 */
 	REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2),	/* JBL Quantum 400 */
 	REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2),	/* JBL Quantum 600 */
 	REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2),	/* JBL Quantum 800 */
author maintainer
#43 lore raw

PATCH 43/849 ALSA: hda: Free card instance properly at probe errors

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 39173303c83859723dab32c2abfb97296d6af3bf upstream.

The recent change in hda-intel driver to allow repeated probes surfaced a problem that has been hidden until; the probe process in the work calls azx_free() at the error path, and this skips the card free process that eventually releases codec instances. As a result, we get a kernel WARNING like:

snd_hda_intel 0000:00:1f.3: Cannot probe codecs, giving up

  ------------[ cut here ]------------
  WARNING: CPU: 14 PID: 186 at sound/hda/hdac_bus.c:73
  ....

For fixing this, we need to call snd_card_free() instead of azx_free(). Additionally, the device drvdata has to be cleared, as the driver binding itself is still active. Then the PM and other driver callbacks will ignore the procedure.

Fixes c0f1886de7e1 ("ALSA: hda: intel: Allow repeatedly probing on codec configuration errors")
Reported-and-tested-by Scott Branden <[email protected]>
---
 sound/pci/hda/hda_intel.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/pci/hda/hda_intel.c +2 -1
@@ -2358,7 +2358,8 @@ static int azx_probe_continue(struct azx
 
 out_free:
 	if (err < 0) {
-		azx_free(chip);
+		pci_set_drvdata(pci, NULL);
+		snd_card_free(chip->card);
 		return err;
 	}
 
author maintainer
#44 lore raw

PATCH 44/849 ALSA: synth: missing check for possible NULL after the call to kstrdup

In reply to Greg Kroah-Hartman

From: Austin Kim <[email protected]>

commit d159037abbe3412285c271bdfb9cdf19e62678ff upstream.

If kcalloc() return NULL due to memory starvation, it is possible for kstrdup() to return NULL in similar case. So add null check after the call to kstrdup() is made.

[ minor coding-style fix by tiwai ]

---
 sound/synth/emux/emux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/synth/emux/emux.c +1 -1
@@ -88,7 +88,7 @@ int snd_emux_register(struct snd_emux *e
 	emu->name = kstrdup(name, GFP_KERNEL);
 	emu->voices = kcalloc(emu->max_voices, sizeof(struct snd_emux_voice),
 			      GFP_KERNEL);
-	if (emu->voices == NULL)
+	if (emu->name == NULL || emu->voices == NULL)
 		return -ENOMEM;
 
 	/* create soundfont list */
author maintainer
#45 lore raw

PATCH 45/849 ALSA: PCM: Fix NULL dereference at mmap checks

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 8e537d5dec34cac746dd6abf6a83e5de3aa471fc upstream.

The recent refactoring of mmap handling caused Oops on some devices that don't use the standard memory allocations. This patch addresses it by allowing snd_dma_buffer_mmap() helper to receive the NULL pointer dmab argument (and return an error appropriately).

Fixes a202bd1ad86d ("ALSA: core: Move mmap handler into memalloc ops")
---
 sound/core/memalloc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
sound/core/memalloc.c +4 -1
@@ -135,8 +135,11 @@ EXPORT_SYMBOL(snd_dma_free_pages);
 int snd_dma_buffer_mmap(struct snd_dma_buffer *dmab,
 			struct vm_area_struct *area)
 {
-	const struct snd_malloc_ops *ops = snd_dma_get_ops(dmab);
+	const struct snd_malloc_ops *ops;
 
+	if (!dmab)
+		return -ENOENT;
+	ops = snd_dma_get_ops(dmab);
 	if (ops && ops->mmap)
 		return ops->mmap(dmab, area);
 	else
author maintainer
#46 lore raw

PATCH 46/849 ALSA: timer: Fix use-after-free problem

In reply to Greg Kroah-Hartman

From: Wang Wensheng <[email protected]>

commit c0317c0e87094f5b5782b6fdef5ae0a4b150496c upstream.

When the timer instance was add into ack_list but was not currently in process, the user could stop it via snd_timer_stop1() without delete it from the ack_list. Then the user could free the timer instance and when it was actually processed UAF occurred.

This issue could be reproduced via testcase snd_timer01 in ltp - running several instances of that testcase at the same time.

What I actually met was that the ack_list of the timer broken and the kernel went into deadloop with irqoff. That could be detected by hardlockup detector on board or when we run it on qemu, we could use gdb to dump the ack_list when the console has no response.

To fix this issue, we delete the timer instance from ack_list and active_list unconditionally in snd_timer_stop1().

---
 sound/core/timer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/timer.c +2 -2
@@ -624,13 +624,13 @@ static int snd_timer_stop1(struct snd_ti
 	if (!timer)
 		return -EINVAL;
 	spin_lock_irqsave(&timer->lock, flags);
+	list_del_init(&timeri->ack_list);
+	list_del_init(&timeri->active_list);
 	if (!(timeri->flags & (SNDRV_TIMER_IFLG_RUNNING |
 			       SNDRV_TIMER_IFLG_START))) {
 		result = -EBUSY;
 		goto unlock;
 	}
-	list_del_init(&timeri->ack_list);
-	list_del_init(&timeri->active_list);
 	if (timer->card && timer->card->shutdown)
 		goto unlock;
 	if (stop) {
author maintainer
#47 lore raw

PATCH 47/849 ALSA: timer: Unconditionally unlink slave instances, too

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit ffdd98277f0a1d15a67a74ae09bee713df4c0dbc upstream.

Like the previous fix (commit c0317c0e8709 "ALSA: timer: Fix use-after-free problem"), we have to unlink slave timer instances immediately at snd_timer_stop(), too. Otherwise it may leave a stale entry in the list if the slave instance is freed before actually running.

---
 sound/core/timer.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
sound/core/timer.c +6 -7
@@ -665,23 +665,22 @@ static int snd_timer_stop1(struct snd_ti
 static int snd_timer_stop_slave(struct snd_timer_instance *timeri, bool stop)
 {
 	unsigned long flags;
+	bool running;
 
 	spin_lock_irqsave(&slave_active_lock, flags);
-	if (!(timeri->flags & SNDRV_TIMER_IFLG_RUNNING)) {
-		spin_unlock_irqrestore(&slave_active_lock, flags);
-		return -EBUSY;
-	}
+	running = timeri->flags & SNDRV_TIMER_IFLG_RUNNING;
 	timeri->flags &= ~SNDRV_TIMER_IFLG_RUNNING;
 	if (timeri->timer) {
 		spin_lock(&timeri->timer->lock);
 		list_del_init(&timeri->ack_list);
 		list_del_init(&timeri->active_list);
-		snd_timer_notify1(timeri, stop ? SNDRV_TIMER_EVENT_STOP :
-				  SNDRV_TIMER_EVENT_PAUSE);
+		if (running)
+			snd_timer_notify1(timeri, stop ? SNDRV_TIMER_EVENT_STOP :
+					  SNDRV_TIMER_EVENT_PAUSE);
 		spin_unlock(&timeri->timer->lock);
 	}
 	spin_unlock_irqrestore(&slave_active_lock, flags);
-	return 0;
+	return running ? 0 : -EBUSY;
 }
 
 /*
author maintainer
#48 lore raw

PATCH 48/849 ext4: fix lazy initialization next schedule time computation in more granular unit

In reply to Greg Kroah-Hartman

From: Shaoying Xu <[email protected]>

commit 39fec6889d15a658c3a3ebb06fd69d3584ddffd3 upstream.

Ext4 file system has default lazy inode table initialization setup once it is mounted. However, it has issue on computing the next schedule time that makes the timeout same amount in jiffies but different real time in secs if with various HZ values. Therefore, fix by measuring the current time in a more granular unit nanoseconds and make the next schedule time independent of the HZ value.

Fixes bfff68738f1c ("ext4: add support for lazy inode table initialization")
---
 fs/ext4/super.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
fs/ext4/super.c +4 -5
@@ -3427,9 +3427,9 @@ static int ext4_run_li_request(struct ex
 	struct super_block *sb = elr->lr_super;
 	ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count;
 	ext4_group_t group = elr->lr_next_group;
-	unsigned long timeout = 0;
 	unsigned int prefetch_ios = 0;
 	int ret = 0;
+	u64 start_time;
 
 	if (elr->lr_mode == EXT4_LI_MODE_PREFETCH_BBITMAP) {
 		elr->lr_next_group = ext4_mb_prefetch(sb, group,
@@ -3466,14 +3466,13 @@ static int ext4_run_li_request(struct ex
 		ret = 1;
 
 	if (!ret) {
-		timeout = jiffies;
+		start_time = ktime_get_real_ns();
 		ret = ext4_init_inode_table(sb, group,
 					    elr->lr_timeout ? 0 : 1);
 		trace_ext4_lazy_itable_init(sb, group);
 		if (elr->lr_timeout == 0) {
-			timeout = (jiffies - timeout) *
-				EXT4_SB(elr->lr_super)->s_li_wait_mult;
-			elr->lr_timeout = timeout;
+			elr->lr_timeout = nsecs_to_jiffies((ktime_get_real_ns() - start_time) *
+				EXT4_SB(elr->lr_super)->s_li_wait_mult);
 		}
 		elr->lr_next_sched = jiffies + elr->lr_timeout;
 		elr->lr_next_group = group + 1;
author maintainer
#49 lore raw

PATCH 49/849 ext4: ensure enough credits in ext4_ext_shift_path_extents

In reply to Greg Kroah-Hartman

From: yangerkun <[email protected]>

commit 4268496e48dc681cfa53b92357314b5d7221e625 upstream.

Like ext4_ext_rm_leaf, we can ensure that there are enough credits before every call that will consume credits. As part of this fix we fold the functionality of ext4_access_path() into ext4_ext_shift_path_extents(). This change is needed as a preparation for the next bugfix patch.

---
 fs/ext4/extents.c |   49 +++++++++++++++----------------------------------
 1 file changed, 15 insertions(+), 34 deletions(-)
fs/ext4/extents.c +15 -34
@@ -4972,36 +4972,6 @@ int ext4_get_es_cache(struct inode *inod
 }
 
 /*
- * ext4_access_path:
- * Function to access the path buffer for marking it dirty.
- * It also checks if there are sufficient credits left in the journal handle
- * to update path.
- */
-static int
-ext4_access_path(handle_t *handle, struct inode *inode,
-		struct ext4_ext_path *path)
-{
-	int credits, err;
-
-	if (!ext4_handle_valid(handle))
-		return 0;
-
-	/*
-	 * Check if need to extend journal credits
-	 * 3 for leaf, sb, and inode plus 2 (bmap and group
-	 * descriptor) for each block group; assume two block
-	 * groups
-	 */
-	credits = ext4_writepage_trans_blocks(inode);
-	err = ext4_datasem_ensure_credits(handle, inode, 7, credits, 0);
-	if (err < 0)
-		return err;
-
-	err = ext4_ext_get_access(handle, inode, path);
-	return err;
-}
-
-/*
  * ext4_ext_shift_path_extents:
  * Shift the extents of a path structure lying between path[depth].p_ext
  * and EXT_LAST_EXTENT(path[depth].p_hdr), by @shift blocks. @SHIFT tells
@@ -5015,6 +4985,7 @@ ext4_ext_shift_path_extents(struct ext4_
 	int depth, err = 0;
 	struct ext4_extent *ex_start, *ex_last;
 	bool update = false;
+	int credits, restart_credits;
 	depth = path->p_depth;
 
 	while (depth >= 0) {
@@ -5024,13 +4995,23 @@ ext4_ext_shift_path_extents(struct ext4_
 				return -EFSCORRUPTED;
 
 			ex_last = EXT_LAST_EXTENT(path[depth].p_hdr);
+			/* leaf + sb + inode */
+			credits = 3;
+			if (ex_start == EXT_FIRST_EXTENT(path[depth].p_hdr)) {
+				update = true;
+				/* extent tree + sb + inode */
+				credits = depth + 2;
+			}
 
-			err = ext4_access_path(handle, inode, path + depth);
+			restart_credits = ext4_writepage_trans_blocks(inode);
+			err = ext4_datasem_ensure_credits(handle, inode, credits,
+					restart_credits, 0);
 			if (err)
 				goto out;
 
-			if (ex_start == EXT_FIRST_EXTENT(path[depth].p_hdr))
-				update = true;
+			err = ext4_ext_get_access(handle, inode, path + depth);
+			if (err)
+				goto out;
 
 			while (ex_start <= ex_last) {
 				if (SHIFT == SHIFT_LEFT) {
@@ -5061,7 +5042,7 @@ ext4_ext_shift_path_extents(struct ext4_
 		}
 
 		/* Update index too */
-		err = ext4_access_path(handle, inode, path + depth);
+		err = ext4_ext_get_access(handle, inode, path + depth);
 		if (err)
 			goto out;
 
author maintainer
#50 lore raw

PATCH 50/849 ext4: refresh the ext4_ext_path struct after dropping i_data_sem.

In reply to Greg Kroah-Hartman

From: yangerkun <[email protected]>

commit 1811bc401aa58c7bdb0df3205aa6613b49d32127 upstream.

After we drop i_data sem, we need to reload the ext4_ext_path structure since the extent tree can change once i_data_sem is released.

This addresses the BUG:

[52117.465187] ------------[ cut here ]------------
[52117.465686] kernel BUG at fs/ext4/extents.c:1756!
...
[52117.478306] Call Trace:
[52117.478565]  ext4_ext_shift_extents+0x3ee/0x710
[52117.479020]  ext4_fallocate+0x139c/0x1b40
[52117.479405]  ? __do_sys_newfstat+0x6b/0x80
[52117.479805]  vfs_fallocate+0x151/0x4b0
[52117.480177]  ksys_fallocate+0x4a/0xa0
[52117.480533]  __x64_sys_fallocate+0x22/0x30
[52117.480930]  do_syscall_64+0x35/0x80
[52117.481277]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[52117.481769] RIP: 0033:0x7fa062f855ca
---
 fs/ext4/extents.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
fs/ext4/extents.c +13 -1
@@ -5006,8 +5006,11 @@ ext4_ext_shift_path_extents(struct ext4_
 			restart_credits = ext4_writepage_trans_blocks(inode);
 			err = ext4_datasem_ensure_credits(handle, inode, credits,
 					restart_credits, 0);
-			if (err)
+			if (err) {
+				if (err > 0)
+					err = -EAGAIN;
 				goto out;
+			}
 
 			err = ext4_ext_get_access(handle, inode, path + depth);
 			if (err)
@@ -5081,6 +5084,7 @@ ext4_ext_shift_extents(struct inode *ino
 	int ret = 0, depth;
 	struct ext4_extent *extent;
 	ext4_lblk_t stop, *iterator, ex_start, ex_end;
+	ext4_lblk_t tmp = EXT_MAX_BLOCKS;
 
 	/* Let path point to the last extent */
 	path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL,
@@ -5134,11 +5138,15 @@ ext4_ext_shift_extents(struct inode *ino
 	 * till we reach stop. In case of right shift, iterator points to stop
 	 * and it is decreased till we reach start.
 	 */
+again:
 	if (SHIFT == SHIFT_LEFT)
 		iterator = &start;
 	else
 		iterator = &stop;
 
+	if (tmp != EXT_MAX_BLOCKS)
+		*iterator = tmp;
+
 	/*
 	 * Its safe to start updating extents.  Start and stop are unsigned, so
 	 * in case of right shift if extent with 0 block is reached, iterator
@@ -5167,6 +5175,7 @@ ext4_ext_shift_extents(struct inode *ino
 			}
 		}
 
+		tmp = *iterator;
 		if (SHIFT == SHIFT_LEFT) {
 			extent = EXT_LAST_EXTENT(path[depth].p_hdr);
 			*iterator = le32_to_cpu(extent->ee_block) +
@@ -5185,6 +5194,9 @@ ext4_ext_shift_extents(struct inode *ino
 		}
 		ret = ext4_ext_shift_path_extents(path, shift, inode,
 				handle, SHIFT);
+		/* iterator can be NULL which means we should break */
+		if (ret == -EAGAIN)
+			goto again;
 		if (ret)
 			break;
 	}
author maintainer
#51 lore raw

PATCH 51/849 fuse: fix page stealing

In reply to Greg Kroah-Hartman

From: Miklos Szeredi <[email protected]>

commit 712a951025c0667ff00b25afc360f74e639dfabe upstream.

It is possible to trigger a crash by splicing anon pipe bufs to the fuse device.

The reason for this is that anon_pipe_buf_release() will reuse buf->page if the refcount is 1, but that page might have already been stolen and its flags modified (e.g. PG_lru added).

This happens in the unlikely case of fuse_dev_splice_write() getting around to calling pipe_buf_release() after a page has been stolen, added to the page cache and removed from the page cache.

Fix by calling pipe_buf_release() right after the page was inserted into the page cache. In this case the page has an elevated refcount so any release function will know that the page isn't reusable.

---
 fs/fuse/dev.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
fs/fuse/dev.c +12 -2
@@ -847,6 +847,12 @@ static int fuse_try_move_page(struct fus
 
 	replace_page_cache_page(oldpage, newpage);
 
+	/*
+	 * Release while we have extra ref on stolen page.  Otherwise
+	 * anon_pipe_buf_release() might think the page can be reused.
+	 */
+	pipe_buf_release(cs->pipe, buf);
+
 	get_page(newpage);
 
 	if (!(buf->flags & PIPE_BUF_FLAG_LRU))
@@ -2031,8 +2037,12 @@ static ssize_t fuse_dev_splice_write(str
 
 	pipe_lock(pipe);
 out_free:
-	for (idx = 0; idx < nbuf; idx++)
-		pipe_buf_release(pipe, &bufs[idx]);
+	for (idx = 0; idx < nbuf; idx++) {
+		struct pipe_buffer *buf = &bufs[idx];
+
+		if (buf->ops)
+			pipe_buf_release(pipe, buf);
+	}
 	pipe_unlock(pipe);
 
 	kvfree(bufs);
author maintainer
#52 lore raw

PATCH 52/849 x86/sme: Use #define USE_EARLY_PGTABLE_L5 in mem_encrypt_identity.c

In reply to Greg Kroah-Hartman

From: Tom Lendacky <[email protected]>

commit e7d445ab26db833d6640d4c9a08bee176777cc82 upstream.

When runtime support for converting between 4-level and 5-level pagetables was added to the kernel, the SME code that built pagetables was updated to use the pagetable functions, e.g. p4d_offset(), etc., in order to simplify the code. However, the use of the pagetable functions in early boot code requires the use of the USE_EARLY_PGTABLE_L5 #define in order to ensure that the proper definition of pgtable_l5_enabled() is used.

Without the #define, pgtable_l5_enabled() is #defined as cpu_feature_enabled(X86_FEATURE_LA57). In early boot, the CPU features have not yet been discovered and populated, so pgtable_l5_enabled() will return false even when 5-level paging is enabled. This causes the SME code to always build 4-level pagetables to perform the in-place encryption. If 5-level paging is enabled, switching to the SME pagetables results in a page-fault that kills the boot.

Adding the #define results in pgtable_l5_enabled() using the __pgtable_l5_enabled variable set in early boot and the SME code building pagetables for the proper paging level.

---
 arch/x86/mm/mem_encrypt_identity.c |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/x86/mm/mem_encrypt_identity.c +9 -0
@@ -27,6 +27,15 @@
 #undef CONFIG_PARAVIRT_XXL
 #undef CONFIG_PARAVIRT_SPINLOCKS
 
+/*
+ * This code runs before CPU feature bits are set. By default, the
+ * pgtable_l5_enabled() function uses bit X86_FEATURE_LA57 to determine if
+ * 5-level paging is active, so that won't work here. USE_EARLY_PGTABLE_L5
+ * is provided to handle this situation and, instead, use a variable that
+ * has been set by the early boot code.
+ */
+#define USE_EARLY_PGTABLE_L5
+
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/mem_encrypt.h>
author maintainer
#53 lore raw

PATCH 53/849 x86/cpu: Fix migration safety with X86_BUG_NULL_SEL

In reply to Greg Kroah-Hartman

From: Jane Malalane <[email protected]>

commit 415de44076640483648d6c0f6d645a9ee61328ad upstream.

Currently, Linux probes for X86_BUG_NULL_SEL unconditionally which makes it unsafe to migrate in a virtualised environment as the properties across the migration pool might differ.

To be specific, the case which goes wrong is:

1. Zen1 (or earlier) and Zen2 (or later) in a migration pool
2. Linux boots on Zen2, probes and finds the absence of X86_BUG_NULL_SEL
3. Linux is then migrated to Zen1

Linux is now running on a X86_BUG_NULL_SEL-impacted CPU while believing that the bug is fixed.

The only way to address the problem is to fully trust the "no longer affected" CPUID bit when virtualised, because in the above case it would be clear deliberately to indicate the fact "you might migrate to somewhere which has this behaviour".

Zen3 adds the NullSelectorClearsBase CPUID bit to indicate that loading a NULL segment selector zeroes the base and limit fields, as well as just attributes. Zen2 also has this behaviour but doesn't have the NSCB bit.

[ bp: Minor touchups. ]

---
 arch/x86/kernel/cpu/amd.c    |    2 +
 arch/x86/kernel/cpu/common.c |   44 ++++++++++++++++++++++++++++++++++++-------
 arch/x86/kernel/cpu/cpu.h    |    1 
 arch/x86/kernel/cpu/hygon.c  |    2 +
 4 files changed, 42 insertions(+), 7 deletions(-)
arch/x86/kernel/cpu/amd.c +2 -0
@@ -989,6 +989,8 @@ static void init_amd(struct cpuinfo_x86
 	if (cpu_has(c, X86_FEATURE_IRPERF) &&
 	    !cpu_has_amd_erratum(c, amd_erratum_1054))
 		msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT);
+
+	check_null_seg_clears_base(c);
 }
 
 #ifdef CONFIG_X86_32
arch/x86/kernel/cpu/common.c +37 -7

64 lines not on this page · raw message

arch/x86/kernel/cpu/cpu.h +1 -0
@@ -75,6 +75,7 @@ extern int detect_extended_topology_earl
 extern int detect_extended_topology(struct cpuinfo_x86 *c);
 extern int detect_ht_early(struct cpuinfo_x86 *c);
 extern void detect_ht(struct cpuinfo_x86 *c);
+extern void check_null_seg_clears_base(struct cpuinfo_x86 *c);
 
 unsigned int aperfmperf_get_khz(int cpu);
 
arch/x86/kernel/cpu/hygon.c +2 -0
@@ -335,6 +335,8 @@ static void init_hygon(struct cpuinfo_x8
 	/* Hygon CPUs don't reset SS attributes on SYSRET, Xen does. */
 	if (!cpu_has(c, X86_FEATURE_XENPV))
 		set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
+
+	check_null_seg_clears_base(c);
 }
 
 static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c)
author maintainer
#54 lore raw

PATCH 54/849 x86/irq: Ensure PI wakeup handler is unregistered before module unload

In reply to Greg Kroah-Hartman

From: Sean Christopherson <[email protected]>

commit 6ff53f6a438f72998f56e82e76694a1df9d1ea2c upstream.

Add a synchronize_rcu() after clearing the posted interrupt wakeup handler to ensure all readers, i.e. in-flight IRQ handlers, see the new handler before returning to the caller. If the caller is an exiting module and is unregistering its handler, failure to wait could result in the IRQ handler jumping into an unloaded module.

The registration path doesn't require synchronization, as it's the caller's responsibility to not generate interrupts it cares about until after its handler is registered.

Fixes f6b3c72c2366 ("x86/irq: Define a global vector for VT-d Posted-Interrupts")

Message-Id: <[email protected]>

---
 arch/x86/kernel/irq.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/irq.c +3 -1
@@ -291,8 +291,10 @@ void kvm_set_posted_intr_wakeup_handler(
 {
 	if (handler)
 		kvm_posted_intr_wakeup_handler = handler;
-	else
+	else {
 		kvm_posted_intr_wakeup_handler = dummy_handler;
+		synchronize_rcu();
+	}
 }
 EXPORT_SYMBOL_GPL(kvm_set_posted_intr_wakeup_handler);
 
author maintainer
#55 lore raw

PATCH 55/849 x86/iopl: Fake iopl(3) CLI/STI usage

In reply to Greg Kroah-Hartman

From: Peter Zijlstra <[email protected]>

commit b968e84b509da593c50dc3db679e1d33de701f78 upstream.

Since commit c8137ace5638 ("x86/iopl: Restrict iopl() permission scope") it's possible to emulate iopl(3) using ioperm(), except for the CLI/STI usage.

Userspace CLI/STI usage is very dubious (read broken), since any exception taken during that window can lead to rescheduling anyway (or worse). The IOPL(2) manpage even states that usage of CLI/STI is highly discouraged and might even crash the system.

Of course, that won't stop people and HP has the dubious honour of being the first vendor to be found using this in their hp-health package.

In order to enable this 'software' to still 'work', have the #GP treat the CLI/STI instructions as NOPs when iopl(3). Warn the user that their program is doing dubious things.

---
 arch/x86/include/asm/insn-eval.h |    1 +
 arch/x86/include/asm/processor.h |    1 +
 arch/x86/kernel/process.c        |    1 +
 arch/x86/kernel/traps.c          |   33 +++++++++++++++++++++++++++++++++
 arch/x86/lib/insn-eval.c         |    2 +-
 5 files changed, 37 insertions(+), 1 deletion(-)
arch/x86/include/asm/insn-eval.h +1 -0
@@ -21,6 +21,7 @@ int insn_get_modrm_rm_off(struct insn *i
 int insn_get_modrm_reg_off(struct insn *insn, struct pt_regs *regs);
 unsigned long insn_get_seg_base(struct pt_regs *regs, int seg_reg_idx);
 int insn_get_code_seg_params(struct pt_regs *regs);
+int insn_get_effective_ip(struct pt_regs *regs, unsigned long *ip);
 int insn_fetch_from_user(struct pt_regs *regs,
 			 unsigned char buf[MAX_INSN_SIZE]);
 int insn_fetch_from_user_inatomic(struct pt_regs *regs,
arch/x86/include/asm/processor.h +1 -0
@@ -516,6 +516,7 @@ struct thread_struct {
 	 */
 	unsigned long		iopl_emul;
 
+	unsigned int		iopl_warn:1;
 	unsigned int		sig_on_uaccess_err:1;
 
 	/*
arch/x86/kernel/process.c +1 -0
@@ -132,6 +132,7 @@ int copy_thread(unsigned long clone_flag
 	frame->ret_addr = (unsigned long) ret_from_fork;
 	p->thread.sp = (unsigned long) fork_frame;
 	p->thread.io_bitmap = NULL;
+	p->thread.iopl_warn = 0;
 	memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
 
 #ifdef CONFIG_X86_64
arch/x86/kernel/traps.c +33 -0
@@ -528,6 +528,36 @@ static enum kernel_gp_hint get_kernel_gp
 
 #define GPFSTR "general protection fault"
 
+static bool fixup_iopl_exception(struct pt_regs *regs)
+{
+	struct thread_struct *t = &current->thread;
+	unsigned char byte;
+	unsigned long ip;
+
+	if (!IS_ENABLED(CONFIG_X86_IOPL_IOPERM) || t->iopl_emul != 3)
+		return false;
+
+	if (insn_get_effective_ip(regs, &ip))
+		return false;
+
+	if (get_user(byte, (const char __user *)ip))
+		return false;
+
+	if (byte != 0xfa && byte != 0xfb)
+		return false;
+
+	if (!t->iopl_warn && printk_ratelimit()) {
+		pr_err("%s[%d] attempts to use CLI/STI, pretending it's a NOP, ip:%lx",
+		       current->comm, task_pid_nr(current), ip);
+		print_vma_addr(KERN_CONT " in ", ip);
+		pr_cont("\n");
+		t->iopl_warn = 1;
+	}
+
+	regs->ip += 1;
+	return true;
+}
+
 DEFINE_IDTENTRY_ERRORCODE(exc_general_protection)
 {
 	char desc[sizeof(GPFSTR) + 50 + 2*sizeof(unsigned long) + 1] = GPFSTR;
@@ -553,6 +583,9 @@ DEFINE_IDTENTRY_ERRORCODE(exc_general_pr
 	tsk = current;
 
 	if (user_mode(regs)) {
+		if (fixup_iopl_exception(regs))
+			goto exit;
+
 		tsk->thread.error_code = error_code;
 		tsk->thread.trap_nr = X86_TRAP_GP;
 
arch/x86/lib/insn-eval.c +1 -1
@@ -1417,7 +1417,7 @@ void __user *insn_get_addr_ref(struct in
 	}
 }
 
-static int insn_get_effective_ip(struct pt_regs *regs, unsigned long *ip)
+int insn_get_effective_ip(struct pt_regs *regs, unsigned long *ip)
 {
 	unsigned long seg_base = 0;
 
author maintainer
#56 lore raw

PATCH 56/849 KVM: arm64: Report corrupted refcount at EL2

In reply to Greg Kroah-Hartman

From: Quentin Perret <[email protected]>

[ Upstream commit 7615c2a514788559c6684234b8fc27f3a843c2c6 ]

Some of the refcount manipulation helpers used at EL2 are instrumented to catch a corrupted state, but not all of them are treated equally. Let's make things more consistent by instrumenting hyp_page_ref_dec_and_test() as well.

---
 arch/arm64/kvm/hyp/nvhe/page_alloc.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kvm/hyp/nvhe/page_alloc.c +1 -0
index a6e874e61a40e..0bd7701ad1df5 100644
@@ -152,6 +152,7 @@ static inline void hyp_page_ref_inc(struct hyp_page *p)
 
 static inline int hyp_page_ref_dec_and_test(struct hyp_page *p)
 {
+	BUG_ON(!p->refcount);
 	p->refcount--;
 	return (p->refcount == 0);
 }
Signature · 1 line
2.33.0
author maintainer
#57 lore raw

PATCH 57/849 ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked()

In reply to Greg Kroah-Hartman

From: Yang Yingliang <[email protected]>

[ Upstream commit c448b7aa3e66042fc0f849d9a0fb90d1af82e948 ]

'component' is allocated in snd_soc_register_component(), but component->list is not initalized, this may cause snd_soc_del_component_unlocked() deref null ptr in the error handing case.

KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
RIP: 0010:__list_del_entry_valid+0x81/0xf0
Call Trace:
 snd_soc_del_component_unlocked+0x69/0x1b0 [snd_soc_core]
 snd_soc_add_component.cold+0x54/0x6c [snd_soc_core]
 snd_soc_register_component+0x70/0x90 [snd_soc_core]
 devm_snd_soc_register_component+0x5e/0xd0 [snd_soc_core]
 tas2552_probe+0x265/0x320 [snd_soc_tas2552]
 ? tas2552_component_probe+0x1e0/0x1e0 [snd_soc_tas2552]
 i2c_device_probe+0xa31/0xbe0

Fix by adding INIT_LIST_HEAD() to snd_soc_component_initialize().

---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/soc-core.c +1 -0
index 583f2381cfc82..e926985bb2f87 100644
@@ -2599,6 +2599,7 @@ int snd_soc_component_initialize(struct snd_soc_component *component,
 	INIT_LIST_HEAD(&component->dai_list);
 	INIT_LIST_HEAD(&component->dobj_list);
 	INIT_LIST_HEAD(&component->card_list);
+	INIT_LIST_HEAD(&component->list);
 	mutex_init(&component->io_mutex);
 
 	component->name = fmt_single_name(dev, &component->id);
Signature · 1 line
2.33.0
author maintainer
#58 lore raw

PATCH 58/849 ASoC: cs42l42: Ensure 0dB full scale volume is used for headsets

In reply to Greg Kroah-Hartman

From: Stefan Binding <[email protected]>

[ Upstream commit aa18457c4af7a9dad1f2b150b11beae1d8ab57aa ]

Ensure the default 0dB playback path is always used.

The code that set FULL_SCALE_VOL based on LOAD_DET_RCSTAT was spurious, and resulted in a -6dB attenuation being accidentally inserted into the playback path.

---
 sound/soc/codecs/cs42l42.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
sound/soc/codecs/cs42l42.c +3 -13
index 99c022be94a68..8838b9a0de8e4 100644
@@ -901,7 +901,6 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 	struct snd_soc_component *component = dai->component;
 	struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
 	unsigned int regval;
-	u8 fullScaleVol;
 	int ret;
 
 	if (mute) {
@@ -972,20 +971,11 @@ static int cs42l42_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 		cs42l42->stream_use |= 1 << stream;
 
 		if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
-			/* Read the headphone load */
-			regval = snd_soc_component_read(component, CS42L42_LOAD_DET_RCSTAT);
-			if (((regval & CS42L42_RLA_STAT_MASK) >> CS42L42_RLA_STAT_SHIFT) ==
-			    CS42L42_RLA_STAT_15_OHM) {
-				fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK;
-			} else {
-				fullScaleVol = 0;
-			}
-
-			/* Un-mute the headphone, set the full scale volume flag */
+			/* Un-mute the headphone */
 			snd_soc_component_update_bits(component, CS42L42_HP_CTL,
 						      CS42L42_HP_ANA_AMUTE_MASK |
-						      CS42L42_HP_ANA_BMUTE_MASK |
-						      CS42L42_HP_FULL_SCALE_VOL_MASK, fullScaleVol);
+						      CS42L42_HP_ANA_BMUTE_MASK,
+						      0);
 		}
 	}
 
Signature · 1 line
2.33.0
author maintainer
#59 lore raw

PATCH 59/849 ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers

In reply to Greg Kroah-Hartman

From: Davide Baldo <[email protected]>

[ Upstream commit d94befbb5ae379f6dfd4fa6d460eacc09fa7b9c3 ]

In laptop 'HP Spectre x360 Convertible 15-eb1xxx/8811' both front and rear speakers are silent, this patch fixes that by overriding the pin layout and by initializing the amplifier which needs a GPIO pin to be set to 1 then 0, similar to the existing HP Spectre x360 14 model.

In order to have volume control, both front and rear speakers were forced to use the DAC1.

This patch also correctly map the mute LED but since there is no microphone on/off switch exposed by the alsa subsystem it never turns on by itself.

There are still known audio issues in this laptop: headset microphone doesn't work, the button to mute/unmute microphone is not yet mapped, the LED of the mute/unmute speakers doesn't seems to be exposed via GPIO and never turns on.

---
 sound/pci/hda/patch_realtek.c | 46 +++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
sound/pci/hda/patch_realtek.c +46 -0
index ae2974dfd83f6..752857908e466 100644
@@ -6430,6 +6430,44 @@ static void alc_fixup_no_int_mic(struct hda_codec *codec,
 	}
 }
 
+/* GPIO1 = amplifier on/off
+ * GPIO3 = mic mute LED
+ */
+static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
+					  const struct hda_fixup *fix, int action)
+{
+	static const hda_nid_t conn[] = { 0x02 };
+
+	struct alc_spec *spec = codec->spec;
+	static const struct hda_pintbl pincfgs[] = {
+		{ 0x14, 0x90170110 },  /* front/high speakers */
+		{ 0x17, 0x90170130 },  /* back/bass speakers */
+		{ }
+	};
+
+	//enable micmute led
+	alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04);
+
+	switch (action) {
+	case HDA_FIXUP_ACT_PRE_PROBE:
+		spec->micmute_led_polarity = 1;
+		/* needed for amp of back speakers */
+		spec->gpio_mask |= 0x01;
+		spec->gpio_dir |= 0x01;
+		snd_hda_apply_pincfgs(codec, pincfgs);
+		/* share DAC to have unified volume control */
+		snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
+		snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+		break;
+	case HDA_FIXUP_ACT_INIT:
+		/* need to toggle GPIO to enable the amp of back speakers */
+		alc_update_gpio_data(codec, 0x01, true);
+		msleep(100);
+		alc_update_gpio_data(codec, 0x01, false);
+		break;
+	}
+}
+
 static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
 					  const struct hda_fixup *fix, int action)
 {
@@ -6582,6 +6620,7 @@ enum {
 	ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED,
 	ALC280_FIXUP_HP_9480M,
 	ALC245_FIXUP_HP_X360_AMP,
+	ALC285_FIXUP_HP_SPECTRE_X360_EB1,
 	ALC288_FIXUP_DELL_HEADSET_MODE,
 	ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC288_FIXUP_DELL_XPS_13,
@@ -8279,6 +8318,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc285_fixup_hp_spectre_x360,
 	},
+	[ALC285_FIXUP_HP_SPECTRE_X360_EB1] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc285_fixup_hp_spectre_x360_eb1
+	},
 	[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc285_fixup_ideapad_s740_coef,
@@ -8629,6 +8672,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
 	SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
+	SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
 	SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
@@ -9055,6 +9100,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
 	{.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"},
 	{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
 	{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
+	{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
 	{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
 	{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
 	{.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"},
Signature · 1 line
2.33.0
author maintainer
#60 lore raw

PATCH 60/849 ptp: fix error print of ptp_kvm on X86_64 platform

In reply to Greg Kroah-Hartman

From: Kele Huang <[email protected]>

[ Upstream commit c2402d43d183b11445aed921e7bebcd47ef222f1 ]

Commit a86ed2cfa13c5 ("ptp: Don't print an error if ptp_kvm is not supported") fixes the error message print on ARM platform by only concerning about the case that the error returned from kvm_arch_ptp_init() is not -EOPNOTSUPP. Although the ARM platform returns -EOPNOTSUPP if ptp_kvm is not supported while X86_64 platform returns -KVM_EOPNOTSUPP, both error codes share the same value 95.

Actually kvm_arch_ptp_init() on X86_64 platform can return three kinds of errors (-KVM_ENOSYS, -KVM_EOPNOTSUPP and -KVM_EFAULT). The problem is that -KVM_EOPNOTSUPP is masked out and -KVM_EFAULT is ignored among them. This patch fixes this by returning them to ptp_kvm_init() respectively.

---
 drivers/ptp/ptp_kvm_x86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ptp/ptp_kvm_x86.c +2 -2
index d0096cd7096a8..4991054a21350 100644
@@ -31,10 +31,10 @@ int kvm_arch_ptp_init(void)
 
 	ret = kvm_hypercall2(KVM_HC_CLOCK_PAIRING, clock_pair_gpa,
 			     KVM_CLOCK_PAIRING_WALLCLOCK);
-	if (ret == -KVM_ENOSYS || ret == -KVM_EOPNOTSUPP)
+	if (ret == -KVM_ENOSYS)
 		return -ENODEV;
 
-	return 0;
+	return ret;
 }
 
 int kvm_arch_ptp_get_clock(struct timespec64 *ts)
Signature · 1 line
2.33.0
author maintainer
#61 lore raw

PATCH 61/849 net: sparx5: Add of_node_put() before goto

In reply to Greg Kroah-Hartman

From: Wan Jiabing <[email protected]>

[ Upstream commit d9fd7e9fccfac466fb528a783f2fc76f2982604c ]

Fix following coccicheck warning:
./drivers/net/ethernet/microchip/sparx5/s4parx5_main.c:723:1-33: WARNING: Function for_each_available_child_of_node should have of_node_put() before goto

Early exits from for_each_available_child_of_node should decrement the node reference counter.

---
 drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/microchip/sparx5/sparx5_main.c +1 -0
index f666133a15dea..6e9058265d43e 100644
@@ -743,6 +743,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
 			err = dev_err_probe(sparx5->dev, PTR_ERR(serdes),
 					    "port %u: missing serdes\n",
 					    portno);
+			of_node_put(portnp);
 			goto cleanup_config;
 		}
 		config->portno = portno;
Signature · 1 line
2.33.0
author maintainer
#62 lore raw

PATCH 62/849 net: mscc: ocelot: Add of_node_put() before goto

In reply to Greg Kroah-Hartman

From: Wan Jiabing <[email protected]>

[ Upstream commit d1a7b9e4696584ce05c12567762c18a866837a85 ]

Fix following coccicheck warning:
./drivers/net/ethernet/mscc/ocelot_vsc7514.c:946:1-33: WARNING: Function for_each_available_child_of_node should have of_node_put() before goto.

Early exits from for_each_available_child_of_node should decrement the node reference counter.

---
 drivers/net/ethernet/mscc/ocelot_vsc7514.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mscc/ocelot_vsc7514.c +1 -0
index 4bd7e9d9ec61c..03cfa0dc7bf99 100644
@@ -972,6 +972,7 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev,
 		target = ocelot_regmap_init(ocelot, res);
 		if (IS_ERR(target)) {
 			err = PTR_ERR(target);
+			of_node_put(portnp);
 			goto out_teardown;
 		}
 
Signature · 1 line
2.33.0
author maintainer
#63 lore raw

PATCH 63/849 cavium: Return negative value when pci_alloc_irq_vectors() fails

In reply to Greg Kroah-Hartman

From: Zheyu Ma <[email protected]>

[ Upstream commit b2cddb44bddc1a9c5949a978bb454bba863264db ]

During the process of driver probing, the probe function should return < 0 for failure, otherwise, the kernel will treat value > 0 as success.

---
 drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/cavium/thunder/nic_main.c +1 -1
index 9361f964bb9b2..816453a4f8d6c 100644
@@ -1193,7 +1193,7 @@ static int nic_register_interrupts(struct nicpf *nic)
 		dev_err(&nic->pdev->dev,
 			"Request for #%d msix vectors failed, returned %d\n",
 			   nic->num_vec, ret);
-		return 1;
+		return ret;
 	}
 
 	/* Register mailbox interrupt handler */
Signature · 1 line
2.33.0
author maintainer
#64 lore raw

PATCH 64/849 scsi: qla2xxx: Return -ENOMEM if kzalloc() fails

In reply to Greg Kroah-Hartman

From: Zheyu Ma <[email protected]>

[ Upstream commit 06634d5b6e923ed0d4772aba8def5a618f44c7fe ]

The driver probing function should return < 0 for failure, otherwise kernel will treat value > 0 as success.

---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
index 0d25d2baa35e7..b48d2344fd4ce 100644
@@ -4073,7 +4073,7 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
 					ql_dbg_pci(ql_dbg_init, ha->pdev,
 					    0xe0ee, "%s: failed alloc dsd\n",
 					    __func__);
-					return 1;
+					return -ENOMEM;
 				}
 				ha->dif_bundle_kallocs++;
 
Signature · 1 line
2.33.0
author maintainer
#65 lore raw

PATCH 65/849 scsi: qla2xxx: Fix unmap of already freed sgl

In reply to Greg Kroah-Hartman

From: Dmitry Bogdanov <[email protected]>

[ Upstream commit 4a8f71014b4d56c4fb287607e844c0a9f68f46d9 ]

The sgl is freed in the target stack in target_release_cmd_kref() before calling qlt_free_cmd() but there is an unmap of sgl in qlt_free_cmd() that causes a panic if sgl is not yet DMA unmapped:

NIP dma_direct_unmap_sg+0xdc/0x180
LR dma_direct_unmap_sg+0xc8/0x180

Call Trace:
 ql_dbg_prefix+0x68/0xc0 [qla2xxx] (unreliable)
 dma_unmap_sg_attrs+0x54/0xf0
 qlt_unmap_sg.part.19+0x54/0x1c0 [qla2xxx]
 qlt_free_cmd+0x124/0x1d0 [qla2xxx]
 tcm_qla2xxx_release_cmd+0x4c/0xa0 [tcm_qla2xxx]
 target_put_sess_cmd+0x198/0x370 [target_core_mod]
 transport_generic_free_cmd+0x6c/0x1b0 [target_core_mod]
 tcm_qla2xxx_complete_free+0x6c/0x90 [tcm_qla2xxx]

The sgl may be left unmapped in error cases of response sending. For instance, qlt_rdy_to_xfer() maps sgl and exits when session is being deleted keeping the sgl mapped.

This patch removes use-after-free of the sgl and ensures that the sgl is unmapped for any command that was not sent to firmware.

---
 drivers/scsi/qla2xxx/qla_target.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +5 -9
index eb47140a899fe..41219f4f1e114 100644
@@ -3261,8 +3261,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
 			"RESET-RSP online/active/old-count/new-count = %d/%d/%d/%d.\n",
 			vha->flags.online, qla2x00_reset_active(vha),
 			cmd->reset_count, qpair->chip_reset);
-		spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
-		return 0;
+		goto out_unmap_unlock;
 	}
 
 	/* Does F/W have an IOCBs for this request */
@@ -3385,10 +3384,6 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
 	prm.sg = NULL;
 	prm.req_cnt = 1;
 
-	/* Calculate number of entries and segments required */
-	if (qlt_pci_map_calc_cnt(&prm) != 0)
-		return -EAGAIN;
-
 	if (!qpair->fw_started || (cmd->reset_count != qpair->chip_reset) ||
 	    (cmd->sess && cmd->sess->deleted)) {
 		/*
@@ -3406,6 +3401,10 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
 		return 0;
 	}
 
+	/* Calculate number of entries and segments required */
+	if (qlt_pci_map_calc_cnt(&prm) != 0)
+		return -EAGAIN;
+
 	spin_lock_irqsave(qpair->qp_lock_ptr, flags);
 	/* Does F/W have an IOCBs for this request */
 	res = qlt_check_reserve_free_req(qpair, prm.req_cnt);
@@ -3810,9 +3809,6 @@ void qlt_free_cmd(struct qla_tgt_cmd *cmd)
 
 	BUG_ON(cmd->cmd_in_wq);
 
-	if (cmd->sg_mapped)
-		qlt_unmap_sg(cmd->vha, cmd);
-
 	if (!cmd->q_full)
 		qlt_decr_num_pend_cmds(cmd->vha);
 
Signature · 1 line
2.33.0
author maintainer
#66 lore raw

PATCH 66/849 mISDN: Fix return values of the probe function

In reply to Greg Kroah-Hartman

From: Zheyu Ma <[email protected]>

[ Upstream commit e211210098cb7490db2183d725f5c0f10463a704 ]

During the process of driver probing, the probe function should return < 0 for failure, otherwise, the kernel will treat value > 0 as success.

---
 drivers/isdn/hardware/mISDN/hfcpci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/isdn/hardware/mISDN/hfcpci.c +4 -4
index e501cb03f211d..bd087cca1c1d2 100644
@@ -1994,14 +1994,14 @@ setup_hw(struct hfc_pci *hc)
 	pci_set_master(hc->pdev);
 	if (!hc->irq) {
 		printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
-		return 1;
+		return -EINVAL;
 	}
 	hc->hw.pci_io =
 		(char __iomem *)(unsigned long)hc->pdev->resource[1].start;
 
 	if (!hc->hw.pci_io) {
 		printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
-		return 1;
+		return -ENOMEM;
 	}
 	/* Allocate memory for FIFOS */
 	/* the memory needs to be on a 32k boundary within the first 4G */
@@ -2012,7 +2012,7 @@ setup_hw(struct hfc_pci *hc)
 	if (!buffer) {
 		printk(KERN_WARNING
 		       "HFC-PCI: Error allocating memory for FIFO!\n");
-		return 1;
+		return -ENOMEM;
 	}
 	hc->hw.fifos = buffer;
 	pci_write_config_dword(hc->pdev, 0x80, hc->hw.dmahandle);
@@ -2022,7 +2022,7 @@ setup_hw(struct hfc_pci *hc)
 		       "HFC-PCI: Error in ioremap for PCI!\n");
 		dma_free_coherent(&hc->pdev->dev, 0x8000, hc->hw.fifos,
 				  hc->hw.dmahandle);
-		return 1;
+		return -ENOMEM;
 	}
 
 	printk(KERN_INFO
Signature · 1 line
2.33.0
author maintainer
#67 lore raw

PATCH 67/849 cavium: Fix return values of the probe function

In reply to Greg Kroah-Hartman

From: Zheyu Ma <[email protected]>

[ Upstream commit c69b2f46876825c726bd8a97c7fa852d8932bc32 ]

During the process of driver probing, the probe function should return < 0 for failure, otherwise, the kernel will treat value > 0 as success.

---
 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/thunder/nicvf_main.c +2 -2
index e2b290135fd97..a61107e05216c 100644
@@ -1224,7 +1224,7 @@ static int nicvf_register_misc_interrupt(struct nicvf *nic)
 	if (ret < 0) {
 		netdev_err(nic->netdev,
 			   "Req for #%d msix vectors failed\n", nic->num_vec);
-		return 1;
+		return ret;
 	}
 
 	sprintf(nic->irq_name[irq], "%s Mbox", "NICVF");
@@ -1243,7 +1243,7 @@ static int nicvf_register_misc_interrupt(struct nicvf *nic)
 	if (!nicvf_check_pf_ready(nic)) {
 		nicvf_disable_intr(nic, NICVF_INTR_MBOX, 0);
 		nicvf_unregister_interrupts(nic);
-		return 1;
+		return -EIO;
 	}
 
 	return 0;
Signature · 1 line
2.33.0
author maintainer
#68 lore raw

PATCH 68/849 sfc: Export fibre-specific supported link modes

In reply to Greg Kroah-Hartman

From: Erik Ekman <[email protected]>

[ Upstream commit c62041c5baa9ded3bc6fd38d3f724de70683b489 ]

The 1/10GbaseT modes were set up for cards with SFP+ cages in 3497ed8c852a5 ("sfc: report supported link speeds on SFP connections"). 10GbaseT was likely used since no 10G fibre mode existed.

The missing fibre modes for 1/10G were added to ethtool.h in 5711a9822144 ("net: ethtool: add support for 1000BaseX and missing 10G link modes") shortly thereafter.

The user guide available at https://support-nic.xilinx.com/wp/drivers
lists support for the following cable and transceiver types in section 2.9:
- QSFP28 100G Direct Attach Cables
- QSFP28 100G SR Optical Transceivers (with SR4 modules listed)
- SFP28 25G Direct Attach Cables
- SFP28 25G SR Optical Transceivers
- QSFP+ 40G Direct Attach Cables
- QSFP+ 40G Active Optical Cables
- QSFP+ 40G SR4 Optical Transceivers
- QSFP+ to SFP+ Breakout Direct Attach Cables
- QSFP+ to SFP+ Breakout Active Optical Cables
- SFP+ 10G Direct Attach Cables
- SFP+ 10G SR Optical Transceivers
- SFP+ 10G LR Optical Transceivers
- SFP 1000BASE‐T Transceivers
- 1G Optical Transceivers
(From user guide issue 28. Issue 16 which also includes older cards like SFN5xxx/SFN6xxx has matching lists for 1/10/40G transceiver types.)

Regarding SFP+ 10GBASE‐T transceivers the latest guide says:
"Solarflare adapters do not support 10GBASE‐T transceiver modules."

Tested using SFN5122F-R7 (with 2 SFP+ ports). Supported link modes do not change depending on module used (tested with 1000BASE-T, 1000BASE-BX10, 10GBASE-LR). Before:

$ ethtool ext
Settings for ext:
	Supported ports: [ FIBRE ]
	Supported link modes:   1000baseT/Full
	                        10000baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: No
	Supported FEC modes: Not reported
	Advertised link modes:  Not reported
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  Not reported
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: No
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: off
	Port: FIBRE
	PHYAD: 255
	Transceiver: internal
        Current message level: 0x000020f7 (8439)
                               drv probe link ifdown ifup rx_err tx_err hw
	Link detected: yes

After:

$ ethtool ext
Settings for ext:
	Supported ports: [ FIBRE ]
	Supported link modes:   1000baseT/Full
	                        1000baseX/Full
	                        10000baseCR/Full
	                        10000baseSR/Full
	                        10000baseLR/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: No
	Supported FEC modes: Not reported
	Advertised link modes:  Not reported
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  Not reported
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: No
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: off
	Port: FIBRE
	PHYAD: 255
	Transceiver: internal
	Supports Wake-on: g
	Wake-on: d
        Current message level: 0x000020f7 (8439)
                               drv probe link ifdown ifup rx_err tx_err hw
	Link detected: yes
---
 drivers/net/ethernet/sfc/mcdi_port_common.c | 37 +++++++++++++++------
 1 file changed, 26 insertions(+), 11 deletions(-)
drivers/net/ethernet/sfc/mcdi_port_common.c +26 -11
index 4bd3ef8f3384e..c4fe3c48ac46a 100644
@@ -132,16 +132,27 @@ void mcdi_to_ethtool_linkset(u32 media, u32 cap, unsigned long *linkset)
 	case MC_CMD_MEDIA_SFP_PLUS:
 	case MC_CMD_MEDIA_QSFP_PLUS:
 		SET_BIT(FIBRE);
-		if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN))
+		if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) {
 			SET_BIT(1000baseT_Full);
-		if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN))
-			SET_BIT(10000baseT_Full);
-		if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN))
+			SET_BIT(1000baseX_Full);
+		}
+		if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) {
+			SET_BIT(10000baseCR_Full);
+			SET_BIT(10000baseLR_Full);
+			SET_BIT(10000baseSR_Full);
+		}
+		if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) {
 			SET_BIT(40000baseCR4_Full);
-		if (cap & (1 << MC_CMD_PHY_CAP_100000FDX_LBN))
+			SET_BIT(40000baseSR4_Full);
+		}
+		if (cap & (1 << MC_CMD_PHY_CAP_100000FDX_LBN)) {
 			SET_BIT(100000baseCR4_Full);
-		if (cap & (1 << MC_CMD_PHY_CAP_25000FDX_LBN))
+			SET_BIT(100000baseSR4_Full);
+		}
+		if (cap & (1 << MC_CMD_PHY_CAP_25000FDX_LBN)) {
 			SET_BIT(25000baseCR_Full);
+			SET_BIT(25000baseSR_Full);
+		}
 		if (cap & (1 << MC_CMD_PHY_CAP_50000FDX_LBN))
 			SET_BIT(50000baseCR2_Full);
 		break;
@@ -192,15 +203,19 @@ u32 ethtool_linkset_to_mcdi_cap(const unsigned long *linkset)
 		result |= (1 << MC_CMD_PHY_CAP_100FDX_LBN);
 	if (TEST_BIT(1000baseT_Half))
 		result |= (1 << MC_CMD_PHY_CAP_1000HDX_LBN);
-	if (TEST_BIT(1000baseT_Full) || TEST_BIT(1000baseKX_Full))
+	if (TEST_BIT(1000baseT_Full) || TEST_BIT(1000baseKX_Full) ||
+			TEST_BIT(1000baseX_Full))
 		result |= (1 << MC_CMD_PHY_CAP_1000FDX_LBN);
-	if (TEST_BIT(10000baseT_Full) || TEST_BIT(10000baseKX4_Full))
+	if (TEST_BIT(10000baseT_Full) || TEST_BIT(10000baseKX4_Full) ||
+			TEST_BIT(10000baseCR_Full) || TEST_BIT(10000baseLR_Full) ||
+			TEST_BIT(10000baseSR_Full))
 		result |= (1 << MC_CMD_PHY_CAP_10000FDX_LBN);
-	if (TEST_BIT(40000baseCR4_Full) || TEST_BIT(40000baseKR4_Full))
+	if (TEST_BIT(40000baseCR4_Full) || TEST_BIT(40000baseKR4_Full) ||
+			TEST_BIT(40000baseSR4_Full))
 		result |= (1 << MC_CMD_PHY_CAP_40000FDX_LBN);
-	if (TEST_BIT(100000baseCR4_Full))
+	if (TEST_BIT(100000baseCR4_Full) || TEST_BIT(100000baseSR4_Full))
 		result |= (1 << MC_CMD_PHY_CAP_100000FDX_LBN);
-	if (TEST_BIT(25000baseCR_Full))
+	if (TEST_BIT(25000baseCR_Full) || TEST_BIT(25000baseSR_Full))
 		result |= (1 << MC_CMD_PHY_CAP_25000FDX_LBN);
 	if (TEST_BIT(50000baseCR2_Full))
 		result |= (1 << MC_CMD_PHY_CAP_50000FDX_LBN);
Signature · 1 line
2.33.0
author maintainer
#69 lore raw

PATCH 69/849 sfc: Dont use netif_info before net_device setup

In reply to Greg Kroah-Hartman

From: Erik Ekman <[email protected]>

[ Upstream commit bf6abf345dfa77786aca554bc58c64bd428ecb1d ]

Use pci_info instead to avoid unnamed/uninitialized noise:

[197088.688729] sfc 0000:01:00.0: Solarflare NIC detected
[197088.690333] sfc 0000:01:00.0: Part Number : SFN5122F
[197088.729061] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no SR-IOV VFs probed
[197088.729071] sfc 0000:01:00.0 (unnamed net_device) (uninitialized): no PTP support

Inspired by fa44821a4ddd ("sfc: don't use netif_info et al before net_device is registered") from Heiner Kallweit.

---
 drivers/net/ethernet/sfc/ptp.c         | 4 ++--
 drivers/net/ethernet/sfc/siena_sriov.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/sfc/ptp.c +2 -2
index a39c5143b3864..797e51802ccbb 100644
@@ -648,7 +648,7 @@ static int efx_ptp_get_attributes(struct efx_nic *efx)
 	} else if (rc == -EINVAL) {
 		fmt = MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS;
 	} else if (rc == -EPERM) {
-		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
+		pci_info(efx->pci_dev, "no PTP support\n");
 		return rc;
 	} else {
 		efx_mcdi_display_error(efx, MC_CMD_PTP, sizeof(inbuf),
@@ -824,7 +824,7 @@ static int efx_ptp_disable(struct efx_nic *efx)
 	 * should only have been called during probe.
 	 */
 	if (rc == -ENOSYS || rc == -EPERM)
-		netif_info(efx, probe, efx->net_dev, "no PTP support\n");
+		pci_info(efx->pci_dev, "no PTP support\n");
 	else if (rc)
 		efx_mcdi_display_error(efx, MC_CMD_PTP,
 				       MC_CMD_PTP_IN_DISABLE_LEN,
drivers/net/ethernet/sfc/siena_sriov.c +1 -1
index 83dcfcae3d4b5..441e7f3e53751 100644
@@ -1057,7 +1057,7 @@ void efx_siena_sriov_probe(struct efx_nic *efx)
 		return;
 
 	if (efx_siena_sriov_cmd(efx, false, &efx->vi_scale, &count)) {
-		netif_info(efx, probe, efx->net_dev, "no SR-IOV VFs probed\n");
+		pci_info(efx->pci_dev, "no SR-IOV VFs probed\n");
 		return;
 	}
 	if (count > 0 && count > max_vfs)
Signature · 1 line
2.33.0
author maintainer
#70 lore raw

PATCH 70/849 hyperv/vmbus: include linux/bitops.h

In reply to Greg Kroah-Hartman

From: Arnd Bergmann <[email protected]>

[ Upstream commit 8017c99680fa65e1e8d999df1583de476a187830 ]

On arm64 randconfig builds, hyperv sometimes fails with this error:

In file included from drivers/hv/hv_trace.c:3:
In file included from drivers/hv/hyperv_vmbus.h:16:
In file included from arch/arm64/include/asm/sync_bitops.h:5:
arch/arm64/include/asm/bitops.h:11:2: error: only <linux/bitops.h> can be included directly
In file included from include/asm-generic/bitops/hweight.h:5:
include/asm-generic/bitops/arch_hweight.h:9:9: error: implicit declaration of function '__sw_hweight32' [-Werror,-Wimplicit-function-declaration] include/asm-generic/bitops/atomic.h:17:7: error: implicit declaration of function 'BIT_WORD' [-Werror,-Wimplicit-function-declaration]

Include the correct header first.

---
 drivers/hv/hyperv_vmbus.h | 1 +
 1 file changed, 1 insertion(+)
drivers/hv/hyperv_vmbus.h +1 -0
index 42f3d9d123a12..d030577ad6a2c 100644
@@ -13,6 +13,7 @@
 #define _HYPERV_VMBUS_H
 
 #include <linux/list.h>
+#include <linux/bitops.h>
 #include <asm/sync_bitops.h>
 #include <asm/hyperv-tlfs.h>
 #include <linux/atomic.h>
Signature · 1 line
2.33.0
author maintainer
#71 lore raw

PATCH 71/849 ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode

In reply to Greg Kroah-Hartman

From: Bastien Roucariès <[email protected]>

[ Upstream commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 ]

Commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") sets the RX/TX delay according to the phy-mode property in the device tree. For the A20-olinuxino-lime2 board this is "rgmii", which is the wrong setting.

Following the example of a900cac3750b ("ARM: dts: sun7i: a20: bananapro:
Fix ethernet phy-mode") the phy-mode is changed to "rgmii-id" which gets the Ethernet working again on this board.

---
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +1 -1
index 8077f1716fbc8..ecb91fb899ff3 100644
@@ -112,7 +112,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
Signature · 1 line
2.33.0
author maintainer
#72 lore raw

PATCH 72/849 reset: tegra-bpmp: Handle errors in BPMP response

In reply to Greg Kroah-Hartman

From: Mikko Perttunen <[email protected]>

[ Upstream commit c045ceb5a145d2a9a4bf33cbc55185ddf99f60ab ]

The return value from tegra_bpmp_transfer indicates the success or failure of the IPC transaction with BPMP. If the transaction succeeded, we also need to check the actual command's result code. Add code to do this.

---
 drivers/reset/tegra/reset-bpmp.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/reset/tegra/reset-bpmp.c +8 -1
index 24d3395964cc4..4c5bba52b1059 100644
@@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
 	struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
 	struct mrq_reset_request request;
 	struct tegra_bpmp_message msg;
+	int err;
 
 	memset(&request, 0, sizeof(request));
 	request.cmd = command;
@@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
 	msg.tx.data = &request;
 	msg.tx.size = sizeof(request);
 
-	return tegra_bpmp_transfer(bpmp, &msg);
+	err = tegra_bpmp_transfer(bpmp, &msg);
+	if (err)
+		return err;
+	if (msg.rx.ret)
+		return -EINVAL;
+
+	return 0;
 }
 
 static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
Signature · 1 line
2.33.0
author maintainer
#73 lore raw

PATCH 73/849 reset: socfpga: add empty driver allowing consumers to probe

In reply to Greg Kroah-Hartman

From: Paweł Anikiel <[email protected]>

[ Upstream commit 3ad60b4b3570937f3278509fe6797a5093ce53f8 ]

The early reset driver doesn't ever probe, which causes consuming devices to be unable to probe. Add an empty driver to set this device as available, allowing consumers to probe.

---
 drivers/reset/reset-socfpga.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
drivers/reset/reset-socfpga.c +26 -0
index 2a72f861f7983..8c6492e5693c7 100644
@@ -92,3 +92,29 @@ void __init socfpga_reset_init(void)
 	for_each_matching_node(np, socfpga_early_reset_dt_ids)
 		a10_reset_init(np);
 }
+
+/*
+ * The early driver is problematic, because it doesn't register
+ * itself as a driver. This causes certain device links to prevent
+ * consumer devices from probing. The hacky solution is to register
+ * an empty driver, whose only job is to attach itself to the reset
+ * manager and call probe.
+ */
+static const struct of_device_id socfpga_reset_dt_ids[] = {
+	{ .compatible = "altr,rst-mgr", },
+	{ /* sentinel */ },
+};
+
+static int reset_simple_probe(struct platform_device *pdev)
+{
+	return 0;
+}
+
+static struct platform_driver reset_socfpga_driver = {
+	.probe	= reset_simple_probe,
+	.driver = {
+		.name		= "socfpga-reset",
+		.of_match_table	= socfpga_reset_dt_ids,
+	},
+};
+builtin_platform_driver(reset_socfpga_driver);
Signature · 1 line
2.33.0
author maintainer
#74 lore raw

PATCH 74/849 mmc: winbond: dont build on M68K

In reply to Greg Kroah-Hartman

From: Randy Dunlap <[email protected]>

[ Upstream commit 162079f2dccd02cb4b6654defd32ca387dd6d4d4 ]

The Winbond MMC driver fails to build on ARCH=m68k so prevent that build config. Silences these build errors:

../drivers/mmc/host/wbsd.c: In function 'wbsd_request_end':
../drivers/mmc/host/wbsd.c:212:28: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration]
212 | dmaflags = claim_dma_lock();
../drivers/mmc/host/wbsd.c:215:17: error: implicit declaration of function 'release_dma_lock'; did you mean 'release_task'? [-Werror=implicit-function-declaration]
215 | release_dma_lock(dmaflags);

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index 71313961cc54d..8acf76ea431b1 100644
@@ -506,7 +506,7 @@ config MMC_OMAP_HS
 
 config MMC_WBSD
 	tristate "Winbond W83L51xD SD/MMC Card Interface support"
-	depends on ISA_DMA_API
+	depends on ISA_DMA_API && !M68K
 	help
 	  This selects the Winbond(R) W83L51xD Secure digital and
 	  Multimedia card Interface.
Signature · 1 line
2.33.0
author maintainer
#75 lore raw

PATCH 75/849 spi: altera: Change to dynamic allocation of spi id

In reply to Greg Kroah-Hartman

From: Russ Weight <[email protected]>

[ Upstream commit f09f6dfef8ce7b70a240cf83811e2b1909c3e47b ]

The spi-altera driver has two flavors: platform and dfl. I'm seeing a case where I have both device types in the same machine, and they are conflicting on the SPI ID:

... kernel: couldn't get idr
... kernel: WARNING: CPU: 28 PID: 912 at drivers/spi/spi.c:2920 spi_register_controller.cold+0x84/0xc0a

Both the platform and dfl drivers use the parent's driver ID as the SPI ID. In the error case, the parent devices are dfl_dev.4 and subdev_spi_altera.4.auto. When the second spi-master is created, the failure occurs because the SPI ID of 4 has already been allocated.

Change the ID allocation to dynamic (by initializing bus_num to -1) to avoid duplicate SPI IDs.

---
 drivers/spi/spi-altera-dfl.c      | 2 +-
 drivers/spi/spi-altera-platform.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-altera-dfl.c +1 -1
index 39a3e1a032e04..59a5b42c71226 100644
@@ -140,7 +140,7 @@ static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)
 	if (!master)
 		return -ENOMEM;
 
-	master->bus_num = dfl_dev->id;
+	master->bus_num = -1;
 
 	hw = spi_master_get_devdata(master);
 
drivers/spi/spi-altera-platform.c +1 -1
index f7a7c14e36790..65147aae82a1a 100644
@@ -48,7 +48,7 @@ static int altera_spi_probe(struct platform_device *pdev)
 		return err;
 
 	/* setup the master state. */
-	master->bus_num = pdev->id;
+	master->bus_num = -1;
 
 	if (pdata) {
 		if (pdata->num_chipselect > ALTERA_SPI_MAX_CS) {
Signature · 1 line
2.33.0
author maintainer
#76 lore raw

PATCH 76/849 drm: panel-orientation-quirks: Add quirk for Aya Neo 2021

In reply to Greg Kroah-Hartman

From: Bryant Mairs <[email protected]>

[ Upstream commit def0c3697287f6e85d5ac68b21302966c95474f9 ]

Fixes screen orientation for the Aya Neo 2021 handheld gaming console.

---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
index f6bdec7fa9253..30c17a76f49ae 100644
@@ -134,6 +134,12 @@ static const struct dmi_system_id orientation_data[] = {
 		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
 		},
 		.driver_data = (void *)&lcd800x1280_rightside_up,
+	}, {	/* AYA NEO 2021 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
+		},
+		.driver_data = (void *)&lcd800x1280_rightside_up,
 	}, {	/* GPD MicroPC (generic strings, also match on bios date) */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
Signature · 1 line
2.33.0
author maintainer
#77 lore raw

PATCH 77/849 fcnal-test: kill hanging ping/nettest binaries on cleanup

In reply to Greg Kroah-Hartman

From: Florian Westphal <[email protected]>

[ Upstream commit 1f83b835a3eaa5ae4bd825fb07182698bfc243ba ]

On my box I see a bunch of ping/nettest processes hanging around after fcntal-test.sh is done.

Clean those up before netns deletion.

---
 tools/testing/selftests/net/fcnal-test.sh | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/net/fcnal-test.sh +3 -0
index a8ad92850e630..8acc4f2a20071 100755
@@ -436,10 +436,13 @@ cleanup()
 		ip -netns ${NSA} link set dev ${NSA_DEV} down
 		ip -netns ${NSA} link del dev ${NSA_DEV}
 
+		ip netns pids ${NSA} | xargs kill 2>/dev/null
 		ip netns del ${NSA}
 	fi
 
+	ip netns pids ${NSB} | xargs kill 2>/dev/null
 	ip netns del ${NSB}
+	ip netns pids ${NSC} | xargs kill 2>/dev/null
 	ip netns del ${NSC} >/dev/null 2>&1
 }
 
Signature · 1 line
2.33.0
author maintainer
#78 lore raw

PATCH 78/849 bpf: Define bpf_jit_alloc_exec_limit for riscv JIT

In reply to Greg Kroah-Hartman

From: Lorenz Bauer <[email protected]>

[ Upstream commit 8f04db78e4e36a5d4858ce841a3e9cc3d69bde36 ]

Expose the maximum amount of useable memory from the riscv JIT.

---
 arch/riscv/net/bpf_jit_core.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/riscv/net/bpf_jit_core.c +5 -0
index 5d247198c30d3..753d85bdfad07 100644
@@ -167,6 +167,11 @@ out:
 	return prog;
 }
 
+u64 bpf_jit_alloc_exec_limit(void)
+{
+	return BPF_JIT_REGION_SIZE;
+}
+
 void *bpf_jit_alloc_exec(unsigned long size)
 {
 	return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START,
Signature · 1 line
2.33.0
author maintainer
#79 lore raw

PATCH 79/849 bpf: Define bpf_jit_alloc_exec_limit for arm64 JIT

In reply to Greg Kroah-Hartman

From: Lorenz Bauer <[email protected]>

[ Upstream commit 5d63ae908242f028bd10860cba98450d11c079b8 ]

Expose the maximum amount of useable memory from the arm64 JIT.

---
 arch/arm64/net/bpf_jit_comp.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/net/bpf_jit_comp.c +5 -0
index 41c23f474ea63..803e7773fa869 100644
@@ -1136,6 +1136,11 @@ out:
 	return prog;
 }
 
+u64 bpf_jit_alloc_exec_limit(void)
+{
+	return BPF_JIT_REGION_SIZE;
+}
+
 void *bpf_jit_alloc_exec(unsigned long size)
 {
 	return __vmalloc_node_range(size, PAGE_SIZE, BPF_JIT_REGION_START,
Signature · 1 line
2.33.0
author maintainer
#80 lore raw

PATCH 80/849 bpf: Prevent increasing bpf_jit_limit above max

In reply to Greg Kroah-Hartman

From: Lorenz Bauer <[email protected]>

[ Upstream commit fadb7ff1a6c2c565af56b4aacdd086b067eed440 ]

Restrict bpf_jit_limit to the maximum supported by the arch's JIT.

---
 include/linux/filter.h     | 1 +
 kernel/bpf/core.c          | 4 +++-
 net/core/sysctl_net_core.c | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
include/linux/filter.h +1 -0
index 83b896044e79f..c227c45121d6a 100644
@@ -1027,6 +1027,7 @@ extern int bpf_jit_enable;
 extern int bpf_jit_harden;
 extern int bpf_jit_kallsyms;
 extern long bpf_jit_limit;
+extern long bpf_jit_limit_max;
 
 typedef void (*bpf_jit_fill_hole_t)(void *area, unsigned int size);
 
kernel/bpf/core.c +3 -1
index 4c0c0146f956c..2340d11737cca 100644
@@ -524,6 +524,7 @@ int bpf_jit_enable   __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON);
 int bpf_jit_kallsyms __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON);
 int bpf_jit_harden   __read_mostly;
 long bpf_jit_limit   __read_mostly;
+long bpf_jit_limit_max __read_mostly;
 
 static void
 bpf_prog_ksym_set_addr(struct bpf_prog *prog)
@@ -817,7 +818,8 @@ u64 __weak bpf_jit_alloc_exec_limit(void)
 static int __init bpf_jit_charge_init(void)
 {
 	/* Only used as heuristic here to derive limit. */
-	bpf_jit_limit = min_t(u64, round_up(bpf_jit_alloc_exec_limit() >> 2,
+	bpf_jit_limit_max = bpf_jit_alloc_exec_limit();
+	bpf_jit_limit = min_t(u64, round_up(bpf_jit_limit_max >> 2,
 					    PAGE_SIZE), LONG_MAX);
 	return 0;
 }
net/core/sysctl_net_core.c +1 -1
index c8496c1142c9d..5f88526ad61cc 100644
@@ -419,7 +419,7 @@ static struct ctl_table net_core_table[] = {
 		.mode		= 0600,
 		.proc_handler	= proc_dolongvec_minmax_bpf_restricted,
 		.extra1		= &long_one,
-		.extra2		= &long_max,
+		.extra2		= &bpf_jit_limit_max,
 	},
 #endif
 	{
Signature · 1 line
2.33.0
author maintainer
#81 lore raw

PATCH 81/849 gpio: mlxbf2.c: Add check for bgpio_init failure

In reply to Greg Kroah-Hartman

From: Asmaa Mnebhi <[email protected]>

[ Upstream commit c0eee6fbfa2b3377f1efed10dad539abeb7312aa ]

Add a check if bgpio_init fails.

---
 drivers/gpio/gpio-mlxbf2.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpio/gpio-mlxbf2.c +5 -0
index befa5e1099439..d4b250b470b41 100644
@@ -268,6 +268,11 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
 			NULL,
 			0);
 
+	if (ret) {
+		dev_err(dev, "bgpio_init failed\n");
+		return ret;
+	}
+
 	gc->direction_input = mlxbf2_gpio_direction_input;
 	gc->direction_output = mlxbf2_gpio_direction_output;
 	gc->ngpio = npins;
Signature · 1 line
2.33.0
author maintainer
#82 lore raw

PATCH 82/849 xen/netfront: stop tx queues during live migration

In reply to Greg Kroah-Hartman

From: Dongli Zhang <[email protected]>

[ Upstream commit 042b2046d0f05cf8124c26ff65dbb6148a4404fb ]

The tx queues are not stopped during the live migration. As a result, the ndo_start_xmit() may access netfront_info->queues which is freed by talk_to_netback()->xennet_destroy_queues().

This patch is to netif_device_detach() at the beginning of xen-netfront resuming, and netif_device_attach() at the end of resuming.

CPU A CPU B

talk_to_netback()
-> if (info->queues)

        xennet_destroy_queues(info);
    to free netfront_info->queues

                                        xennet_start_xmit()
                                        to access netfront_info->queues
  -> err = xennet_create_queues(info, &num_queues);

The idea is borrowed from virtio-net.

---
 drivers/net/xen-netfront.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/xen-netfront.c +8 -0
index 44275908d61a2..0169f7743b6d3 100644
@@ -1669,6 +1669,10 @@ static int netfront_resume(struct xenbus_device *dev)
 
 	dev_dbg(&dev->dev, "%s\n", dev->nodename);
 
+	netif_tx_lock_bh(info->netdev);
+	netif_device_detach(info->netdev);
+	netif_tx_unlock_bh(info->netdev);
+
 	xennet_disconnect_backend(info);
 	return 0;
 }
@@ -2283,6 +2287,10 @@ static int xennet_connect(struct net_device *dev)
 	 * domain a kick because we've probably just requeued some
 	 * packets.
 	 */
+	netif_tx_lock_bh(np->netdev);
+	netif_device_attach(np->netdev);
+	netif_tx_unlock_bh(np->netdev);
+
 	netif_carrier_on(np->netdev);
 	for (j = 0; j < num_queues; ++j) {
 		queue = &np->queues[j];
Signature · 1 line
2.33.0
author maintainer
#83 lore raw

PATCH 83/849 nvmet-tcp: fix a memory leak when releasing a queue

In reply to Greg Kroah-Hartman

From: Maurizio Lombardi <[email protected]>

[ Upstream commit 926245c7d22271307606c88b1fbb2539a8550e94 ]

page_frag_free() won't completely release the memory allocated for the commands, the cache page must be explicitly freed by calling __page_frag_cache_drain().

This bug can be easily reproduced by repeatedly executing the following command on the initiator:

$echo 1 > /sys/devices/virtual/nvme-fabrics/ctl/nvme0/reset_controller

---
 drivers/nvme/target/tcp.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/nvme/target/tcp.c +3 -0
index d641bfa07a801..586ca20837e7b 100644
@@ -1428,6 +1428,7 @@ static void nvmet_tcp_uninit_data_in_cmds(struct nvmet_tcp_queue *queue)
 
 static void nvmet_tcp_release_queue_work(struct work_struct *w)
 {
+	struct page *page;
 	struct nvmet_tcp_queue *queue =
 		container_of(w, struct nvmet_tcp_queue, release_work);
 
@@ -1447,6 +1448,8 @@ static void nvmet_tcp_release_queue_work(struct work_struct *w)
 		nvmet_tcp_free_crypto(queue);
 	ida_simple_remove(&nvmet_tcp_queue_ida, queue->idx);
 
+	page = virt_to_head_page(queue->pf_cache.va);
+	__page_frag_cache_drain(page, queue->pf_cache.pagecnt_bias);
 	kfree(queue);
 }
 
Signature · 1 line
2.33.0
author maintainer
#84 lore raw

PATCH 84/849 spi: spl022: fix Microwire full duplex mode

In reply to Greg Kroah-Hartman

From: Thomas Perrot <[email protected]>

[ Upstream commit d81d0e41ed5fe7229a2c9a29d13bad288c7cf2d2 ]

There are missing braces in the function that verify controller parameters, then an error is always returned when the parameter to select Microwire frames operation is used on devices allowing it.

---
 drivers/spi/spi-pl022.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/spi/spi-pl022.c +3 -2
index feebda66f56eb..e4484ace584e4 100644
@@ -1716,12 +1716,13 @@ static int verify_controller_parameters(struct pl022 *pl022,
 				return -EINVAL;
 			}
 		} else {
-			if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX)
+			if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) {
 				dev_err(&pl022->adev->dev,
 					"Microwire half duplex mode requested,"
 					" but this is only available in the"
 					" ST version of PL022\n");
-			return -EINVAL;
+				return -EINVAL;
+			}
 		}
 	}
 	return 0;
Signature · 1 line
2.33.0
author maintainer
#85 lore raw

PATCH 85/849 net: multicast: calculate csum of looped-back and forwarded packets

In reply to Greg Kroah-Hartman

From: Cyril Strejc <[email protected]>

[ Upstream commit 9122a70a6333705c0c35614ddc51c274ed1d3637 ]

During a testing of an user-space application which transmits UDP multicast datagrams and utilizes multicast routing to send the UDP datagrams out of defined network interfaces, I've found a multicast router does not fill-in UDP checksum into locally produced, looped-back and forwarded UDP datagrams, if an original output NIC the datagrams are sent to has UDP TX checksum offload enabled.

The datagrams are sent malformed out of the NIC the datagrams have been forwarded to.

It is because:

1. If TX checksum offload is enabled on the output NIC, UDP checksum is not calculated by kernel and is not filled into skb data.

2. dev_loopback_xmit(), which is called solely by ip_mc_finish_output(), sets skb->ip_summed = CHECKSUM_UNNECESSARY unconditionally.

3. Since 35fc92a9 ("[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE"), the ip_summed value is preserved during forwarding.

4. If ip_summed != CHECKSUM_PARTIAL, checksum is not calculated during a packet egress.

The minimum fix in dev_loopback_xmit():

1. Preserves skb->ip_summed CHECKSUM_PARTIAL. This is the case when the original output NIC has TX checksum offload enabled. The effects are:

a) If the forwarding destination interface supports TX checksum offloading, the NIC driver is responsible to fill-in the checksum.

b) If the forwarding destination interface does NOT support TX checksum offloading, checksums are filled-in by kernel before skb is submitted to the NIC driver.

c) For local delivery, checksum validation is skipped as in the case of CHECKSUM_UNNECESSARY, thanks to skb_csum_unnecessary().

2. Translates ip_summed CHECKSUM_NONE to CHECKSUM_UNNECESSARY. It means, for CHECKSUM_NONE, the behavior is unmodified and is there to skip a looped-back packet local delivery checksum validation.

---
 include/net/udp.h | 5 +++--
 net/core/dev.c    | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
include/net/udp.h +3 -2
index 360df454356cb..909ecf447e0fb 100644
@@ -494,8 +494,9 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk,
 	 * CHECKSUM_NONE in __udp_gso_segment. UDP GRO indeed builds partial
 	 * packets in udp_gro_complete_segment. As does UDP GSO, verified by
 	 * udp_send_skb. But when those packets are looped in dev_loopback_xmit
-	 * their ip_summed is set to CHECKSUM_UNNECESSARY. Reset in this
-	 * specific case, where PARTIAL is both correct and required.
+	 * their ip_summed CHECKSUM_NONE is changed to CHECKSUM_UNNECESSARY.
+	 * Reset in this specific case, where PARTIAL is both correct and
+	 * required.
 	 */
 	if (skb->pkt_type == PACKET_LOOPBACK)
 		skb->ip_summed = CHECKSUM_PARTIAL;
net/core/dev.c +2 -1
index 9cb47618d4869..2015074d8d9ab 100644
@@ -3995,7 +3995,8 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *skb)
 	skb_reset_mac_header(skb);
 	__skb_pull(skb, skb_network_offset(skb));
 	skb->pkt_type = PACKET_LOOPBACK;
-	skb->ip_summed = CHECKSUM_UNNECESSARY;
+	if (skb->ip_summed == CHECKSUM_NONE)
+		skb->ip_summed = CHECKSUM_UNNECESSARY;
 	WARN_ON(!skb_dst(skb));
 	skb_dst_force(skb);
 	netif_rx_ni(skb);
Signature · 1 line
2.33.0
author maintainer
#86 lore raw

PATCH 86/849 watchdog: Fix OMAP watchdog early handling

In reply to Greg Kroah-Hartman

From: Walter Stoll <[email protected]>

[ Upstream commit cd004d8299f1dc6cfa6a4eea8f94cb45eaedf070 ]

TI's implementation does not service the watchdog even if the kernel command line parameter omap_wdt.early_enable is set to 1. This patch fixes the issue.

---
 drivers/watchdog/omap_wdt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/watchdog/omap_wdt.c +5 -1
index 1616f93dfad7f..74d785b2b478f 100644
@@ -268,8 +268,12 @@ static int omap_wdt_probe(struct platform_device *pdev)
 			wdev->wdog.bootstatus = WDIOF_CARDRESET;
 	}
 
-	if (!early_enable)
+	if (early_enable) {
+		omap_wdt_start(&wdev->wdog);
+		set_bit(WDOG_HW_RUNNING, &wdev->wdog.status);
+	} else {
 		omap_wdt_disable(wdev);
+	}
 
 	ret = watchdog_register_device(&wdev->wdog);
 	if (ret) {
Signature · 1 line
2.33.0
author maintainer
#87 lore raw

PATCH 87/849 drm: panel-orientation-quirks: Add quirk for GPD Win3

In reply to Greg Kroah-Hartman

From: Mario <[email protected]>

[ Upstream commit 61b1d445f3bfe4c3ba4335ceeb7e8ba688fd31e2 ]

Fixes screen orientation for GPD Win 3 handheld gaming console.

---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
index 30c17a76f49ae..e1b2ce4921ae7 100644
@@ -191,6 +191,12 @@ static const struct dmi_system_id orientation_data[] = {
 		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
 		},
 		.driver_data = (void *)&gpd_win2,
+	}, {	/* GPD Win 3 */
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
+		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
+		},
+		.driver_data = (void *)&lcd720x1280_rightside_up,
 	}, {	/* I.T.Works TW891 */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
Signature · 1 line
2.33.0
author maintainer
#88 lore raw

PATCH 88/849 block: schedule queue restart after BLK_STS_ZONE_RESOURCE

In reply to Greg Kroah-Hartman

From: Naohiro Aota <[email protected]>

[ Upstream commit 9586e67b911c95ba158fcc247b230e9c2d718623 ]

When dispatching a zone append write request to a SCSI zoned block device, if the target zone of the request is already locked, the device driver will return BLK_STS_ZONE_RESOURCE and the request will be pushed back to the hctx dipatch queue. The queue will be marked as RESTART in dd_finish_request() and restarted in __blk_mq_free_request(). However, this restart applies to the hctx of the completed request. If the requeued request is on a different hctx, dispatch will no be retried until another request is submitted or the next periodic queue run triggers, leading to up to 30 seconds latency for the requeued request.

Fix this problem by scheduling a queue restart similarly to the BLK_STS_RESOURCE case or when we cannot get the budget.

Also, consolidate the checks into the "need_resource" variable to simplify the condition.

---
 block/blk-mq.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
block/blk-mq.c +9 -4
index 9c64f0025a562..dc49483334c72 100644
@@ -1318,6 +1318,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
 	int errors, queued;
 	blk_status_t ret = BLK_STS_OK;
 	LIST_HEAD(zone_list);
+	bool needs_resource = false;
 
 	if (list_empty(list))
 		return false;
@@ -1363,6 +1364,8 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
 			queued++;
 			break;
 		case BLK_STS_RESOURCE:
+			needs_resource = true;
+			fallthrough;
 		case BLK_STS_DEV_RESOURCE:
 			blk_mq_handle_dev_resource(rq, list);
 			goto out;
@@ -1373,6 +1376,7 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
 			 * accept.
 			 */
 			blk_mq_handle_zone_resource(rq, &zone_list);
+			needs_resource = true;
 			break;
 		default:
 			errors++;
@@ -1399,7 +1403,6 @@ out:
 		/* For non-shared tags, the RESTART check will suffice */
 		bool no_tag = prep == PREP_DISPATCH_NO_TAG &&
 			(hctx->flags & BLK_MQ_F_TAG_QUEUE_SHARED);
-		bool no_budget_avail = prep == PREP_DISPATCH_NO_BUDGET;
 
 		if (nr_budgets)
 			blk_mq_release_budgets(q, list);
@@ -1440,14 +1443,16 @@ out:
 		 * If driver returns BLK_STS_RESOURCE and SCHED_RESTART
 		 * bit is set, run queue after a delay to avoid IO stalls
 		 * that could otherwise occur if the queue is idle.  We'll do
-		 * similar if we couldn't get budget and SCHED_RESTART is set.
+		 * similar if we couldn't get budget or couldn't lock a zone
+		 * and SCHED_RESTART is set.
 		 */
 		needs_restart = blk_mq_sched_needs_restart(hctx);
+		if (prep == PREP_DISPATCH_NO_BUDGET)
+			needs_resource = true;
 		if (!needs_restart ||
 		    (no_tag && list_empty_careful(&hctx->dispatch_wait.entry)))
 			blk_mq_run_hw_queue(hctx, true);
-		else if (needs_restart && (ret == BLK_STS_RESOURCE ||
-					   no_budget_avail))
+		else if (needs_restart && needs_resource)
 			blk_mq_delay_run_hw_queue(hctx, BLK_MQ_RESOURCE_DELAY);
 
 		blk_mq_update_dispatch_busy(hctx, true);
Signature · 1 line
2.33.0
author maintainer
#89 lore raw

PATCH 89/849 nvmet-tcp: fix header digest verification

In reply to Greg Kroah-Hartman

From: Amit Engel <[email protected]>

[ Upstream commit 86aeda32b887cdaeb0f4b7bfc9971e36377181c7 ]

Pass the correct length to nvmet_tcp_verify_hdgst, which is the pdu header length. This fixes a wrong behaviour where header digest verification passes although the digest is wrong.

---
 drivers/nvme/target/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/tcp.c +1 -1
index 586ca20837e7b..46c3b3be7e033 100644
@@ -1096,7 +1096,7 @@ recv:
 	}
 
 	if (queue->hdr_digest &&
-	    nvmet_tcp_verify_hdgst(queue, &queue->pdu, queue->offset)) {
+	    nvmet_tcp_verify_hdgst(queue, &queue->pdu, hdr->hlen)) {
 		nvmet_tcp_fatal_error(queue); /* fatal */
 		return -EPROTO;
 	}
Signature · 1 line
2.33.0
author maintainer
#90 lore raw

PATCH 90/849 net: hns3: change hclge/hclgevf workqueue to WQ_UNBOUND mode

In reply to Greg Kroah-Hartman

From: Yufeng Mo <[email protected]>

[ Upstream commit f29da4088fb4eeba457219a931327d1d5f45196a ]

Currently, the workqueue of hclge/hclgevf is executed on the CPU that initiates scheduling requests by default. In stress scenarios, the CPU may be busy and workqueue scheduling is completed after a long period of time. To avoid this situation and implement proper scheduling, use the WQ_UNBOUND mode instead. In this way, the workqueue can be performed on a relatively idle CPU.

---
 .../hisilicon/hns3/hns3pf/hclge_main.c        | 34 +++----------------
 .../hisilicon/hns3/hns3pf/hclge_main.h        |  1 -
 .../hisilicon/hns3/hns3vf/hclgevf_main.c      |  2 +-
 3 files changed, 6 insertions(+), 31 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +5 -29
index 721eb4e92f618..dc748f2f18434 100644
@@ -2846,33 +2846,28 @@ static void hclge_mbx_task_schedule(struct hclge_dev *hdev)
 {
 	if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) &&
 	    !test_and_set_bit(HCLGE_STATE_MBX_SERVICE_SCHED, &hdev->state))
-		mod_delayed_work_on(cpumask_first(&hdev->affinity_mask),
-				    hclge_wq, &hdev->service_task, 0);
+		mod_delayed_work(hclge_wq, &hdev->service_task, 0);
 }
 
 static void hclge_reset_task_schedule(struct hclge_dev *hdev)
 {
 	if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) &&
 	    !test_and_set_bit(HCLGE_STATE_RST_SERVICE_SCHED, &hdev->state))
-		mod_delayed_work_on(cpumask_first(&hdev->affinity_mask),
-				    hclge_wq, &hdev->service_task, 0);
+		mod_delayed_work(hclge_wq, &hdev->service_task, 0);
 }
 
 static void hclge_errhand_task_schedule(struct hclge_dev *hdev)
 {
 	if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) &&
 	    !test_and_set_bit(HCLGE_STATE_ERR_SERVICE_SCHED, &hdev->state))
-		mod_delayed_work_on(cpumask_first(&hdev->affinity_mask),
-				    hclge_wq, &hdev->service_task, 0);
+		mod_delayed_work(hclge_wq, &hdev->service_task, 0);
 }
 
 void hclge_task_schedule(struct hclge_dev *hdev, unsigned long delay_time)
 {
 	if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) &&
 	    !test_bit(HCLGE_STATE_RST_FAIL, &hdev->state))
-		mod_delayed_work_on(cpumask_first(&hdev->affinity_mask),
-				    hclge_wq, &hdev->service_task,
-				    delay_time);
+		mod_delayed_work(hclge_wq, &hdev->service_task, delay_time);
 }
 
 static int hclge_get_mac_link_status(struct hclge_dev *hdev, int *link_status)
@@ -3490,33 +3485,14 @@ static void hclge_get_misc_vector(struct hclge_dev *hdev)
 	hdev->num_msi_used += 1;
 }
 
-static void hclge_irq_affinity_notify(struct irq_affinity_notify *notify,
-				      const cpumask_t *mask)
-{
-	struct hclge_dev *hdev = container_of(notify, struct hclge_dev,
-					      affinity_notify);
-
-	cpumask_copy(&hdev->affinity_mask, mask);
-}
-
-static void hclge_irq_affinity_release(struct kref *ref)
-{
-}
-
 static void hclge_misc_affinity_setup(struct hclge_dev *hdev)
 {
 	irq_set_affinity_hint(hdev->misc_vector.vector_irq,
 			      &hdev->affinity_mask);
-
-	hdev->affinity_notify.notify = hclge_irq_affinity_notify;
-	hdev->affinity_notify.release = hclge_irq_affinity_release;
-	irq_set_affinity_notifier(hdev->misc_vector.vector_irq,
-				  &hdev->affinity_notify);
 }
 
 static void hclge_misc_affinity_teardown(struct hclge_dev *hdev)
 {
-	irq_set_affinity_notifier(hdev->misc_vector.vector_irq, NULL);
 	irq_set_affinity_hint(hdev->misc_vector.vector_irq, NULL);
 }
 
@@ -13040,7 +13016,7 @@ static int hclge_init(void)
 {
 	pr_info("%s is initializing\n", HCLGE_NAME);
 
-	hclge_wq = alloc_workqueue("%s", 0, 0, HCLGE_NAME);
+	hclge_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, HCLGE_NAME);
 	if (!hclge_wq) {
 		pr_err("%s: failed to create workqueue\n", HCLGE_NAME);
 		return -ENOMEM;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +0 -1
index e446b839a3715..0d0ebb9714234 100644
@@ -942,7 +942,6 @@ struct hclge_dev {
 
 	/* affinity mask and notify for misc interrupt */
 	cpumask_t affinity_mask;
-	struct irq_affinity_notify affinity_notify;
 	struct hclge_ptp *ptp;
 };
 
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -1
index b8414f684e89d..a1713a1ce6839 100644
@@ -3890,7 +3890,7 @@ static int hclgevf_init(void)
 {
 	pr_info("%s is initializing\n", HCLGEVF_NAME);
 
-	hclgevf_wq = alloc_workqueue("%s", 0, 0, HCLGEVF_NAME);
+	hclgevf_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, HCLGEVF_NAME);
 	if (!hclgevf_wq) {
 		pr_err("%s: failed to create workqueue\n", HCLGEVF_NAME);
 		return -ENOMEM;
Signature · 1 line
2.33.0
author maintainer
#91 lore raw

PATCH 91/849 net: hns3: ignore reset event before initialization process is done

In reply to Greg Kroah-Hartman

From: Guangbin Huang <[email protected]>

[ Upstream commit 0251d196b0e1a19c870be882e5d4f496de8ab758 ]

Currently, if there is a reset event triggered by RAS during device in initialization process, driver may run reset process concurrently with initialization process. In this case, it may cause problem. For example, the RSS indirection table may has not been alloc memory in initialization process yet, but it is used in reset process, it will cause a call trace like this:

[61228.744836] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
...
[61228.897677] Workqueue: hclgevf hclgevf_service_task [hclgevf]
[61228.911390] pstate: 40400009 (nZcv daif +PAN -UAO -TCO BTYPE=--)
[61228.918670] pc : hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf]
[61228.927812] lr : hclgevf_set_rss_indir_table+0x90/0x190 [hclgevf]
[61228.937248] sp : ffff8000162ebb50
[61228.941087] x29: ffff8000162ebb50 x28: ffffb77add72dbc0 x27: ffff0820c7dc8080
[61228.949516] x26: 0000000000000000 x25: ffff0820ad4fc880 x24: ffff0820c7dc8080
[61228.958220] x23: ffff0820c7dc8090 x22: 00000000ffffffff x21: 0000000000000040
[61228.966360] x20: ffffb77add72b9c0 x19: 0000000000000000 x18: 0000000000000030
[61228.974646] x17: 0000000000000000 x16: ffffb77ae713feb0 x15: ffff0820ad4fcce8
[61228.982808] x14: ffffffffffffffff x13: ffff8000962eb7f7 x12: 00003834ec70c960
[61228.991990] x11: 00e0fafa8c206982 x10: 9670facc78a8f9a8 x9 : ffffb77add717530
[61229.001123] x8 : ffff0820ad4fd6b8 x7 : 0000000000000000 x6 : 0000000000000011
[61229.010249] x5 : 00000000000cb1b0 x4 : 0000000000002adb x3 : 0000000000000049
[61229.018662] x2 : ffff8000162ebbb8 x1 : 0000000000000000 x0 : 0000000000000480
[61229.027002] Call trace:
[61229.030177]  hclgevf_set_rss_indir_table+0xb4/0x190 [hclgevf]
[61229.039009]  hclgevf_rss_init_hw+0x128/0x1b4 [hclgevf]
[61229.046809]  hclgevf_reset_rebuild+0x17c/0x69c [hclgevf]
[61229.053862]  hclgevf_reset_service_task+0x4cc/0xa80 [hclgevf]
[61229.061306]  hclgevf_service_task+0x6c/0x630 [hclgevf]
[61229.068491]  process_one_work+0x1dc/0x48c
[61229.074121]  worker_thread+0x15c/0x464
[61229.078562]  kthread+0x168/0x16c
[61229.082873]  ret_from_fork+0x10/0x18
[61229.088221] Code: 7900e7f6 f904a683 d503201f 9101a3e2 (38616b43)
[61229.095357] ---[ end trace 153661a538f6768c ]---

To fix this problem, don't schedule reset task before initialization process is done.

---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c   | 1 +
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 +
 3 files changed, 5 insertions(+)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -0
index dc748f2f18434..b1397d9f9a62e 100644
@@ -2852,6 +2852,7 @@ static void hclge_mbx_task_schedule(struct hclge_dev *hdev)
 static void hclge_reset_task_schedule(struct hclge_dev *hdev)
 {
 	if (!test_bit(HCLGE_STATE_REMOVING, &hdev->state) &&
+	    test_bit(HCLGE_STATE_SERVICE_INITED, &hdev->state) &&
 	    !test_and_set_bit(HCLGE_STATE_RST_SERVICE_SCHED, &hdev->state))
 		mod_delayed_work(hclge_wq, &hdev->service_task, 0);
 }
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +3 -0
index a1713a1ce6839..9d36620f9c035 100644
@@ -2230,6 +2230,7 @@ static void hclgevf_get_misc_vector(struct hclgevf_dev *hdev)
 void hclgevf_reset_task_schedule(struct hclgevf_dev *hdev)
 {
 	if (!test_bit(HCLGEVF_STATE_REMOVING, &hdev->state) &&
+	    test_bit(HCLGEVF_STATE_SERVICE_INITED, &hdev->state) &&
 	    !test_and_set_bit(HCLGEVF_STATE_RST_SERVICE_SCHED,
 			      &hdev->state))
 		mod_delayed_work(hclgevf_wq, &hdev->service_task, 0);
@@ -3443,6 +3444,8 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
 
 	hclgevf_init_rxd_adv_layout(hdev);
 
+	set_bit(HCLGEVF_STATE_SERVICE_INITED, &hdev->state);
+
 	hdev->last_reset_time = jiffies;
 	dev_info(&hdev->pdev->dev, "finished initializing %s driver\n",
 		 HCLGEVF_DRIVER_NAME);
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h +1 -0
index e8013be055f89..19f1494e356ab 100644
@@ -144,6 +144,7 @@ enum hclgevf_states {
 	HCLGEVF_STATE_REMOVING,
 	HCLGEVF_STATE_NIC_REGISTERED,
 	HCLGEVF_STATE_ROCE_REGISTERED,
+	HCLGEVF_STATE_SERVICE_INITED,
 	/* task states */
 	HCLGEVF_STATE_RST_SERVICE_SCHED,
 	HCLGEVF_STATE_RST_HANDLING,
Signature · 1 line
2.33.0
author maintainer
#92 lore raw

PATCH 92/849 r8169: Add device 10ec:8162 to driver r8169

In reply to Greg Kroah-Hartman

From: Janghyub Seo <[email protected]>

[ Upstream commit 72f898ca0ab85fde6facf78b14d9f67a4a7b32d1 ]

This patch makes the driver r8169 pick up device Realtek Semiconductor Co. , Ltd. Device [10ec:8162].

---
 drivers/net/ethernet/realtek/r8169_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/realtek/r8169_main.c +1 -0
index 55411c100a0e5..6a566676ec0e9 100644
@@ -157,6 +157,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
 	{ PCI_VDEVICE(REALTEK,	0x8129) },
 	{ PCI_VDEVICE(REALTEK,	0x8136), RTL_CFG_NO_GBIT },
 	{ PCI_VDEVICE(REALTEK,	0x8161) },
+	{ PCI_VDEVICE(REALTEK,	0x8162) },
 	{ PCI_VDEVICE(REALTEK,	0x8167) },
 	{ PCI_VDEVICE(REALTEK,	0x8168) },
 	{ PCI_VDEVICE(NCUBE,	0x8168) },
Signature · 1 line
2.33.0
author maintainer
#93 lore raw

PATCH 93/849 vmxnet3: do not stop tx queues after netif_device_detach()

In reply to Greg Kroah-Hartman

From: Dongli Zhang <[email protected]>

[ Upstream commit 9159f102402a64ac85e676b75cc1f9c62c5b4b73 ]

The netif_device_detach() conditionally stops all tx queues if the queues are running. There is no need to call netif_tx_stop_all_queues() again.

---
 drivers/net/vmxnet3/vmxnet3_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/vmxnet3/vmxnet3_drv.c +0 -1
index 6e87f1fc4874a..ceecee4081384 100644
@@ -3749,7 +3749,6 @@ vmxnet3_suspend(struct device *device)
 	vmxnet3_free_intr_resources(adapter);
 
 	netif_device_detach(netdev);
-	netif_tx_stop_all_queues(netdev);
 
 	/* Create wake-up filters. */
 	pmConf = adapter->pm_conf;
Signature · 1 line
2.33.0
author maintainer
#94 lore raw

PATCH 94/849 nfp: bpf: relax prog rejection for mtu check through max_pkt_offset

In reply to Greg Kroah-Hartman

From: Yu Xiao <[email protected]>

[ Upstream commit 90a881fc352a953f1c8beb61977a2db0818157d4 ]

MTU change is refused whenever the value of new MTU is bigger than the max packet bytes that fits in NFP Cluster Target Memory (CTM). However, an eBPF program doesn't always need to access the whole packet data.

The maximum direct packet access (DPA) offset has always been caculated by verifier and stored in the max_pkt_offset field of prog aux data.

---
 drivers/net/ethernet/netronome/nfp/bpf/main.c   | 16 +++++++++++-----
 drivers/net/ethernet/netronome/nfp/bpf/main.h   |  2 ++
 .../net/ethernet/netronome/nfp/bpf/offload.c    | 17 +++++++++++++----
 3 files changed, 26 insertions(+), 9 deletions(-)
drivers/net/ethernet/netronome/nfp/bpf/main.c +11 -5
index 11c83a99b0140..f469950c72657 100644
@@ -182,15 +182,21 @@ static int
 nfp_bpf_check_mtu(struct nfp_app *app, struct net_device *netdev, int new_mtu)
 {
 	struct nfp_net *nn = netdev_priv(netdev);
-	unsigned int max_mtu;
+	struct nfp_bpf_vnic *bv;
+	struct bpf_prog *prog;
 
 	if (~nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF)
 		return 0;
 
-	max_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
-	if (new_mtu > max_mtu) {
-		nn_info(nn, "BPF offload active, MTU over %u not supported\n",
-			max_mtu);
+	if (nn->xdp_hw.prog) {
+		prog = nn->xdp_hw.prog;
+	} else {
+		bv = nn->app_priv;
+		prog = bv->tc_prog;
+	}
+
+	if (nfp_bpf_offload_check_mtu(nn, prog, new_mtu)) {
+		nn_info(nn, "BPF offload active, potential packet access beyond hardware packet boundary");
 		return -EBUSY;
 	}
 	return 0;
drivers/net/ethernet/netronome/nfp/bpf/main.h +2 -0
index d0e17eebddd94..16841bb750b72 100644
@@ -560,6 +560,8 @@ bool nfp_is_subprog_start(struct nfp_insn_meta *meta);
 void nfp_bpf_jit_prepare(struct nfp_prog *nfp_prog);
 int nfp_bpf_jit(struct nfp_prog *prog);
 bool nfp_bpf_supported_opcode(u8 code);
+bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog,
+			       unsigned int mtu);
 
 int nfp_verify_insn(struct bpf_verifier_env *env, int insn_idx,
 		    int prev_insn_idx);
drivers/net/ethernet/netronome/nfp/bpf/offload.c +13 -4
index 53851853562c6..9d97cd281f18e 100644
@@ -481,19 +481,28 @@ int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data,
 	return 0;
 }
 
+bool nfp_bpf_offload_check_mtu(struct nfp_net *nn, struct bpf_prog *prog,
+			       unsigned int mtu)
+{
+	unsigned int fw_mtu, pkt_off;
+
+	fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
+	pkt_off = min(prog->aux->max_pkt_offset, mtu);
+
+	return fw_mtu < pkt_off;
+}
+
 static int
 nfp_net_bpf_load(struct nfp_net *nn, struct bpf_prog *prog,
 		 struct netlink_ext_ack *extack)
 {
 	struct nfp_prog *nfp_prog = prog->aux->offload->dev_priv;
-	unsigned int fw_mtu, pkt_off, max_stack, max_prog_len;
+	unsigned int max_stack, max_prog_len;
 	dma_addr_t dma_addr;
 	void *img;
 	int err;
 
-	fw_mtu = nn_readb(nn, NFP_NET_CFG_BPF_INL_MTU) * 64 - 32;
-	pkt_off = min(prog->aux->max_pkt_offset, nn->dp.netdev->mtu);
-	if (fw_mtu < pkt_off) {
+	if (nfp_bpf_offload_check_mtu(nn, prog, nn->dp.netdev->mtu)) {
 		NL_SET_ERR_MSG_MOD(extack, "BPF offload not supported with potential packet access beyond HW packet split boundary");
 		return -EOPNOTSUPP;
 	}
Signature · 1 line
2.33.0
author maintainer
#95 lore raw

PATCH 95/849 net/smc: Fix smc_link->llc_testlink_time overflow

In reply to Greg Kroah-Hartman

From: Tony Lu <[email protected]>

[ Upstream commit c4a146c7cf5e8ad76231523b174d161bf152c6e7 ]

The value of llc_testlink_time is set to the value stored in net->ipv4.sysctl_tcp_keepalive_time when linkgroup init. The value of sysctl_tcp_keepalive_time is already jiffies, so we don't need to multiply by HZ, which would cause smc_link->llc_testlink_time overflow, and test_link send flood.

---
 net/smc/smc_llc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/smc_llc.c +1 -1
index 72f4b72eb1753..f1d323439a2af 100644
@@ -1822,7 +1822,7 @@ void smc_llc_link_active(struct smc_link *link)
 			    link->smcibdev->ibdev->name, link->ibport);
 	link->state = SMC_LNK_ACTIVE;
 	if (link->lgr->llc_testlink_time) {
-		link->llc_testlink_time = link->lgr->llc_testlink_time * HZ;
+		link->llc_testlink_time = link->lgr->llc_testlink_time;
 		schedule_delayed_work(&link->llc_testlink_wrk,
 				      link->llc_testlink_time);
 	}
Signature · 1 line
2.33.0
author maintainer
#96 lore raw

PATCH 96/849 net/smc: Correct spelling mistake to TCPF_SYN_RECV

In reply to Greg Kroah-Hartman

From: Wen Gu <[email protected]>

[ Upstream commit f3a3a0fe0b644582fa5d83dd94b398f99fc57914 ]

There should use TCPF_SYN_RECV instead of TCP_SYN_RECV.

---
 net/smc/af_smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/af_smc.c +1 -1
index c038efc23ce38..78b663dbfa1f9 100644
@@ -1057,7 +1057,7 @@ static void smc_connect_work(struct work_struct *work)
 	if (smc->clcsock->sk->sk_err) {
 		smc->sk.sk_err = smc->clcsock->sk->sk_err;
 	} else if ((1 << smc->clcsock->sk->sk_state) &
-					(TCPF_SYN_SENT | TCP_SYN_RECV)) {
+					(TCPF_SYN_SENT | TCPF_SYN_RECV)) {
 		rc = sk_stream_wait_connect(smc->clcsock->sk, &timeo);
 		if ((rc == -EPIPE) &&
 		    ((1 << smc->clcsock->sk->sk_state) &
Signature · 1 line
2.33.0
author maintainer
#97 lore raw

PATCH 97/849 tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer

In reply to Greg Kroah-Hartman

From: David Yang <[email protected]>

[ Upstream commit 9c7516d669e68e94e17203469a873ff5d1d3a41a ]

The coccinelle check report:

./tools/testing/selftests/vm/split_huge_page_test.c:344:36-42:
ERROR: application of sizeof to pointer

Use "strlen" to fix it.

---
 tools/testing/selftests/vm/split_huge_page_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vm/split_huge_page_test.c +1 -1
index 1af16d2c2a0ac..52497b7b9f1db 100644
@@ -341,7 +341,7 @@ void split_file_backed_thp(void)
 	}
 
 	/* write something to the file, so a file-backed THP can be allocated */
-	num_written = write(fd, tmpfs_loc, sizeof(tmpfs_loc));
+	num_written = write(fd, tmpfs_loc, strlen(tmpfs_loc) + 1);
 	close(fd);
 
 	if (num_written < 1) {
Signature · 1 line
2.33.0
author maintainer
#98 lore raw

PATCH 98/849 btrfs: clear MISSING device status bit in btrfs_close_one_device

In reply to Greg Kroah-Hartman

From: Li Zhang <[email protected]>

commit 5d03dbebba2594d2e6fbf3b5dd9060c5a835de3b upstream.

Reported bug: https://github.com/kdave/btrfs-progs/issues/389

There's a problem with scrub reporting aborted status but returning error code 0, on a filesystem with missing and readded device.

Roughly these steps:

- mkfs -d raid1 dev1 dev2
- fill with data
- unmount
- make dev1 disappear
- mount -o degraded
- copy more data
- make dev1 appear again

Running scrub afterwards reports that the command was aborted, but the system log message says the exit code was 0.

It seems that the cause of the error is decrementing fs_devices->missing_devices but not clearing device->dev_state. Every time we umount filesystem, it would call close_ctree, And it would eventually involve btrfs_close_one_device to close the device, but it only decrements fs_devices->missing_devices but does not clear the device BTRFS_DEV_STATE_MISSING bit. Worse, this bug will cause Integer Overflow, because every time umount, fs_devices->missing_devices will decrease. If fs_devices->missing_devices value hit 0, it would overflow.

With added debugging:

loop1: detected capacity change from 0 to 20971520
BTRFS: device fsid 56ad51f1-5523-463b-8547-c19486c51ebb devid 1 transid 21 /dev/loop1 scanned by systemd-udevd (2311)
loop2: detected capacity change from 0 to 20971520
BTRFS: device fsid 56ad51f1-5523-463b-8547-c19486c51ebb devid 2 transid 17 /dev/loop2 scanned by systemd-udevd (2313) BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): using free space tree
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000f706684d /dev/loop1 0
BTRFS warning (device loop1): devid 2 uuid 6635ac31-56dd-4852-873b-c60f5e2d53d2 is missing
BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 1
BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): using free space tree
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000f706684d /dev/loop1 0
BTRFS warning (device loop1): devid 2 uuid 6635ac31-56dd-4852-873b-c60f5e2d53d2 is missing
BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 0
BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): using free space tree
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000f706684d /dev/loop1 18446744073709551615 BTRFS warning (device loop1): devid 2 uuid 6635ac31-56dd-4852-873b-c60f5e2d53d2 is missing
BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 18446744073709551615

If fs_devices->missing_devices is 0, next time it would be 18446744073709551615

After apply this patch, the fs_devices->missing_devices seems to be right:

  $ truncate -s 10g test1
  $ truncate -s 10g test2
  $ losetup /dev/loop1 test1
  $ losetup /dev/loop2 test2
  $ mkfs.btrfs -draid1 -mraid1 /dev/loop1 /dev/loop2 -f
  $ losetup -d /dev/loop2
  $ mount -o degraded /dev/loop1 /mnt/1
  $ umount /mnt/1
  $ mount -o degraded /dev/loop1 /mnt/1
  $ umount /mnt/1
  $ mount -o degraded /dev/loop1 /mnt/1
  $ umount /mnt/1
  $ dmesg

loop1: detected capacity change from 0 to 20971520
loop2: detected capacity change from 0 to 20971520
BTRFS: device fsid 15aa1203-98d3-4a66-bcae-ca82f629c2cd devid 1 transid 5 /dev/loop1 scanned by mkfs.btrfs (1863)
BTRFS: device fsid 15aa1203-98d3-4a66-bcae-ca82f629c2cd devid 2 transid 5 /dev/loop2 scanned by mkfs.btrfs (1863) BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): disk space caching is enabled
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000975bd577 /dev/loop1 0
BTRFS warning (device loop1): devid 2 uuid 8b333791-0b3f-4f57-b449-1c1ab6b51f38 is missing BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 1
BTRFS info (device loop1): checking UUID tree
BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): disk space caching is enabled
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000975bd577 /dev/loop1 0
BTRFS warning (device loop1): devid 2 uuid 8b333791-0b3f-4f57-b449-1c1ab6b51f38 is missing BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 1
BTRFS info (device loop1): flagging fs with big metadata feature
BTRFS info (device loop1): allowing degraded mounts
BTRFS info (device loop1): disk space caching is enabled
BTRFS info (device loop1): has skinny extents
BTRFS info (device loop1): before clear_missing.00000000975bd577 /dev/loop1 0
BTRFS warning (device loop1): devid 2 uuid 8b333791-0b3f-4f57-b449-1c1ab6b51f38 is missing BTRFS info (device loop1): before clear_missing.0000000000000000 /dev/loop2 1

---
 fs/btrfs/volumes.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/btrfs/volumes.c +3 -1
@@ -1134,8 +1134,10 @@ static void btrfs_close_one_device(struc
 	if (device->devid == BTRFS_DEV_REPLACE_DEVID)
 		clear_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state);
 
-	if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state))
+	if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) {
+		clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state);
 		fs_devices->missing_devices--;
+	}
 
 	btrfs_close_bdev(device);
 	if (device->bdev) {
author maintainer
#99 lore raw

PATCH 99/849 btrfs: fix lost error handling when replaying directory deletes

In reply to Greg Kroah-Hartman

From: Filipe Manana <[email protected]>

commit 10adb1152d957a4d570ad630f93a88bb961616c1 upstream.

At replay_dir_deletes(), if find_dir_range() returns an error we break out of the main while loop and then assign a value of 0 (success) to the 'ret' variable, resulting in completely ignoring that an error happened. Fix that by jumping to the 'out' label when find_dir_range() returns an error (negative value).

---
 fs/btrfs/tree-log.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/btrfs/tree-log.c +3 -1
@@ -2505,7 +2505,9 @@ again:
 		else {
 			ret = find_dir_range(log, path, dirid, key_type,
 					     &range_start, &range_end);
-			if (ret != 0)
+			if (ret < 0)
+				goto out;
+			else if (ret > 0)
 				break;
 		}
 
author maintainer
#100 lore raw

PATCH 100/849 btrfs: call btrfs_check_rw_degradable only if there is a missing device

In reply to Greg Kroah-Hartman

From: Anand Jain <[email protected]>

commit 5c78a5e7aa835c4f08a7c90fe02d19f95a776f29 upstream.

In open_ctree() in btrfs_check_rw_degradable() [1], we check each block group individually if at least the minimum number of devices is available for that profile. If all the devices are available, then we don't have to check degradable.

[1]
open_ctree()
::
3559 if (!sb_rdonly(sb) && !btrfs_check_rw_degradable(fs_info, NULL)) {

Also before calling btrfs_check_rw_degradable() in open_ctee() at the line number shown below [2] we call btrfs_read_chunk_tree() and down to add_missing_dev() to record number of missing devices.

[2]
open_ctree()
::
3454 ret = btrfs_read_chunk_tree(fs_info);

btrfs_read_chunk_tree()
read_one_chunk() / read_one_dev()
add_missing_dev()

So, check if there is any missing device before btrfs_check_rw_degradable() in open_ctree().

Also, with this the mount command could save ~16ms.[3] in the most common case, that is no device is missing.

[3]
1) * 16934.96 us | btrfs_check_rw_degradable [btrfs]();

---
 fs/btrfs/disk-io.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/btrfs/disk-io.c +2 -1
@@ -3551,7 +3551,8 @@ int __cold open_ctree(struct super_block
 		goto fail_sysfs;
 	}
 
-	if (!sb_rdonly(sb) && !btrfs_check_rw_degradable(fs_info, NULL)) {
+	if (!sb_rdonly(sb) && fs_info->fs_devices->missing_devices &&
+	    !btrfs_check_rw_degradable(fs_info, NULL)) {
 		btrfs_warn(fs_info,
 		"writable mount is not allowed due to too many missing devices");
 		goto fail_sysfs;
author maintainer
#101 lore raw

PATCH 101/849 KVM: VMX: Unregister posted interrupt wakeup handler on hardware unsetup

In reply to Greg Kroah-Hartman

From: Sean Christopherson <[email protected]>

commit ec5a4919fa7b7d8c7a2af1c7e799b1fe4be84343 upstream.

Unregister KVM's posted interrupt wakeup handler during unsetup so that a spurious interrupt that arrives after kvm_intel.ko is unloaded doesn't call into freed memory.

Fixes bf9f6ac8d749 ("KVM: Update Posted-Interrupts Descriptor when vCPU is blocked")

Message-Id: <[email protected]>

---
 arch/x86/kvm/vmx/vmx.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/kvm/vmx/vmx.c +5 -2
@@ -7517,6 +7517,8 @@ static void vmx_migrate_timers(struct kv
 
 static void hardware_unsetup(void)
 {
+	kvm_set_posted_intr_wakeup_handler(NULL);
+
 	if (nested)
 		nested_vmx_hardware_unsetup();
 
@@ -7844,8 +7846,6 @@ static __init int hardware_setup(void)
 		vmx_x86_ops.request_immediate_exit = __kvm_request_immediate_exit;
 	}
 
-	kvm_set_posted_intr_wakeup_handler(pi_wakeup_handler);
-
 	kvm_mce_cap_supported |= MCG_LMCE_P;
 
 	if (pt_mode != PT_MODE_SYSTEM && pt_mode != PT_MODE_HOST_GUEST)
@@ -7869,6 +7869,9 @@ static __init int hardware_setup(void)
 	r = alloc_kvm_area();
 	if (r)
 		nested_vmx_hardware_unsetup();
+
+	kvm_set_posted_intr_wakeup_handler(pi_wakeup_handler);
+
 	return r;
 }
 
author maintainer
#102 lore raw

PATCH 102/849 powerpc/kvm: Fix kvm_use_magic_page

In reply to Greg Kroah-Hartman

From: Andreas Gruenbacher <[email protected]>

commit 0c8eb2884a42d992c7726539328b7d3568f22143 upstream.

When switching from __get_user to fault_in_pages_readable, commit 9f9eae5ce717 broke kvm_use_magic_page: like __get_user, fault_in_pages_readable returns 0 on success.

Fixes 9f9eae5ce717 ("powerpc/kvm: Prefer fault_in_pages_readable function")
Cc [email protected] # v4.18+
---
 arch/powerpc/kernel/kvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/kvm.c +1 -1
@@ -669,7 +669,7 @@ static void __init kvm_use_magic_page(vo
 	on_each_cpu(kvm_map_magic_page, &features, 1);
 
 	/* Quick self-test to see if the mapping works */
-	if (!fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
+	if (fault_in_pages_readable((const char *)KVM_MAGIC_PAGE, sizeof(u32))) {
 		kvm_patching_worked = false;
 		return;
 	}
author maintainer
#103 lore raw

PATCH 103/849 KVM: PPC: Tick accounting should defer vtime accounting til after IRQ handling

In reply to Greg Kroah-Hartman

From: Laurent Vivier <[email protected]>

commit 235cee162459d96153d63651ce7ff51752528c96 upstream.

Commit 112665286d08 ("KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs") moved guest_exit() into the interrupt protected area to avoid wrong context warning (or worse). The problem is that tick-based time accounting has not yet been updated at this point (because it depends on the timer interrupt firing), so the guest time gets incorrectly accounted to system time.

To fix the problem, follow the x86 fix in commit 160457140187 ("Defer vtime accounting 'til after IRQ handling"), and allow host IRQs to run before accounting the guest exit time.

In the case vtime accounting is enabled, this is not required because TB is used directly for accounting.

Before this patch, with CONFIG_TICK_CPU_ACCOUNTING=y in the host and a guest running a kernel compile, the 'guest' fields of /proc/stat are stuck at zero. With the patch they can be observed increasing roughly as expected.

Fixes e233d54d4d97 ("KVM: booke: use __kvm_guest_exit")
Fixes 112665286d08 ("KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs")
[np: only required for tick accounting, add Book3E fix, tweak changelog]
---
 arch/powerpc/kvm/book3s_hv.c |   30 ++++++++++++++++++++++++++++--
 arch/powerpc/kvm/booke.c     |   16 +++++++++++++++-
 2 files changed, 43 insertions(+), 3 deletions(-)
arch/powerpc/kvm/book3s_hv.c +28 -2
@@ -3687,7 +3687,20 @@ static noinline void kvmppc_run_core(str
 
 	kvmppc_set_host_core(pcpu);
 
-	guest_exit_irqoff();
+	context_tracking_guest_exit();
+	if (!vtime_accounting_enabled_this_cpu()) {
+		local_irq_enable();
+		/*
+		 * Service IRQs here before vtime_account_guest_exit() so any
+		 * ticks that occurred while running the guest are accounted to
+		 * the guest. If vtime accounting is enabled, accounting uses
+		 * TB rather than ticks, so it can be done without enabling
+		 * interrupts here, which has the problem that it accounts
+		 * interrupt processing overhead to the host.
+		 */
+		local_irq_disable();
+	}
+	vtime_account_guest_exit();
 
 	local_irq_enable();
 
@@ -4462,7 +4475,20 @@ int kvmhv_run_single_vcpu(struct kvm_vcp
 
 	kvmppc_set_host_core(pcpu);
 
-	guest_exit_irqoff();
+	context_tracking_guest_exit();
+	if (!vtime_accounting_enabled_this_cpu()) {
+		local_irq_enable();
+		/*
+		 * Service IRQs here before vtime_account_guest_exit() so any
+		 * ticks that occurred while running the guest are accounted to
+		 * the guest. If vtime accounting is enabled, accounting uses
+		 * TB rather than ticks, so it can be done without enabling
+		 * interrupts here, which has the problem that it accounts
+		 * interrupt processing overhead to the host.
+		 */
+		local_irq_disable();
+	}
+	vtime_account_guest_exit();
 
 	local_irq_enable();
 
arch/powerpc/kvm/booke.c +15 -1
@@ -1047,7 +1047,21 @@ int kvmppc_handle_exit(struct kvm_vcpu *
 	}
 
 	trace_kvm_exit(exit_nr, vcpu);
-	guest_exit_irqoff();
+
+	context_tracking_guest_exit();
+	if (!vtime_accounting_enabled_this_cpu()) {
+		local_irq_enable();
+		/*
+		 * Service IRQs here before vtime_account_guest_exit() so any
+		 * ticks that occurred while running the guest are accounted to
+		 * the guest. If vtime accounting is enabled, accounting uses
+		 * TB rather than ticks, so it can be done without enabling
+		 * interrupts here, which has the problem that it accounts
+		 * interrupt processing overhead to the host.
+		 */
+		local_irq_disable();
+	}
+	vtime_account_guest_exit();
 
 	local_irq_enable();
 
author maintainer
#104 lore raw

PATCH 104/849 ia64: kprobes: Fix to pass correct trampoline address to the handler

In reply to Greg Kroah-Hartman

From: Masami Hiramatsu <[email protected]>

commit a7fe2378454cf46cd5e2776d05e72bbe8f0a468c upstream.

The following commit:

Commit e792ff804f49 ("ia64: kprobes: Use generic kretprobe trampoline handler")

Passed the wrong trampoline address to __kretprobe_trampoline_handler(): it passes the descriptor address instead of function entry address.

Pass the right parameter.

Also use correct symbol dereference function to get the function address from 'kretprobe_trampoline' - an IA64 special.

Fixes e792ff804f49 ("ia64: kprobes: Use generic kretprobe trampoline handler")
Cc Josh Poimboeuf <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc X86 ML <[email protected]>
Cc Daniel Xu <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Abhishek Sagar <[email protected]>
Cc Andrii Nakryiko <[email protected]>
Cc Paul McKenney <[email protected]>
---
 arch/ia64/kernel/kprobes.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
arch/ia64/kernel/kprobes.c +5 -4
@@ -398,7 +398,8 @@ static void kretprobe_trampoline(void)
 
 int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
 {
-	regs->cr_iip = __kretprobe_trampoline_handler(regs, kretprobe_trampoline, NULL);
+	regs->cr_iip = __kretprobe_trampoline_handler(regs,
+		dereference_function_descriptor(kretprobe_trampoline), NULL);
 	/*
 	 * By returning a non-zero value, we are telling
 	 * kprobe_handler() that we don't want the post_handler
@@ -414,7 +415,7 @@ void __kprobes arch_prepare_kretprobe(st
 	ri->fp = NULL;
 
 	/* Replace the return addr with trampoline addr */
-	regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip;
+	regs->b0 = (unsigned long)dereference_function_descriptor(kretprobe_trampoline);
 }
 
 /* Check the instruction in the slot is break */
@@ -902,14 +903,14 @@ static struct kprobe trampoline_p = {
 int __init arch_init_kprobes(void)
 {
 	trampoline_p.addr =
-		(kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip;
+		dereference_function_descriptor(kretprobe_trampoline);
 	return register_kprobe(&trampoline_p);
 }
 
 int __kprobes arch_trampoline_kprobe(struct kprobe *p)
 {
 	if (p->addr ==
-		(kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip)
+		dereference_function_descriptor(kretprobe_trampoline))
 		return 1;
 
 	return 0;
author maintainer
#105 lore raw

PATCH 105/849 selinux: fix race condition when computing ocontext SIDs

In reply to Greg Kroah-Hartman

From: Ondrej Mosnacek <[email protected]>

commit cbfcd13be5cb2a07868afe67520ed181956579a7 upstream.

Current code contains a lot of racy patterns when converting an ocontext's context structure to an SID. This is being done in a "lazy" fashion, such that the SID is looked up in the SID table only when it's first needed and then cached in the "sid" field of the ocontext structure. However, this is done without any locking or memory barriers and is thus unsafe.

Between commits 24ed7fdae669 ("selinux: use separate table for initial SID lookup") and 66f8e2f03c02 ("selinux: sidtab reverse lookup hash table"), this race condition lead to an actual observable bug, because a pointer to the shared sid field was passed directly to sidtab_context_to_sid(), which was using this location to also store an intermediate value, which could have been read by other threads and interpreted as an SID. In practice this caused e.g. new mounts to get a wrong (seemingly random) filesystem context, leading to strange denials. This bug has been spotted in the wild at least twice, see [1] and [2].

Fix the race condition by making all the racy functions use a common helper that ensures the ocontext::sid accesses are made safely using the appropriate SMP constructs.

Note that security_netif_sid() was populating the sid field of both contexts stored in the ocontext, but only the first one was actually used. The SELinux wiki's documentation on the "netifcon" policy statement [3] suggests that using only the first context is intentional. I kept only the handling of the first context here, as there is really no point in doing the SID lookup for the unused one.

I wasn't able to reproduce the bug mentioned above on any kernel that includes commit 66f8e2f03c02, even though it has been reported that the issue occurs with that commit, too, just less frequently. Thus, I wasn't able to verify that this patch fixes the issue, but it makes sense to avoid the race condition regardless.

[1] https://github.com/containers/container-selinux/issues/89
[2] https://lists.fedoraproject.org/archives/list/[email protected]/thread/6DMTAMHIOAOEMUAVTULJD45JZU7IBAFM/
[3] https://selinuxproject.org/page/NetworkStatements#netifcon

---
 security/selinux/ss/services.c |  162 +++++++++++++++++++----------------------
 1 file changed, 77 insertions(+), 85 deletions(-)
security/selinux/ss/services.c +77 -85
@@ -2375,6 +2375,43 @@ err_policy:
 }
 
 /**
+ * ocontext_to_sid - Helper to safely get sid for an ocontext
+ * @sidtab: SID table
+ * @c: ocontext structure
+ * @index: index of the context entry (0 or 1)
+ * @out_sid: pointer to the resulting SID value
+ *
+ * For all ocontexts except OCON_ISID the SID fields are populated
+ * on-demand when needed. Since updating the SID value is an SMP-sensitive
+ * operation, this helper must be used to do that safely.
+ *
+ * WARNING: This function may return -ESTALE, indicating that the caller
+ * must retry the operation after re-acquiring the policy pointer!
+ */
+static int ocontext_to_sid(struct sidtab *sidtab, struct ocontext *c,
+			   size_t index, u32 *out_sid)
+{
+	int rc;
+	u32 sid;
+
+	/* Ensure the associated sidtab entry is visible to this thread. */
+	sid = smp_load_acquire(&c->sid[index]);
+	if (!sid) {
+		rc = sidtab_context_to_sid(sidtab, &c->context[index], &sid);
+		if (rc)
+			return rc;
+
+		/*
+		 * Ensure the new sidtab entry is visible to other threads
+		 * when they see the SID.
+		 */
+		smp_store_release(&c->sid[index], sid);
+	}
+	*out_sid = sid;
+	return 0;
+}
+
+/**
  * security_port_sid - Obtain the SID for a port.
  * @state: SELinux state
  * @protocol: protocol number
@@ -2412,17 +2449,13 @@ retry:
 	}
 
 	if (c) {
-		if (!c->sid[0]) {
-			rc = sidtab_context_to_sid(sidtab, &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, out_sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		*out_sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else {
 		*out_sid = SECINITSID_PORT;
 	}
@@ -2471,18 +2504,13 @@ retry:
 	}
 
 	if (c) {
-		if (!c->sid[0]) {
-			rc = sidtab_context_to_sid(sidtab,
-						   &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, out_sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		*out_sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else
 		*out_sid = SECINITSID_UNLABELED;
 
@@ -2531,17 +2559,13 @@ retry:
 	}
 
 	if (c) {
-		if (!c->sid[0]) {
-			rc = sidtab_context_to_sid(sidtab, &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, out_sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		*out_sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else
 		*out_sid = SECINITSID_UNLABELED;
 
@@ -2585,25 +2609,13 @@ retry:
 	}
 
 	if (c) {
-		if (!c->sid[0] || !c->sid[1]) {
-			rc = sidtab_context_to_sid(sidtab, &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
-			rc = sidtab_context_to_sid(sidtab, &c->context[1],
-						   &c->sid[1]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, if_sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		*if_sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else
 		*if_sid = SECINITSID_NETIF;
 
@@ -2695,18 +2707,13 @@ retry:
 	}
 
 	if (c) {
-		if (!c->sid[0]) {
-			rc = sidtab_context_to_sid(sidtab,
-						   &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, out_sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		*out_sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else {
 		*out_sid = SECINITSID_NODE;
 	}
@@ -2871,7 +2878,7 @@ static inline int __security_genfs_sid(s
 	u16 sclass;
 	struct genfs *genfs;
 	struct ocontext *c;
-	int rc, cmp = 0;
+	int cmp = 0;
 
 	while (path[0] == '/' && path[1] == '/')
 		path++;
@@ -2885,9 +2892,8 @@ static inline int __security_genfs_sid(s
 			break;
 	}
 
-	rc = -ENOENT;
 	if (!genfs || cmp)
-		goto out;
+		return -ENOENT;
 
 	for (c = genfs->head; c; c = c->next) {
 		len = strlen(c->u.name);
@@ -2896,20 +2902,10 @@ static inline int __security_genfs_sid(s
 			break;
 	}
 
-	rc = -ENOENT;
 	if (!c)
-		goto out;
+		return -ENOENT;
 
-	if (!c->sid[0]) {
-		rc = sidtab_context_to_sid(sidtab, &c->context[0], &c->sid[0]);
-		if (rc)
-			goto out;
-	}
-
-	*sid = c->sid[0];
-	rc = 0;
-out:
-	return rc;
+	return ocontext_to_sid(sidtab, c, 0, sid);
 }
 
 /**
@@ -2994,17 +2990,13 @@ retry:
 
 	if (c) {
 		sbsec->behavior = c->v.behavior;
-		if (!c->sid[0]) {
-			rc = sidtab_context_to_sid(sidtab, &c->context[0],
-						   &c->sid[0]);
-			if (rc == -ESTALE) {
-				rcu_read_unlock();
-				goto retry;
-			}
-			if (rc)
-				goto out;
+		rc = ocontext_to_sid(sidtab, c, 0, &sbsec->sid);
+		if (rc == -ESTALE) {
+			rcu_read_unlock();
+			goto retry;
 		}
-		sbsec->sid = c->sid[0];
+		if (rc)
+			goto out;
 	} else {
 		rc = __security_genfs_sid(policy, fstype, "/",
 					SECCLASS_DIR, &sbsec->sid);
author maintainer
#106 lore raw

PATCH 106/849 ipmi:watchdog: Set panic count to proper value on a panic

In reply to Greg Kroah-Hartman

From: Corey Minyard <[email protected]>

commit db05ddf7f321634c5659a0cf7ea56594e22365f7 upstream.

You will get two decrements when the messages on a panic are sent, not one, since commit 2033f6858970 ("ipmi: Free receive messages when in an oops") was added, but the watchdog code had a bug where it didn't set the value properly.

Cc <[email protected]> # v5.4+
Fixes 2033f6858970 ("ipmi: Free receive messages when in an oops")
---
 drivers/char/ipmi/ipmi_watchdog.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/ipmi/ipmi_watchdog.c +4 -4
@@ -497,7 +497,7 @@ static void panic_halt_ipmi_heartbeat(vo
 	msg.cmd = IPMI_WDOG_RESET_TIMER;
 	msg.data = NULL;
 	msg.data_len = 0;
-	atomic_inc(&panic_done_count);
+	atomic_add(2, &panic_done_count);
 	rv = ipmi_request_supply_msgs(watchdog_user,
 				      (struct ipmi_addr *) &addr,
 				      0,
@@ -507,7 +507,7 @@ static void panic_halt_ipmi_heartbeat(vo
 				      &panic_halt_heartbeat_recv_msg,
 				      1);
 	if (rv)
-		atomic_dec(&panic_done_count);
+		atomic_sub(2, &panic_done_count);
 }
 
 static struct ipmi_smi_msg panic_halt_smi_msg = {
@@ -531,12 +531,12 @@ static void panic_halt_ipmi_set_timeout(
 	/* Wait for the messages to be free. */
 	while (atomic_read(&panic_done_count) != 0)
 		ipmi_poll_interface(watchdog_user);
-	atomic_inc(&panic_done_count);
+	atomic_add(2, &panic_done_count);
 	rv = __ipmi_set_timeout(&panic_halt_smi_msg,
 				&panic_halt_recv_msg,
 				&send_heartbeat_now);
 	if (rv) {
-		atomic_dec(&panic_done_count);
+		atomic_sub(2, &panic_done_count);
 		pr_warn("Unable to extend the watchdog timeout\n");
 	} else {
 		if (send_heartbeat_now)
author maintainer
#107 lore raw

PATCH 107/849 md/raid1: only allocate write behind bio for WriteMostly device

In reply to Greg Kroah-Hartman

From: Guoqing Jiang <[email protected]>

commit fd3b6975e9c11c4fa00965f82a0bfbb3b7b44101 upstream.

Commit 6607cd319b6b91bff94e90f798a61c031650b514 ("raid1: ensure write behind bio has less than BIO_MAX_VECS sectors") tried to guarantee the size of behind bio is not bigger than BIO_MAX_VECS sectors.

Unfortunately the same calltrace still could happen since an array could enable write-behind without write mostly device.

To match the manpage of mdadm (which says "write-behind is only attempted on drives marked as write-mostly"), we need to check WriteMostly flag to avoid such unexpected behavior.

[1]. https://bugzilla.kernel.org/show_bug.cgi?id=213181#c25

---
 drivers/md/raid1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid1.c +1 -1
@@ -1496,7 +1496,7 @@ static void raid1_write_request(struct m
 		if (!r1_bio->bios[i])
 			continue;
 
-		if (first_clone) {
+		if (first_clone && test_bit(WriteMostly, &rdev->flags)) {
 			/* do behind I/O ?
 			 * Not if there are too many, or cannot
 			 * allocate memory, or a reader on WriteMostly
author maintainer
#108 lore raw

PATCH 108/849 hwmon: (pmbus/lm25066) Add offset coefficients

In reply to Greg Kroah-Hartman

From: Zev Weiss <[email protected]>

commit ae59dc455a78fb73034dd1fbb337d7e59c27cbd8 upstream.

With the exception of the lm5066i, all the devices handled by this driver had been missing their offset ('b') coefficients for direct format readings.

Fixes 58615a94f6a1 ("hwmon: (pmbus/lm25066) Add support for LM25056")
Fixes e53e6497fc9f ("hwmon: (pmbus/lm25066) Refactor device specific coefficients")
---
 drivers/hwmon/pmbus/lm25066.c |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
drivers/hwmon/pmbus/lm25066.c +23 -0
@@ -55,22 +55,27 @@ static struct __coeff lm25066_coeff[6][P
 	[lm25056] = {
 		[PSC_VOLTAGE_IN] = {
 			.m = 16296,
+			.b = 1343,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN] = {
 			.m = 13797,
+			.b = -1833,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN_L] = {
 			.m = 6726,
+			.b = -537,
 			.R = -2,
 		},
 		[PSC_POWER] = {
 			.m = 5501,
+			.b = -2908,
 			.R = -3,
 		},
 		[PSC_POWER_L] = {
 			.m = 26882,
+			.b = -5646,
 			.R = -4,
 		},
 		[PSC_TEMPERATURE] = {
@@ -82,26 +87,32 @@ static struct __coeff lm25066_coeff[6][P
 	[lm25066] = {
 		[PSC_VOLTAGE_IN] = {
 			.m = 22070,
+			.b = -1800,
 			.R = -2,
 		},
 		[PSC_VOLTAGE_OUT] = {
 			.m = 22070,
+			.b = -1800,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN] = {
 			.m = 13661,
+			.b = -5200,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN_L] = {
 			.m = 6852,
+			.b = -3100,
 			.R = -2,
 		},
 		[PSC_POWER] = {
 			.m = 736,
+			.b = -3300,
 			.R = -2,
 		},
 		[PSC_POWER_L] = {
 			.m = 369,
+			.b = -1900,
 			.R = -2,
 		},
 		[PSC_TEMPERATURE] = {
@@ -111,26 +122,32 @@ static struct __coeff lm25066_coeff[6][P
 	[lm5064] = {
 		[PSC_VOLTAGE_IN] = {
 			.m = 4611,
+			.b = -642,
 			.R = -2,
 		},
 		[PSC_VOLTAGE_OUT] = {
 			.m = 4621,
+			.b = 423,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN] = {
 			.m = 10742,
+			.b = 1552,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN_L] = {
 			.m = 5456,
+			.b = 2118,
 			.R = -2,
 		},
 		[PSC_POWER] = {
 			.m = 1204,
+			.b = 8524,
 			.R = -3,
 		},
 		[PSC_POWER_L] = {
 			.m = 612,
+			.b = 11202,
 			.R = -3,
 		},
 		[PSC_TEMPERATURE] = {
@@ -140,26 +157,32 @@ static struct __coeff lm25066_coeff[6][P
 	[lm5066] = {
 		[PSC_VOLTAGE_IN] = {
 			.m = 4587,
+			.b = -1200,
 			.R = -2,
 		},
 		[PSC_VOLTAGE_OUT] = {
 			.m = 4587,
+			.b = -2400,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN] = {
 			.m = 10753,
+			.b = -1200,
 			.R = -2,
 		},
 		[PSC_CURRENT_IN_L] = {
 			.m = 5405,
+			.b = -600,
 			.R = -2,
 		},
 		[PSC_POWER] = {
 			.m = 1204,
+			.b = -6000,
 			.R = -3,
 		},
 		[PSC_POWER_L] = {
 			.m = 605,
+			.b = -8000,
 			.R = -3,
 		},
 		[PSC_TEMPERATURE] = {
author maintainer
#109 lore raw

PATCH 109/849 regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled

In reply to Greg Kroah-Hartman

From: Krzysztof Kozlowski <[email protected]>

commit b16bef60a9112b1e6daf3afd16484eb06e7ce792 upstream.

The driver and its bindings, before commit 04f9f068a619 ("regulator:
s5m8767: Modify parsing method of the voltage table of buck2/3/4") were requiring to provide at least one safe/default voltage for DVS registers if DVS GPIO is not being enabled.

IOW, if s5m8767,pmic-buck2-uses-gpio-dvs is missing, the s5m8767,pmic-buck2-dvs-voltage should still be present and contain one voltage.

This requirement was coming from driver behavior matching this condition (none of DVS GPIO is enabled): it was always initializing the DVS selector pins to 0 and keeping the DVS enable setting at reset value (enabled). Therefore if none of DVS GPIO is enabled in devicetree, driver was configuring the first DVS voltage for buck[234].

Mentioned commit 04f9f068a619 ("regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4") broke it because DVS voltage won't be parsed from devicetree if DVS GPIO is not enabled. After the change, driver will configure bucks to use the register reset value as voltage which might have unpleasant effects.

Fix this by relaxing the bindings constrain: if DVS GPIO is not enabled in devicetree (therefore DVS voltage is also not parsed), explicitly disable it.

Fixes 04f9f068a619 ("regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4")

Message-Id: <[email protected]>

---
 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt |   21 +++-------
 drivers/regulator/s5m8767.c                                     |   21 ++++------
 2 files changed, 17 insertions(+), 25 deletions(-)
Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt +8 -13
@@ -13,6 +13,14 @@ common regulator binding documented in:
 
 
 Required properties of the main device node (the parent!):
+ - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
+   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
+
+ [1] If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
+     property is specified, then all the eight voltage values for the
+     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
+
+Optional properties of the main device node (the parent!):
  - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
    units for buck2 when changing voltage using gpio dvs. Refer to [1] below
    for additional information.
@@ -25,19 +33,6 @@ Required properties of the main device n
    units for buck4 when changing voltage using gpio dvs. Refer to [1] below
    for additional information.
 
- - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
-   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
-
- [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
-     property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
-     property should specify atleast one voltage level (which would be a
-     safe operating voltage).
-
-     If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
-     property is specified, then all the eight voltage values for the
-     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
-
-Optional properties of the main device node (the parent!):
  - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
  - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
  - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
drivers/regulator/s5m8767.c +9 -12
@@ -850,18 +850,15 @@ static int s5m8767_pmic_probe(struct pla
 	/* DS4 GPIO */
 	gpio_direction_output(pdata->buck_ds[2], 0x0);
 
-	if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs ||
-	   pdata->buck4_gpiodvs) {
-		regmap_update_bits(s5m8767->iodev->regmap_pmic,
-				S5M8767_REG_BUCK2CTRL, 1 << 1,
-				(pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1));
-		regmap_update_bits(s5m8767->iodev->regmap_pmic,
-				S5M8767_REG_BUCK3CTRL, 1 << 1,
-				(pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1));
-		regmap_update_bits(s5m8767->iodev->regmap_pmic,
-				S5M8767_REG_BUCK4CTRL, 1 << 1,
-				(pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1));
-	}
+	regmap_update_bits(s5m8767->iodev->regmap_pmic,
+			   S5M8767_REG_BUCK2CTRL, 1 << 1,
+			   (pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1));
+	regmap_update_bits(s5m8767->iodev->regmap_pmic,
+			   S5M8767_REG_BUCK3CTRL, 1 << 1,
+			   (pdata->buck3_gpiodvs) ? (1 << 1) : (0 << 1));
+	regmap_update_bits(s5m8767->iodev->regmap_pmic,
+			   S5M8767_REG_BUCK4CTRL, 1 << 1,
+			   (pdata->buck4_gpiodvs) ? (1 << 1) : (0 << 1));
 
 	/* Initialize GPIO DVS registers */
 	for (i = 0; i < 8; i++) {
author maintainer
#110 lore raw

PATCH 110/849 regulator: dt-bindings: samsung,s5m8767: correct s5m8767,pmic-buck-default-dvs-idx property

In reply to Greg Kroah-Hartman

From: Krzysztof Kozlowski <[email protected]>

commit a7fda04bc9b6ad9da8e19c9e6e3b1dab773d068a upstream.

The driver was always parsing "s5m8767,pmic-buck-default-dvs-idx", not "s5m8767,pmic-buck234-default-dvs-idx".

Fixes 26aec009f6b6 ("regulator: add device tree support for s5m8767")

Message-Id: <[email protected]>

---
 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt +1 -1
@@ -39,7 +39,7 @@ Optional properties of the main device n
 
 Additional properties required if either of the optional properties are used:
 
- - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
+ - s5m8767,pmic-buck-default-dvs-idx: Default voltage setting selected from
    the possible 8 options selectable by the dvs gpios. The value of this
    property should be between 0 and 7. If not specified or if out of range, the
    default value of this property is set to 0.
author maintainer
#111 lore raw

PATCH 111/849 EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell

In reply to Greg Kroah-Hartman

From: Eric Badger <[email protected]>

commit 537bddd069c743759addf422d0b8f028ff0f8dbc upstream.

The computation of TOHM is off by one bit. This missed bit results in too low a value for TOHM, which can cause errors in regular memory to incorrectly report:

EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory

---
 drivers/edac/sb_edac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/sb_edac.c +1 -1
@@ -1052,7 +1052,7 @@ static u64 haswell_get_tohm(struct sbrid
 	pci_read_config_dword(pvt->info.pci_vtd, HASWELL_TOHM_1, &reg);
 	rc = ((reg << 6) | rc) << 26;
 
-	return rc | 0x1ffffff;
+	return rc | 0x3ffffff;
 }
 
 static u64 knl_get_tolm(struct sbridge_pvt *pvt)
author maintainer
#112 lore raw

PATCH 112/849 mwifiex: fix division by zero in fw download path

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 89f8765a11d8df49296d92c404067f9b5c58ee26 upstream.

Add the missing endpoint sanity checks to probe() to avoid division by zero in mwifiex_write_data_sync() in case a malicious device has broken descriptors (or when doing descriptor fuzz testing).

Only add checks for the firmware-download boot stage, which require both command endpoints, for now. The driver looks like it will handle a missing endpoint during normal operation without oopsing, albeit not very gracefully as it will try to submit URBs to the default pipe and fail.

Note that USB core will reject URBs submitted for endpoints with zero wMaxPacketSize but that drivers doing packet-size calculations still need to handle this (cf. commit 2548288b4fb0 ("USB: Fix: Don't skip endpoint descriptors with maxpacket=0")).

Fixes 4daffe354366 ("mwifiex: add support for Marvell USB8797 chipset")
Cc Amitkumar Karwar <[email protected]>
---
 drivers/net/wireless/marvell/mwifiex/usb.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/net/wireless/marvell/mwifiex/usb.c +16 -0
@@ -505,6 +505,22 @@ static int mwifiex_usb_probe(struct usb_
 		}
 	}
 
+	switch (card->usb_boot_state) {
+	case USB8XXX_FW_DNLD:
+		/* Reject broken descriptors. */
+		if (!card->rx_cmd_ep || !card->tx_cmd_ep)
+			return -ENODEV;
+		if (card->bulk_out_maxpktsize == 0)
+			return -ENODEV;
+		break;
+	case USB8XXX_FW_READY:
+		/* Assume the driver can handle missing endpoints for now. */
+		break;
+	default:
+		WARN_ON(1);
+		return -ENODEV;
+	}
+
 	usb_set_intfdata(intf, card);
 
 	ret = mwifiex_add_card(card, &card->fw_done, &usb_ops,
author maintainer
#113 lore raw

PATCH 113/849 ath6kl: fix division by zero in send path

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit c1b9ca365deae667192be9fe24db244919971234 upstream.

Add the missing endpoint max-packet sanity check to probe() to avoid division by zero in ath10k_usb_hif_tx_sg() in case a malicious device has broken descriptors (or when doing descriptor fuzz testing).

Note that USB core will reject URBs submitted for endpoints with zero wMaxPacketSize but that drivers doing packet-size calculations still need to handle this (cf. commit 2548288b4fb0 ("USB: Fix: Don't skip endpoint descriptors with maxpacket=0")).

---
 drivers/net/wireless/ath/ath6kl/usb.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/net/wireless/ath/ath6kl/usb.c +5 -0
@@ -340,6 +340,11 @@ static int ath6kl_usb_setup_pipe_resourc
 				   le16_to_cpu(endpoint->wMaxPacketSize),
 				   endpoint->bInterval);
 		}
+
+		/* Ignore broken descriptors. */
+		if (usb_endpoint_maxp(endpoint) == 0)
+			continue;
+
 		urbcount = 0;
 
 		pipe_num =
author maintainer
#114 lore raw

PATCH 114/849 ath6kl: fix control-message timeout

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit a066d28a7e729f808a3e6eff22e70c003091544e upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 241b128b6b69 ("ath6kl: add back beginnings of USB support")
---
 drivers/net/wireless/ath/ath6kl/usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/usb.c +1 -1
@@ -912,7 +912,7 @@ static int ath6kl_usb_submit_ctrl_in(str
 				 req,
 				 USB_DIR_IN | USB_TYPE_VENDOR |
 				 USB_RECIP_DEVICE, value, index, buf,
-				 size, 2 * HZ);
+				 size, 2000);
 
 	if (ret < 0) {
 		ath6kl_warn("Failed to read usb control message: %d\n", ret);
author maintainer
#115 lore raw

PATCH 115/849 ath10k: fix control-message timeout

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 5286132324230168d3fab6ffc16bfd7de85bdfb4 upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 4db66499df91 ("ath10k: add initial USB support")
Cc Erik Stromdahl <[email protected]>
---
 drivers/net/wireless/ath/ath10k/usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/usb.c +1 -1
@@ -525,7 +525,7 @@ static int ath10k_usb_submit_ctrl_in(str
 			      req,
 			      USB_DIR_IN | USB_TYPE_VENDOR |
 			      USB_RECIP_DEVICE, value, index, buf,
-			      size, 2 * HZ);
+			      size, 2000);
 
 	if (ret < 0) {
 		ath10k_warn(ar, "Failed to read usb control message: %d\n",
author maintainer
#116 lore raw

PATCH 116/849 ath10k: fix division by zero in send path

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit a006acb931317aad3a8dd41333ebb0453caf49b8 upstream.

Add the missing endpoint max-packet sanity check to probe() to avoid division by zero in ath10k_usb_hif_tx_sg() in case a malicious device has broken descriptors (or when doing descriptor fuzz testing).

Note that USB core will reject URBs submitted for endpoints with zero wMaxPacketSize but that drivers doing packet-size calculations still need to handle this (cf. commit 2548288b4fb0 ("USB: Fix: Don't skip endpoint descriptors with maxpacket=0")).

Fixes 4db66499df91 ("ath10k: add initial USB support")
Cc Erik Stromdahl <[email protected]>
---
 drivers/net/wireless/ath/ath10k/usb.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/net/wireless/ath/ath10k/usb.c +5 -0
@@ -853,6 +853,11 @@ static int ath10k_usb_setup_pipe_resourc
 				   le16_to_cpu(endpoint->wMaxPacketSize),
 				   endpoint->bInterval);
 		}
+
+		/* Ignore broken descriptors. */
+		if (usb_endpoint_maxp(endpoint) == 0)
+			continue;
+
 		urbcount = 0;
 
 		pipe_num =
author maintainer
#117 lore raw

PATCH 117/849 PCI: Mark Atheros QCA6174 to avoid bus reset

In reply to Greg Kroah-Hartman

From: Ingmar Klein <[email protected]>

commit e3f4bd3462f6f796594ecc0dda7144ed2d1e5a26 upstream.

When passing the Atheros QCA6174 through to a virtual machine, the VM hangs at the point where the ath10k driver loads.

Add a quirk to avoid bus resets on this device, which avoids the hang.

---
 drivers/pci/quirks.c |    1 +
 1 file changed, 1 insertion(+)
drivers/pci/quirks.c +1 -0
@@ -3573,6 +3573,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003e, quirk_no_bus_reset);
 
 /*
  * Root port on some Cavium CN8xxx chips do not successfully complete a bus
author maintainer
#118 lore raw

PATCH 118/849 rtl8187: fix control-message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 2e9be536a213e838daed6ba42024dd68954ac061 upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 605bebe23bf6 ("[PATCH] Add rtl8187 wireless driver")
Cc [email protected] # 2.6.23
---
 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c +7 -7
@@ -28,7 +28,7 @@ u8 rtl818x_ioread8_idx(struct rtl8187_pr
 	usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
 			RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits8, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits8, sizeof(val), 500);
 
 	val = priv->io_dmabuf->bits8;
 	mutex_unlock(&priv->io_mutex);
@@ -45,7 +45,7 @@ u16 rtl818x_ioread16_idx(struct rtl8187_
 	usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
 			RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits16, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits16, sizeof(val), 500);
 
 	val = priv->io_dmabuf->bits16;
 	mutex_unlock(&priv->io_mutex);
@@ -62,7 +62,7 @@ u32 rtl818x_ioread32_idx(struct rtl8187_
 	usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
 			RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits32, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits32, sizeof(val), 500);
 
 	val = priv->io_dmabuf->bits32;
 	mutex_unlock(&priv->io_mutex);
@@ -79,7 +79,7 @@ void rtl818x_iowrite8_idx(struct rtl8187
 	usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
 			RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits8, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits8, sizeof(val), 500);
 
 	mutex_unlock(&priv->io_mutex);
 }
@@ -93,7 +93,7 @@ void rtl818x_iowrite16_idx(struct rtl818
 	usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
 			RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits16, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits16, sizeof(val), 500);
 
 	mutex_unlock(&priv->io_mutex);
 }
@@ -107,7 +107,7 @@ void rtl818x_iowrite32_idx(struct rtl818
 	usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
 			RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
 			(unsigned long)addr, idx & 0x03,
-			&priv->io_dmabuf->bits32, sizeof(val), HZ / 2);
+			&priv->io_dmabuf->bits32, sizeof(val), 500);
 
 	mutex_unlock(&priv->io_mutex);
 }
@@ -183,7 +183,7 @@ static void rtl8225_write_8051(struct ie
 	usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
 			RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
 			addr, 0x8225, &priv->io_dmabuf->bits16, sizeof(data),
-			HZ / 2);
+			500);
 
 	mutex_unlock(&priv->io_mutex);
 
author maintainer
#119 lore raw

PATCH 119/849 evm: mark evm_fixmode as __ro_after_init

In reply to Greg Kroah-Hartman

From: Austin Kim <[email protected]>

commit 32ba540f3c2a7ef61ed5a577ce25069a3d714fc9 upstream.

The evm_fixmode is only configurable by command-line option and it is never modified outside initcalls, so declaring it with __ro_after_init is better.

---
 security/integrity/evm/evm_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/evm/evm_main.c +1 -1
@@ -78,7 +78,7 @@ static struct xattr_list evm_config_defa
 
 LIST_HEAD(evm_config_xattrnames);
 
-static int evm_fixmode;
+static int evm_fixmode __ro_after_init;
 static int __init evm_set_fixmode(char *str)
 {
 	if (strncmp(str, "fix", 3) == 0)
author maintainer
#120 lore raw

PATCH 120/849 ifb: Depend on netfilter alternatively to tc

In reply to Greg Kroah-Hartman

From: Lukas Wunner <[email protected]>

commit 046178e726c2977d686ba5e07105d5a6685c830e upstream.

IFB originally depended on NET_CLS_ACT for traffic redirection. But since v4.5, that may be achieved with NFT_FWD_NETDEV as well.

Fixes 39e6dea28adc ("netfilter: nf_tables: add forward expression to the netdev family")
Cc <[email protected]> # v4.5+: bcfabee1afd9: netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress
Cc <[email protected]> # v4.5+
---
 drivers/net/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/Kconfig +1 -1
@@ -150,7 +150,7 @@ config NET_FC
 
 config IFB
 	tristate "Intermediate Functional Block support"
-	depends on NET_CLS_ACT
+	depends on NET_ACT_MIRRED || NFT_FWD_NETDEV
 	select NET_REDIRECT
 	help
 	  This is an intermediate driver that allows sharing of
author maintainer
#121 lore raw

PATCH 121/849 platform/surface: aggregator_registry: Add support for Surface Laptop Studio

In reply to Greg Kroah-Hartman

From: Maximilian Luz <[email protected]>

commit 4f042e40199ce8bac6bc2b853e81744ee4ea759c upstream.

Add support for the Surface Laptop Studio.

In contrast to previous Surface Laptop models, this one has its HID devices attached to target ID 1 (instead of 2). It also has a couple more of them, including a new notifier for when the pen is stashed / taken out of its place, a "Sys Control" device, and two other unidentified HID devices with unknown usages.

Battery and performance profile interfaces remain the same.

---
 drivers/platform/surface/surface_aggregator_registry.c |   54 +++++++++++++++++
 1 file changed, 54 insertions(+)
drivers/platform/surface/surface_aggregator_registry.c +54 -0
@@ -77,6 +77,42 @@ static const struct software_node ssam_n
 	.parent = &ssam_node_root,
 };
 
+/* HID keyboard (TID1). */
+static const struct software_node ssam_node_hid_tid1_keyboard = {
+	.name = "ssam:01:15:01:01:00",
+	.parent = &ssam_node_root,
+};
+
+/* HID pen stash (TID1; pen taken / stashed away evens). */
+static const struct software_node ssam_node_hid_tid1_penstash = {
+	.name = "ssam:01:15:01:02:00",
+	.parent = &ssam_node_root,
+};
+
+/* HID touchpad (TID1). */
+static const struct software_node ssam_node_hid_tid1_touchpad = {
+	.name = "ssam:01:15:01:03:00",
+	.parent = &ssam_node_root,
+};
+
+/* HID device instance 6 (TID1, unknown HID device). */
+static const struct software_node ssam_node_hid_tid1_iid6 = {
+	.name = "ssam:01:15:01:06:00",
+	.parent = &ssam_node_root,
+};
+
+/* HID device instance 7 (TID1, unknown HID device). */
+static const struct software_node ssam_node_hid_tid1_iid7 = {
+	.name = "ssam:01:15:01:07:00",
+	.parent = &ssam_node_root,
+};
+
+/* HID system controls (TID1). */
+static const struct software_node ssam_node_hid_tid1_sysctrl = {
+	.name = "ssam:01:15:01:08:00",
+	.parent = &ssam_node_root,
+};
+
 /* HID keyboard. */
 static const struct software_node ssam_node_hid_main_keyboard = {
 	.name = "ssam:01:15:02:01:00",
@@ -159,6 +195,21 @@ static const struct software_node *ssam_
 	NULL,
 };
 
+/* Devices for Surface Laptop Studio. */
+static const struct software_node *ssam_node_group_sls[] = {
+	&ssam_node_root,
+	&ssam_node_bat_ac,
+	&ssam_node_bat_main,
+	&ssam_node_tmp_pprof,
+	&ssam_node_hid_tid1_keyboard,
+	&ssam_node_hid_tid1_penstash,
+	&ssam_node_hid_tid1_touchpad,
+	&ssam_node_hid_tid1_iid6,
+	&ssam_node_hid_tid1_iid7,
+	&ssam_node_hid_tid1_sysctrl,
+	NULL,
+};
+
 /* Devices for Surface Laptop Go. */
 static const struct software_node *ssam_node_group_slg1[] = {
 	&ssam_node_root,
@@ -507,6 +558,9 @@ static const struct acpi_device_id ssam_
 	/* Surface Laptop Go 1 */
 	{ "MSHW0118", (unsigned long)ssam_node_group_slg1 },
 
+	/* Surface Laptop Studio */
+	{ "MSHW0123", (unsigned long)ssam_node_group_sls },
+
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, ssam_platform_hub_match);
author maintainer
#122 lore raw

PATCH 122/849 mt76: mt7615: fix skb use-after-free on mac reset

In reply to Greg Kroah-Hartman

From: Felix Fietkau <[email protected]>

commit b5cd1fd6043bbb7c5810067b5f93f3016bfd8a6f upstream.

When clearing all existing pending tx slots, mt76_tx_complete_skb needs to be used to free the skbs, to ensure that they are cleared from the status list as well.

---
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c |   45 ++++++++++++------------
 1 file changed, 23 insertions(+), 22 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +23 -22
@@ -1494,32 +1494,41 @@ out:
 }
 
 static void
-mt7615_mac_tx_free_token(struct mt7615_dev *dev, u16 token)
+mt7615_txwi_free(struct mt7615_dev *dev, struct mt76_txwi_cache *txwi)
 {
 	struct mt76_dev *mdev = &dev->mt76;
-	struct mt76_txwi_cache *txwi;
 	__le32 *txwi_data;
 	u32 val;
 	u8 wcid;
 
-	trace_mac_tx_free(dev, token);
-	txwi = mt76_token_put(mdev, token);
-	if (!txwi)
-		return;
+	mt7615_txp_skb_unmap(mdev, txwi);
+	if (!txwi->skb)
+		goto out;
 
 	txwi_data = (__le32 *)mt76_get_txwi_ptr(mdev, txwi);
 	val = le32_to_cpu(txwi_data[1]);
 	wcid = FIELD_GET(MT_TXD1_WLAN_IDX, val);
+	mt76_tx_complete_skb(mdev, wcid, txwi->skb);
 
-	mt7615_txp_skb_unmap(mdev, txwi);
-	if (txwi->skb) {
-		mt76_tx_complete_skb(mdev, wcid, txwi->skb);
-		txwi->skb = NULL;
-	}
-
+out:
+	txwi->skb = NULL;
 	mt76_put_txwi(mdev, txwi);
 }
 
+static void
+mt7615_mac_tx_free_token(struct mt7615_dev *dev, u16 token)
+{
+	struct mt76_dev *mdev = &dev->mt76;
+	struct mt76_txwi_cache *txwi;
+
+	trace_mac_tx_free(dev, token);
+	txwi = mt76_token_put(mdev, token);
+	if (!txwi)
+		return;
+
+	mt7615_txwi_free(dev, txwi);
+}
+
 static void mt7615_mac_tx_free(struct mt7615_dev *dev, struct sk_buff *skb)
 {
 	struct mt7615_tx_free *free = (struct mt7615_tx_free *)skb->data;
@@ -2026,16 +2035,8 @@ void mt7615_tx_token_put(struct mt7615_d
 	int id;
 
 	spin_lock_bh(&dev->mt76.token_lock);
-	idr_for_each_entry(&dev->mt76.token, txwi, id) {
-		mt7615_txp_skb_unmap(&dev->mt76, txwi);
-		if (txwi->skb) {
-			struct ieee80211_hw *hw;
-
-			hw = mt76_tx_status_get_hw(&dev->mt76, txwi->skb);
-			ieee80211_free_txskb(hw, txwi->skb);
-		}
-		mt76_put_txwi(&dev->mt76, txwi);
-	}
+	idr_for_each_entry(&dev->mt76.token, txwi, id)
+		mt7615_txwi_free(dev, txwi);
 	spin_unlock_bh(&dev->mt76.token_lock);
 	idr_destroy(&dev->mt76.token);
 }
author maintainer
#123 lore raw

PATCH 123/849 HID: surface-hid: Use correct event registry for managing HID events

In reply to Greg Kroah-Hartman

From: Maximilian Luz <[email protected]>

commit dc0fd0acb6e0e8025a0a43ada54513b216254fac upstream.

Until now, we have only ever seen the REG-category registry being used on devices addressed with target ID 2. In fact, we have only ever seen Surface Aggregator Module (SAM) HID devices with target ID 2. For those devices, the registry also has to be addressed with target ID 2.

Some devices, like the new Surface Laptop Studio, however, address their HID devices on target ID 1. As a result of this, any target ID 2 commands time out. This includes event management commands addressed to the target ID 2 REG-category registry. For these devices, the registry has to be addressed via target ID 1 instead.

We therefore assume that the target ID of the registry to be used depends on the target ID of the respective device. Implement this accordingly.

Note that we currently allow the surface HID driver to only load against devices with target ID 2, so these timeouts are not happening (yet). This is just a preparation step before we allow the driver to load against all target IDs.

---
 drivers/hid/surface-hid/surface_hid.c         |    2 +-
 include/linux/surface_aggregator/controller.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/hid/surface-hid/surface_hid.c +1 -1
@@ -209,7 +209,7 @@ static int surface_hid_probe(struct ssam
 
 	shid->notif.base.priority = 1;
 	shid->notif.base.fn = ssam_hid_event_fn;
-	shid->notif.event.reg = SSAM_EVENT_REGISTRY_REG;
+	shid->notif.event.reg = SSAM_EVENT_REGISTRY_REG(sdev->uid.target);
 	shid->notif.event.id.target_category = sdev->uid.category;
 	shid->notif.event.id.instance = sdev->uid.instance;
 	shid->notif.event.mask = SSAM_EVENT_MASK_STRICT;
include/linux/surface_aggregator/controller.h +2 -2
@@ -792,8 +792,8 @@ enum ssam_event_mask {
 #define SSAM_EVENT_REGISTRY_KIP	\
 	SSAM_EVENT_REGISTRY(SSAM_SSH_TC_KIP, 0x02, 0x27, 0x28)
 
-#define SSAM_EVENT_REGISTRY_REG \
-	SSAM_EVENT_REGISTRY(SSAM_SSH_TC_REG, 0x02, 0x01, 0x02)
+#define SSAM_EVENT_REGISTRY_REG(tid)\
+	SSAM_EVENT_REGISTRY(SSAM_SSH_TC_REG, tid, 0x01, 0x02)
 
 /**
  * enum ssam_event_notifier_flags - Flags for event notifiers.
author maintainer
#124 lore raw

PATCH 124/849 HID: surface-hid: Allow driver matching for target ID 1 devices

In reply to Greg Kroah-Hartman

From: Maximilian Luz <[email protected]>

commit ab5fe33925c6b03f646a1153771dab047548e4d8 upstream.

Until now we have only ever seen HID devices with target ID 2. The new Surface Laptop Studio however uses HID devices with target ID 1. Allow matching this driver to those as well.

---
 drivers/hid/surface-hid/surface_hid.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/surface-hid/surface_hid.c +1 -1
@@ -230,7 +230,7 @@ static void surface_hid_remove(struct ss
 }
 
 static const struct ssam_device_id surface_hid_match[] = {
-	{ SSAM_SDEV(HID, 0x02, SSAM_ANY_IID, 0x00) },
+	{ SSAM_SDEV(HID, SSAM_ANY_TID, SSAM_ANY_IID, 0x00) },
 	{ },
 };
 MODULE_DEVICE_TABLE(ssam, surface_hid_match);
author maintainer
#125 lore raw

PATCH 125/849 wcn36xx: Fix HT40 capability for 2Ghz band

In reply to Greg Kroah-Hartman

From: Loic Poulain <[email protected]>

commit 960ae77f25631bbe4e3aafefe209b52e044baf31 upstream.

All wcn36xx controllers are supposed to support HT40 (and SGI40), This doubles the maximum bitrate/throughput with compatible APs.

Tested with wcn3620 & wcn3680B.

Fixes 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
---
 drivers/net/wireless/ath/wcn36xx/main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/wcn36xx/main.c +3 -1
@@ -135,7 +135,9 @@ static struct ieee80211_supported_band w
 		.cap =	IEEE80211_HT_CAP_GRN_FLD |
 			IEEE80211_HT_CAP_SGI_20 |
 			IEEE80211_HT_CAP_DSSSCCK40 |
-			IEEE80211_HT_CAP_LSIG_TXOP_PROT,
+			IEEE80211_HT_CAP_LSIG_TXOP_PROT |
+			IEEE80211_HT_CAP_SGI_40 |
+			IEEE80211_HT_CAP_SUP_WIDTH_20_40,
 		.ht_supported = true,
 		.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K,
 		.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
author maintainer
#126 lore raw

PATCH 126/849 wcn36xx: Fix tx_status mechanism

In reply to Greg Kroah-Hartman

From: Loic Poulain <[email protected]>

commit a9e79b116cc4d0057e912be8f40b2c2e5bdc7c43 upstream.

This change fix the TX ack mechanism in various ways:

- For NO_ACK tagged packets, we don't need to wait for TX_ACK indication and so are not subject to the single packet ack limitation. So we don't have to stop the tx queue, and can call the tx status callback as soon as DMA transfer has completed.

- Fix skb ownership/reference. Only start status indication timeout once the DMA transfer has been completed. This avoids the skb to be both referenced in the DMA tx ring and by the tx_ack_skb pointer, preventing any use-after-free or double-free.

- This adds a sanity (paranoia?) check on the skb tx ack pointer.

- Resume TX queue if TX status tagged packet TX fails.

---
 drivers/net/wireless/ath/wcn36xx/dxe.c  |   37 ++++++++++++--------------------
 drivers/net/wireless/ath/wcn36xx/txrx.c |   31 +++++---------------------
 2 files changed, 21 insertions(+), 47 deletions(-)
drivers/net/wireless/ath/wcn36xx/dxe.c +15 -22
@@ -403,8 +403,21 @@ static void reap_tx_dxes(struct wcn36xx
 			dma_unmap_single(wcn->dev, ctl->desc->src_addr_l,
 					 ctl->skb->len, DMA_TO_DEVICE);
 			info = IEEE80211_SKB_CB(ctl->skb);
-			if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
-				/* Keep frame until TX status comes */
+			if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
+				if (info->flags & IEEE80211_TX_CTL_NO_ACK) {
+					info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
+					ieee80211_tx_status_irqsafe(wcn->hw, ctl->skb);
+				} else {
+					/* Wait for the TX ack indication or timeout... */
+					spin_lock(&wcn->dxe_lock);
+					if (WARN_ON(wcn->tx_ack_skb))
+						ieee80211_free_txskb(wcn->hw, wcn->tx_ack_skb);
+					wcn->tx_ack_skb = ctl->skb; /* Tracking ref */
+					mod_timer(&wcn->tx_ack_timer, jiffies + HZ / 10);
+					spin_unlock(&wcn->dxe_lock);
+				}
+				/* do not free, ownership transferred to mac80211 status cb */
+			} else {
 				ieee80211_free_txskb(wcn->hw, ctl->skb);
 			}
 
@@ -426,7 +439,6 @@ static irqreturn_t wcn36xx_irq_tx_comple
 {
 	struct wcn36xx *wcn = (struct wcn36xx *)dev;
 	int int_src, int_reason;
-	bool transmitted = false;
 
 	wcn36xx_dxe_read_register(wcn, WCN36XX_DXE_INT_SRC_RAW_REG, &int_src);
 
@@ -466,7 +478,6 @@ static irqreturn_t wcn36xx_irq_tx_comple
 		if (int_reason & (WCN36XX_CH_STAT_INT_DONE_MASK |
 				  WCN36XX_CH_STAT_INT_ED_MASK)) {
 			reap_tx_dxes(wcn, &wcn->dxe_tx_h_ch);
-			transmitted = true;
 		}
 	}
 
@@ -479,7 +490,6 @@ static irqreturn_t wcn36xx_irq_tx_comple
 					   WCN36XX_DXE_0_INT_CLR,
 					   WCN36XX_INT_MASK_CHAN_TX_L);
 
-
 		if (int_reason & WCN36XX_CH_STAT_INT_ERR_MASK ) {
 			wcn36xx_dxe_write_register(wcn,
 						   WCN36XX_DXE_0_INT_ERR_CLR,
@@ -507,25 +517,8 @@ static irqreturn_t wcn36xx_irq_tx_comple
 		if (int_reason & (WCN36XX_CH_STAT_INT_DONE_MASK |
 				  WCN36XX_CH_STAT_INT_ED_MASK)) {
 			reap_tx_dxes(wcn, &wcn->dxe_tx_l_ch);
-			transmitted = true;
-		}
-	}
-
-	spin_lock(&wcn->dxe_lock);
-	if (wcn->tx_ack_skb && transmitted) {
-		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(wcn->tx_ack_skb);
-
-		/* TX complete, no need to wait for 802.11 ack indication */
-		if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS &&
-		    info->flags & IEEE80211_TX_CTL_NO_ACK) {
-			info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
-			del_timer(&wcn->tx_ack_timer);
-			ieee80211_tx_status_irqsafe(wcn->hw, wcn->tx_ack_skb);
-			wcn->tx_ack_skb = NULL;
-			ieee80211_wake_queues(wcn->hw);
 		}
 	}
-	spin_unlock(&wcn->dxe_lock);
 
 	return IRQ_HANDLED;
 }
drivers/net/wireless/ath/wcn36xx/txrx.c +6 -25
@@ -502,10 +502,11 @@ int wcn36xx_start_tx(struct wcn36xx *wcn
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct wcn36xx_vif *vif_priv = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	unsigned long flags;
 	bool is_low = ieee80211_is_data(hdr->frame_control);
 	bool bcast = is_broadcast_ether_addr(hdr->addr1) ||
 		is_multicast_ether_addr(hdr->addr1);
+	bool ack_ind = (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) &&
+					!(info->flags & IEEE80211_TX_CTL_NO_ACK);
 	struct wcn36xx_tx_bd bd;
 	int ret;
 
@@ -521,30 +522,16 @@ int wcn36xx_start_tx(struct wcn36xx *wcn
 
 	bd.dpu_rf = WCN36XX_BMU_WQ_TX;
 
-	if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
+	if (unlikely(ack_ind)) {
 		wcn36xx_dbg(WCN36XX_DBG_DXE, "TX_ACK status requested\n");
 
-		spin_lock_irqsave(&wcn->dxe_lock, flags);
-		if (wcn->tx_ack_skb) {
-			spin_unlock_irqrestore(&wcn->dxe_lock, flags);
-			wcn36xx_warn("tx_ack_skb already set\n");
-			return -EINVAL;
-		}
-
-		wcn->tx_ack_skb = skb;
-		spin_unlock_irqrestore(&wcn->dxe_lock, flags);
-
 		/* Only one at a time is supported by fw. Stop the TX queues
 		 * until the ack status gets back.
 		 */
 		ieee80211_stop_queues(wcn->hw);
 
-		/* TX watchdog if no TX irq or ack indication received  */
-		mod_timer(&wcn->tx_ack_timer, jiffies + HZ / 10);
-
 		/* Request ack indication from the firmware */
-		if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
-			bd.tx_comp = 1;
+		bd.tx_comp = 1;
 	}
 
 	/* Data frames served first*/
@@ -558,14 +545,8 @@ int wcn36xx_start_tx(struct wcn36xx *wcn
 	bd.tx_bd_sign = 0xbdbdbdbd;
 
 	ret = wcn36xx_dxe_tx_frame(wcn, vif_priv, &bd, skb, is_low);
-	if (ret && (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
-		/* If the skb has not been transmitted,
-		 * don't keep a reference to it.
-		 */
-		spin_lock_irqsave(&wcn->dxe_lock, flags);
-		wcn->tx_ack_skb = NULL;
-		spin_unlock_irqrestore(&wcn->dxe_lock, flags);
-
+	if (unlikely(ret && ack_ind)) {
+		/* If the skb has not been transmitted, resume TX queue */
 		ieee80211_wake_queues(wcn->hw);
 	}
 
author maintainer
#127 lore raw

PATCH 127/849 wcn36xx: Fix (QoS) null data frame bitrate/modulation

In reply to Greg Kroah-Hartman

From: Loic Poulain <[email protected]>

commit d3fd2c95c1c13ec217d43ebef3c61cfa00a6cd37 upstream.

We observe unexpected connection drops with some APs due to non-acked mac80211 generated null data frames (keep-alive). After debugging and capture, we noticed that null frames are submitted at standard data bitrate and that the given APs are in trouble with that.

After setting the null frame bitrate to control bitrate, all null frames are acked as expected and connection is maintained.

Not sure if it's a requirement of the specification, but it seems the right thing to do anyway, null frames are mostly used for control purpose (power-saving, keep-alive...), and submitting them with a slower/simpler bitrate/modulation is more robust.

---
 drivers/net/wireless/ath/wcn36xx/txrx.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/wcn36xx/txrx.c +1 -0
@@ -429,6 +429,7 @@ static void wcn36xx_set_tx_data(struct w
 	if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
 		/* Don't use a regular queue for null packet (no ampdu) */
 		bd->queue_id = WCN36XX_TX_U_WQ_ID;
+		bd->bd_rate = WCN36XX_BD_RATE_CTRL;
 	}
 
 	if (bcast) {
author maintainer
#128 lore raw

PATCH 128/849 PM: sleep: Do not let "syscore" devices runtime-suspend during system transitions

In reply to Greg Kroah-Hartman

From: Rafael J. Wysocki <[email protected]>

commit 928265e3601cde78c7e0a3e518a93b27defed3b1 upstream.

There is no reason to allow "syscore" devices to runtime-suspend during system-wide PM transitions, because they are subject to the same possible failure modes as any other devices in that respect.

Accordingly, change device_prepare() and device_complete() to call pm_runtime_get_noresume() and pm_runtime_put(), respectively, for "syscore" devices too.

Fixes 057d51a1268f ("Merge branch 'pm-sleep'")
Cc 3.10+ <[email protected]> # 3.10+
---
 drivers/base/power/main.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/base/power/main.c +5 -4
@@ -1051,7 +1051,7 @@ static void device_complete(struct devic
 	const char *info = NULL;
 
 	if (dev->power.syscore)
-		return;
+		goto out;
 
 	device_lock(dev);
 
@@ -1081,6 +1081,7 @@ static void device_complete(struct devic
 
 	device_unlock(dev);
 
+out:
 	pm_runtime_put(dev);
 }
 
@@ -1794,9 +1795,6 @@ static int device_prepare(struct device
 	int (*callback)(struct device *) = NULL;
 	int ret = 0;
 
-	if (dev->power.syscore)
-		return 0;
-
 	/*
 	 * If a device's parent goes into runtime suspend at the wrong time,
 	 * it won't be possible to resume the device.  To prevent this we
@@ -1805,6 +1803,9 @@ static int device_prepare(struct device
 	 */
 	pm_runtime_get_noresume(dev);
 
+	if (dev->power.syscore)
+		return 0;
+
 	device_lock(dev);
 
 	dev->power.wakeup_path = false;
author maintainer
#129 lore raw

PATCH 129/849 mwifiex: Read a PCI register after writing the TX ring write pointer

In reply to Greg Kroah-Hartman

From: Jonas Dreßler <[email protected]>

commit e5f4eb8223aa740237cd463246a7debcddf4eda1 upstream.

On the 88W8897 PCIe+USB card the firmware randomly crashes after setting the TX ring write pointer. The issue is present in the latest firmware version 15.68.19.p21 of the PCIe+USB card.

Those firmware crashes can be worked around by reading any PCI register of the card after setting that register, so read the PCI_VENDOR_ID register here. The reason this works is probably because we keep the bus from entering an ASPM state for a bit longer, because that's what causes the cards firmware to crash.

This fixes a bug where during RX/TX traffic and with ASPM L1 substates enabled (the specific substates where the issue happens appear to be platform dependent), the firmware crashes and eventually a command timeout appears in the logs.

---
 drivers/net/wireless/marvell/mwifiex/pcie.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/wireless/marvell/mwifiex/pcie.c +8 -0
@@ -1479,6 +1479,14 @@ mwifiex_pcie_send_data(struct mwifiex_ad
 			ret = -1;
 			goto done_unmap;
 		}
+
+		/* The firmware (latest version 15.68.19.p21) of the 88W8897 PCIe+USB card
+		 * seems to crash randomly after setting the TX ring write pointer when
+		 * ASPM powersaving is enabled. A workaround seems to be keeping the bus
+		 * busy by reading a random register afterwards.
+		 */
+		mwifiex_read_reg(adapter, PCI_VENDOR_ID, &rx_val);
+
 		if ((mwifiex_pcie_txbd_not_full(card)) &&
 		    tx_param->next_pkt_len) {
 			/* have more packets and TxBD still can hold more */