5.10.163-rc1 review
Subsystems (11)
Greg Kroah-Hartman
maintainercover 5.10.163-rc1 review
This is the start of the stable review cycle for the 5.10.163 release. There are 783 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Jan 2023 13:53:18 +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.10.163-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.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.10.163-rc1
Paolo Abeni <[email protected]>
net/ulp: prevent ULP without clone op from entering the LISTEN status
Frederick Lawler <[email protected]>
net: sched: disallow noqueue for qdisc classes
Mat Martineau <[email protected]>
mptcp: use proper req destructor for IPv6
Mat Martineau <[email protected]>
mptcp: dedicated request sock for subflow in v6
Mat Martineau <[email protected]>
mptcp: remove MPTCP 'ifdef' in TCP SYN cookies
Mat Martineau <[email protected]>
mptcp: mark ops structures as ro_after_init
Rasmus Villemoes <[email protected]>
serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way"
Indan Zupancic <[email protected]>
fsl_lpuart: Don't enable interrupts too early
Eric Biggers <[email protected]>
ext4: don't set up encryption key during jbd2 transaction
Eric Biggers <[email protected]>
ext4: disable fast-commit of encrypted dir operations
Helge Deller <[email protected]>
parisc: Align parisc MADV_XXX constants with all other architectures
Harshit Mogalapalli <[email protected]>
io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res()
Ard Biesheuvel <[email protected]>
efi: random: combine bootloader provided RNG seed with RNG protocol output
Jan Kara <[email protected]>
mbcache: Avoid nesting of cache->c_list_lock under bit locks
Linus Torvalds <[email protected]>
hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling
Arnd Bergmann <[email protected]>
hfs/hfsplus: use WARN_ON for sanity check
Muhammad Usama Anjum <[email protected]>
selftests: set the BUILD variable to absolute path
Eric Biggers <[email protected]>
ext4: don't allow journal inode to have encrypt flag
Zhenyu Wang <[email protected]>
drm/i915/gvt: fix vgpu debugfs clean in remove
Zhenyu Wang <[email protected]>
drm/i915/gvt: fix gvt debugfs destroy
Ben Dooks <[email protected]>
riscv: uaccess: fix type of 0 variable on error in get_user()
Paul Menzel <[email protected]>
fbdev: matroxfb: G200eW: Increase max memory from 1 MB to 16 MB
Jeff Layton <[email protected]>
nfsd: fix handling of readdir in v4root vs. mount upcall timeout
Rodrigo Branco <[email protected]>
x86/bugs: Flush IBP in ib_prctl_set()
Yanjun Zhang <[email protected]>
nvme: fix multipath crash caused by flush request when blktrace is enabled
Hans de Goede <[email protected]>
ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet
Jan Kara <[email protected]>
udf: Fix extension of the last extent in the file
Zhengchao Shao <[email protected]>
caif: fix memory leak in cfctrl_linkup_request()
Dan Carpenter <[email protected]>
drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()
Szymon Heidrich <[email protected]>
usb: rndis_host: Secure rndis_query check against int overflow
Daniil Tatianin <[email protected]>
drivers/net/bonding/bond_3ad: return when there's no aggregator
Miaoqian Lin <[email protected]>
perf tools: Fix resources leak in perf_data__open_dir()
Jozsef Kadlecsik <[email protected]>
netfilter: ipset: Rework long task execution when adding/deleting entries
Jozsef Kadlecsik <[email protected]>
netfilter: ipset: fix hash:net,port,net hang with /0 subnet
Jamal Hadi Salim <[email protected]>
net: sched: cbq: dont intepret cls results when asked to drop
Jamal Hadi Salim <[email protected]>
net: sched: atm: dont intepret cls results when asked to drop
Miaoqian Lin <[email protected]>
gpio: sifive: Fix refcount leak in sifive_gpio_probe
Xiubo Li <[email protected]>
ceph: switch to vfs_inode_has_locks() to fix file lock bug
Jeff Layton <[email protected]>
filelock: new helper: vfs_inode_has_locks
Carlo Caione <[email protected]>
drm/meson: Reduce the FIFO lines held when AFBC is not used
Maor Gottlieb <[email protected]>
RDMA/mlx5: Fix validation of max_rd_atomic caps for DC
Miaoqian Lin <[email protected]>
net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
Jiguang Xiao <[email protected]>
net: amd-xgbe: add missed tasklet_kill
Adham Faris <[email protected]>
net/mlx5e: Fix hw mtu initializing at XDP SQ allocation
Dragos Tatulea <[email protected]>
net/mlx5e: IPoIB, Don't allow CQE compression to be turned on by default
Shay Drory <[email protected]>
net/mlx5: Avoid recovery in probe flows
Jiri Pirko <[email protected]>
net/mlx5: Add forgotten cleanup calls into mlx5_init_once() error path
Stefano Garzarella <[email protected]>
vhost: fix range used in translate_desc()
Stefano Garzarella <[email protected]>
vringh: fix range used in iotlb_translate()
Yuan Can <[email protected]>
vhost/vsock: Fix error handling in vhost_vsock_init()
Miaoqian Lin <[email protected]>
nfc: Fix potential resource leaks
Daniil Tatianin <[email protected]>
qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure
Hawkins Jiawei <[email protected]>
net: sched: fix memory leak in tcindex_set_parms
Jie Wang <[email protected]>
net: hns3: add interrupts re-initialization while doing VF FLR
Jeff Layton <[email protected]>
nfsd: shut down the NFSv4 state objects before the filecache
Shawn Bohrer <[email protected]>
veth: Fix race with AF_XDP exposing old or uninitialized descriptors
Ronak Doshi <[email protected]>
vmxnet3: correctly report csum_level for encapsulated packet
Steven Price <[email protected]>
drm/panfrost: Fix GEM handle creation ref-counting
Jakub Kicinski <[email protected]>
bpf: pull before calling skb_postpull_rcsum()
minoura makoto <[email protected]>
SUNRPC: ensure the matching upcall is in-flight upon downcall
Jan Kara <[email protected]>
ext4: fix deadlock due to mbcache entry corruption
Jan Kara <[email protected]>
mbcache: automatically delete entries from cache on freeing
Jan Kara <[email protected]>
ext4: fix race when reusing xattr blocks
Jan Kara <[email protected]>
ext4: unindent codeblock in ext4_xattr_block_set()
Jan Kara <[email protected]>
ext4: remove EA inode entry from mbcache on inode eviction
Jan Kara <[email protected]>
mbcache: add functions to delete entry if unused
Jan Kara <[email protected]>
mbcache: don't reclaim used entries
Shuqi Zhang <[email protected]>
ext4: use kmemdup() to replace kmalloc + memcpy
Eric Biggers <[email protected]>
ext4: fix leaking uninitialized memory in fast-commit journal
Bhaskar Chowdhury <[email protected]>
ext4: fix various seppling typos
Jan Kara <[email protected]>
ext4: simplify ext4 error translation
Jan Kara <[email protected]>
ext4: move functions in super.c
Alexander Potapenko <[email protected]>
fs: ext4: initialize fsdata in pagecache_write()
Chaitanya Kulkarni <[email protected]>
ext4: use memcpy_to_page() in pagecache_write()
Ira Weiny <[email protected]>
mm/highmem: Lift memcpy_[to|from]_page to core
Baokun Li <[email protected]>
ext4: correct inconsistent error msg in nojournal mode
Jason Yan <[email protected]>
ext4: goto right label 'failed_mount3a'
Guo Ren <[email protected]>
riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument
Chen Huang <[email protected]>
riscv/stacktrace: Fix stack output without ra on the stack top
Biju Das <[email protected]>
ravb: Fix "failed to switch device to config mode" message during unbind
Luca Ceresoli <[email protected]>
staging: media: tegra-video: fix device_node use after free
Masami Hiramatsu (Google) <[email protected]>
x86/kprobes: Fix optprobe optimization check with CONFIG_RETHUNK
Borislav Petkov <[email protected]>
x86/kprobes: Convert to insn_decode()
Masami Hiramatsu (Google) <[email protected]>
perf probe: Fix to get the DW_AT_decl_file and DW_AT_call_file as unsinged data
Masami Hiramatsu (Google) <[email protected]>
perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor
Smitha T Murthy <[email protected]>
media: s5p-mfc: Fix in register read and write for H264
Smitha T Murthy <[email protected]>
media: s5p-mfc: Clear workbit to handle error condition
Smitha T Murthy <[email protected]>
media: s5p-mfc: Fix to handle reference queue during finishing
Yazen Ghannam <[email protected]>
x86/MCE/AMD: Clear DFR errors found in THR handler
Borislav Petkov <[email protected]>
x86/mce: Get rid of msr_ops
Sasha Levin <[email protected]>
btrfs: replace strncpy() with strscpy()
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Clear attr_update properly
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Generalize I/O stacks to PMON mapping procedure
Jens Axboe <[email protected]>
ARM: renumber bits related to _TIF_WORK_MASK
Alex Deucher <[email protected]>
drm/amdgpu: make display pinning more flexible (v2)
Alex Deucher <[email protected]>
drm/amdgpu: handle polaris10/11 overlap asics (v2)
Ye Bin <[email protected]>
ext4: allocate extended attribute value in vmalloc area
Jan Kara <[email protected]>
ext4: avoid unaccounted block allocation when expanding inode
Jan Kara <[email protected]>
ext4: initialize quota before expanding inode in setproject ioctl
Ye Bin <[email protected]>
ext4: fix inode leak in ext4_xattr_inode_create() on an error path
Jan Kara <[email protected]>
ext4: avoid BUG_ON when creating xattrs
Luís Henriques <[email protected]>
ext4: fix error code return to user-space in ext4_get_branch()
Baokun Li <[email protected]>
ext4: fix corruption when online resizing a 1K bigalloc fs
Eric Whitney <[email protected]>
ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline
Ye Bin <[email protected]>
ext4: init quota for 'old.inode' in 'ext4_rename'
Baokun Li <[email protected]>
ext4: fix bug_on in __es_tree_search caused by bad boot loader inode
Zhang Yi <[email protected]>
ext4: check and assert if marking an no_delete evicting inode dirty
Ye Bin <[email protected]>
ext4: fix reserved cluster accounting in __es_remove_extent()
Baokun Li <[email protected]>
ext4: fix bug_on in __es_tree_search caused by bad quota inode
Baokun Li <[email protected]>
ext4: add helper to check quota inums
Baokun Li <[email protected]>
ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode
Gaosheng Cui <[email protected]>
ext4: fix undefined behavior in bit shift for ext4_check_flag_values
Baokun Li <[email protected]>
ext4: fix use-after-free in ext4_orphan_cleanup
Baokun Li <[email protected]>
ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
Zhang Yi <[email protected]>
ext4: silence the warning when evicting inode with dioread_nolock
Yuan Can <[email protected]>
drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init()
Mikko Kovanen <[email protected]>
drm/i915/dsi: fix VBT send packet port selection for dual link DSI
Zack Rusin <[email protected]>
drm/vmwgfx: Validate the box size for the snooped cursor
Simon Ser <[email protected]>
drm/connector: send hotplug uevent on connector cleanup
Wang Weiyang <[email protected]>
device_cgroup: Roll back to original exceptions after copy failure
Shang XiaoJing <[email protected]>
parisc: led: Fix potential null-ptr-deref in start_task()
Maria Yu <[email protected]>
remoteproc: core: Do pm_relax when in RPROC_OFFLINE state
Kim Phillips <[email protected]>
iommu/amd: Fix ivrs_acpihid cmdline parsing code
Isaac J. Manjarres <[email protected]>
driver core: Fix bus_type.match() error handling in __driver_attach()
Corentin Labbe <[email protected]>
crypto: n2 - add missing hash statesize
Sascha Hauer <[email protected]>
PCI/sysfs: Fix double free in error path
Michael S. Tsirkin <[email protected]>
PCI: Fix pci_device_is_present() for VFs by checking PF
Dan Carpenter <[email protected]>
ipmi: fix use after free in _ipmi_destroy_user()
Huaxin Lu <[email protected]>
ima: Fix a potential NULL pointer access in ima_restore_measurement_list
Alexander Sverdlin <[email protected]>
mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type()
Zhang Yuchen <[email protected]>
ipmi: fix long wait in unload when IPMI disconnect
Aidan MacDonald <[email protected]>
ASoC: jz4740-i2s: Handle independent FIFO flush bits
Michael Walle <[email protected]>
wifi: wilc1000: sdio: fix module autoloading
Aditya Garg <[email protected]>
efi: Add iMac Pro 2017 to uefi skip cert quirk
Florian-Ewald Mueller <[email protected]>
md/bitmap: Fix bitmap chunk size overflow issues
Ian Abbott <[email protected]>
rtc: ds1347: fix value written to century register
Steve French <[email protected]>
cifs: fix missing display of three mount options
Paulo Alcantara <[email protected]>
cifs: fix confusing debug message
Takashi Iwai <[email protected]>
media: dvb-core: Fix UAF due to refcount races at releasing
Keita Suzuki <[email protected]>
media: dvb-core: Fix double free in dvb_register_device()
Nick Desaulniers <[email protected]>
ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
Luca Ceresoli <[email protected]>
staging: media: tegra-video: fix chan->mipi value on error
Yang Jihong <[email protected]>
tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
Zheng Yejian <[email protected]>
tracing/hist: Fix wrong return value in parse_action_params()
Masami Hiramatsu (Google) <[email protected]>
x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK
Steven Rostedt (Google) <[email protected]>
ftrace/x86: Add back ftrace_expected for ftrace bug reports
Ashok Raj <[email protected]>
x86/microcode/intel: Do not retry microcode reloading on the APs
Sean Christopherson <[email protected]>
KVM: nVMX: Inject #GP, not #UD, if "generic" VMXON CR0/CR4 check fails
Namhyung Kim <[email protected]>
perf/core: Call LSM hook after copying perf_event_attr
Zheng Yejian <[email protected]>
tracing/hist: Fix out-of-bound write on 'action_data.var_ref_idx'
Mike Snitzer <[email protected]>
dm cache: set needs_check flag after aborting metadata
Luo Meng <[email protected]>
dm cache: Fix UAF in destroy()
Luo Meng <[email protected]>
dm clone: Fix UAF in clone_dtr()
Luo Meng <[email protected]>
dm integrity: Fix UAF in dm_integrity_dtr()
Luo Meng <[email protected]>
dm thin: Fix UAF in run_timer_softirq()
Luo Meng <[email protected]>
dm thin: resume even if in FAIL mode
Zhihao Cheng <[email protected]>
dm thin: Use last transaction's pmd->root when commit failed
Zhihao Cheng <[email protected]>
dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata
Mike Snitzer <[email protected]>
dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort
Chris Chiu <[email protected]>
ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops
Philipp Jungkamp <[email protected]>
ALSA: patch_realtek: Fix Dell Inspiron Plus 16
Yongqiang Liu <[email protected]>
cpufreq: Init completion before kobject_init_and_add()
Kant Fan <[email protected]>
PM/devfreq: governor: Add a private governor_data for governor
Mickaël Salaün <[email protected]>
selftests: Use optional USERCFLAGS and USERLDFLAGS
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm850-lenovo-yoga-c630: correct I2C12 pins drive strength
Jason A. Donenfeld <[email protected]>
ARM: ux500: do not directly dereference __iomem
Boris Burkov <[email protected]>
btrfs: fix resolving backrefs for inline extent followed by prealloc
Wenchao Chen <[email protected]>
mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-db845c: correct SPI2 pins drive strength
Bixuan Cui <[email protected]>
jbd2: use the correct print format
Steven Rostedt <[email protected]>
ktest.pl minconfig: Unset configs instead of just removing them
Steven Rostedt <[email protected]>
kest.pl: Fix grub2 menu handling for rebooting
Manivannan Sadhasivam <[email protected]>
soc: qcom: Select REMAP_MMIO for LLCC driver
Jason A. Donenfeld <[email protected]>
media: stv0288: use explicitly signed char
Eric Dumazet <[email protected]>
net/af_packet: make sure to pull mac header
Hangbin Liu <[email protected]>
net/af_packet: add VLAN support for AF_PACKET SOCK_RAW GSO
Paul E. McKenney <[email protected]>
rcu: Prevent lockdep-RCU splats on lock acquisition/release
Paul E. McKenney <[email protected]>
torture: Exclude "NOHZ tick-stop error" from fatal errors
Ping-Ke Shih <[email protected]>
wifi: rtlwifi: 8192de: correct checking of IQK reload
Jakub Kicinski <[email protected]>
wifi: rtlwifi: remove always-true condition pointed out by GCC 12
Dima Chumak <[email protected]>
net/mlx5e: Fix nullptr in mlx5e_tc_add_fdb_flow()
Pierre-Louis Bossart <[email protected]>
ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire
Pierre-Louis Bossart <[email protected]>
ASoC: Intel/SOF: use set_stream() instead of set_tdm_slots() for HDAudio
Marco Elver <[email protected]>
kcsan: Instrument memcpy/memset/memmove with newer Clang
Chuck Lever <[email protected]>
SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails
Hanjun Guo <[email protected]>
tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak
Hanjun Guo <[email protected]>
tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak
Hanjun Guo <[email protected]>
tpm: acpi: Call acpi_put_table() to fix memory leak
Deren Wu <[email protected]>
mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING
Pavel Machek <[email protected]>
f2fs: should put a page when checking the summary info
NARIBAYASHI Akira <[email protected]>
mm, compaction: fix fast_isolate_around() to stay within boundaries
Mikulas Patocka <[email protected]>
md: fix a crash in mempool_free
Christian Brauner <[email protected]>
pnode: terminate at peers of source
Artem Egorkine <[email protected]>
ALSA: line6: fix stack overflow in line6_midi_transmit
Artem Egorkine <[email protected]>
ALSA: line6: correct midi status byte when receiving data from podxt
Zhang Tianci <[email protected]>
ovl: Use ovl mounter's fsuid and fsgid in ovl_link()
Wang Yufen <[email protected]>
binfmt: Fix error return code in load_elf_fdpic_binary()
Aditya Garg <[email protected]>
hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount
Qiujun Huang <[email protected]>
pstore/zone: Use GFP_ATOMIC to allocate zone buffer
Terry Junge <[email protected]>
HID: plantronics: Additional PIDs for double volume key presses quirk
José Expósito <[email protected]>
HID: multitouch: fix Asus ExpertBook P2 P2451FA trackpoint
Nathan Lynch <[email protected]>
powerpc/rtas: avoid scheduling in rtas_os_term()
Nathan Lynch <[email protected]>
powerpc/rtas: avoid device tree lookups in rtas_os_term()
Christophe Leroy <[email protected]>
objtool: Fix SEGFAULT
Christoph Hellwig <[email protected]>
nvmet: don't defer passthrough commands with trivial effects to the workqueue
Christoph Hellwig <[email protected]>
nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition
Adam Vodopjan <[email protected]>
ata: ahci: Fix PCS quirk application for suspend
Keith Busch <[email protected]>
nvme-pci: fix page size checks
Keith Busch <[email protected]>
nvme-pci: fix mempool alloc size
Klaus Jensen <[email protected]>
nvme-pci: fix doorbell buffer value endianness
Paulo Alcantara <[email protected]>
cifs: fix oops during encryption
Miaoqian Lin <[email protected]>
usb: dwc3: qcom: Fix memory leak in dwc3_qcom_interconnect_init
Steven Price <[email protected]>
pwm: tegra: Fix 32 bit build
Lin Ma <[email protected]>
media: dvbdev: fix refcnt bug
Lin Ma <[email protected]>
media: dvbdev: fix build warning due to comments
Chen Zhongjin <[email protected]>
ovl: fix use inode directly in rcu-walk mode
Rickard x Andersson <[email protected]>
gcov: add support for checksum field
Johan Hovold <[email protected]>
regulator: core: fix deadlock on regulator enable
Rasmus Villemoes <[email protected]>
iio: adc128s052: add proper .data members in adc128_of_match table
Nuno Sá <[email protected]>
iio: adc: ad_sigma_delta: do not use internal iio_dev lock
Roberto Sassu <[email protected]>
reiserfs: Add missing calls to reiserfs_security_free()
Enrik Berkhan <[email protected]>
HID: mcp2221: don't connect hidraw
Jason Gerecke <[email protected]>
HID: wacom: Ensure bootloader PID is usable in hidraw mode
Ferry Toth <[email protected]>
usb: dwc3: core: defer probe on ulpi_read_id timeout
Sven Peter <[email protected]>
usb: dwc3: Fix race between dwc3_set_mode and __dwc3_set_mode
Jiao Zhou <[email protected]>
ALSA: hda/hdmi: Add HP Device 0x8711 to force connect list
Edward Pacman <[email protected]>
ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
wangdicheng <[email protected]>
ALSA: usb-audio: add the quirk for KT0206 device
GUO Zihua <[email protected]>
ima: Simplify ima_lsm_copy_rule
John Stultz <[email protected]>
pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
David Howells <[email protected]>
afs: Fix lost servers_outstanding count
Yang Jihong <[email protected]>
perf debug: Set debug_peo_args and redirect_to_stderr variable to correct values in perf_quiet_option()
John Stultz <[email protected]>
pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
Kees Cook <[email protected]>
LoadPin: Ignore the "contents" argument of the LSM hooks
Hans de Goede <[email protected]>
ASoC: rt5670: Remove unbalanced pm_runtime_put()
Wang Jingjin <[email protected]>
ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume()
Marek Szyprowski <[email protected]>
ASoC: wm8994: Fix potential deadlock
Wang Jingjin <[email protected]>
ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()
Wang Yufen <[email protected]>
ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link()
Wang Yufen <[email protected]>
ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe()
Cezary Rojewski <[email protected]>
ASoC: Intel: Skylake: Fix driver hang during shutdown
Pierre-Louis Bossart <[email protected]>
ALSA: hda: add snd_hdac_stop_streams() helper
Pierre-Louis Bossart <[email protected]>
ALSA/ASoC: hda: move/rename snd_hdac_ext_stop_streams to hdac_stream.c
Yang Yingliang <[email protected]>
hwmon: (jc42) Fix missing unlock on error in jc42_write()
Zhang Xiaoxu <[email protected]>
orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init()
Zhang Xiaoxu <[email protected]>
orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()
Nathan Chancellor <[email protected]>
drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()
Nathan Chancellor <[email protected]>
drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()
Hawkins Jiawei <[email protected]>
hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param()
Xiu Jianfeng <[email protected]>
clk: st: Fix memory leak in st_of_quadfs_setup()
Shigeru Yoshida <[email protected]>
media: si470x: Fix use-after-free in si470x_int_in_callback()
Wolfram Sang <[email protected]>
mmc: renesas_sdhi: better reset from HS400 mode
Kunihiko Hayashi <[email protected]>
mmc: f-sdh30: Add quirks for broken timeout clock capability
Rui Zhang <[email protected]>
regulator: core: fix use_count leakage when handling boot-on
Andrii Nakryiko <[email protected]>
libbpf: Avoid enum forward-declarations in public API in C++ mode
Ye Bin <[email protected]>
blk-mq: fix possible memleak when register 'hctx' failed
Mazin Al Haddad <[email protected]>
media: dvb-usb: fix memory leak in dvb_usb_adapter_init()
Lin Ma <[email protected]>
media: dvbdev: adopts refcnt to avoid UAF
Yan Lei <[email protected]>
media: dvb-frontends: fix leak of memory fw
Maxim Korotkov <[email protected]>
ethtool: avoiding integer overflow in ethtool_phys_id()
Stanislav Fomichev <[email protected]>
bpf: Prevent decl_tag from being referenced in func_proto arg
Stanislav Fomichev <[email protected]>
ppp: associate skb with a device at tx
Schspa Shi <[email protected]>
mrp: introduce active flags to prevent UAF when applicant uninit
Eric Dumazet <[email protected]>
net: add atomic_long_t to net_device_stats fields
Aurabindo Pillai <[email protected]>
drm/amd/display: fix array index out of bound error in bios parser
Jiang Li <[email protected]>
md/raid1: stop mdx_raid1 thread when raid1 array run failed
Li Zhong <[email protected]>
drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()
Ville Syrjälä <[email protected]>
drm/sti: Use drm_mode_copy()
Ville Syrjälä <[email protected]>
drm/rockchip: Use drm_mode_copy()
Ville Syrjälä <[email protected]>
drm/msm: Use drm_mode_copy()
Nathan Chancellor <[email protected]>
s390/lcs: Fix return type of lcs_start_xmit()
Nathan Chancellor <[email protected]>
s390/netiucv: Fix return type of netiucv_tx()
Nathan Chancellor <[email protected]>
s390/ctcm: Fix return type of ctc{mp,}m_tx()
Nathan Chancellor <[email protected]>
drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback
Nathan Chancellor <[email protected]>
drm/amdgpu: Fix type of second parameter in trans_msg() callback
Kees Cook <[email protected]>
igb: Do not free q_vector unless new one was allocated
Minsuk Kang <[email protected]>
wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()
Nathan Chancellor <[email protected]>
hamradio: baycom_epp: Fix return type of baycom_send_packet()
Nathan Chancellor <[email protected]>
net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
Stanislav Fomichev <[email protected]>
bpf: make sure skb->len != 0 when redirecting to a tunneling device
Jiri Slaby (SUSE) <[email protected]>
qed (gcc13): use u16 for fid to be big enough
gehao <[email protected]>
drm/amd/display: prevent memory leak
Zhang Yuchen <[email protected]>
ipmi: fix memleak when unload ipmi driver
Amadeusz Sławiński <[email protected]>
ASoC: codecs: rt298: Add quirk for KBL-R RVP platform
Shigeru Yoshida <[email protected]>
wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out
Fedor Pchelkin <[email protected]>
wifi: ath9k: verify the expected usb_endpoints are present
Wright Feng <[email protected]>
brcmfmac: return error when getting invalid max_flowrings from dongle
Doug Brown <[email protected]>
drm/etnaviv: add missing quirks for GC300
ZhangPeng <[email protected]>
hfs: fix OOB Read in __hfs_brec_find
Zheng Yejian <[email protected]>
acct: fix potential integer overflow in encode_comp_t()
Ryusuke Konishi <[email protected]>
nilfs2: fix shift-out-of-bounds due to too large exponent of block size
Ryusuke Konishi <[email protected]>
nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()
Rafael J. Wysocki <[email protected]>
ACPICA: Fix error code path in acpi_ds_call_control_method()
Hoi Pok Wu <[email protected]>
fs: jfs: fix shift-out-of-bounds in dbDiscardAG
Shigeru Yoshida <[email protected]>
udf: Avoid double brelse() in udf_rename()
Dongliang Mu <[email protected]>
fs: jfs: fix shift-out-of-bounds in dbAllocAG
Liu Shixin <[email protected]>
binfmt_misc: fix shift-out-of-bounds in check_special_flags
Gaurav Kohli <[email protected]>
x86/hyperv: Remove unregister syscore call from Hyper-V cleanup
Guilherme G. Piccoli <[email protected]>
video: hyperv_fb: Avoid taking busy spinlock on panic path
Mark Rutland <[email protected]>
arm64: make is_ttbrX_addr() noinstr-safe
Zqiang <[email protected]>
rcu: Fix __this_cpu_read() lockdep warning in rcu_force_quiescent_state()
Eric Dumazet <[email protected]>
net: stream: purge sk_error_queue in sk_stream_kill_queues()
Christophe JAILLET <[email protected]>
myri10ge: Fix an error handling path in myri10ge_probe()
David Howells <[email protected]>
rxrpc: Fix missing unlock in rxrpc_do_sendmsg()
Cong Wang <[email protected]>
net_sched: reject TCF_EM_SIMPLE case for complex ematch module
Yang Yingliang <[email protected]>
mailbox: zynq-ipi: fix error handling while device_register() fails
Subash Abhinov Kasiviswanathan <[email protected]>
skbuff: Account for tail adjustment during pull operations
Eelco Chaudron <[email protected]>
openvswitch: Fix flow lookup to use unmasked key
Jakub Kicinski <[email protected]>
selftests: devlink: fix the fd redirect in dummy_reporter_test
GUO Zihua <[email protected]>
rtc: mxc_v2: Add missing clk_disable_unprepare()
Tan Tee Min <[email protected]>
igc: Set Qbv start_time and end_time to end_time if not being configured in GCL
Kurt Kanzenbach <[email protected]>
igc: Lift TAPRIO schedule restriction
Tan Tee Min <[email protected]>
igc: recalculate Qbv end_time by considering cycle time
Muhammad Husaini Zulkifli <[email protected]>
igc: Add checking for basetime less than zero
Vinicius Costa Gomes <[email protected]>
igc: Use strict cycles for Qbv scheduling
Vinicius Costa Gomes <[email protected]>
igc: Enhance Qbv scheduling by using first flag bit
Vladimir Oltean <[email protected]>
net: add a helper to avoid issues with HW TX timestamping and SO_TXTIME
Xin Long <[email protected]>
net: igc: use skb_csum_is_sctp instead of protocol check
Xin Long <[email protected]>
net: add inline function skb_csum_is_sctp
Marco Elver <[email protected]>
net: switch to storing KCOV handle directly in sk_buff
Li Zetao <[email protected]>
r6040: Fix kmemleak in probe and remove
Minsuk Kang <[email protected]>
nfc: pn533: Clear nfc_target before being used
Yang Yingliang <[email protected]>
mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Emeel Hakim <[email protected]>
net: macsec: fix net device access prior to holding a lock
Dan Aloni <[email protected]>
nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
Chuck Lever <[email protected]>
NFSD: Remove spurious cb_setup_err tracepoint
Alexandre Belloni <[email protected]>
rtc: pcf85063: fix pcf85063_clkout_control
Gaosheng Cui <[email protected]>
rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()
Gaosheng Cui <[email protected]>
rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
Qingfang DENG <[email protected]>
netfilter: flowtable: really fix NAT IPv6 offload
Nathan Lynch <[email protected]>
powerpc/pseries/eeh: use correct API for error log size
Haowen Bai <[email protected]>
powerpc/eeh: Drop redundant spinlock initialization
Yuan Can <[email protected]>
remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region()
Luca Weiss <[email protected]>
remoteproc: qcom_q6v5_pas: detach power domains on remove
Luca Weiss <[email protected]>
remoteproc: qcom_q6v5_pas: disable wakeup on probe fail or remove
Gaosheng Cui <[email protected]>
remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev()
Uwe Kleine-König <[email protected]>
pwm: sifive: Call pwm_sifive_update_clock() while mutex is held
Jason Gunthorpe <[email protected]>
iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY
Miaoqian Lin <[email protected]>
selftests/powerpc: Fix resource leaks
Kajol Jain <[email protected]>
powerpc/hv-gpci: Fix hv_gpci event list
Yang Yingliang <[email protected]>
powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
Nicholas Piggin <[email protected]>
powerpc/perf: callchain validate kernel stack pointer bounds
Masahiro Yamada <[email protected]>
kbuild: refactor single builds of *.ko
Masahiro Yamada <[email protected]>
kbuild: unify modules(_install) for in-tree and external modules
Masahiro Yamada <[email protected]>
kbuild: remove unneeded mkdir for external modules_install
Yang Yingliang <[email protected]>
powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()
Gustavo A. R. Silva <[email protected]>
powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds
Christophe Leroy <[email protected]>
powerpc/xmon: Enable breakpoints on 8xx
Miaoqian Lin <[email protected]>
cxl: Fix refcount leak in cxl_calc_capp_routing
Christophe JAILLET <[email protected]>
powerpc/52xx: Fix a resource leak in an error handling path
Xie Shaowen <[email protected]>
macintosh/macio-adb: check the return value of ioremap()
Yang Yingliang <[email protected]>
macintosh: fix possible memory leak in macio_add_one_device()
Yuan Can <[email protected]>
iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
Yang Yingliang <[email protected]>
iommu/amd: Fix pci device refcount leak in ppr_notifier()
Alexander Stein <[email protected]>
rtc: pcf85063: Fix reading alarm
Stefan Eichenberger <[email protected]>
rtc: snvs: Allow a time difference on clock register read
Rafael J. Wysocki <[email protected]>
rtc: cmos: Disable ACPI RTC event on removal
Rafael J. Wysocki <[email protected]>
rtc: cmos: Rename ACPI-related functions
Rafael J. Wysocki <[email protected]>
rtc: cmos: Eliminate forward declarations of some functions
Rafael J. Wysocki <[email protected]>
rtc: cmos: Call rtc_wake_setup() from cmos_do_probe()
Rafael J. Wysocki <[email protected]>
rtc: cmos: Call cmos_wake_setup() from cmos_do_probe()
Alexandre Belloni <[email protected]>
rtc: cmos: fix build on non-ACPI platforms
Rafael J. Wysocki <[email protected]>
rtc: cmos: Fix wake alarm breakage
Rafael J. Wysocki <[email protected]>
rtc: cmos: Fix event handler registration ordering issue
Rafael J. Wysocki <[email protected]>
rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0
Fenghua Yu <[email protected]>
dmaengine: idxd: Fix crc_val field for completion record
Jon Hunter <[email protected]>
pwm: tegra: Improve required rate calculation
Matt Redfearn <[email protected]>
include/uapi/linux/swab: Fix potentially missing __always_inline
Al Cooper <[email protected]>
phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix flush size
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix R/W permission check
Jernej Skrabec <[email protected]>
iommu/sun50i: Consider all fault sources for reset
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix reset release
Arnd Bergmann <[email protected]>
RDMA/siw: Fix pointer cast warning
ruanjinjie <[email protected]>
power: supply: fix null pointer dereferencing in power_supply_get_battery_info
Yuan Can <[email protected]>
HSI: omap_ssi_core: Fix error handling in ssi_init()
Ajay Kaher <[email protected]>
perf symbol: correction while adjusting symbol
Leo Yan <[email protected]>
perf trace: Handle failure when trace point folder is missed
Leo Yan <[email protected]>
perf trace: Use macro RAW_SYSCALL_ARGS_NUM to replace number
Leo Yan <[email protected]>
perf trace: Return error if a system call doesn't exist
Zeng Heng <[email protected]>
power: supply: fix residue sysfs file in error handle route of __power_supply_register()
Yang Yingliang <[email protected]>
HSI: omap_ssi_core: fix possible memory leak in ssi_probe()
Yang Yingliang <[email protected]>
HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
Christophe JAILLET <[email protected]>
fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
Xiongfeng Wang <[email protected]>
fbdev: vermilion: decrease reference count in error path
Shang XiaoJing <[email protected]>
fbdev: via: Fix error in via_core_init()
Yang Yingliang <[email protected]>
fbdev: pm2fb: fix missing pci_disable_device()
Andy Shevchenko <[email protected]>
fbdev: ssd1307fb: Drop optional dependency
Marcus Folkesson <[email protected]>
thermal/drivers/imx8mm_thermal: Validate temperature range
Shang XiaoJing <[email protected]>
samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe()
Zheng Yejian <[email protected]>
tracing/hist: Fix issue of losting command info in error_log
Jiasheng Jiang <[email protected]>
usb: storage: Add check for kcalloc
Zheyu Ma <[email protected]>
i2c: ismt: Fix an out-of-bounds bug in ismt_access()
Yang Yingliang <[email protected]>
i2c: mux: reg: check return value after calling platform_get_resource()
Bartosz Golaszewski <[email protected]>
gpiolib: cdev: fix NULL-pointer dereferences
Andy Shevchenko <[email protected]>
gpiolib: Get rid of redundant 'else'
Chen Zhongjin <[email protected]>
vme: Fix error not catched in fake_init()
YueHaibing <[email protected]>
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
Dan Carpenter <[email protected]>
staging: rtl8192u: Fix use after free in ieee80211_rx()
Hui Tang <[email protected]>
i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe
Yang Yingliang <[email protected]>
chardev: fix error handling in cdev_device_add()
Yang Yingliang <[email protected]>
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
Zhengchao Shao <[email protected]>
drivers: mcb: fix resource leak in mcb_probe()
John Keeping <[email protected]>
usb: gadget: f_hid: fix refcount leak on error path
John Keeping <[email protected]>
usb: gadget: f_hid: fix f_hidg lifetime vs cdev
Maxim Devaev <[email protected]>
usb: gadget: f_hid: optional SETUP/SET_REPORT mode
Yang Yingliang <[email protected]>
usb: roles: fix of node refcount leak in usb_role_switch_is_parent()
Fabrice Gasnier <[email protected]>
counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update
Ramona Bolboaca <[email protected]>
iio: adis: add '__adis_enable_irq()' implementation
Jonathan Cameron <[email protected]>
iio:imu:adis: Move exports into IIO_ADISLIB namespace
Nuno Sá <[email protected]>
iio: adis: stylistic changes
Nuno Sá <[email protected]>
iio: adis: handle devices that cannot unmask the drdy pin
Jonathan Cameron <[email protected]>
iio:imu:adis: Use IRQF_NO_AUTOEN instead of irq request then disable
Barry Song <[email protected]>
genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()
Cosmin Tanislav <[email protected]>
iio: temperature: ltc2983: make bulk write buffer DMA-safe
Yang Yingliang <[email protected]>
cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()
Yang Yingliang <[email protected]>
cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
Yang Yingliang <[email protected]>
firmware: raspberrypi: fix possible memory leak in rpi_firmware_probe()
Zheng Wang <[email protected]>
misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os
ruanjinjie <[email protected]>
misc: tifm: fix possible memory leak in tifm_7xx1_switch_media()
Yang Yingliang <[email protected]>
ocxl: fix pci device refcount leak when calling get_function_0()
Yang Yingliang <[email protected]>
misc: ocxl: fix possible name leak in ocxl_file_register_afu()
Zhengchao Shao <[email protected]>
test_firmware: fix memory leak in test_firmware_init()
Yuan Can <[email protected]>
serial: sunsab: Fix error handling in sunsab_init()
Gabriel Somlo <[email protected]>
serial: altera_uart: fix locking in polling mode
Jiri Slaby <[email protected]>
tty: serial: altera_uart_{r,t}x_chars() need only uart_port
Jiri Slaby <[email protected]>
tty: serial: clean up stop-tx part in altera_uart_tx_chars()
Xiongfeng Wang <[email protected]>
serial: pch: Fix PCI device refcount leak in pch_request_dma()
delisun <[email protected]>
serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
Jiamei Xie <[email protected]>
serial: amba-pl011: avoid SBSA UART accessing DMACR register
Sven Peter <[email protected]>
usb: typec: tipd: Fix spurious fwnode_handle_put in error path
Yang Yingliang <[email protected]>
usb: typec: tcpci: fix of node refcount leak in tcpci_register_port()
Sven Peter <[email protected]>
usb: typec: Check for ops->exit instead of ops->enter in altmode_exit
Gaosheng Cui <[email protected]>
staging: vme_user: Fix possible UAF in tsi148_dma_list_add
Linus Walleij <[email protected]>
usb: fotg210-udc: Fix ages old endianness issues
Rafael Mendonca <[email protected]>
uio: uio_dmem_genirq: Fix deadlock between irq config and handling
Rafael Mendonca <[email protected]>
uio: uio_dmem_genirq: Fix missing unlock in irq configuration
Rafael Mendonca <[email protected]>
vfio: platform: Do not pass return buffer to ACPI _RST method
Yang Yingliang <[email protected]>
class: fix possible memory leak in __class_register()
Kartik <[email protected]>
serial: tegra: Read DMA status before terminating
Yang Yingliang <[email protected]>
drivers: dio: fix possible memory leak in dio_init()
Dragos Tatulea <[email protected]>
IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces
Xiongfeng Wang <[email protected]>
hwrng: geode - Fix PCI device refcount leak
Xiongfeng Wang <[email protected]>
hwrng: amd - Fix PCI device refcount leak
Gaosheng Cui <[email protected]>
crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
Chengchang Tang <[email protected]>
RDMA/hns: Fix page size cap from firmware
Chengchang Tang <[email protected]>
RDMA/hns: Fix PBL page MTR find
Zhang Xiaoxu <[email protected]>
orangefs: Fix sysfs not cleanup when dev init failed
Wang Yufen <[email protected]>
RDMA/srp: Fix error return code in srp_parse_options()
Wang Yufen <[email protected]>
RDMA/hfi1: Fix error return code in parse_platform_config()
Tong Tiangen <[email protected]>
riscv/mm: add arch hook arch_clear_hugepage_flags
Shang XiaoJing <[email protected]>
crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe()
Christophe JAILLET <[email protected]>
crypto: amlogic - Remove kcalloc without check
Mark Zhang <[email protected]>
RDMA/nldev: Fix failure to send large messages
Yonggil Song <[email protected]>
f2fs: avoid victim selection from previous victim section
Yuan Can <[email protected]>
RDMA/nldev: Add checks for nla_nest_start() in fill_stat_counter_qps()
Gaosheng Cui <[email protected]>
scsi: snic: Fix possible UAF in snic_tgt_create()
Chen Zhongjin <[email protected]>
scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
Shang XiaoJing <[email protected]>
scsi: ipr: Fix WARNING in ipr_init()
Yang Yingliang <[email protected]>
scsi: scsi_debug: Fix possible name leak in sdebug_add_host_helper()
Yang Yingliang <[email protected]>
scsi: fcoe: Fix possible name leak when device_register() fails
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_report_zones()
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_verify()
Yang Yingliang <[email protected]>
scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device()
Yang Yingliang <[email protected]>
scsi: hpsa: Fix error handling in hpsa_add_sas_host()
Yang Yingliang <[email protected]>
scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add()
Daniel Jordan <[email protected]>
padata: Fix list iterator in padata_do_serial()
Daniel Jordan <[email protected]>
padata: Always leave BHs disabled when running ->parallel()
Zhang Yiqun <[email protected]>
crypto: tcrypt - Fix multibuffer skcipher speed test mem leak
Yuan Can <[email protected]>
scsi: hpsa: Fix possible memory leak in hpsa_init_one()
Zhang Xiaoxu <[email protected]>
RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed
Zhengchao Shao <[email protected]>
RDMA/hns: fix memory leak in hns_roce_alloc_mr()
Uwe Kleine-König <[email protected]>
crypto: ccree - Make cc_debugfs_global_fini() available for module init function
Xiongfeng Wang <[email protected]>
RDMA/hfi: Decrease PCI device reference count in error path
Zeng Heng <[email protected]>
PCI: Check for alloc failure in pci_request_irq()
Luoyouming <[email protected]>
RDMA/hns: Fix ext_sge num error when post send
Luoyouming <[email protected]>
RDMA/hns: Repacing 'dseg_len' by macros in fill_ext_sge_inl_data()
Xiongfeng Wang <[email protected]>
crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set()
Herbert Xu <[email protected]>
crypto: cryptd - Use request context instead of stack for sub-request
Gaosheng Cui <[email protected]>
crypto: ccree - Remove debugfs when platform_driver_register failed
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_write_scat()
Bernard Metzler <[email protected]>
RDMA/siw: Set defined status for work completion with undefined status
Mark Zhang <[email protected]>
RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port
Bernard Metzler <[email protected]>
RDMA/siw: Fix immediate work request flush to completion queue
Dongdong Zhang <[email protected]>
f2fs: fix normal discard process
Xiu Jianfeng <[email protected]>
apparmor: Fix memleak in alloc_ns()
Corentin Labbe <[email protected]>
crypto: rockchip - rework by using crypto_engine
Kai Ye <[email protected]>
crypto: rockchip - delete unneeded variable initialization
Corentin Labbe <[email protected]>
crypto: rockchip - remove non-aligned handling
Corentin Labbe <[email protected]>
crypto: rockchip - better handle cipher key
Corentin Labbe <[email protected]>
crypto: rockchip - add fallback for ahash
Corentin Labbe <[email protected]>
crypto: rockchip - add fallback for cipher
Corentin Labbe <[email protected]>
crypto: rockchip - do not store mode globally
Corentin Labbe <[email protected]>
crypto: rockchip - do not do custom power management
Zhang Qilong <[email protected]>
f2fs: Fix the race condition of resize flag between resizefs
Kunihiko Hayashi <[email protected]>
PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled
Leon Romanovsky <[email protected]>
RDMA/core: Fix order of nldev_exit call
Vidya Sagar <[email protected]>
PCI: dwc: Fix n_fts[] array overrun
Xiu Jianfeng <[email protected]>
apparmor: Use pointer to struct aa_label for lbs_cred
Bart Van Assche <[email protected]>
scsi: core: Fix a race between scsi_done() and scsi_timeout()
Natalia Petrova <[email protected]>
crypto: nitrox - avoid double free on error path in nitrox_sriov_init()
Corentin Labbe <[email protected]>
crypto: sun8i-ss - use dma_addr instead u32
John Johansen <[email protected]>
apparmor: Fix abi check to include v8 abi
John Johansen <[email protected]>
apparmor: fix lockdep warning when removing a namespace
Gaosheng Cui <[email protected]>
apparmor: fix a memleak in multi_transaction_new()
Piergiorgio Beruto <[email protected]>
stmmac: fix potential division by 0
Yang Yingliang <[email protected]>
Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave()
Firo Yang <[email protected]>
sctp: sysctl: make extra pointers netns aware
Eric Pilmore <[email protected]>
ntb_netdev: Use dev_kfree_skb_any() in interrupt context
Jerry Ray <[email protected]>
net: lan9303: Fix read error execution path
Markus Schneider-Pargmann <[email protected]>
can: tcan4x5x: Remove invalid write in clear_interrupts
Tom Lendacky <[email protected]>
net: amd-xgbe: Check only the minimum speed for active/passive cables
Tom Lendacky <[email protected]>
net: amd-xgbe: Fix logic around active and passive cables
Yang Yingliang <[email protected]>
net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: apple: mace: don't call dev_kfree_skb() under spin_lock_irqsave()
Hangbin Liu <[email protected]>
net/tunnel: wait until all sk_user_data reader finish before releasing the sock
Li Zetao <[email protected]>
net: farsync: Fix kmemleak when rmmods farsync
Yang Yingliang <[email protected]>
ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
ruanjinjie <[email protected]>
of: overlay: fix null pointer dereferencing in find_dup_cset_node_entry() and find_dup_cset_prop()
Yuan Can <[email protected]>
drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init()
Zhang Changzhong <[email protected]>
net: stmmac: selftests: fix potential memleak in stmmac_test_arpoffload()
Yongqiang Liu <[email protected]>
net: defxx: Fix missing err handling in dfx_init()
Artem Chernyshev <[email protected]>
net: vmw_vsock: vmci: Check memcpy_from_msg()
Xiu Jianfeng <[email protected]>
clk: socfpga: Fix memory leak in socfpga_gate_init()
Dinh Nguyen <[email protected]>
clk: socfpga: use clk_hw_register for a5/c5
Lee Jones <[email protected]>
clk: socfpga: clk-pll: Remove unused variable 'rc'
Yang Jihong <[email protected]>
blktrace: Fix output non-blktrace event when blk_classic option enabled
Wang Yufen <[email protected]>
wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix the channel width reporting
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
Kris Bahnsen <[email protected]>
spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode
Xiu Jianfeng <[email protected]>
clk: samsung: Fix memory leak in _samsung_clk_register_pll()
Jiasheng Jiang <[email protected]>
media: coda: Add check for kmalloc
Jiasheng Jiang <[email protected]>
media: coda: Add check for dcoda_iram_alloc
Liang He <[email protected]>
media: c8sectpfe: Add of_node_put() when breaking out of loop
Yang Yingliang <[email protected]>
mmc: mmci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: wbsd: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: via-sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: meson-gx: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: omap_hsmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: atmel-mci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: wmt-sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: vub300: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: toshsd: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: pxamci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: mxcmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: moxart: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: alcor: fix return value check of mmc_add_host()
Trond Myklebust <[email protected]>
NFSv4.x: Fail client initialisation if state manager thread can't run
Wang ShaoBo <[email protected]>
SUNRPC: Fix missing release socket in rpc_sockname()
Zhang Xiaoxu <[email protected]>
xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()
Gaosheng Cui <[email protected]>
ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt
Liu Shixin <[email protected]>
media: saa7164: fix missing pci_disable_device()
Takashi Iwai <[email protected]>
ALSA: pcm: Set missing stop_operating flag at undoing trigger start
Eric Dumazet <[email protected]>
bpf, sockmap: fix race in sock_map_free()
Martin Blumenstingl <[email protected]>
hwmon: (jc42) Restore the min/max/critical temperatures on resume
Martin Blumenstingl <[email protected]>
hwmon: (jc42) Convert register access and caching to regmap/regcache
Yang Yingliang <[email protected]>
regulator: core: fix resource leak in regulator_register()
Chen Zhongjin <[email protected]>
configfs: fix possible memory leak in configfs_create_dir()
Sebastian Andrzej Siewior <[email protected]>
hsr: Synchronize sequence number updates.
Sebastian Andrzej Siewior <[email protected]>
hsr: Synchronize sending frames to have always incremented outgoing seq nr.
Sebastian Andrzej Siewior <[email protected]>
hsr: Disable netpoll.
George McCollister <[email protected]>
net: hsr: generate supervision frame without HSR/PRP tag
Sebastian Andrzej Siewior <[email protected]>
hsr: Add a rcu-read lock to hsr_forward_skb().
Christian Marangi <[email protected]>
clk: qcom: clk-krait: fix wrong div2 functions
Yang Yingliang <[email protected]>
regulator: core: fix module refcount leak in set_supply()
Deren Wu <[email protected]>
wifi: mt76: fix coverity overrun-call in mt76_get_txpower()
Chen Zhongjin <[email protected]>
wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails
Zhengchao Shao <[email protected]>
wifi: mac80211: fix memory leak in ieee80211_if_add()
Alexander Sverdlin <[email protected]>
spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE
Dan Carpenter <[email protected]>
bonding: uninitialized variable in bond_miimon_inspect()
Pengcheng Yang <[email protected]>
bpf, sockmap: Fix data loss caused by using apply_bytes on ingress redirect
Pengcheng Yang <[email protected]>
bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
Florian Westphal <[email protected]>
netfilter: conntrack: set icmpv6 redirects as RELATED
Zhang Qilong <[email protected]>
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
Xiongfeng Wang <[email protected]>
drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
Xiongfeng Wang <[email protected]>
drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()
Guchun Chen <[email protected]>
drm/amd/pm/smu11: BACO is supported when it's in BACO state
Ricardo Ribalda <[email protected]>
ASoC: mediatek: mt8173: Enable IRQ when pdata is ready
AngeloGioacchino Del Regno <[email protected]>
ASoC: mediatek: mt8173: Fix debugfs registration for components
Ben Greear <[email protected]>
wifi: iwlwifi: mvm: fix double free on tx path.
Liu Shixin <[email protected]>
ALSA: asihpi: fix missing pci_disable_device()
Trond Myklebust <[email protected]>
NFS: Fix an Oops in nfs_d_automount()
Trond Myklebust <[email protected]>
NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn
Trond Myklebust <[email protected]>
NFSv4.2: Fix initialisation of struct nfs4_label
Trond Myklebust <[email protected]>
NFSv4.2: Fix a memory stomp in decode_attr_security_label
Trond Myklebust <[email protected]>
NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding
Jiasheng Jiang <[email protected]>
ASoC: mediatek: mtk-btcvsd: Add checks for write and read of mtk_btcvsd_snd
Dmitry Torokhov <[email protected]>
ASoC: dt-bindings: wcd9335: fix reset line polarity in example
Zhang Zekun <[email protected]>
drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe()
Aakarsh Jain <[email protected]>
media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC
Baisong Zhong <[email protected]>
media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()
Chen Zhongjin <[email protected]>
media: dvb-core: Fix ignored return value in dvb_register_frontend()
ZhangPeng <[email protected]>
pinctrl: pinconf-generic: add missing of_node_put()
Dario Binacchi <[email protected]>
clk: imx: replace osc_hdmi with dummy
Gautam Menghani <[email protected]>
media: imon: fix a race condition in send_packet()
Chen Zhongjin <[email protected]>
media: vimc: Fix wrong function called when vimc_init() fails
Yuan Can <[email protected]>
ASoC: qcom: Add checks for devm_kcalloc
Xiaomeng Tong <[email protected]>
drbd: fix an invalid memory access caused by incorrect use of list iterator
Zheng Yongjun <[email protected]>
mtd: maps: pxa2xx-flash: fix memory leak in probe
Jonathan Toppins <[email protected]>
bonding: fix link recovery in mode 2 when updelay is nonzero
Yang Yingliang <[email protected]>
drm/amdgpu: fix pci device refcount leak
Xiu Jianfeng <[email protected]>
clk: rockchip: Fix memory leak in rockchip_clk_register_pll()
Wang ShaoBo <[email protected]>
regulator: core: use kfree_const() to free space conditionally
Baisong Zhong <[email protected]>
ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
Baisong Zhong <[email protected]>
ALSA: pcm: fix undefined behavior in bit shift for SNDRV_PCM_RATE_KNOT
Marcus Folkesson <[email protected]>
HID: hid-sensor-custom: set fixed size for custom attributes
Stanislav Fomichev <[email protected]>
bpf: Move skb->len == 0 checks into __bpf_redirect
Eric Dumazet <[email protected]>
inet: add READ_ONCE(sk->sk_bound_dev_if) in inet_csk_bind_conflict()
Christoph Hellwig <[email protected]>
media: videobuf-dma-contig: use dma_mmap_coherent
Yuan Can <[email protected]>
media: platform: exynos4-is: Fix error handling in fimc_md_init()
Yang Yingliang <[email protected]>
media: solo6x10: fix possible memory leak in solo_sysfs_init()
Chen Zhongjin <[email protected]>
media: vidtv: Fix use-after-free in vidtv_bridge_dvb_init()
Douglas Anderson <[email protected]>
Input: elants_i2c - properly handle the reset GPIO when power is off
Hui Tang <[email protected]>
mtd: lpddr2_nvm: Fix possible null-ptr-deref
Xiu Jianfeng <[email protected]>
wifi: ath10k: Fix return value in ath10k_pci_init()
Xiu Jianfeng <[email protected]>
ima: Fix misuse of dereference of pointer in template_desc_init_fields()
GUO Zihua <[email protected]>
integrity: Fix memory leakage in keyring allocation error path
Brian Starkey <[email protected]>
drm/fourcc: Fix vsub/hsub for Q410 and Q401
Dave Stevenson <[email protected]>
drm/fourcc: Add packed 10bit YUV 4:2:0 format
Dan Carpenter <[email protected]>
amdgpu/pm: prevent array underflow in vega20_odn_edit_dpm_table()
Yang Yingliang <[email protected]>
regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
Zeng Heng <[email protected]>
ASoC: pxa: fix null-pointer dereference in filter()
Xinlei Lee <[email protected]>
drm/mediatek: Modify dpi power on/off sequence.
Hanjun Guo <[email protected]>
drm/radeon: Add the missed acpi_put_table() to fix memory leak
David Howells <[email protected]>
rxrpc: Fix ack.bufferSize to be 0 when generating an ack
David Howells <[email protected]>
net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write()
Vladimir Zapolskiy <[email protected]>
media: camss: Clean up received buffers on failed start of streaming
Marek Vasut <[email protected]>
wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port
Randy Dunlap <[email protected]>
Input: joystick - fix Kconfig warning for JOYSTICK_ADC
Zhang Xiaoxu <[email protected]>
mtd: Fix device name leak when register device failed in add_mtd_device()
Manivannan Sadhasivam <[email protected]>
clk: qcom: gcc-sm8250: Use retention mode for USB GDSCs
Andrii Nakryiko <[email protected]>
bpf: propagate precision across all frames, not just the last one
Martin KaFai Lau <[email protected]>
bpf: Check the other end of slot_type for STACK_SPILL
Andrii Nakryiko <[email protected]>
bpf: propagate precision in ALU/ALU64 operations
Yang Yingliang <[email protected]>
media: platform: exynos4-is: fix return value check in fimc_md_probe()
Liu Shixin <[email protected]>
media: vivid: fix compose size exceed boundary
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix slot type check in check_stack_write_var_off
Dmitry Baryshkov <[email protected]>
drm/msm/hdmi: drop unused GPIO support
Dmitry Baryshkov <[email protected]>
drm/msm/hdmi: switch to drm_bridge_connector
GUO Zihua <[email protected]>
ima: Handle -ESTALE returned by ima_filter_rule_match()
Gustavo A. R. Silva <[email protected]>
ima: Fix fall-through warnings for Clang
Marek Vasut <[email protected]>
drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure
Jonathan Neuschäfer <[email protected]>
spi: Update reference to struct spi_controller
Marek Vasut <[email protected]>
clk: renesas: r9a06g032: Repair grave increment error
Zhang Qilong <[email protected]>
drm/rockchip: lvds: fix PM usage counter unbalance in poweron
Jimmy Assarsson <[email protected]>
can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming
Jimmy Assarsson <[email protected]>
can: kvaser_usb: Add struct kvaser_usb_busparams
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix bogus restart events
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix wrong CAN state after stopping
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix improved state not being reported
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Set Warning state even without bus errors
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
Vincent Mailhol <[email protected]>
can: kvaser_usb: do not increase tx statistics when sending error message frames
Marek Szyprowski <[email protected]>
media: exynos4-is: don't rely on the v4l2_async_subdev internals
Ezequiel Garcia <[email protected]>
media: exynos4-is: Use v4l2_async_notifier_add_fwnode_remote_subdev
Tang Bin <[email protected]>
venus: pm_helpers: Fix error check in vcodec_domains_get()
Ricardo Ribalda <[email protected]>
media: i2c: ad5820: Fix error path
Jiasheng Jiang <[email protected]>
media: coda: jpeg: Add check for kmalloc
Junlin Yang <[email protected]>
pata_ipx4xx_cf: Fix unsigned comparison with less than zero
Shung-Hsi Yu <[email protected]>
libbpf: Fix null-pointer dereference in find_prog_by_sec_insn()
Xu Kuohai <[email protected]>
libbpf: Fix use-after-free in btf_dump_name_dups
Abhinav Kumar <[email protected]>
drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix reading the vendor of combo chips
Fedor Pchelkin <[email protected]>
wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
Fedor Pchelkin <[email protected]>
wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
Cai Xinchen <[email protected]>
rapidio: devices: fix missing put_device in mport_cdev_open
ZhangPeng <[email protected]>
hfs: Fix OOB Write in hfs_asc2mac
Gavrilov Ilia <[email protected]>
relay: fix type mismatch when allocating memory in relay_create_buf()
Zhang Qilong <[email protected]>
eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
Wang Weiyang <[email protected]>
rapidio: fix possible UAF when kfifo_alloc() fails
Chen Zhongjin <[email protected]>
fs: sysv: Fix sysv_nblocks() returns wrong value
Ladislav Michl <[email protected]>
MIPS: OCTEON: warn only once if deprecated link status is being used
Anastasia Belova <[email protected]>
MIPS: BCM63xx: Add check for NULL for clk in clk_enable
Yang Yingliang <[email protected]>
platform/x86: intel_scu_ipc: fix possible name leak in __intel_scu_ipc_register()
Yu Liao <[email protected]>
platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]()
Rafael J. Wysocki <[email protected]>
PM: runtime: Do not call __rpm_callback() from rpm_idle()
Ulf Hansson <[email protected]>
PM: runtime: Improve path in rpm_idle() when no callback
Harshit Mogalapalli <[email protected]>
xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
Xiu Jianfeng <[email protected]>
x86/xen: Fix memory leak in xen_init_lock_cpu()
Xiu Jianfeng <[email protected]>
x86/xen: Fix memory leak in xen_smp_intr_init{_pv}()
Oleg Nesterov <[email protected]>
uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
Li Zetao <[email protected]>
ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
Yang Yingliang <[email protected]>
clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
Phil Auld <[email protected]>
cpu/hotplug: Make target_store() a nop when target == state
Alexey Izbyshev <[email protected]>
futex: Resend potentially swallowed owner death notification
Peter Zijlstra <[email protected]>
futex: Move to kernel/futex/
Wolfram Sang <[email protected]>
clocksource/drivers/sh_cmt: Access registers according to spec
Geert Uytterhoeven <[email protected]>
clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled
Yang Yingliang <[email protected]>
rapidio: rio: fix possible name leak in rio_register_mport()
Yang Yingliang <[email protected]>
rapidio: fix possible name leaks when rio_add_device() fails
Li Zetao <[email protected]>
ocfs2: fix memory leak in ocfs2_mount_volume()
Heming Zhao via Ocfs2-devel <[email protected]>
ocfs2: rewrite error handling of ocfs2_fill_super
Heming Zhao via Ocfs2-devel <[email protected]>
ocfs2: ocfs2_mount_volume does cleanup job before return error
Akinobu Mita <[email protected]>
debugfs: fix error when writing negative value to atomic_t debugfs file
Wolfram Sang <[email protected]>
docs: fault-injection: fix non-working usage of negative values
Akinobu Mita <[email protected]>
lib/notifier-error-inject: fix error when writing -errno to debugfs file
Akinobu Mita <[email protected]>
libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
Xiongfeng Wang <[email protected]>
cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
Yang Yingliang <[email protected]>
genirq/irqdesc: Don't try to remove non-existing sysfs files
Jeff Layton <[email protected]>
nfsd: don't call nfsd_file_put from client states seqfile display
Yang Yingliang <[email protected]>
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
Shang XiaoJing <[email protected]>
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
Yuan Can <[email protected]>
platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
Yang Yingliang <[email protected]>
PNP: fix name memory leak in pnp_alloc_dev()
Zhao Gongyi <[email protected]>
selftests/efivarfs: Add checking of the test return value
Yang Yingliang <[email protected]>
MIPS: vpe-cmp: fix possible memory leak while module exiting
Yang Yingliang <[email protected]>
MIPS: vpe-mt: fix possible memory leak while module exiting
Shang XiaoJing <[email protected]>
ocfs2: fix memory leak in ocfs2_stack_glue_init()
Gaosheng Cui <[email protected]>
lib/fonts: fix undefined behavior in bit shift for get_default_font
Alexey Dobriyan <[email protected]>
proc: fixup uptime selftest
Barnabás Pőcze <[email protected]>
timerqueue: Use rb_entry_safe() in timerqueue_getnext()
Barnabás Pőcze <[email protected]>
platform/x86: huawei-wmi: fix return value calculation
wuchi <[email protected]>
lib/debugobjects: fix stat count and optimize debug_objects_mem_init
Chen Zhongjin <[email protected]>
perf: Fix possible memleak in pmu_dev_alloc()
Yipeng Zou <[email protected]>
selftests/ftrace: event_triggers: wait longer for test_event_enable
Chen Hui <[email protected]>
cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut()
Ondrej Mosnacek <[email protected]>
fs: don't audit the capability check in simple_xattr_list()
xiongxin <[email protected]>
PM: hibernate: Fix mistake in kerneldoc comment
Al Viro <[email protected]>
alpha: fix syscall entry in !AUDUT_SYSCALL case
Ulf Hansson <[email protected]>
cpuidle: dt: Return the correct numbers of parsed idle states
Qais Yousef <[email protected]>
sched/uclamp: Fix relationship between uclamp and migration margin
Vincent Donnefort <[email protected]>
sched/fair: Cleanup task_util and capacity type
Michael Kelley <[email protected]>
tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
Yuan Can <[email protected]>
tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init()
Stephen Boyd <[email protected]>
pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
Doug Brown <[email protected]>
ARM: mmp: fix timer_read delay
Wang Yufen <[email protected]>
pstore/ram: Fix error return code in ramoops_probe()
Pali Rohár <[email protected]>
arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC
Pali Rohár <[email protected]>
ARM: dts: turris-omnia: Add switch port 6 node
Pali Rohár <[email protected]>
ARM: dts: turris-omnia: Add ethernet aliases
Pali Rohár <[email protected]>
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712-evb: Fix usb vbus regulators unit names
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712e: Fix unit address for pinctrl node
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
Jayesh Choudhary <[email protected]>
arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node
Jayesh Choudhary <[email protected]>
arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node
Shang XiaoJing <[email protected]>
perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
Yuan Can <[email protected]>
perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
Zhang Qilong <[email protected]>
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
Zhang Qilong <[email protected]>
soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe
Minghao Chi <[email protected]>
soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
Kory Maincent <[email protected]>
arm: dts: spear600: Fix clcd interrupt
Jiasheng Jiang <[email protected]>
soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index
Srinivas Kandagatla <[email protected]>
soc: qcom: apr: make code more reuseable
Luca Weiss <[email protected]>
soc: qcom: llcc: make irq truly optional
Chen Jiahao <[email protected]>
drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
Marek Vasut <[email protected]>
ARM: dts: stm32: Fix AV96 WLAN regulator gpio property
Marek Vasut <[email protected]>
ARM: dts: stm32: Drop stm32mp15xc.dtsi from Avenger96
Marco Elver <[email protected]>
objtool, kcsan: Add volatile read/write instrumentation to whitelist
Stephan Gerhold <[email protected]>
arm64: dts: qcom: msm8916: Drop MSS fallback compatible
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-cheza: fix AP suspend pin bias
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm630: fix UART1 pin bias
Luca Weiss <[email protected]>
ARM: dts: qcom: apq8064: fix coresight compatible
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: fix GPU OPP table
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: ipq6018-cp01-c1: use BLSPI1 pins
Ivaylo Dimitrov <[email protected]>
usb: musb: remove extra check in musb_gadget_vbus_draw
-------------
Diffstat:
.../devicetree/bindings/sound/qcom,wcd9335.txt | 2 +-
Documentation/driver-api/spi.rst | 4 +-
Documentation/fault-injection/fault-injection.rst | 16 +-
MAINTAINERS | 2 +-
Makefile | 107 ++---
arch/alpha/kernel/entry.S | 4 +-
arch/arm/boot/dts/armada-370.dtsi | 2 +-
arch/arm/boot/dts/armada-375.dtsi | 2 +-
arch/arm/boot/dts/armada-380.dtsi | 4 +-
arch/arm/boot/dts/armada-385-turris-omnia.dts | 18 +-
arch/arm/boot/dts/armada-385.dtsi | 6 +-
arch/arm/boot/dts/armada-39x.dtsi | 6 +-
arch/arm/boot/dts/armada-xp-mv78230.dtsi | 8 +-
arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 +-
arch/arm/boot/dts/dove.dtsi | 2 +-
arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-
arch/arm/boot/dts/spear600.dtsi | 2 +-
arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts | 1 -
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +-
arch/arm/include/asm/thread_info.h | 13 +-
arch/arm/mach-mmp/time.c | 11 +-
arch/arm/nwfpe/Makefile | 6 +
.../boot/dts/marvell/armada-3720-turris-mox.dts | 3 +
arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 12 +-
arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 22 +-
arch/arm64/boot/dts/mediatek/mt6797.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 6 +-
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 +
arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +-
arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 +-
arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 5 +-
.../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 6 +-
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
arch/arm64/include/asm/processor.h | 4 +-
arch/mips/bcm63xx/clk.c | 2 +
.../cavium-octeon/executive/cvmx-helper-board.c | 2 +-
arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
arch/mips/kernel/vpe-cmp.c | 4 +-
arch/mips/kernel/vpe-mt.c | 4 +-
arch/parisc/include/uapi/asm/mman.h | 23 +-
arch/parisc/kernel/sys_parisc.c | 27 ++
arch/parisc/kernel/syscalls/syscall.tbl | 2 +-
arch/powerpc/kernel/rtas.c | 20 +-
arch/powerpc/perf/callchain.c | 1 +
arch/powerpc/perf/hv-gpci-requests.h | 4 +
arch/powerpc/perf/hv-gpci.c | 33 +-
arch/powerpc/perf/hv-gpci.h | 1 +
arch/powerpc/perf/req-gen/perf.h | 20 +
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1 +
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +-
arch/powerpc/platforms/pseries/eeh_pseries.c | 14 +-
arch/powerpc/sysdev/xive/spapr.c | 1 +
arch/powerpc/xmon/xmon.c | 11 +-
arch/riscv/include/asm/hugetlb.h | 6 +
arch/riscv/include/asm/uaccess.h | 2 +-
arch/riscv/kernel/stacktrace.c | 12 +-
arch/x86/events/intel/uncore.h | 1 +
arch/x86/events/intel/uncore_snb.c | 3 +
arch/x86/events/intel/uncore_snbep.c | 48 ++-
arch/x86/hyperv/hv_init.c | 2 -
arch/x86/kernel/cpu/bugs.c | 2 +
arch/x86/kernel/cpu/mce/amd.c | 37 +-
arch/x86/kernel/cpu/mce/core.c | 95 ++---
arch/x86/kernel/cpu/mce/internal.h | 12 +-
arch/x86/kernel/cpu/microcode/intel.c | 8 +-
arch/x86/kernel/ftrace.c | 2 +
arch/x86/kernel/kprobes/core.c | 27 +-
arch/x86/kernel/kprobes/opt.c | 35 +-
arch/x86/kernel/uprobes.c | 4 +-
arch/x86/kvm/vmx/nested.c | 44 ++-
arch/x86/xen/smp.c | 24 +-
arch/x86/xen/smp_pv.c | 12 +-
arch/x86/xen/spinlock.c | 6 +-
block/blk-mq-sysfs.c | 11 +-
crypto/cryptd.c | 36 +-
crypto/tcrypt.c | 9 -
drivers/acpi/acpica/dsmethod.c | 10 +-
drivers/acpi/acpica/utcopy.c | 7 -
drivers/ata/ahci.c | 32 +-
drivers/ata/pata_ixp4xx_cf.c | 2 +-
drivers/base/class.c | 5 +
drivers/base/dd.c | 6 +-
drivers/base/power/runtime.c | 18 +-
drivers/block/drbd/drbd_main.c | 4 +-
drivers/bluetooth/btusb.c | 6 +-
drivers/bluetooth/hci_bcsp.c | 2 +-
drivers/bluetooth/hci_h5.c | 2 +-
drivers/bluetooth/hci_ll.c | 2 +-
drivers/bluetooth/hci_qca.c | 2 +-
drivers/char/hw_random/amd-rng.c | 18 +-
drivers/char/hw_random/geode-rng.c | 36 +-
drivers/char/ipmi/ipmi_msghandler.c | 12 +-
drivers/char/ipmi/ipmi_si_intf.c | 27 +-
drivers/char/tpm/eventlog/acpi.c | 12 +-
drivers/char/tpm/tpm_crb.c | 31 +-
drivers/char/tpm/tpm_ftpm_tee.c | 8 +-
drivers/char/tpm/tpm_tis.c | 9 +-
drivers/clk/imx/clk-imx8mn.c | 12 +-
drivers/clk/qcom/clk-krait.c | 2 +
drivers/clk/qcom/gcc-sm8250.c | 4 +-
drivers/clk/renesas/r9a06g032-clocks.c | 3 +-
drivers/clk/rockchip/clk-pll.c | 1 +
drivers/clk/samsung/clk-pll.c | 1 +
drivers/clk/socfpga/clk-gate.c | 16 +-
drivers/clk/socfpga/clk-periph.c | 8 +-
drivers/clk/socfpga/clk-pll.c | 17 +-
drivers/clk/st/clkgen-fsyn.c | 5 +-
drivers/clocksource/sh_cmt.c | 102 +++--
drivers/clocksource/timer-ti-dm-systimer.c | 4 +-
drivers/counter/stm32-lptimer-cnt.c | 2 +-
drivers/cpufreq/amd_freq_sensitivity.c | 2 +
drivers/cpufreq/cpufreq.c | 2 +-
drivers/cpufreq/qcom-cpufreq-hw.c | 1 +
drivers/cpuidle/dt_idle_states.c | 2 +-
drivers/crypto/Kconfig | 5 +
.../crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 2 +-
drivers/crypto/amlogic/amlogic-gxl-core.c | 1 -
drivers/crypto/amlogic/amlogic-gxl.h | 2 +-
drivers/crypto/cavium/nitrox/nitrox_mbx.c | 1 +
drivers/crypto/ccree/cc_debugfs.c | 2 +-
drivers/crypto/ccree/cc_driver.c | 10 +-
drivers/crypto/hisilicon/qm.h | 6 +-
drivers/crypto/img-hash.c | 8 +-
drivers/crypto/n2_core.c | 6 +
drivers/crypto/omap-sham.c | 2 +-
drivers/crypto/rockchip/rk3288_crypto.c | 193 +--------
drivers/crypto/rockchip/rk3288_crypto.h | 53 +--
drivers/crypto/rockchip/rk3288_crypto_ahash.c | 199 ++++++----
drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 413 +++++++++++--------
drivers/devfreq/devfreq.c | 6 +-
drivers/devfreq/governor_userspace.c | 12 +-
drivers/dio/dio.c | 8 +
drivers/edac/i10nm_base.c | 3 +-
drivers/firmware/efi/efi.c | 4 +-
drivers/firmware/efi/libstub/efistub.h | 2 +
drivers/firmware/efi/libstub/random.c | 42 +-
drivers/firmware/raspberrypi.c | 1 +
drivers/gpio/gpio-sifive.c | 1 +
drivers/gpio/gpiolib-cdev.c | 93 +++--
drivers/gpio/gpiolib.c | 12 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 +-
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 16 +-
.../gpu/drm/amd/display/dc/dce60/dce60_resource.c | 3 +
.../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +
drivers/gpu/drm/amd/include/kgd_pp_interface.h | 3 +-
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 +-
.../gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 3 +-
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 +
drivers/gpu/drm/bridge/adv7511/adv7511.h | 3 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 18 +-
drivers/gpu/drm/bridge/adv7511/adv7533.c | 25 +-
drivers/gpu/drm/drm_connector.c | 3 +
drivers/gpu/drm/drm_fourcc.c | 11 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 5 +-
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 +-
drivers/gpu/drm/i915/gvt/debugfs.c | 17 +-
drivers/gpu/drm/i915/gvt/scheduler.c | 1 +
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 12 +-
drivers/gpu/drm/meson/meson_viu.c | 5 +-
drivers/gpu/drm/msm/Makefile | 2 +-
drivers/gpu/drm/msm/dp/dp_display.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi.c | 78 ++--
drivers/gpu/drm/msm/hdmi/hdmi.h | 30 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 81 +++-
.../drm/msm/hdmi/{hdmi_connector.c => hdmi_hpd.c} | 216 +---------
drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 27 +-
drivers/gpu/drm/panfrost/panfrost_gem.c | 16 +-
drivers/gpu/drm/panfrost/panfrost_gem.h | 5 +-
drivers/gpu/drm/radeon/radeon_bios.c | 19 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +-
drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 10 +-
drivers/gpu/drm/sti/sti_dvo.c | 7 +-
drivers/gpu/drm/sti/sti_hda.c | 7 +-
drivers/gpu/drm/sti/sti_hdmi.c | 7 +-
drivers/gpu/drm/tegra/dc.c | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +-
drivers/hid/hid-ids.h | 3 +
drivers/hid/hid-mcp2221.c | 12 +-
drivers/hid/hid-multitouch.c | 4 +
drivers/hid/hid-plantronics.c | 9 +
drivers/hid/hid-sensor-custom.c | 2 +-
drivers/hid/wacom_sys.c | 8 +
drivers/hid/wacom_wac.c | 4 +
drivers/hid/wacom_wac.h | 1 +
drivers/hsi/controllers/omap_ssi_core.c | 14 +-
drivers/hv/ring_buffer.c | 13 +
drivers/hwmon/Kconfig | 1 +
drivers/hwmon/jc42.c | 243 +++++++-----
drivers/i2c/busses/i2c-ismt.c | 3 +
drivers/i2c/busses/i2c-pxa-pci.c | 10 +-
drivers/i2c/muxes/i2c-mux-reg.c | 5 +-
drivers/iio/accel/adis16201.c | 1 +
drivers/iio/accel/adis16209.c | 1 +
drivers/iio/adc/ad_sigma_delta.c | 8 +-
drivers/iio/adc/ti-adc128s052.c | 14 +-
drivers/iio/gyro/adis16136.c | 1 +
drivers/iio/gyro/adis16260.c | 1 +
drivers/iio/imu/adis.c | 98 ++---
drivers/iio/imu/adis16400.c | 1 +
drivers/iio/imu/adis16460.c | 5 +-
drivers/iio/imu/adis16475.c | 6 +-
drivers/iio/imu/adis16480.c | 1 +
drivers/iio/imu/adis_buffer.c | 10 +-
drivers/iio/imu/adis_trigger.c | 20 +-
drivers/iio/temperature/ltc2983.c | 10 +-
drivers/infiniband/core/device.c | 2 +-
drivers/infiniband/core/nldev.c | 6 +-
drivers/infiniband/hw/hfi1/affinity.c | 2 +
drivers/infiniband/hw/hfi1/firmware.c | 6 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 24 +-
drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +-
drivers/infiniband/hw/mlx5/qp.c | 49 ++-
drivers/infiniband/sw/rxe/rxe_qp.c | 6 +-
drivers/infiniband/sw/siw/siw_cq.c | 24 +-
drivers/infiniband/sw/siw/siw_qp_tx.c | 2 +-
drivers/infiniband/sw/siw/siw_verbs.c | 40 +-
drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 7 +
drivers/infiniband/ulp/srp/ib_srp.c | 96 ++++-
drivers/input/joystick/Kconfig | 1 +
drivers/input/touchscreen/elants_i2c.c | 9 +-
drivers/iommu/amd/init.c | 7 +
drivers/iommu/amd/iommu_v2.c | 1 +
drivers/iommu/fsl_pamu.c | 2 +-
drivers/iommu/sun50i-iommu.c | 16 +-
drivers/irqchip/irq-gic-pm.c | 2 +-
drivers/isdn/hardware/mISDN/hfcmulti.c | 19 +-
drivers/isdn/hardware/mISDN/hfcpci.c | 13 +-
drivers/isdn/hardware/mISDN/hfcsusb.c | 12 +-
drivers/macintosh/macio-adb.c | 4 +
drivers/macintosh/macio_asic.c | 2 +-
drivers/mailbox/zynqmp-ipi-mailbox.c | 4 +-
drivers/mcb/mcb-core.c | 4 +-
drivers/mcb/mcb-parse.c | 2 +-
drivers/md/dm-cache-metadata.c | 54 ++-
drivers/md/dm-cache-target.c | 11 +-
drivers/md/dm-clone-target.c | 1 +
drivers/md/dm-integrity.c | 2 +
drivers/md/dm-thin-metadata.c | 60 ++-
drivers/md/dm-thin.c | 18 +-
drivers/md/md-bitmap.c | 47 ++-
drivers/md/md.c | 9 +-
drivers/md/raid1.c | 1 +
drivers/media/dvb-core/dmxdev.c | 8 +
drivers/media/dvb-core/dvb_ca_en50221.c | 2 +-
drivers/media/dvb-core/dvb_frontend.c | 10 +-
drivers/media/dvb-core/dvbdev.c | 33 +-
drivers/media/dvb-frontends/bcm3510.c | 1 +
drivers/media/dvb-frontends/stv0288.c | 5 +-
drivers/media/i2c/ad5820.c | 10 +-
drivers/media/pci/saa7164/saa7164-core.c | 4 +-
drivers/media/pci/solo6x10/solo6x10-core.c | 1 +
drivers/media/platform/coda/coda-bit.c | 14 +-
drivers/media/platform/coda/coda-jpeg.c | 10 +-
drivers/media/platform/exynos4-is/fimc-core.c | 2 +-
drivers/media/platform/exynos4-is/media-dev.c | 32 +-
drivers/media/platform/exynos4-is/media-dev.h | 2 +-
drivers/media/platform/qcom/camss/camss-video.c | 3 +-
drivers/media/platform/qcom/venus/pm_helpers.c | 4 +-
drivers/media/platform/s5p-mfc/s5p_mfc.c | 17 +-
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 4 +-
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 12 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 14 +-
.../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 +
drivers/media/radio/si470x/radio-si470x-usb.c | 4 +-
drivers/media/rc/imon.c | 6 +-
drivers/media/test-drivers/vidtv/vidtv_bridge.c | 22 +-
drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 +
drivers/media/usb/dvb-usb/az6027.c | 4 +
drivers/media/usb/dvb-usb/dvb-usb-init.c | 4 +-
drivers/media/v4l2-core/videobuf-dma-contig.c | 22 +-
drivers/misc/cxl/guest.c | 24 +-
drivers/misc/cxl/pci.c | 21 +-
drivers/misc/ocxl/config.c | 20 +-
drivers/misc/ocxl/file.c | 7 +-
drivers/misc/sgi-gru/grufault.c | 13 +-
drivers/misc/sgi-gru/grumain.c | 22 +-
drivers/misc/sgi-gru/grutables.h | 2 +-
drivers/misc/tifm_7xx1.c | 2 +-
drivers/mmc/host/alcor.c | 5 +-
drivers/mmc/host/atmel-mci.c | 9 +-
drivers/mmc/host/meson-gx-mmc.c | 4 +-
drivers/mmc/host/mmci.c | 4 +-
drivers/mmc/host/moxart-mmc.c | 4 +-
drivers/mmc/host/mxcmmc.c | 4 +-
drivers/mmc/host/omap_hsmmc.c | 4 +-
drivers/mmc/host/pxamci.c | 7 +-
drivers/mmc/host/renesas_sdhi_core.c | 2 +-
drivers/mmc/host/rtsx_usb_sdmmc.c | 11 +-
drivers/mmc/host/sdhci-sprd.c | 16 +-
drivers/mmc/host/sdhci_f_sdh30.c | 3 +
drivers/mmc/host/toshsd.c | 6 +-
drivers/mmc/host/via-sdmmc.c | 4 +-
drivers/mmc/host/vub300.c | 13 +-
drivers/mmc/host/wbsd.c | 12 +-
drivers/mmc/host/wmt-sdmmc.c | 6 +-
drivers/mtd/lpddr/lpddr2_nvm.c | 2 +
drivers/mtd/maps/pxa2xx-flash.c | 2 +
drivers/mtd/mtdcore.c | 4 +-
drivers/mtd/spi-nor/core.c | 2 +
drivers/net/bonding/bond_3ad.c | 1 +
drivers/net/bonding/bond_main.c | 13 +-
drivers/net/can/m_can/tcan4x5x.c | 5 -
drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 30 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 115 +++++-
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 167 ++++++--
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 437 ++++++++++++++++++---
drivers/net/dsa/lan9303-core.c | 4 +-
drivers/net/ethernet/amd/atarilance.c | 2 +-
drivers/net/ethernet/amd/lance.c | 2 +-
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +
drivers/net/ethernet/amd/xgbe/xgbe-i2c.c | 4 +-
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 +-
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 23 +-
drivers/net/ethernet/apple/bmac.c | 2 +-
drivers/net/ethernet/apple/mace.c | 2 +-
drivers/net/ethernet/dnet.c | 4 +-
drivers/net/ethernet/freescale/enetc/enetc.c | 8 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +-
drivers/net/ethernet/intel/igb/igb_main.c | 10 +-
drivers/net/ethernet/intel/igc/igc.h | 2 +
drivers/net/ethernet/intel/igc/igc_defines.h | 2 +
drivers/net/ethernet/intel/igc/igc_main.c | 245 +++++++++---
drivers/net/ethernet/intel/igc/igc_tsn.c | 11 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 12 +-
drivers/net/ethernet/mellanox/mlx5/core/health.c | 6 +
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 +
drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_debug.c | 3 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 8 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 10 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 8 +-
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 +
drivers/net/ethernet/rdc/r6040.c | 5 +-
drivers/net/ethernet/renesas/ravb_main.c | 2 +-
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 3 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 2 +-
.../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 8 +-
drivers/net/ethernet/ti/netcp_core.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
drivers/net/fddi/defxx.c | 22 +-
drivers/net/hamradio/baycom_epp.c | 2 +-
drivers/net/hamradio/scc.c | 6 +-
drivers/net/macsec.c | 34 +-
drivers/net/ntb_netdev.c | 4 +-
drivers/net/phy/xilinx_gmii2rgmii.c | 1 +
drivers/net/ppp/ppp_generic.c | 2 +
drivers/net/usb/rndis_host.c | 3 +-
drivers/net/veth.c | 5 +-
drivers/net/vmxnet3/vmxnet3_drv.c | 8 +
drivers/net/wan/farsync.c | 2 +
drivers/net/wireless/ath/ar5523/ar5523.c | 6 +
drivers/net/wireless/ath/ath10k/pci.c | 20 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 46 ++-
.../broadcom/brcm80211/brcmfmac/firmware.c | 5 +
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 +-
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 3 +-
drivers/net/wireless/microchip/wilc1000/sdio.c | 1 +
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
.../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 26 +-
.../net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 10 +-
drivers/net/wireless/rsi/rsi_91x_core.c | 4 +-
drivers/net/wireless/rsi/rsi_91x_hal.c | 6 +-
drivers/nfc/pn533/pn533.c | 4 +
drivers/nvme/host/nvme.h | 2 +-
drivers/nvme/host/pci.c | 37 +-
drivers/nvme/target/passthru.c | 11 +-
drivers/of/overlay.c | 4 +-
drivers/parisc/led.c | 3 +
drivers/pci/controller/dwc/pcie-designware.c | 2 +-
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
drivers/pci/irq.c | 2 +
drivers/pci/pci-sysfs.c | 13 +-
drivers/pci/pci.c | 2 +
drivers/perf/arm_dsu_pmu.c | 6 +-
drivers/perf/arm_smmuv3_pmu.c | 8 +-
drivers/phy/broadcom/phy-brcm-usb.c | 6 +-
drivers/pinctrl/pinconf-generic.c | 4 +-
drivers/platform/chrome/cros_usbpd_notify.c | 6 +-
drivers/platform/x86/huawei-wmi.c | 20 +-
drivers/platform/x86/intel_scu_ipc.c | 2 +-
drivers/platform/x86/mxm-wmi.c | 8 +-
drivers/pnp/core.c | 4 +-
drivers/power/supply/power_supply_core.c | 7 +-
drivers/pwm/pwm-sifive.c | 5 +-
drivers/pwm/pwm-tegra.c | 4 +-
drivers/rapidio/devices/rio_mport_cdev.c | 15 +-
drivers/rapidio/rio-scan.c | 8 +-
drivers/rapidio/rio.c | 9 +-
drivers/regulator/core.c | 15 +-
drivers/remoteproc/qcom_q6v5_pas.c | 4 +
drivers/remoteproc/qcom_sysmon.c | 5 +-
drivers/remoteproc/remoteproc_core.c | 9 +-
drivers/rtc/rtc-cmos.c | 366 ++++++++---------
drivers/rtc/rtc-ds1347.c | 2 +-
drivers/rtc/rtc-mxc_v2.c | 4 +-
drivers/rtc/rtc-pcf85063.c | 10 +-
drivers/rtc/rtc-pic32.c | 8 +-
drivers/rtc/rtc-snvs.c | 16 +-
drivers/rtc/rtc-st-lpc.c | 1 +
drivers/s390/net/ctcm_main.c | 11 +-
drivers/s390/net/lcs.c | 8 +-
drivers/s390/net/netiucv.c | 9 +-
drivers/scsi/fcoe/fcoe.c | 1 +
drivers/scsi/fcoe/fcoe_sysfs.c | 19 +-
drivers/scsi/hpsa.c | 9 +-
drivers/scsi/ipr.c | 10 +-
drivers/scsi/mpt3sas/mpt3sas_transport.c | 2 +
drivers/scsi/scsi_debug.c | 11 +-
drivers/scsi/scsi_error.c | 14 +-
drivers/scsi/snic/snic_disc.c | 3 +
drivers/soc/qcom/Kconfig | 1 +
drivers/soc/qcom/apr.c | 142 ++++---
drivers/soc/qcom/llcc-qcom.c | 2 +-
drivers/soc/ti/knav_qmss_queue.c | 6 +-
drivers/soc/ti/smartreflex.c | 1 +
drivers/soc/ux500/ux500-soc-id.c | 10 +-
drivers/soundwire/intel.c | 8 +-
drivers/soundwire/qcom.c | 8 +-
drivers/soundwire/stream.c | 4 +-
drivers/spi/spi-gpio.c | 16 +-
drivers/spi/spidev.c | 21 +-
drivers/staging/iio/accel/adis16203.c | 1 +
drivers/staging/iio/accel/adis16240.c | 1 +
drivers/staging/media/tegra-video/csi.c | 4 +-
drivers/staging/media/tegra-video/csi.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 +-
drivers/thermal/imx8mm_thermal.c | 8 +-
drivers/tty/serial/altera_uart.c | 21 +-
drivers/tty/serial/amba-pl011.c | 14 +-
drivers/tty/serial/fsl_lpuart.c | 18 +-
drivers/tty/serial/pch_uart.c | 4 +
drivers/tty/serial/serial-tegra.c | 6 +-
drivers/tty/serial/serial_core.c | 3 +-
drivers/tty/serial/sunsab.c | 8 +-
drivers/uio/uio_dmem_genirq.c | 13 +-
drivers/usb/dwc3/core.c | 23 +-
drivers/usb/dwc3/dwc3-qcom.c | 13 +-
drivers/usb/gadget/function/f_hid.c | 271 ++++++++++---
drivers/usb/gadget/function/u_hid.h | 1 +
drivers/usb/gadget/udc/fotg210-udc.c | 12 +-
drivers/usb/musb/musb_gadget.c | 2 -
drivers/usb/roles/class.c | 5 +-
drivers/usb/storage/alauda.c | 2 +
drivers/usb/typec/bus.c | 2 +-
drivers/usb/typec/tcpm/tcpci.c | 5 +-
drivers/usb/typec/tps6598x.c | 2 +-
drivers/vfio/platform/vfio_platform_common.c | 3 +-
drivers/vhost/vhost.c | 4 +-
drivers/vhost/vringh.c | 5 +-
drivers/vhost/vsock.c | 9 +-
drivers/video/fbdev/Kconfig | 1 -
drivers/video/fbdev/hyperv_fb.c | 8 +-
drivers/video/fbdev/matrox/matroxfb_base.c | 4 +-
drivers/video/fbdev/pm2fb.c | 9 +-
drivers/video/fbdev/uvesafb.c | 1 +
drivers/video/fbdev/vermilion/vermilion.c | 4 +-
drivers/video/fbdev/via/via-core.c | 9 +-
drivers/vme/bridges/vme_fake.c | 2 +
drivers/vme/bridges/vme_tsi148.c | 1 +
drivers/xen/privcmd.c | 2 +-
fs/afs/fs_probe.c | 5 +-
fs/binfmt_elf_fdpic.c | 5 +-
fs/binfmt_misc.c | 8 +-
fs/btrfs/backref.c | 4 +
fs/btrfs/ioctl.c | 9 +-
fs/btrfs/rcu-string.h | 6 +-
fs/ceph/caps.c | 2 +-
fs/ceph/locks.c | 4 -
fs/ceph/super.h | 1 -
fs/char_dev.c | 2 +-
fs/cifs/cifsfs.c | 8 +-
fs/cifs/cifsglob.h | 69 ++++
fs/cifs/cifsproto.h | 4 +-
fs/cifs/connect.c | 4 +-
fs/cifs/misc.c | 4 +-
fs/cifs/smb2ops.c | 143 ++++---
fs/configfs/dir.c | 2 +
fs/debugfs/file.c | 28 +-
fs/ext4/ext4.h | 9 +-
fs/ext4/extents.c | 8 +
fs/ext4/extents_status.c | 3 +-
fs/ext4/fast_commit.c | 49 ++-
fs/ext4/fast_commit.h | 1 +
fs/ext4/indirect.c | 11 +-
fs/ext4/inline.c | 2 +-
fs/ext4/inode.c | 49 ++-
fs/ext4/ioctl.c | 13 +-
fs/ext4/mballoc.h | 2 +-
fs/ext4/migrate.c | 6 +-
fs/ext4/namei.c | 49 ++-
fs/ext4/resize.c | 6 +-
fs/ext4/super.c | 230 +++++------
fs/ext4/verity.c | 7 +-
fs/ext4/xattr.c | 184 ++++-----
fs/ext4/xattr.h | 1 +
fs/f2fs/gc.c | 11 +-
fs/f2fs/segment.c | 2 +-
fs/hfs/inode.c | 13 +-
fs/hfs/trans.c | 2 +-
fs/hfsplus/hfsplus_fs.h | 2 +
fs/hfsplus/inode.c | 16 +-
fs/hfsplus/options.c | 4 +
fs/hugetlbfs/inode.c | 6 +-
fs/jfs/jfs_dmap.c | 27 +-
fs/libfs.c | 22 +-
fs/locks.c | 23 ++
fs/mbcache.c | 121 ++++--
fs/nfs/namespace.c | 2 +-
fs/nfs/nfs4proc.c | 34 +-
fs/nfs/nfs4state.c | 2 +
fs/nfs/nfs4xdr.c | 12 +-
fs/nfsd/nfs4callback.c | 8 +-
fs/nfsd/nfs4state.c | 51 ++-
fs/nfsd/nfs4xdr.c | 11 +
fs/nfsd/nfssvc.c | 2 +-
fs/nilfs2/the_nilfs.c | 73 +++-
fs/ocfs2/journal.c | 2 +-
fs/ocfs2/journal.h | 1 +
fs/ocfs2/stackglue.c | 8 +-
fs/ocfs2/super.c | 105 ++---
fs/orangefs/orangefs-debugfs.c | 29 +-
fs/orangefs/orangefs-mod.c | 8 +-
fs/overlayfs/dir.c | 46 ++-
fs/overlayfs/super.c | 7 +-
fs/pnode.c | 2 +-
fs/pstore/Kconfig | 1 +
fs/pstore/pmsg.c | 7 +-
fs/pstore/ram.c | 2 +
fs/pstore/ram_core.c | 6 +-
fs/pstore/zone.c | 2 +-
fs/quota/dquot.c | 2 +
fs/reiserfs/namei.c | 4 +
fs/reiserfs/xattr_security.c | 2 +-
fs/sysv/itree.c | 2 +-
fs/udf/inode.c | 2 +-
fs/udf/namei.c | 8 +-
fs/xattr.c | 2 +-
include/linux/debugfs.h | 19 +-
include/linux/devfreq.h | 7 +-
include/linux/efi.h | 2 -
include/linux/eventfd.h | 2 +-
include/linux/fs.h | 18 +-
include/linux/highmem.h | 18 +
include/linux/hyperv.h | 2 +
include/linux/iio/imu/adis.h | 63 +--
include/linux/interrupt.h | 4 +
include/linux/mbcache.h | 41 +-
include/linux/netdevice.h | 58 +--
include/linux/netfilter/ipset/ip_set.h | 2 +-
include/linux/nvme.h | 3 +-
include/linux/proc_fs.h | 2 +
include/linux/skbuff.h | 42 +-
include/linux/soc/qcom/apr.h | 12 +-
include/linux/sunrpc/rpc_pipe_fs.h | 5 +
include/linux/timerqueue.h | 2 +-
include/media/dvbdev.h | 32 +-
include/net/dst.h | 5 +-
include/net/mptcp.h | 12 +-
include/net/mrp.h | 1 +
include/net/pkt_sched.h | 9 +
include/sound/hdaudio.h | 2 +
include/sound/hdaudio_ext.h | 1 -
include/sound/pcm.h | 36 +-
include/sound/soc-dai.h | 32 +-
include/trace/events/ext4.h | 7 +-
include/trace/events/jbd2.h | 44 +--
include/uapi/drm/drm_fourcc.h | 11 +
include/uapi/linux/idxd.h | 2 +-
include/uapi/linux/swab.h | 2 +-
include/uapi/sound/asequencer.h | 8 +-
io_uring/io_uring.c | 2 +-
kernel/Makefile | 2 +-
kernel/acct.c | 2 +
kernel/bpf/btf.c | 5 +
kernel/bpf/verifier.c | 123 +++---
kernel/cpu.c | 4 +-
kernel/events/core.c | 14 +-
kernel/futex/Makefile | 3 +
kernel/{futex.c => futex/core.c} | 30 +-
kernel/gcov/gcc_4_7.c | 5 +
kernel/irq/internals.h | 2 +
kernel/irq/irqdesc.c | 15 +-
kernel/irq/manage.c | 11 +-
kernel/kcsan/core.c | 50 +++
kernel/padata.c | 15 +-
kernel/power/snapshot.c | 4 +-
kernel/rcu/tree.c | 23 +-
kernel/rcu/tree.h | 1 +
kernel/relay.c | 4 +-
kernel/sched/fair.c | 128 +++++-
kernel/trace/blktrace.c | 3 +-
kernel/trace/trace.c | 15 +-
kernel/trace/trace_events_hist.c | 13 +-
lib/Kconfig.debug | 1 -
lib/debugobjects.c | 10 +
lib/fonts/fonts.c | 4 +-
lib/iov_iter.c | 14 -
lib/notifier-error-inject.c | 2 +-
lib/test_firmware.c | 1 +
mm/compaction.c | 18 +-
net/802/mrp.c | 18 +-
net/bluetooth/hci_core.c | 2 +-
net/bluetooth/rfcomm/core.c | 2 +-
net/bpf/test_run.c | 3 -
net/caif/cfctrl.c | 6 +-
net/core/dev.c | 16 +-
net/core/filter.c | 18 +-
net/core/skbuff.c | 9 +-
net/core/sock_map.c | 2 +
net/core/stream.c | 6 +
net/ethtool/ioctl.c | 3 +-
net/hsr/hsr_device.c | 59 +--
net/hsr/hsr_forward.c | 15 +-
net/hsr/hsr_framereg.c | 9 +-
net/hsr/hsr_framereg.h | 2 +
net/ipv4/inet_connection_sock.c | 28 +-
net/ipv4/syncookies.c | 7 +-
net/ipv4/tcp_bpf.c | 8 +-
net/ipv4/tcp_ulp.c | 4 +
net/ipv4/udp_tunnel_core.c | 1 +
net/mac80211/iface.c | 1 +
net/mptcp/subflow.c | 76 +++-
net/netfilter/ipset/ip_set_core.c | 7 +-
net/netfilter/ipset/ip_set_hash_ip.c | 14 +-
net/netfilter/ipset/ip_set_hash_ipmark.c | 13 +-
net/netfilter/ipset/ip_set_hash_ipport.c | 13 +-
net/netfilter/ipset/ip_set_hash_ipportip.c | 13 +-
net/netfilter/ipset/ip_set_hash_ipportnet.c | 13 +-
net/netfilter/ipset/ip_set_hash_net.c | 17 +-
net/netfilter/ipset/ip_set_hash_netiface.c | 15 +-
net/netfilter/ipset/ip_set_hash_netnet.c | 23 +-
net/netfilter/ipset/ip_set_hash_netport.c | 19 +-
net/netfilter/ipset/ip_set_hash_netportnet.c | 40 +-
net/netfilter/nf_conntrack_proto_icmpv6.c | 53 +++
net/netfilter/nf_flow_table_offload.c | 6 +-
net/nfc/netlink.c | 52 ++-
net/openvswitch/datapath.c | 25 +-
net/packet/af_packet.c | 20 +-
net/rxrpc/output.c | 2 +-
net/rxrpc/sendmsg.c | 2 +-
net/sched/cls_tcindex.c | 12 +-
net/sched/ematch.c | 2 +
net/sched/sch_api.c | 5 +
net/sched/sch_atm.c | 5 +-
net/sched/sch_cbq.c | 4 +-
net/sctp/sysctl.c | 73 ++--
net/sunrpc/auth_gss/auth_gss.c | 19 +-
net/sunrpc/auth_gss/svcauth_gss.c | 9 +-
net/sunrpc/clnt.c | 2 +-
net/sunrpc/xprtrdma/verbs.c | 2 +-
net/vmw_vsock/vmci_transport.c | 6 +-
net/wireless/reg.c | 4 +-
samples/vfio-mdev/mdpy-fb.c | 8 +-
security/apparmor/apparmorfs.c | 4 +-
security/apparmor/lsm.c | 4 +-
security/apparmor/policy.c | 2 +-
security/apparmor/policy_ns.c | 2 +-
security/apparmor/policy_unpack.c | 2 +-
security/device_cgroup.c | 33 +-
security/integrity/digsig.c | 6 +-
security/integrity/ima/ima_main.c | 1 +
security/integrity/ima/ima_policy.c | 53 ++-
security/integrity/ima/ima_template.c | 9 +-
security/integrity/platform_certs/load_uefi.c | 1 +
security/loadpin/loadpin.c | 30 +-
sound/core/pcm_native.c | 4 +-
sound/drivers/mts64.c | 3 +
sound/hda/ext/hdac_ext_stream.c | 17 -
sound/hda/hdac_stream.c | 27 ++
sound/pci/asihpi/hpioctl.c | 2 +-
sound/pci/hda/hda_controller.c | 4 +-
sound/pci/hda/patch_hdmi.c | 1 +
sound/pci/hda/patch_realtek.c | 77 ++++
sound/soc/codecs/hdac_hda.c | 22 +-
sound/soc/codecs/max98373-sdw.c | 2 +-
sound/soc/codecs/pcm512x.c | 8 +-
sound/soc/codecs/rt1308-sdw.c | 2 +-
sound/soc/codecs/rt298.c | 7 +
sound/soc/codecs/rt5670.c | 2 -
sound/soc/codecs/rt5682-sdw.c | 2 +-
sound/soc/codecs/rt700.c | 2 +-
sound/soc/codecs/rt711.c | 2 +-
sound/soc/codecs/rt715.c | 2 +-
sound/soc/codecs/wm8994.c | 5 +
sound/soc/codecs/wsa881x.c | 2 +-
sound/soc/generic/audio-graph-card.c | 4 +-
sound/soc/intel/boards/bytcr_rt5640.c | 15 +
sound/soc/intel/boards/sof_sdw.c | 6 +-
sound/soc/intel/skylake/skl-pcm.c | 7 +-
sound/soc/intel/skylake/skl.c | 7 +-
sound/soc/jz4740/jz4740-i2s.c | 39 +-
sound/soc/mediatek/common/mtk-btcvsd.c | 6 +-
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 71 +++-
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 7 +-
sound/soc/pxa/mmp-pcm.c | 2 +-
sound/soc/qcom/lpass-sc7180.c | 3 +
sound/soc/qcom/sdm845.c | 4 +-
sound/soc/rockchip/rockchip_pdm.c | 1 +
sound/soc/rockchip/rockchip_spdif.c | 1 +
sound/soc/sof/intel/hda-dai.c | 7 +-
sound/usb/line6/driver.c | 3 +-
sound/usb/line6/midi.c | 6 +-
sound/usb/line6/midibuf.c | 25 +-
sound/usb/line6/midibuf.h | 5 +-
sound/usb/line6/pod.c | 3 +-
sound/usb/quirks-table.h | 2 +
tools/arch/parisc/include/uapi/asm/mman.h | 12 +-
tools/lib/bpf/bpf.h | 7 +
tools/lib/bpf/btf_dump.c | 29 +-
tools/lib/bpf/libbpf.c | 3 +
tools/objtool/check.c | 12 +-
tools/perf/bench/bench.h | 12 -
tools/perf/builtin-trace.c | 32 +-
tools/perf/util/data.c | 2 +
tools/perf/util/debug.c | 4 +
tools/perf/util/dwarf-aux.c | 23 +-
tools/perf/util/symbol-elf.c | 2 +-
tools/testing/ktest/ktest.pl | 23 +-
tools/testing/selftests/Makefile | 26 +-
.../selftests/drivers/net/netdevsim/devlink.sh | 4 +-
tools/testing/selftests/efivarfs/efivarfs.sh | 5 +
.../ftrace/test.d/ftrace/func_event_triggers.tc | 15 +-
tools/testing/selftests/lib.mk | 5 +
.../selftests/netfilter/conntrack_icmp_related.sh | 36 +-
.../selftests/powerpc/dscr/dscr_sysfs_test.c | 5 +-
tools/testing/selftests/proc/proc-uptime-002.c | 3 +-
.../selftests/rcutorture/bin/console-badness.sh | 3 +-
747 files changed, 7705 insertions(+), 4186 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/783 usb: musb: remove extra check in musb_gadget_vbus_draw
From: Ivaylo Dimitrov <[email protected]>
[ Upstream commit ecec4b20d29c3d6922dafe7d2555254a454272d2 ]
The checks for musb->xceiv and musb->xceiv->set_power duplicate those in usb_phy_set_power(), so there is no need of them. Moreover, not calling usb_phy_set_power() results in usb_phy_set_charger_current() not being called, so current USB config max current is not propagated through USB charger framework and charger drivers may try to draw more current than allowed or possible.
Fix that by removing those extra checks and calling usb_phy_set_power() directly.
Tested on Motorola Droid4 and Nokia N900
--- drivers/usb/musb/musb_gadget.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/musb/musb_gadget.c +0 -2
@@ -1628,8 +1628,6 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) {struct musb *musb =gadget_to_musb (gadget); -if (!musb->xceiv->set_power) -return -EOPNOTSUPP ;return usb_phy_set_power (musb->xceiv, mA); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 2/783 arm64: dts: qcom: ipq6018-cp01-c1: use BLSPI1 pins
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 4871d3c38893c8a585e3e96364b7fb91cda8322e ]
When BLSPI1 (originally SPI0, later renamed in commit f82c48d46852 ("arm64: dts: qcom: ipq6018: correct QUP peripheral labels")) was added, the device node lacked respective pin configuration assignment.
--- arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts +2 -0
@@ -37,6 +37,8 @@ &i2c_1 { &spi_0 { cs-select = <0>; + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; status = "okay"; m25p80@0 {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 3/783 arm64: dts: qcom: msm8996: fix GPU OPP table
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 0d440d811e6e2f37093e54db55bc27fe66678170 ]
Fix Adreno OPP table according to the msm-3.18. Enable 624 MHz for the speed bin 3 and 560 MHz for bins 2 and 3.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +5 -5
@@ -651,17 +651,17 @@ gpu_opp_table: opp-table { compatible ="operating-points-v2"; /* - * 624Mhz and 560Mhz are only available on speed - * bin (1 << 0). All the rest are available on - * all bins of the hardware + * 624Mhz is only available on speed bins 0 and 3. + * 560Mhz is only available on speed bins 0, 2 and 3. + * All the rest are available on all bins of the hardware. */ opp-624000000 { opp-hz = /bits/ 64 <624000000>; - opp-supported-hw = <0x01>; + opp-supported-hw = <0x09>; }; opp-560000000 { opp-hz = /bits/ 64 <560000000>; - opp-supported-hw = <0x01>; + opp-supported-hw = <0x0d>; }; opp-510000000 { opp-hz = /bits/ 64 <510000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 4/783 ARM: dts: qcom: apq8064: fix coresight compatible
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit a42b1ee868361f1cb0492f1bdaefb43e0751e468 ]
There's a typo missing the arm, prefix of arm,coresight-etb10. Fix it to make devicetree validation happier.
--- arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-apq8064.dtsi +1 -1
@@ -1571,7 +1571,7 @@ wifi { }; etb@1a01000 { - compatible = "coresight-etb10", "arm,primecell"; + compatible = "arm,coresight-etb10", "arm,primecell"; reg = <0x1a01000 0x1000>; clocks = <&rpmcc RPM_QDSS_CLK>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 5/783 arm64: dts: qcom: sdm630: fix UART1 pin bias
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 780f836fe071a9e8703fe6a05ae00129acf83391 ]
There is no "bias-no-pull" property. Assume intentions were disabling bias.
--- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm630.dtsi +1 -1
@@ -593,7 +593,7 @@ rx-cts-rts { pins = "gpio17", "gpio18", "gpio19"; function = "gpio"; drive-strength = <2>; - bias-no-pull; + bias-disable; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 6/783 arm64: dts: qcom: sdm845-cheza: fix AP suspend pin bias
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 9bce41fab14da8f21027dc9847535ef5e22cbe8b ]
There is no "bias-no-pull" property. Assume intentions were disabling bias.
--- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +2 -2
@@ -1292,7 +1292,7 @@ ap_suspend_l_assert: ap_suspend_l_assert { config { pins = "gpio126"; function = "gpio"; - bias-no-pull; + bias-disable; drive-strength = <2>; output-low; };
@@ -1302,7 +1302,7 @@ ap_suspend_l_deassert: ap_suspend_l_deassert { config { pins = "gpio126"; function = "gpio"; - bias-no-pull; + bias-disable; drive-strength = <2>; output-high; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 7/783 arm64: dts: qcom: msm8916: Drop MSS fallback compatible
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit ff02ac621634e82c0c34d02a79d402ae700cdfd0 ]
MSM8916 was originally using the "qcom,q6v5-pil" compatible for the MSS remoteproc. Later it was decided to use SoC-specific compatibles instead, so "qcom,msm8916-mss-pil" is now the preferred compatible.
Commit 60a05ed059a0 ("arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS") updated the MSM8916 device tree to make use of the new compatible but still kept the old "qcom,q6v5-pil" as fallback.
This is inconsistent with other SoCs and conflicts with the description in the binding documentation (which says that only one compatible should be present). Also, it has no functional advantage since older kernels could not handle this DT anyway (e.g. "power-domains" in the MSS node is only supported by kernels that also support "qcom,msm8916-mss-pil").
Make this consistent with other SoCs by using only the "qcom,msm8916-mss-pil" compatible.
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -1249,7 +1249,7 @@ spmi_bus: spmi@200f000 { }; mpss: remoteproc@4080000 { - compatible = "qcom,msm8916-mss-pil", "qcom,q6v5-pil"; + compatible = "qcom,msm8916-mss-pil"; reg = <0x04080000 0x100>, <0x04020000 0x040>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 8/783 objtool, kcsan: Add volatile read/write instrumentation to whitelist
In reply to Greg Kroah-HartmanFrom: Marco Elver <[email protected]>
[ Upstream commit 63646fcba5bb4b59a19031c21913f94e46a3d0d4 ]
Adds KCSAN's volatile instrumentation to objtool's uaccess whitelist.
Recent kernel change have shown that this was missing from the uaccess whitelist (since the first upstreamed version of KCSAN):
mm/gup.o: warning: objtool: fault_in_readable+0x101: call to __tsan_volatile_write1() with UACCESS enabled
--- tools/objtool/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tools/objtool/check.c +10 -0
@@ -802,6 +802,16 @@ static const char *uaccess_safe_builtin[] = {"__tsan_read_write4" ,"__tsan_read_write8" ,"__tsan_read_write16" , +"__tsan_volatile_read1" , +"__tsan_volatile_read2" , +"__tsan_volatile_read4" , +"__tsan_volatile_read8" , +"__tsan_volatile_read16" , +"__tsan_volatile_write1" , +"__tsan_volatile_write2" , +"__tsan_volatile_write4" , +"__tsan_volatile_write8" , +"__tsan_volatile_write16" ,"__tsan_atomic8_load" ,"__tsan_atomic16_load" , "__tsan_atomic32_load",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 9/783 ARM: dts: stm32: Drop stm32mp15xc.dtsi from Avenger96
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 3b835f1b8acef53c8882b25f40f48d7f5982c938 ]
The Avenger96 is populated with STM32MP157A DHCOR SoM, drop the stm32mp15xc.dtsi which should only be included in DTs of devices which are populated with STM32MP15xC/F SoC as the stm32mp15xc.dtsi enables CRYP block not present in the STM32MP15xA/D SoC .
--- arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts +0 -1
@@ -13,7 +13,6 @@ /dts-v1/; #include "stm32mp157.dtsi" -#include "stm32mp15xc.dtsi" #include "stm32mp15xx-dhcor-som.dtsi" #include "stm32mp15xx-dhcor-avenger96.dtsi"
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 10/783 ARM: dts: stm32: Fix AV96 WLAN regulator gpio property
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit d5d577e3d50713ad11d98dbdaa48bb494346c26d ]
The WLAN regulator uses 'gpios' property instead of 'gpio' to specify regulator enable GPIO. While the former is also currently handled by the Linux kernel regulator-fixed driver, the later is the correct one per DT bindings. Update the DT to use the later.
--- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +1 -1
@@ -100,7 +100,7 @@ wlan_pwr: regulator-wlan { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>; + gpio = <&gpioz 3 GPIO_ACTIVE_HIGH>; enable-active-high; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 11/783 drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
In reply to Greg Kroah-HartmanFrom: Chen Jiahao <[email protected]>
[ Upstream commit adf85adc2a7199b41e7a4da083bd17274a3d6969 ]
There is a sparse warning shown below:
drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol 'knav_acc_firmwares' was not declared. Should it be static?
Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c, mark it as static to fix the warning.
--- drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/ti/knav_qmss_queue.c +1 -1
@@ -67,7 +67,7 @@ static DEFINE_MUTEX(knav_dev_lock);* Newest followed by older ones. Search is done from start of the array * until a firmware file is found. */ -const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin" }; +static const char *const knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin" };static bool device_ready;bool knav_qmss_device_ready (void )
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 12/783 soc: qcom: llcc: make irq truly optional
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit c882c899ead3545102a4d71b5fbe73b9e4bc2657 ]
The function platform_get_irq prints an error message into the kernel log when the irq isn't found.
Since the interrupt is actually optional and not provided by some SoCs, use platform_get_irq_optional which does not print an error message.
--- drivers/soc/qcom/llcc-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/llcc-qcom.c +1 -1
@@ -476,7 +476,7 @@ static int qcom_llcc_probe(struct platform_device *pdev)if (ret) goto err; - drv_data->ecc_irq =platform_get_irq (pdev,0 ); + drv_data->ecc_irq =platform_get_irq_optional (pdev,0 );if (drv_data->ecc_irq >=0 ) { llcc_edac = platform_device_register_data(&pdev->dev, "qcom_llcc_edac", -1, drv_data,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 13/783 soc: qcom: apr: make code more reuseable
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit 99139b80c1b3d73026ed8be2de42c52e2976ab64 ]
APR and other packet routers like GPR are pretty much same and interact with other drivers in similar way.
Ex: GPR ports can be considered as APR services, only difference is they are allocated dynamically.
Other difference is packet layout, which should not matter with the apis abstracted. Apart from this the rest of the functionality is pretty much identical across APR and GPR.
Make the apr code more reusable by abstracting it service level, rather than device level so that we do not need to write new drivers for other new packet routers like GPR.
This patch is in preparation to add GPR support to this driver.
Stable-dep-of: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index")
--- drivers/soc/qcom/apr.c | 129 +++++++++++++++++++++-------------- include/linux/soc/qcom/apr.h | 12 +++- 2 files changed, 90 insertions(+), 51 deletions(-)
drivers/soc/qcom/apr.c +79 -50
@@ -15,13 +15,18 @@#include <linux/rpmsg.h> #include <linux/of.h> -struct apr { +enum { +PR_TYPE_APR =0 , +}; + +struct packet_router {struct rpmsg_endpoint *ch;struct device *dev;spinlock_t svcs_lock;spinlock_t rx_lock;struct idr svcs_idr;int dest_domain_id; +int type;struct pdr_handle *pdr;struct workqueue_struct *rxwq;struct work_struct rx_work;
@@ -44,21 +49,21 @@ struct apr_rx_buf {*/ int apr_send_pkt (struct apr_device *adev,struct apr_pkt *pkt) { -struct apr *apr =dev_get_drvdata (adev->dev.parent); +struct packet_router *apr =dev_get_drvdata (adev->dev.parent);struct apr_hdr *hdr;unsigned long flags;int ret; -spin_lock_irqsave (&adev->lock, flags); +spin_lock_irqsave (&adev->svc.lock, flags); hdr = &pkt->hdr; hdr->src_domain =APR_DOMAIN_APPS ; - hdr->src_svc = adev->svc_id; + hdr->src_svc = adev->svc.id; hdr->dest_domain = adev->domain_id; - hdr->dest_svc = adev->svc_id; + hdr->dest_svc = adev->svc.id; ret =rpmsg_trysend (apr->ch, pkt, hdr->pkt_size); -spin_unlock_irqrestore (&adev->lock, flags); +spin_unlock_irqrestore (&adev->svc.lock, flags);return ret ? ret : hdr->pkt_size; }
@@ -74,7 +79,7 @@ static void apr_dev_release(struct device *dev)static int apr_callback (struct rpmsg_device *rpdev,void *buf,int len,void *priv,u32 addr) { -struct apr *apr =dev_get_drvdata (&rpdev->dev); +struct packet_router *apr =dev_get_drvdata (&rpdev->dev);struct apr_rx_buf *abuf;unsigned long flags;
@@ -100,11 +105,11 @@ static int apr_callback(struct rpmsg_device *rpdev, void *buf,return 0 ; } - -static int apr_do_rx_callback (struct apr *apr,struct apr_rx_buf *abuf) +static int apr_do_rx_callback (struct packet_router *apr,struct apr_rx_buf *abuf) {uint16_t hdr_size, msg_type, ver, svc_id; -struct apr_device *svc =NULL ; +struct pkt_router_svc *svc; +struct apr_device *adev;struct apr_driver *adrv =NULL ;struct apr_resp_pkt resp;struct apr_hdr *hdr;
@@ -145,12 +150,15 @@ static int apr_do_rx_callback(struct apr *apr, struct apr_rx_buf *abuf) svc_id = hdr->dest_svc;spin_lock_irqsave (&apr->svcs_lock, flags); svc =idr_find (&apr->svcs_idr, svc_id); -if (svc && svc->dev.driver) - adrv =to_apr_driver (svc->dev.driver); +if (svc && svc->dev->driver) { + adev =svc_to_apr_device (svc); + adrv =to_apr_driver (adev->dev.driver); + }spin_unlock_irqrestore (&apr->svcs_lock, flags); -if (!adrv) { -dev_err (apr->dev,"APR: service is not registered\n" ); +if (!adrv || !adev) { +dev_err (apr->dev,"APR: service is not registered (%d)\n" , + svc_id);return -EINVAL ; }
@@ -164,20 +172,26 @@ static int apr_do_rx_callback(struct apr *apr, struct apr_rx_buf *abuf)if (resp.payload_size >0 ) resp.payload = buf + hdr_size; - adrv->callback (svc, &resp); + adrv->callback (adev, &resp);return 0 ; }static void apr_rxwq (struct work_struct *work) { - struct apr *apr = container_of(work, struct apr, rx_work); + struct packet_router *apr = container_of(work, struct packet_router, rx_work);struct apr_rx_buf *abuf, *b;unsigned long flags;if (!list_empty (&apr->rx_list)) {list_for_each_entry_safe (abuf, b, &apr->rx_list, node) { -apr_do_rx_callback (apr, abuf); +switch (apr->type) { +case PR_TYPE_APR : +apr_do_rx_callback (apr, abuf); +break ; +default : +break ; + }spin_lock_irqsave (&apr->rx_lock, flags);list_del (&abuf->node);spin_unlock_irqrestore (&apr->rx_lock, flags);
@@ -201,7 +215,7 @@ static int apr_device_match(struct device *dev, struct device_driver *drv)while (id->domain_id !=0 || id->svc_id !=0 ) {if (id->domain_id == adev->domain_id && - id->svc_id == adev->svc_id) + id->svc_id == adev->svc.id)return 1 ; id++; }
@@ -221,14 +235,14 @@ static int apr_device_remove(struct device *dev) {struct apr_device *adev =to_apr_device (dev);struct apr_driver *adrv; -struct apr *apr =dev_get_drvdata (adev->dev.parent); +struct packet_router *apr =dev_get_drvdata (adev->dev.parent);if (dev->driver) { adrv =to_apr_driver (dev->driver);if (adrv->remove) adrv->remove (adev);spin_lock (&apr->svcs_lock); -idr_remove (&apr->svcs_idr, adev->svc_id); +idr_remove (&apr->svcs_idr, adev->svc.id);spin_unlock (&apr->svcs_lock); }
@@ -257,28 +271,39 @@ struct bus_type aprbus = {EXPORT_SYMBOL_GPL (aprbus);static int apr_add_device (struct device *dev,struct device_node *np, -const struct apr_device_id *id) +u32 svc_id,u32 domain_id) { -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct apr_device *adev =NULL ; +struct pkt_router_svc *svc;int ret; adev =kzalloc (sizeof (*adev),GFP_KERNEL );if (!adev)return -ENOMEM ; -spin_lock_init (&adev->lock); + adev->svc_id = svc_id; + svc = &adev->svc; + + svc->id = svc_id; + svc->pr = apr; + svc->priv = adev; + svc->dev = dev; +spin_lock_init (&svc->lock); + + adev->domain_id = domain_id; - adev->svc_id = id->svc_id; - adev->domain_id = id->domain_id; - adev->version = id->svc_version;if (np)snprintf (adev->name,APR_NAME_SIZE ,"%pOFn" , np); -else -strscpy (adev->name, id->name,APR_NAME_SIZE ); -dev_set_name (&adev->dev,"aprsvc:%s:%x:%x" , adev->name, - id->domain_id, id->svc_id); +switch (apr->type) { +case PR_TYPE_APR : +dev_set_name (&adev->dev,"aprsvc:%s:%x:%x" , adev->name, + domain_id, svc_id); +break ; +default : +break ; + } adev->dev.bus = &aprbus; adev->dev.parent = dev;
@@ -287,8 +312,7 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->dev.driver =NULL ;spin_lock (&apr->svcs_lock); -idr_alloc (&apr->svcs_idr, adev, id->svc_id, - id->svc_id +1 ,GFP_ATOMIC ); +idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC );spin_unlock (&apr->svcs_lock); of_property_read_string_index(np, "qcom,protection-domain",
@@ -308,7 +332,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,static int of_apr_add_pd_lookups (struct device *dev) {const char *service_name, *service_path; -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct device_node *node;struct pdr_service *pds;int ret;
@@ -340,13 +364,14 @@ static int of_apr_add_pd_lookups(struct device *dev)static void of_register_apr_devices (struct device *dev,const char *svc_path) { -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct device_node *node;const char *service_path;int ret;for_each_child_of_node (dev->of_node, node) { -struct apr_device_id id = { {0 } }; +u32 svc_id; +u32 domain_id;/* * This function is called with svc_path NULL during
@@ -376,13 +401,13 @@ static void of_register_apr_devices(struct device *dev, const char *svc_path)continue ; } -if (of_property_read_u32 (node,"reg" , &id.svc_id)) +if (of_property_read_u32 (node,"reg" , &svc_id))continue ; - id.domain_id = apr->dest_domain_id; + domain_id = apr->dest_domain_id; -if (apr_add_device (dev, node, &id)) -dev_err (dev,"Failed to add apr %d svc\n" , id.svc_id); +if (apr_add_device (dev, node, svc_id, domain_id)) +dev_err (dev,"Failed to add apr %d svc\n" , svc_id); } }
@@ -402,7 +427,7 @@ static int apr_remove_device(struct device *dev, void *svc_path)static void apr_pd_status (int state,char *svc_path,void *priv) { -struct apr *apr = (struct apr *)priv; +struct packet_router *apr = (struct packet_router *)priv;switch (state) {case SERVREG_SERVICE_STATE_UP :
@@ -417,16 +442,20 @@ static void apr_pd_status(int state, char *svc_path, void *priv)static int apr_probe (struct rpmsg_device *rpdev) {struct device *dev = &rpdev->dev; -struct apr *apr; +struct packet_router *apr;int ret; apr =devm_kzalloc (dev,sizeof (*apr),GFP_KERNEL );if (!apr)return -ENOMEM ; - ret =of_property_read_u32 (dev->of_node,"qcom,apr-domain" , &apr->dest_domain_id); + ret =of_property_read_u32 (dev->of_node,"qcom,domain" , &apr->dest_domain_id); +if (ret)/* try deprecated apr-domain property */ + ret =of_property_read_u32 (dev->of_node,"qcom,apr-domain" , + &apr->dest_domain_id); + apr->type =PR_TYPE_APR ;if (ret) { -dev_err (dev,"APR Domain ID not specified in DT\n" ); +dev_err (dev,"Domain ID not specified in DT\n" );return ret; }
@@ -469,7 +498,7 @@ static int apr_probe(struct rpmsg_device *rpdev)static void apr_remove (struct rpmsg_device *rpdev) { -struct apr *apr =dev_get_drvdata (&rpdev->dev); +struct packet_router *apr =dev_get_drvdata (&rpdev->dev);pdr_handle_release (apr->pdr);device_for_each_child (&rpdev->dev,NULL , apr_remove_device);
@@ -506,20 +535,20 @@ void apr_driver_unregister(struct apr_driver *drv) }EXPORT_SYMBOL_GPL (apr_driver_unregister); -static const struct of_device_id apr_of_match[] = { +static const struct of_device_id pkt_router_of_match[] = { { .compatible ="qcom,apr" }, { .compatible ="qcom,apr-v2" }, {} }; -MODULE_DEVICE_TABLE (of, apr_of_match); +MODULE_DEVICE_TABLE (of, pkt_router_of_match); -static struct rpmsg_driver apr_driver = { +static struct rpmsg_driver packet_router_driver = { .probe = apr_probe, .remove = apr_remove, .callback = apr_callback, .drv = { .name ="qcom,apr" , - .of_match_table = apr_of_match, + .of_match_table = pkt_router_of_match, }, };
@@ -529,7 +558,7 @@ static int __init apr_init(void) ret =bus_register (&aprbus);if (!ret) - ret =register_rpmsg_driver (&apr_driver); + ret =register_rpmsg_driver (&packet_router_driver);else bus_unregister (&aprbus);
@@ -539,7 +568,7 @@ static int __init apr_init(void) static void __exit apr_exit(void) {bus_unregister (&aprbus); -unregister_rpmsg_driver (&apr_driver); +unregister_rpmsg_driver (&packet_router_driver); }subsys_initcall (apr_init);
include/linux/soc/qcom/apr.h +11 -1
@@ -79,6 +79,15 @@ struct apr_resp_pkt {#define APR_SVC_MAJOR_VERSION (v) ((v >> 16) & 0xFF)#define APR_SVC_MINOR_VERSION (v) (v & 0xFF) +struct packet_router ; +struct pkt_router_svc { +struct device *dev; +struct packet_router *pr; +spinlock_t lock; +int id; +void *priv; +}; +struct apr_device {struct device dev;uint16_t svc_id;
@@ -86,11 +95,12 @@ struct apr_device {uint32_t version;char name[APR_NAME_SIZE ];const char *service_path; -spinlock_t lock; +struct pkt_router_svc svc;struct list_head node; };#define to_apr_device (d) container_of(d, struct apr_device, dev) +#define svc_to_apr_device (d) container_of(d, struct apr_device, svc)struct apr_driver {int (*probe)(struct apr_device *sl);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 14/783 soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index
In reply to Greg Kroah-HartmanFrom: Jiasheng Jiang <[email protected]>
[ Upstream commit 6d7860f5750d73da2fa1a1f6c9405058a593fa32 ]
As idr_alloc() and of_property_read_string_index() can return negative numbers, it should be better to check the return value and deal with the exception.
Therefore, it should be better to use goto statement to stop and return error.
--- drivers/soc/qcom/apr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/soc/qcom/apr.c +12 -3
@@ -312,11 +312,19 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->dev.driver =NULL ;spin_lock (&apr->svcs_lock); -idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC ); + ret =idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC );spin_unlock (&apr->svcs_lock); +if (ret <0 ) { +dev_err (dev,"idr_alloc failed: %d\n" , ret); + goto out; + } -of_property_read_string_index (np,"qcom,protection-domain" , -1 , &adev->service_path); + ret =of_property_read_string_index (np,"qcom,protection-domain" , +1 , &adev->service_path); +if (ret <0 ) { +dev_err (dev,"Failed to read second value of qcom,protection-domain\n" ); + goto out; + }dev_info (dev,"Adding APR dev: %s\n" ,dev_name (&adev->dev));
@@ -326,6 +334,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,put_device (&adev->dev); } +out:return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 15/783 arm: dts: spear600: Fix clcd interrupt
In reply to Greg Kroah-HartmanFrom: Kory Maincent <[email protected]>
[ Upstream commit 0336e2ce34e7a89832b6c214f924eb7bc58940be ]
Interrupt 12 of the Interrupt controller belongs to the SMI controller, the right one for the display controller is the interrupt 13.
--- arch/arm/boot/dts/spear600.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/spear600.dtsi +1 -1
@@ -47,7 +47,7 @@ clcd: clcd@fc200000 { compatible = "arm,pl110", "arm,primecell"; reg = <0xfc200000 0x1000>; interrupt-parent = <&vic1>; - interrupts = <12>; + interrupts = <13>; status = "disabled"; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 16/783 soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
In reply to Greg Kroah-HartmanFrom: Minghao Chi <[email protected]>
[ Upstream commit 12eeb74925da70eb39d90abead9de9793be3d4c8 ]
Using pm_runtime_resume_and_get is more appropriate for simplifying code.
Stable-dep-of: e961c0f19450 ("soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe")
--- drivers/soc/ti/knav_qmss_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soc/ti/knav_qmss_queue.c +1 -2
@@ -1782,9 +1782,8 @@ static int knav_queue_probe(struct platform_device *pdev)INIT_LIST_HEAD (&kdev->pdsps);pm_runtime_enable (&pdev->dev); - ret =pm_runtime_get_sync (&pdev->dev); + ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 ) { -pm_runtime_put_noidle (&pdev->dev);dev_err (dev,"Failed to enable QMSS\n" );return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 17/783 soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit e961c0f19450fd4a26bd043dd2979990bf12caf6 ]
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.
--- drivers/soc/ti/knav_qmss_queue.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/ti/knav_qmss_queue.c +1 -0
@@ -1784,6 +1784,7 @@ static int knav_queue_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 ) { +pm_runtime_disable (&pdev->dev);dev_err (dev,"Failed to enable QMSS\n" );return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 18/783 soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 69460e68eb662064ab4188d4e129ff31c1f23ed9 ]
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.
--- drivers/soc/ti/smartreflex.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/ti/smartreflex.c +1 -0
@@ -942,6 +942,7 @@ static int omap_sr_probe(struct platform_device *pdev) err_debugfs:debugfs_remove_recursive (sr_info->dbg_dir); err_list_del: +pm_runtime_disable (&pdev->dev);list_del (&sr_info->node);pm_runtime_put_sync (&pdev->dev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 19/783 perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit facafab7611f7b872c6b9eeaff53461ef11f482e ]
dsu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
--- drivers/perf/arm_dsu_pmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/perf/arm_dsu_pmu.c +5 -1
@@ -866,7 +866,11 @@ static int __init dsu_pmu_init(void)if (ret <0 )return ret; dsu_pmu_cpuhp_state = ret; -return platform_driver_register (&dsu_pmu_driver); + ret =platform_driver_register (&dsu_pmu_driver); +if (ret) +cpuhp_remove_multi_state (dsu_pmu_cpuhp_state); + +return ret; } static void __exit dsu_pmu_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 20/783 perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit 6f2d566b46436a50a80d6445e82879686b89588c ]
arm_smmu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
--- drivers/perf/arm_smmuv3_pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/perf/arm_smmuv3_pmu.c +7 -1
@@ -870,6 +870,8 @@ static struct platform_driver smmu_pmu_driver = {static int __init arm_smmu_pmu_init (void ) { +int ret; + cpuhp_state_num = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "perf/arm/pmcg:online", NULL,
@@ -877,7 +879,11 @@ static int __init arm_smmu_pmu_init(void)if (cpuhp_state_num <0 )return cpuhp_state_num; -return platform_driver_register (&smmu_pmu_driver); + ret =platform_driver_register (&smmu_pmu_driver); +if (ret) +cpuhp_remove_multi_state (cpuhp_state_num); + +return ret; }module_init (arm_smmu_pmu_init);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 21/783 arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node
In reply to Greg Kroah-HartmanFrom: Jayesh Choudhary <[email protected]>
[ Upstream commit b86833ab3653dbb0dc453eec4eef8615e63de4e2 ]
crypto driver itself is not dma-coherent. So drop it.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +0 -1
@@ -127,7 +127,6 @@ crypto: crypto@4e00000 { dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>, <&main_udmap 0x4001>; dma-names = "tx", "rx1", "rx2"; - dma-coherent; rng: rng@4e10000 { compatible = "inside-secure,safexcel-eip76";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 22/783 arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node
In reply to Greg Kroah-HartmanFrom: Jayesh Choudhary <[email protected]>
[ Upstream commit 26c5012403f3f1fd3bf8f7d3389ee539ae5cc162 ]
crypto driver itself is not dma-coherent. So drop it.
--- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +0 -1
@@ -367,7 +367,6 @@ main_crypto: crypto@4e00000 { dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>, <&main_udmap 0x4001>; dma-names = "tx", "rx1", "rx2"; - dma-coherent; rng: rng@4e10000 { compatible = "inside-secure,safexcel-eip76";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 23/783 arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit e4495a0a8b3d84816c9a46edf3ce060bbf267475 ]
Rename the fixed-clock oscillators to remove the unit address.
This solves unit_address_vs_reg warnings.
--- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712e.dtsi +10 -10
@@ -160,70 +160,70 @@ sys_clk: dummyclk { #clock-cells = <0>; }; - clk26m: oscillator@0 { + clk26m: oscillator-26m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <26000000>; clock-output-names = "clk26m"; }; - clk32k: oscillator@1 { + clk32k: oscillator-32k { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "clk32k"; }; - clkfpc: oscillator@2 { + clkfpc: oscillator-50m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <50000000>; clock-output-names = "clkfpc"; }; - clkaud_ext_i_0: oscillator@3 { + clkaud_ext_i_0: oscillator-aud0 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <6500000>; clock-output-names = "clkaud_ext_i_0"; }; - clkaud_ext_i_1: oscillator@4 { + clkaud_ext_i_1: oscillator-aud1 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <196608000>; clock-output-names = "clkaud_ext_i_1"; }; - clkaud_ext_i_2: oscillator@5 { + clkaud_ext_i_2: oscillator-aud2 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <180633600>; clock-output-names = "clkaud_ext_i_2"; }; - clki2si0_mck_i: oscillator@6 { + clki2si0_mck_i: oscillator-i2s0 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si0_mck_i"; }; - clki2si1_mck_i: oscillator@7 { + clki2si1_mck_i: oscillator-i2s1 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si1_mck_i"; }; - clki2si2_mck_i: oscillator@8 { + clki2si2_mck_i: oscillator-i2s2 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si2_mck_i"; }; - clktdmin_mclk_i: oscillator@9 { + clktdmin_mclk_i: oscillator-mclk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 24/783 arm64: dts: mt2712e: Fix unit address for pinctrl node
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 1d4516f53a611b362db7ba7a8889923d469f57e1 ]
The unit address for the pinctrl node is (0x)1000b000 and not (0x)10005000, which is the syscfg_pctl_a address instead.
This fixes the following warning:
arch/arm64/boot/dts/mediatek/mt2712e.dtsi:264.40-267.4: Warning (unique_unit_address): /syscfg_pctl_a@10005000: duplicate unit-address (also used in node /pinctrl@10005000)
--- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt2712e.dtsi +1 -1
@@ -266,7 +266,7 @@ syscfg_pctl_a: syscfg_pctl_a@10005000 { reg = <0 0x10005000 0 0x1000>; }; - pio: pinctrl@10005000 { + pio: pinctrl@1000b000 { compatible = "mediatek,mt2712-pinctrl"; reg = <0 0x1000b000 0 0x1000>; mediatek,pctl-regmap = <&syscfg_pctl_a>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 25/783 arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 377063156893bf6c088309ac799fe5c6dce2822d ]
Update the names to regulator-vproc-buck{0,1} to fix unit_addres_vs_reg warnings for those.
--- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712-evb.dts +2 -2
@@ -26,14 +26,14 @@ chosen { stdout-path = "serial0:921600n8"; }; - cpus_fixed_vproc0: fixedregulator@0 { + cpus_fixed_vproc0: regulator-vproc-buck0 { compatible = "regulator-fixed"; regulator-name = "vproc_buck0"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; }; - cpus_fixed_vproc1: fixedregulator@1 { + cpus_fixed_vproc1: regulator-vproc-buck1 { compatible = "regulator-fixed"; regulator-name = "vproc_buck1"; regulator-min-microvolt = <1000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 26/783 arm64: dts: mt2712-evb: Fix usb vbus regulators unit names
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit ec1ae39a8d25cfb067b5459fac7c5b7b9bce6f6a ]
Update the names to regulator-usb-p{0-3}-vbus to fix unit_address_vs_reg warnings for those.
--- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712-evb.dts +4 -4
@@ -50,7 +50,7 @@ extcon_usb1: extcon_iddig1 { id-gpio = <&pio 14 GPIO_ACTIVE_HIGH>; }; - usb_p0_vbus: regulator@2 { + usb_p0_vbus: regulator-usb-p0-vbus { compatible = "regulator-fixed"; regulator-name = "p0_vbus"; regulator-min-microvolt = <5000000>;
@@ -59,7 +59,7 @@ usb_p0_vbus: regulator@2 { enable-active-high; }; - usb_p1_vbus: regulator@3 { + usb_p1_vbus: regulator-usb-p1-vbus { compatible = "regulator-fixed"; regulator-name = "p1_vbus"; regulator-min-microvolt = <5000000>;
@@ -68,7 +68,7 @@ usb_p1_vbus: regulator@3 { enable-active-high; }; - usb_p2_vbus: regulator@4 { + usb_p2_vbus: regulator-usb-p2-vbus { compatible = "regulator-fixed"; regulator-name = "p2_vbus"; regulator-min-microvolt = <5000000>;
@@ -77,7 +77,7 @@ usb_p2_vbus: regulator@4 { enable-active-high; }; - usb_p3_vbus: regulator@5 { + usb_p3_vbus: regulator-usb-p3-vbus { compatible = "regulator-fixed"; regulator-name = "p3_vbus"; regulator-min-microvolt = <5000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 27/783 arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 509438336ce75c8b4e6ce8e8d507dc77d0783bdd ]
Fix the pinctrl submodes and optee node to remove unneeded unit address, fixing all unit_address_vs_reg warnings.
--- arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi +3 -3
@@ -17,7 +17,7 @@ chosen { }; firmware { - optee: optee@4fd00000 { + optee: optee { compatible = "linaro,optee-tz"; method = "smc"; };
@@ -209,7 +209,7 @@ pins_cmd_dat { }; }; - i2c0_pins_a: i2c0@0 { + i2c0_pins_a: i2c0 { pins1 { pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>, <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
@@ -217,7 +217,7 @@ pins1 { }; }; - i2c2_pins_a: i2c2@0 { + i2c2_pins_a: i2c2 { pins1 { pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>, <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 28/783 arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 5f535cc583759c9c60d4cc9b8d221762e2d75387 ]
Update its unit name to oscillator-26m and remove the unneeded unit address to fix a unit_address_vs_reg warning.
--- arch/arm64/boot/dts/mediatek/mt6797.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt6797.dtsi +1 -1
@@ -95,7 +95,7 @@ cpu9: cpu@201 { }; }; - clk26m: oscillator@0 { + clk26m: oscillator-26m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <26000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 29/783 ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit dcc7d8c72b64a479b8017e4332d99179deb8802d ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/dove.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/dove.dtsi +1 -1
@@ -129,7 +129,7 @@ pcie0: pcie@1 { pcie1: pcie@2 { device_type = "pci"; status = "disabled"; - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; reg = <0x1000 0 0 0 0>; clocks = <&gate_clk 5>; marvell,pcie-port = <1>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 30/783 ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit d9208b0fa2e803d16b28d91bf1d46b7ee9ea13c6 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-370.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-370.dtsi +1 -1
@@ -74,7 +74,7 @@ pcie0: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 31/783 ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit eab276787f456cbea89fabea110fe0728673d308 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 8 ++++---- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/armada-xp-mv78230.dtsi +4 -4
@@ -97,7 +97,7 @@ pcie1: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -115,7 +115,7 @@ pcie2: pcie@2,0 { pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -133,7 +133,7 @@ pcie3: pcie@3,0 { pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -151,7 +151,7 @@ pcie4: pcie@4,0 { pcie5: pcie@5,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; reg = <0x2800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
arch/arm/boot/dts/armada-xp-mv78260.dtsi +8 -8
@@ -112,7 +112,7 @@ pcie1: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -130,7 +130,7 @@ pcie2: pcie@2,0 { pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -148,7 +148,7 @@ pcie3: pcie@3,0 { pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -166,7 +166,7 @@ pcie4: pcie@4,0 { pcie5: pcie@5,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; reg = <0x2800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -184,7 +184,7 @@ pcie5: pcie@5,0 { pcie6: pcie@6,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x84000 0 0x2000>; + assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; reg = <0x3000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -202,7 +202,7 @@ pcie6: pcie@6,0 { pcie7: pcie@7,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x88000 0 0x2000>; + assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; reg = <0x3800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -220,7 +220,7 @@ pcie7: pcie@7,0 { pcie8: pcie@8,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>; + assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; reg = <0x4000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -238,7 +238,7 @@ pcie8: pcie@8,0 { pcie9: pcie@9,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; + assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; reg = <0x4800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 32/783 ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 823956d2436f70ced74c0fe8ab99facd8abfc060 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-375.dtsi +1 -1
@@ -582,7 +582,7 @@ pcie0: pcie@1,0 { pcie1: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 33/783 ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 44f47b7a8fa4678ce4c38ea74837e4996b9df6d6 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-380.dtsi | 4 ++-- arch/arm/boot/dts/armada-385.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-380.dtsi +2 -2
@@ -79,7 +79,7 @@ pcie@1,0 { /* x1 port */ pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -98,7 +98,7 @@ pcie@2,0 { /* x1 port */ pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
arch/arm/boot/dts/armada-385.dtsi +3 -3
@@ -84,7 +84,7 @@ pcie1: pcie@1,0 { /* x1 port */ pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -103,7 +103,7 @@ pcie2: pcie@2,0 { /* x1 port */ pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -125,7 +125,7 @@ pcie3: pcie@3,0 { */ pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 34/783 ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 69236d2391b4d7324b11c3252921571577892e7b ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-39x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-39x.dtsi +3 -3
@@ -453,7 +453,7 @@ pcie@1,0 { /* x1 port */ pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -472,7 +472,7 @@ pcie@2,0 { /* x1 port */ pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -494,7 +494,7 @@ pcie@3,0 { */ pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 35/783 ARM: dts: turris-omnia: Add ethernet aliases
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit f1f3e530c59a7e8c5f06172f4c28b945a6b4bfb8 ]
This allows bootloader to correctly pass MAC addresses used by bootloader to individual interfaces into kernel device tree.
--- arch/arm/boot/dts/armada-385-turris-omnia.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/armada-385-turris-omnia.dts +6 -0
@@ -22,6 +22,12 @@ chosen { stdout-path = &uart0; }; + aliases { + ethernet0 = ð0; + ethernet1 = ð1; + ethernet2 = ð2; + }; + memory { device_type = "memory"; reg = <0x00000000 0x40000000>; /* 1024 MB */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 36/783 ARM: dts: turris-omnia: Add switch port 6 node
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit f87db2005f73876602211af0ee156817019b6bda ]
Switch port 6 is connected to eth0, so add appropriate device tree node for it.
--- arch/arm/boot/dts/armada-385-turris-omnia.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +11 -1
@@ -297,7 +297,17 @@ fixed-link { }; }; - /* port 6 is connected to eth0 */ + ports@6 { + reg = <6>; + label = "cpu"; + ethernet = <ð0>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; }; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 37/783 arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 21aad8ba615e9c39cee6c5d0b76726f63791926c ]
MCP7940MT-I/MNY RTC has connected interrupt line to GPIO2_5.
--- arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +3 -0
@@ -124,9 +124,12 @@ &i2c0 { /delete-property/ mrvl,i2c-fast-mode; status = "okay"; + /* MCP7940MT-I/MNY RTC */ rtc@6f { compatible = "microchip,mcp7940x"; reg = <0x6f>; + interrupt-parent = <&gpiosb>; + interrupts = <5 0>; /* GPIO2_5 */ }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 38/783 pstore/ram: Fix error return code in ramoops_probe()
In reply to Greg Kroah-HartmanFrom: Wang Yufen <[email protected]>
[ Upstream commit e1fce564900f8734edf15b87f028c57e14f6e28d ]
In the if (dev_of_node(dev) && !pdata) path, the "err" may be assigned a value of 0, so the error return code -EINVAL may be incorrectly set to 0. To fix set valid return code before calling to goto.
--- fs/pstore/ram.c | 2 ++ 1 file changed, 2 insertions(+)
fs/pstore/ram.c +2 -0
@@ -730,6 +730,7 @@ static int ramoops_probe(struct platform_device *pdev)/* Make sure we didn't get bogus platform data pointer. */ if (!pdata) {pr_err ("NULL platform data\n" ); + err = -EINVAL ; goto fail_out; }
@@ -737,6 +738,7 @@ static int ramoops_probe(struct platform_device *pdev) !pdata->ftrace_size && !pdata->pmsg_size)) {pr_err ("The memory size and the record/console size must be " "non-zero\n" ); + err = -EINVAL ; goto fail_out; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 39/783 ARM: mmp: fix timer_read delay
In reply to Greg Kroah-HartmanFrom: Doug Brown <[email protected]>
[ Upstream commit e348b4014c31041e13ff370669ba3348c4d385e3 ]
timer_read() was using an empty 100-iteration loop to wait for the TMR_CVWR register to capture the latest timer counter value. The delay wasn't long enough. This resulted in CPU idle time being extremely underreported on PXA168 with CONFIG_NO_HZ_IDLE=y.
Switch to the approach used in the vendor kernel, which implements the capture delay by reading TMR_CVWR a few times instead.
--- arch/arm/mach-mmp/time.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
arch/arm/mach-mmp/time.c +7 -4
@@ -43,18 +43,21 @@static void __iomem *mmp_timer_base =TIMERS_VIRT_BASE ;/* -* FIXME: the timer needs some delay to stablize the counter capture +* Read the timer through the CVWR register. Delay is required after requesting +* a read. The CR register cannot be directly read due to metastability issues +* documented in the PXA168 software manual. */ static inline uint32_t timer_read (void ) { -int delay =100 ; +uint32_t val; +int delay =3 ;__raw_writel (1 , mmp_timer_base +TMR_CVWR (1 ));while (delay--) -cpu_relax (); + val =__raw_readl (mmp_timer_base +TMR_CVWR (1 )); -return __raw_readl (mmp_timer_base +TMR_CVWR (1 )); +return val; } static u64 notrace mmp_read_sched_clock(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 40/783 pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
[ Upstream commit e6b842741b4f39007215fd7e545cb55aa3d358a2 ]
An oops can be induced by running 'cat /proc/kcore > /dev/null' on devices using pstore with the ram backend because kmap_atomic() assumes lowmem pages are accessible with __va().
Unable to handle kernel paging request at virtual address ffffff807ff2b000 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000081d87000 [ffffff807ff2b000] pgd=180000017fe18003, p4d=180000017fe18003, pud=180000017fe18003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: dm_integrity CPU: 7 PID: 21179 Comm: perf Not tainted 5.15.67-10882-ge4eb2eb988cd #1 baa443fb8e8477896a370b31a821eb2009f9bfba Hardware name: Google Lazor (rev3 - 8) (DT) pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __memcpy+0x110/0x260 lr : vread+0x194/0x294 sp : ffffffc013ee39d0 x29: ffffffc013ee39f0 x28: 0000000000001000 x27: ffffff807ff2b000 x26: 0000000000001000 x25: ffffffc0085a2000 x24: ffffff802d4b3000 x23: ffffff80f8a60000 x22: ffffff802d4b3000 x21: ffffffc0085a2000 x20: ffffff8080b7bc68 x19: 0000000000001000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffd3073f2e60 x14: ffffffffad588000 x13: 0000000000000000 x12: 0000000000000001 x11: 00000000000001a2 x10: 00680000fff2bf0b x9 : 03fffffff807ff2b x8 : 0000000000000001 x7 : 0000000000000000 x6 : 0000000000000000 x5 : ffffff802d4b4000 x4 : ffffff807ff2c000 x3 : ffffffc013ee3a78 x2 : 0000000000001000 x1 : ffffff807ff2b000 x0 : ffffff802d4b3000 Call trace: __memcpy+0x110/0x260 read_kcore+0x584/0x778 proc_reg_read+0xb4/0xe4
During early boot, memblock reserves the pages for the ramoops reserved memory node in DT that would otherwise be part of the direct lowmem mapping. Pstore's ram backend reuses those reserved pages to change the memory type (writeback or non-cached) by passing the pages to vmap() (see pfn_to_page() usage in persistent_ram_vmap() for more details) with specific flags. When read_kcore() starts iterating over the vmalloc region, it runs over the virtual address that vmap() returned for ramoops. In aligned_vread() the virtual address is passed to vmalloc_to_page() which returns the page struct for the reserved lowmem area. That lowmem page is passed to kmap_atomic(), which effectively calls page_to_virt() that assumes a lowmem page struct must be directly accessible with __va() and friends. These pages are mapped via vmap() though, and the lowmem mapping was never made, so accessing them via the lowmem virtual address oopses like above.
Let's side-step this problem by passing VM_IOREMAP to vmap(). This will tell vread() to not include the ramoops region in the kcore. Instead the area will look like a bunch of zeros. The alternative is to teach kmap() about vmalloc areas that intersect with lowmem. Presumably such a change isn't a one-liner, and there isn't much interest in inspecting the ramoops region in kcore files anyway, so the most expedient route is taken for now.
--- fs/pstore/ram_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/pstore/ram_core.c +5 -1
@@ -425,7 +425,11 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size,phys_addr_t addr = page_start + i *PAGE_SIZE ; pages[i] =pfn_to_page (addr >>PAGE_SHIFT ); } - vaddr =vmap (pages, page_count,VM_MAP , prot); +/* +* VM_IOREMAP used here to bypass this region during vread() +* and kmap_atomic() (i.e. kcore) to avoid __va() failures. +*/ + vaddr =vmap (pages, page_count,VM_MAP |VM_IOREMAP , prot);kfree (pages);/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 41/783 tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit 2b7d07f7acaac2c7750e420dcf4414588ede6d03 ]
The ftpm_mod_init() returns the driver_register() directly without checking its return value, if driver_register() failed, the ftpm_tee_plat_driver is not unregistered.
Fix by unregister ftpm_tee_plat_driver when driver_register() failed.
--- drivers/char/tpm/tpm_ftpm_tee.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +7 -1
@@ -397,7 +397,13 @@ static int __init ftpm_mod_init(void)if (rc)return rc; -return driver_register (&ftpm_tee_driver.driver); + rc =driver_register (&ftpm_tee_driver.driver); +if (rc) { +platform_driver_unregister (&ftpm_tee_plat_driver); +return rc; + } + +return 0 ; } static void __exit ftpm_mod_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 42/783 tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
In reply to Greg Kroah-HartmanFrom: Michael Kelley <[email protected]>
[ Upstream commit f5264068071964b56dc02c9dab3d11574aaca6ff ]
The error message in __crb_relinquish_locality() mentions requestAccess instead of Relinquish. Fix it.
--- drivers/char/tpm/tpm_crb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_crb.c +1 -1
@@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev,iowrite32 (CRB_LOC_CTRL_RELINQUISH , &priv->regs_h->loc_ctrl);if (!crb_wait_for_reg_32 (&priv->regs_h->loc_state, mask, value,TPM2_TIMEOUT_C )) { -dev_warn (dev,"TPM_LOC_STATE_x.requestAccess timed out\n" ); +dev_warn (dev,"TPM_LOC_STATE_x.Relinquish timed out\n" );return -ETIME ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 43/783 sched/fair: Cleanup task_util and capacity type
In reply to Greg Kroah-HartmanFrom: Vincent Donnefort <[email protected]>
[ Upstream commit ef8df9798d469b7c45c66664550e93469749f1e8 ]
task_util and capacity are comparable unsigned long values. There is no need for an intermidiate implicit signed cast.
Stable-dep-of: 48d5e9daa8b7 ("sched/uclamp: Fix relationship between uclamp and migration margin")
--- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/sched/fair.c +3 -2
@@ -4074,7 +4074,8 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,trace_sched_util_est_se_tp (&p->se); } -static inline int task_fits_capacity (struct task_struct *p,long capacity) +static inline int task_fits_capacity (struct task_struct *p, +unsigned long capacity) {return fits_capacity (uclamp_task_util (p), capacity); }
@@ -6247,7 +6248,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)return best_cpu; } -static inline bool asym_fits_capacity (int task_util,int cpu) +static inline bool asym_fits_capacity (unsigned long task_util,int cpu) {if (static_branch_unlikely (&sched_asym_cpucapacity))return fits_capacity (task_util,capacity_of (cpu));
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 44/783 sched/uclamp: Fix relationship between uclamp and migration margin
In reply to Greg Kroah-HartmanFrom: Qais Yousef <[email protected]>
[ Upstream commit 48d5e9daa8b767e75ed9421665b037a49ce4bc04 ]
fits_capacity() verifies that a util is within 20% margin of the capacity of a CPU, which is an attempt to speed up upmigration.
But when uclamp is used, this 20% margin is problematic because for example if a task is boosted to 1024, then it will not fit on any CPU according to fits_capacity() logic.
Or if a task is boosted to capacity_orig_of(medium_cpu). The task will end up on big instead on the desired medium CPU.
Similar corner cases exist for uclamp and usage of capacity_of(). Slightest irq pressure on biggest CPU for example will make a 1024 boosted task look like it can't fit.
What we really want is for uclamp comparisons to ignore the migration margin and capacity pressure, yet retain them for when checking the _actual_ util signal.
For example, task p:
p->util_avg = 300 p->uclamp[UCLAMP_MIN] = 1024
Will fit a big CPU. But
p->util_avg = 900 p->uclamp[UCLAMP_MIN] = 1024
will not, this should trigger overutilized state because the big CPU is now *actually* being saturated.
Similar reasoning applies to capping tasks with UCLAMP_MAX. For example:
p->util_avg = 1024 p->uclamp[UCLAMP_MAX] = capacity_orig_of(medium_cpu)
Should fit the task on medium cpus without triggering overutilized state.
Inlined comments expand more on desired behavior in more scenarios.
Introduce new util_fits_cpu() function which encapsulates the new logic. The new function is not used anywhere yet, but will be used to update various users of fits_capacity() in later patches.
--- kernel/sched/fair.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
kernel/sched/fair.c +123 -0
@@ -4074,6 +4074,129 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,trace_sched_util_est_se_tp (&p->se); } +static inline int util_fits_cpu (unsigned long util, +unsigned long uclamp_min, +unsigned long uclamp_max, +int cpu) +{ +unsigned long capacity_orig, capacity_orig_thermal; +unsigned long capacity =capacity_of (cpu); +bool fits, uclamp_max_fits; + +/* +* Check if the real util fits without any uclamp boost/cap applied. +*/ + fits =fits_capacity (util, capacity); + +if (!uclamp_is_used ()) +return fits; + +/* +* We must use capacity_orig_of() for comparing against uclamp_min and +* uclamp_max. We only care about capacity pressure (by using +* capacity_of()) for comparing against the real util. +* +* If a task is boosted to 1024 for example, we don't want a tiny +* pressure to skew the check whether it fits a CPU or not. +* +* Similarly if a task is capped to capacity_orig_of(little_cpu), it +* should fit a little cpu even if there's some pressure. +* +* Only exception is for thermal pressure since it has a direct impact +* on available OPP of the system. +* +* We honour it for uclamp_min only as a drop in performance level +* could result in not getting the requested minimum performance level. +* +* For uclamp_max, we can tolerate a drop in performance level as the +* goal is to cap the task. So it's okay if it's getting less. +* +* In case of capacity inversion, which is not handled yet, we should +* honour the inverted capacity for both uclamp_min and uclamp_max all +* the time. +*/ + capacity_orig =capacity_orig_of (cpu); + capacity_orig_thermal = capacity_orig -arch_scale_thermal_pressure (cpu); + +/* +* We want to force a task to fit a cpu as implied by uclamp_max. +* But we do have some corner cases to cater for.. +* +* +* C=z +* | ___ +* | C=y | | +* |_ _ _ _ _ _ _ _ _ ___ _ _ _ | _ | _ _ _ _ _ uclamp_max +* | C=x | | | | +* | ___ | | | | +* | | | | | | | (util somewhere in this region) +* | | | | | | | +* | | | | | | | +* +---------------------------------------- +* cpu0 cpu1 cpu2 +* +* In the above example if a task is capped to a specific performance +* point, y, then when: +* +* * util = 80% of x then it does not fit on cpu0 and should migrate +* to cpu1 +* * util = 80% of y then it is forced to fit on cpu1 to honour +* uclamp_max request. +* +* which is what we're enforcing here. A task always fits if +* uclamp_max <= capacity_orig. But when uclamp_max > capacity_orig, +* the normal upmigration rules should withhold still. +* +* Only exception is when we are on max capacity, then we need to be +* careful not to block overutilized state. This is so because: +* +* 1. There's no concept of capping at max_capacity! We can't go +* beyond this performance level anyway. +* 2. The system is being saturated when we're operating near +* max capacity, it doesn't make sense to block overutilized. +*/ + uclamp_max_fits = (capacity_orig ==SCHED_CAPACITY_SCALE ) && (uclamp_max ==SCHED_CAPACITY_SCALE ); + uclamp_max_fits = !uclamp_max_fits && (uclamp_max <= capacity_orig); + fits = fits || uclamp_max_fits; + +/* +* +* C=z +* | ___ (region a, capped, util >= uclamp_max) +* | C=y | | +* |_ _ _ _ _ _ _ _ _ ___ _ _ _ | _ | _ _ _ _ _ uclamp_max +* | C=x | | | | +* | ___ | | | | (region b, uclamp_min <= util <= uclamp_max) +* |_ _ _|_ _|_ _ _ _| _ | _ _ _| _ | _ _ _ _ _ uclamp_min +* | | | | | | | +* | | | | | | | (region c, boosted, util < uclamp_min) +* +---------------------------------------- +* cpu0 cpu1 cpu2 +* +* a) If util > uclamp_max, then we're capped, we don't care about +* actual fitness value here. We only care if uclamp_max fits +* capacity without taking margin/pressure into account. +* See comment above. +* +* b) If uclamp_min <= util <= uclamp_max, then the normal +* fits_capacity() rules apply. Except we need to ensure that we +* enforce we remain within uclamp_max, see comment above. +* +* c) If util < uclamp_min, then we are boosted. Same as (b) but we +* need to take into account the boosted value fits the CPU without +* taking margin/pressure into account. +* +* Cases (a) and (b) are handled in the 'fits' variable already. We +* just need to consider an extra check for case (c) after ensuring we +* handle the case uclamp_min > uclamp_max. +*/ + uclamp_min =min (uclamp_min, uclamp_max); +if (util < uclamp_min && capacity_orig !=SCHED_CAPACITY_SCALE ) + fits = fits && (uclamp_min <= capacity_orig_thermal); + +return fits; +} +static inline int task_fits_capacity (struct task_struct *p,unsigned long capacity) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 45/783 cpuidle: dt: Return the correct numbers of parsed idle states
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit ee3c2c8ad6ba6785f14a60e4081d7c82e88162a2 ]
While we correctly skips to initialize an idle state from a disabled idle state node in DT, the returned value from dt_init_idle_driver() don't get adjusted accordingly. Instead the number of found idle state nodes are returned, while the callers are expecting the number of successfully initialized idle states from DT.
This leads to cpuidle drivers unnecessarily continues to initialize their idle state specific data. Moreover, in the case when all idle states have been disabled in DT, we would end up registering a cpuidle driver, rather than relying on the default arch specific idle call.
--- drivers/cpuidle/dt_idle_states.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/dt_idle_states.c +1 -1
@@ -223,6 +223,6 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,* also be 0 on platforms with missing DT idle states or legacy DT * configuration predating the DT idle states bindings. */ -return i; +return state_idx - start_idx; }EXPORT_SYMBOL_GPL (dt_init_idle_driver);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 46/783 alpha: fix syscall entry in !AUDUT_SYSCALL case
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
[ Upstream commit f7b2431a6d22f7a91c567708e071dfcd6d66db14 ]
We only want to take the slow path if SYSCALL_TRACE or SYSCALL_AUDIT is set; on !AUDIT_SYSCALL configs the current tree hits it whenever _any_ thread flag (including NEED_RESCHED, NOTIFY_SIGNAL, etc.) happens to be set.
--- arch/alpha/kernel/entry.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/alpha/kernel/entry.S +3 -1
@@ -469,8 +469,10 @@ entSys: #ifdef CONFIG_AUDITSYSCALL lda $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT and $3, $6, $3 -#endif bne $3, strace +#else + blbs $3, strace /* check for SYSCALL_TRACE in disguise */ +#endif beq $4, 1f ldq $27, 0($5) 1: jsr $26, ($27), sys_ni_syscall
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 47/783 PM: hibernate: Fix mistake in kerneldoc comment
In reply to Greg Kroah-HartmanFrom: xiongxin <[email protected]>
[ Upstream commit 6e5d7300cbe7c3541bc31f16db3e9266e6027b4b ]
The actual maximum image size formula in hibernate_preallocate_memory() is as follows:
max_size = (count - (size + PAGES_FOR_IO)) / 2
- 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE);
but the one in the kerneldoc comment of the function is different and incorrect.
--- kernel/power/snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/power/snapshot.c +2 -2
@@ -1677,8 +1677,8 @@ static unsigned long minimum_image_size(unsigned long saveable)* /sys/power/reserved_size, respectively). To make this happen, we compute the * total number of available page frames and allocate at least * -* ([page frames total] + PAGES_FOR_IO + [metadata pages]) / 2 -* + 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE) +* ([page frames total] - PAGES_FOR_IO - [metadata pages]) / 2 +* - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE) * * of them, which corresponds to the maximum size of a hibernation image. *
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 48/783 fs: dont audit the capability check in simple_xattr_list()
In reply to Greg Kroah-HartmanFrom: Ondrej Mosnacek <[email protected]>
[ Upstream commit e7eda157c4071cd1e69f4b1687b0fbe1ae5e6f46 ]
The check being unconditional may lead to unwanted denials reported by LSMs when a process has the capability granted by DAC, but denied by an LSM. In the case of SELinux such denials are a problem, since they can't be effectively filtered out via the policy and when not silenced, they produce noise that may hide a true problem or an attack.
Checking for the capability only if any trusted xattr is actually present wouldn't really address the issue, since calling listxattr(2) on such node on its own doesn't indicate an explicit attempt to see the trusted xattrs. Additionally, it could potentially leak the presence of trusted xattrs to an unprivileged user if they can check for the denials (e.g. through dmesg).
Therefore, it's best (and simplest) to keep the check unconditional and instead use ns_capable_noaudit() that will silence any associated LSM denials.
--- fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xattr.c +1 -1
@@ -1049,7 +1049,7 @@ static int xattr_list_one(char **buffer, ssize_t *remaining_size,ssize_t simple_xattr_list (struct inode *inode,struct simple_xattrs *xattrs,char *buffer,size_t size) { -bool trusted =capable (CAP_SYS_ADMIN ); +bool trusted =ns_capable_noaudit (&init_user_ns,CAP_SYS_ADMIN );struct simple_xattr *xattr;ssize_t remaining_size = size;int err =0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 49/783 cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut()
In reply to Greg Kroah-HartmanFrom: Chen Hui <[email protected]>
[ Upstream commit 9901c21bcaf2f01fe5078f750d624f4ddfa8f81b ]
If "cpu_dev" fails to get opp table in qcom_cpufreq_hw_read_lut(), the program will return, resulting in "table" resource is not released.
--- drivers/cpufreq/qcom-cpufreq-hw.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/qcom-cpufreq-hw.c +1 -0
@@ -158,6 +158,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, } }else if (ret != -ENODEV ) {dev_err (cpu_dev,"Invalid opp table in device tree\n" ); +kfree (table);return ret; }else { policy->fast_switch_possible = true;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 50/783 selftests/ftrace: event_triggers: wait longer for test_event_enable
In reply to Greg Kroah-HartmanFrom: Yipeng Zou <[email protected]>
[ Upstream commit a1d6cd88c8973cfb08ee85722488b1d6d5d16327 ]
In some platform, the schedule event may came slowly, delay 100ms can't cover it.
I was notice that on my board which running in low cpu_freq,and this selftests allways gose fail.
So maybe we can check more times here to wait longer.
--- .../ftrace/test.d/ftrace/func_event_triggers.tc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc +11 -4
@@ -38,11 +38,18 @@ cnt_trace() { test_event_enabled() { val=$1 + check_times=10 # wait for 10 * SLEEP_TIME at most - e=`cat $EVENT_ENABLE` - if [ "$e" != $val ]; then - fail "Expected $val but found $e" - fi + while [ $check_times -ne 0 ]; do + e=`cat $EVENT_ENABLE` + if [ "$e" == $val ]; then + return 0 + fi + sleep $SLEEP_TIME + check_times=$((check_times - 1)) + done + + fail "Expected $val but found $e" } run_enable_disable() {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 51/783 perf: Fix possible memleak in pmu_dev_alloc()
In reply to Greg Kroah-HartmanFrom: Chen Zhongjin <[email protected]>
[ Upstream commit e8d7a90c08ce963c592fb49845f2ccc606a2ac21 ]
In pmu_dev_alloc(), when dev_set_name() failed, it will goto free_dev and call put_device(pmu->dev) to release it.
However pmu->dev->release is assigned after this, which makes warning and memleak.
Call dev_set_name() after pmu->dev->release = pmu_dev_release to fix it.
Device '(null)' does not have a release() function...
WARNING: CPU: 2 PID: 441 at drivers/base/core.c:2332 device_release+0x1b9/0x240
...
Call Trace:
<TASK>
kobject_put+0x17f/0x460
put_device+0x20/0x30
pmu_dev_alloc+0x152/0x400
perf_pmu_register+0x96b/0xee0
...
kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
unreferenced object 0xffff888014759000 (size 2048):
comm "modprobe", pid 441, jiffies 4294931444 (age 38.332s)
backtrace:
[<0000000005aed3b4>] kmalloc_trace+0x27/0x110
[<000000006b38f9b8>] pmu_dev_alloc+0x50/0x400
[<00000000735f17be>] perf_pmu_register+0x96b/0xee0
[<00000000e38477f1>] 0xffffffffc0ad8603
[<000000004e162216>] do_one_initcall+0xd0/0x4e0
...--- kernel/events/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/events/core.c +5 -3
@@ -10810,13 +10810,15 @@ static int pmu_dev_alloc(struct pmu *pmu) pmu->dev->groups = pmu->attr_groups;device_initialize (pmu->dev); - ret =dev_set_name (pmu->dev,"%s" , pmu->name); -if (ret) - goto free_dev;dev_set_drvdata (pmu->dev, pmu); pmu->dev->bus = &pmu_bus; pmu->dev->release = pmu_dev_release; + + ret =dev_set_name (pmu->dev,"%s" , pmu->name); +if (ret) + goto free_dev; + ret =device_add (pmu->dev);if (ret) goto free_dev;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 52/783 lib/debugobjects: fix stat count and optimize debug_objects_mem_init
In reply to Greg Kroah-HartmanFrom: wuchi <[email protected]>
[ Upstream commit eabb7f1ace53e127309407b2b5e74e8199e85270 ]
1. Var debug_objects_allocated tracks valid kmem_cache_alloc calls, so track it in debug_objects_replace_static_objects. Do similar things in object_cpu_offline.
2. In debug_objects_mem_init, there is no need to call function cpuhp_setup_state_nocalls when debug_objects_enabled = 0 (out of memory).
--- lib/debugobjects.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
lib/debugobjects.c +10 -0
@@ -440,6 +440,7 @@ static int object_cpu_offline(unsigned int cpu)struct debug_percpu_free *percpu_pool;struct hlist_node *tmp;struct debug_obj *obj; +unsigned long flags;/* Remote access is safe as the CPU is dead already */ percpu_pool =per_cpu_ptr (&percpu_obj_pool, cpu);
@@ -447,6 +448,12 @@ static int object_cpu_offline(unsigned int cpu)hlist_del (&obj->node);kmem_cache_free (obj_cache, obj); } + +raw_spin_lock_irqsave (&pool_lock, flags); + obj_pool_used -= percpu_pool->obj_free; + debug_objects_freed += percpu_pool->obj_free; +raw_spin_unlock_irqrestore (&pool_lock, flags); + percpu_pool->obj_free =0 ;return 0 ;
@@ -1316,6 +1323,8 @@ static int __init debug_objects_replace_static_objects(void)hlist_add_head (&obj->node, &objects); } + debug_objects_allocated += i; +/* * debug_objects_mem_init() is now called early that only one CPU is up * and interrupts have been disabled, so it is safe to replace the
@@ -1384,6 +1393,7 @@ void __init debug_objects_mem_init(void) debug_objects_enabled =0 ;kmem_cache_destroy (obj_cache);pr_warn ("out of memory.\n" ); +return ; }else debug_objects_selftest ();
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 53/783 platform/x86: huawei-wmi: fix return value calculation
In reply to Greg Kroah-HartmanFrom: Barnabás Pőcze <[email protected]>
[ Upstream commit 0b9a1dcdb6a2c841899389bf2dd7a3e0e2aa0e99 ]
Previously, huawei_wmi_input_setup() returned the result of logical or-ing the return values of two functions that return negative errno-style error codes and one that returns acpi_status. If this returned value was non-zero, then it was propagated from the platform driver's probe function. That function should return a negative errno-style error code, so the result of the logical or that huawei_wmi_input_setup() returned was not appropriate.
Fix that by checking each function separately and returning the error code unmodified.
--- drivers/platform/x86/huawei-wmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/platform/x86/huawei-wmi.c +16 -4
@@ -760,6 +760,9 @@ static int huawei_wmi_input_setup(struct device *dev,const char *guid, struct input_dev **idev) { + acpi_status status; +int err; + *idev =devm_input_allocate_device (dev);if (!*idev)return -ENOMEM ;
@@ -769,10 +772,19 @@ static int huawei_wmi_input_setup(struct device *dev, (*idev)->id.bustype =BUS_HOST ; (*idev)->dev.parent = dev; -return sparse_keymap_setup (*idev, huawei_wmi_keymap,NULL ) || -input_register_device (*idev) || -wmi_install_notify_handler (guid, huawei_wmi_input_notify, - *idev); + err =sparse_keymap_setup (*idev, huawei_wmi_keymap,NULL ); +if (err) +return err; + + err =input_register_device (*idev); +if (err) +return err; + + status =wmi_install_notify_handler (guid, huawei_wmi_input_notify, *idev); +if (ACPI_FAILURE (status)) +return -EIO ; + +return 0 ; }static void huawei_wmi_input_exit (struct device *dev,const char *guid)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 54/783 timerqueue: Use rb_entry_safe() in timerqueue_getnext()
In reply to Greg Kroah-HartmanFrom: Barnabás Pőcze <[email protected]>
[ Upstream commit 2f117484329b233455ee278f2d9b0a4356835060 ]
When timerqueue_getnext() is called on an empty timer queue, it will use rb_entry() on a NULL pointer, which is invalid. Fix that by using rb_entry_safe() which handles NULL pointers.
This has not caused any issues so far because the offset of the rb_node member in timerqueue_node is 0, so rb_entry() is essentially a no-op.
--- include/linux/timerqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/timerqueue.h +1 -1
@@ -35,7 +35,7 @@ struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) {struct rb_node *leftmost =rb_first_cached (&head->rb_root); - return rb_entry(leftmost, struct timerqueue_node, node); + return rb_entry_safe(leftmost, struct timerqueue_node, node); }static inline void timerqueue_init (struct timerqueue_node *node)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 55/783 proc: fixup uptime selftest
In reply to Greg Kroah-HartmanFrom: Alexey Dobriyan <[email protected]>
[ Upstream commit 5cc81d5c81af0dee54da9a67a3ebe4be076a13db ]
syscall(3) returns -1 and sets errno on error, unlike "syscall" instruction.
Systems which have <= 32/64 CPUs are unaffected. Test won't bounce to all CPUs before completing if there are more of them.
--- tools/testing/selftests/proc/proc-uptime-002.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/proc/proc-uptime-002.c +2 -1
@@ -17,6 +17,7 @@// while shifting across CPUs. #undef NDEBUG#include <assert.h> +#include <errno.h> #include <unistd.h> #include <sys/syscall.h> #include <stdlib.h>
@@ -54,7 +55,7 @@ int main(void) len +=sizeof (unsigned long );free (m); m =malloc (len); - }while (sys_sched_getaffinity (0 , len, m) == -EINVAL ); + }while (sys_sched_getaffinity (0 , len, m) ==-1 && errno ==EINVAL ); fd =open ("/proc/uptime" ,O_RDONLY );assert (fd >=0 );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 56/783 lib/fonts: fix undefined behavior in bit shift for get_default_font
In reply to Greg Kroah-HartmanFrom: Gaosheng Cui <[email protected]>
[ Upstream commit 6fe888c4d2fb174408e4540bb2d5602b9f507f90 ]
Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in lib/fonts/fonts.c:139:20 left shift of 1 by 31 places cannot be represented in type 'int' <TASK> dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c get_default_font+0x1c7/0x1f0 fbcon_startup+0x347/0x3a0 do_take_over_console+0xce/0x270 do_fbcon_takeover+0xa1/0x170 do_fb_registered+0x2a8/0x340 fbcon_fb_registered+0x47/0xe0 register_framebuffer+0x294/0x4a0 __drm_fb_helper_initial_config_and_unlock+0x43c/0x880 [drm_kms_helper] drm_fb_helper_initial_config+0x52/0x80 [drm_kms_helper] drm_fbdev_client_hotplug+0x156/0x1b0 [drm_kms_helper] drm_fbdev_generic_setup+0xfc/0x290 [drm_kms_helper] bochs_pci_probe+0x6ca/0x772 [bochs] local_pci_probe+0x4d/0xb0 pci_device_probe+0x119/0x320 really_probe+0x181/0x550 __driver_probe_device+0xc6/0x220 driver_probe_device+0x32/0x100 __driver_attach+0x195/0x200 bus_for_each_dev+0xbb/0x120 driver_attach+0x27/0x30 bus_add_driver+0x22e/0x2f0 driver_register+0xa9/0x190 __pci_register_driver+0x90/0xa0 bochs_pci_driver_init+0x52/0x1000 [bochs] do_one_initcall+0x76/0x430 do_init_module+0x61/0x28a load_module+0x1f82/0x2e50 __do_sys_finit_module+0xf8/0x190 __x64_sys_finit_module+0x23/0x30 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK>
--- lib/fonts/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/fonts/fonts.c +2 -2
@@ -135,8 +135,8 @@ const struct font_desc *get_default_font(int xres, int yres, u32 font_w,if (res >20 ) c +=20 - res; -if ((font_w & (1 << (f->width -1 ))) && - (font_h & (1 << (f->height -1 )))) +if ((font_w & (1U << (f->width -1 ))) && + (font_h & (1U << (f->height -1 )))) c +=1000 ;if (c > cc) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 57/783 ocfs2: fix memory leak in ocfs2_stack_glue_init()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit 13b6269dd022aaa69ca8d1df374ab327504121cf ]
ocfs2_table_header should be free in ocfs2_stack_glue_init() if ocfs2_sysfs_init() failed, otherwise kmemleak will report memleak.
BUG: memory leak
unreferenced object 0xffff88810eeb5800 (size 128):
comm "modprobe", pid 4507, jiffies 4296182506 (age 55.888s)
hex dump (first 32 bytes):
c0 40 14 a0 ff ff ff ff 00 00 00 00 01 00 00 00 .@..............
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000001e59e1cd>] __register_sysctl_table+0xca/0xef0
[<00000000c04f70f7>] 0xffffffffa0050037
[<000000001bd12912>] do_one_initcall+0xdb/0x480
[<0000000064f766c9>] do_init_module+0x1cf/0x680
[<000000002ba52db0>] load_module+0x6441/0x6f20
[<000000009772580d>] __do_sys_finit_module+0x12f/0x1c0
[<00000000380c1f22>] do_syscall_64+0x3f/0x90
[<000000004cf473bc>] entry_SYSCALL_64_after_hwframe+0x63/0xcd--- fs/ocfs2/stackglue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/ocfs2/stackglue.c +7 -1
@@ -705,6 +705,8 @@ static struct ctl_table_header *ocfs2_table_header;static int __init ocfs2_stack_glue_init (void ) { +int ret; +strcpy (cluster_stack_name,OCFS2_STACK_PLUGIN_O2CB ); ocfs2_table_header =register_sysctl_table (ocfs2_root_table);
@@ -714,7 +716,11 @@ static int __init ocfs2_stack_glue_init(void)return -ENOMEM ;/* or something. */ } -return ocfs2_sysfs_init (); + ret =ocfs2_sysfs_init (); +if (ret) +unregister_sysctl_table (ocfs2_table_header); + +return ret; } static void __exit ocfs2_stack_glue_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 58/783 MIPS: vpe-mt: fix possible memory leak while module exiting
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 5822e8cc84ee37338ab0bdc3124f6eec04dc232d ]
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release().
--- arch/mips/kernel/vpe-mt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/vpe-mt.c +2 -2
@@ -313,7 +313,6 @@ ATTRIBUTE_GROUPS(vpe);static void vpe_device_release (struct device *cd) { -kfree (cd); }static struct class vpe_class = {
@@ -497,6 +496,7 @@ int __init vpe_module_init(void)device_del (&vpe_device); out_class: +put_device (&vpe_device);class_unregister (&vpe_class); out_chrdev:
@@ -509,7 +509,7 @@ void __exit vpe_module_exit(void) {struct vpe *v, *n; -device_del (&vpe_device); +device_unregister (&vpe_device);class_unregister (&vpe_class);unregister_chrdev (major,VPE_MODULE_NAME );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 59/783 MIPS: vpe-cmp: fix possible memory leak while module exiting
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit c5ed1fe0801f0c66b0fbce2785239a5664629057 ]
dev_set_name() allocates memory for name, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release().
--- arch/mips/kernel/vpe-cmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/vpe-cmp.c +2 -2
@@ -75,7 +75,6 @@ ATTRIBUTE_GROUPS(vpe);static void vpe_device_release (struct device *cd) { -kfree (cd); }static struct class vpe_class = {
@@ -157,6 +156,7 @@ int __init vpe_module_init(void)device_del (&vpe_device); out_class: +put_device (&vpe_device);class_unregister (&vpe_class); out_chrdev:
@@ -169,7 +169,7 @@ void __exit vpe_module_exit(void) {struct vpe *v, *n; -device_del (&vpe_device); +device_unregister (&vpe_device);class_unregister (&vpe_class);unregister_chrdev (major,VPE_MODULE_NAME );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 60/783 selftests/efivarfs: Add checking of the test return value
In reply to Greg Kroah-HartmanFrom: Zhao Gongyi <[email protected]>
[ Upstream commit c93924267fe6f2b44af1849f714ae9cd8117a9cd ]
Add checking of the test return value, otherwise it will report success forever for test_create_read().
--- tools/testing/selftests/efivarfs/efivarfs.sh | 5 +++++ 1 file changed, 5 insertions(+)
tools/testing/selftests/efivarfs/efivarfs.sh +5 -0
@@ -87,6 +87,11 @@ test_create_read() { local file=$efivarfs_mount/$FUNCNAME-$test_guid ./create-read $file + if [ $? -ne 0 ]; then + echo "create and read $file failed" + file_cleanup $file + exit 1 + fi file_cleanup $file }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 61/783 PNP: fix name memory leak in pnp_alloc_dev()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 110d7b0325c55ff3620073ba4201845f59e22ebf ]
After commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, move dev_set_name() after pnp_add_id() to avoid memory leak.
--- drivers/pnp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pnp/core.c +2 -2
@@ -160,14 +160,14 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, dev->dev.coherent_dma_mask = dev->dma_mask; dev->dev.release = &pnp_release_device; -dev_set_name (&dev->dev,"%02x:%02x" , dev->protocol->number, dev->number); - dev_id =pnp_add_id (dev, pnpid);if (!dev_id) {kfree (dev);return NULL ; } +dev_set_name (&dev->dev,"%02x:%02x" , dev->protocol->number, dev->number); +return dev; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 62/783 perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 1ff9dd6e7071a561f803135c1d684b13c7a7d01d ]
pci_get_device() will increase the reference count for the returned 'dev'. We need to call pci_dev_put() to decrease the reference count. Since 'dev' is only used in pci_read_config_dword(), let's add pci_dev_put() right after it.
--- arch/x86/events/intel/uncore_snbep.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/events/intel/uncore_snbep.c +1 -0
@@ -2828,6 +2828,7 @@ static bool hswep_has_limit_sbox(unsigned int device)return false;pci_read_config_dword (dev,HSWEP_PCU_CAPID4_OFFET , &capid4); +pci_dev_put (dev);if (!hswep_get_chop (capid4))return true;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 63/783 perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 8ebd16c11c346751b3944d708e6c181ed4746c39 ]
pci_get_device() will increase the reference count for the returned pci_dev, so snr_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count. Let's add the missing pci_dev_put().
--- arch/x86/events/intel/uncore_snbep.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/events/intel/uncore_snbep.c +2 -0
@@ -4681,6 +4681,8 @@ static void __snr_uncore_mmio_init_box(struct intel_uncore_box *box, addr += box_ctl; +pci_dev_put (pdev); + box->io_addr =ioremap (addr, type->mmio_map_size);if (!box->io_addr) {pr_warn ("perf uncore: Failed to ioremap for %s.\n" , type->name);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 64/783 perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 17b8d847b92d815d1638f0de154654081d66b281 ]
pci_get_device() will increase the reference count for the returned pci_dev, so tgl_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count before exiting from __uncore_imc_init_box(). Add pci_dev_put() for both normal and error path.
--- arch/x86/events/intel/uncore_snb.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/events/intel/uncore_snb.c +3 -0
@@ -1274,6 +1274,7 @@ static void tgl_uncore_imc_freerunning_init_box(struct intel_uncore_box *box)/* MCHBAR is disabled */ if (!(mch_bar &BIT (0 ))) {pr_warn ("perf uncore: MCHBAR is disabled. Failed to map IMC free-running counters.\n" ); +pci_dev_put (pdev);return ; } mch_bar &= ~BIT (0 );
@@ -1287,6 +1288,8 @@ static void tgl_uncore_imc_freerunning_init_box(struct intel_uncore_box *box) box->io_addr =ioremap (addr, type->mmio_map_size);if (!box->io_addr)pr_warn ("perf uncore: Failed to ioremap for %s.\n" , type->name); + +pci_dev_put (pdev); }static struct intel_uncore_ops tgl_uncore_imc_freerunning_ops = {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 65/783 platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit 5a2d96623670155d94aca72c320c0ac27bdc6bd2 ]
The following WARNING message was given when rmmod cros_usbpd_notify:
Unexpected driver unregister!
WARNING: CPU: 0 PID: 253 at drivers/base/driver.c:270 driver_unregister+0x8a/0xb0 Modules linked in: cros_usbpd_notify(-) CPU: 0 PID: 253 Comm: rmmod Not tainted 6.1.0-rc3 #24 ... Call Trace: <TASK> cros_usbpd_notify_exit+0x11/0x1e [cros_usbpd_notify] __x64_sys_delete_module+0x3c7/0x570 ? __ia32_sys_delete_module+0x570/0x570 ? lock_is_held_type+0xe3/0x140 ? syscall_enter_from_user_mode+0x17/0x50 ? rcu_read_lock_sched_held+0xa0/0xd0 ? syscall_enter_from_user_mode+0x1c/0x50 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f333fe9b1b7
The reason is that the cros_usbpd_notify_init() does not check the return value of platform_driver_register(), and the cros_usbpd_notify can install successfully even if platform_driver_register() failed.
Fix by checking the return value of platform_driver_register() and unregister cros_usbpd_notify_plat_driver when it failed.
--- drivers/platform/chrome/cros_usbpd_notify.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_usbpd_notify.c +5 -1
@@ -284,7 +284,11 @@ static int __init cros_usbpd_notify_init(void)return ret;#ifdef CONFIG_ACPI -platform_driver_register (&cros_usbpd_notify_acpi_driver); + ret =platform_driver_register (&cros_usbpd_notify_acpi_driver); +if (ret) { +platform_driver_unregister (&cros_usbpd_notify_plat_driver); +return ret; + }#endif return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 66/783 irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit f9ee20c85b3a3ba0afd3672630ec4f93d339f015 ]
gic_probe() calls pm_runtime_get_sync() and added fail path as rpm_put to put usage_counter. However, pm_runtime_get_sync() will increment usage_counter even it failed. Fix it by replacing it with pm_runtime_resume_and_get() to keep usage counter balanced.
--- drivers/irqchip/irq-gic-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-gic-pm.c +1 -1
@@ -104,7 +104,7 @@ static int gic_probe(struct platform_device *pdev)pm_runtime_enable (dev); - ret =pm_runtime_get_sync (dev); + ret =pm_runtime_resume_and_get (dev);if (ret <0 ) goto rpm_disable;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 67/783 EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 9c8921555907f4d723f01ed2d859b66f2d14f08e ]
As the comment of pci_get_domain_bus_and_slot() says, it returns a PCI device with refcount incremented, so it doesn't need to call an extra pci_dev_get() in pci_get_dev_wrapper(), and the PCI device needs to be put in the error path.
--- drivers/edac/i10nm_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/edac/i10nm_base.c +1 -2
@@ -53,11 +53,10 @@ static struct pci_dev *pci_get_dev_wrapper(int dom, unsigned int bus,if (unlikely (pci_enable_device (pdev) <0 )) {edac_dbg (2 ,"Failed to enable device %02x:%02x.%x\n" , bus, dev, fun); +pci_dev_put (pdev);return NULL ; } -pci_dev_get (pdev); -return pdev; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 68/783 nfsd: dont call nfsd_file_put from client states seqfile display
In reply to Greg Kroah-HartmanFrom: Jeff Layton <[email protected]>
[ Upstream commit e0aa651068bfd520afcd357af8ecd2de005fc83d ]
We had a report of this:
BUG: sleeping function called from invalid context at fs/nfsd/filecache.c:440
...with a stack trace showing nfsd_file_put being called from nfs4_show_open. This code has always tried to call fput while holding a spinlock, but we recently changed this to use the filecache, and that started triggering the might_sleep() in nfsd_file_put.
states_start takes and holds the cl_lock while iterating over the client's states, and we can't sleep with that held.
Have the various nfs4_show_* functions instead hold the fi_lock instead of taking a nfsd_file reference.
--- fs/nfsd/nfs4state.c | 51 +++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 18 deletions(-)
fs/nfsd/nfs4state.c +33 -18
@@ -507,15 +507,26 @@ find_any_file(struct nfs4_file *f)return ret; } -static struct nfsd_file *find_deleg_file (struct nfs4_file *f) +static struct nfsd_file *find_any_file_locked (struct nfs4_file *f) { -struct nfsd_file *ret =NULL ; +lockdep_assert_held (&f->fi_lock); + +if (f->fi_fds[O_RDWR ]) +return f->fi_fds[O_RDWR ]; +if (f->fi_fds[O_WRONLY ]) +return f->fi_fds[O_WRONLY ]; +if (f->fi_fds[O_RDONLY ]) +return f->fi_fds[O_RDONLY ]; +return NULL ; +} + +static struct nfsd_file *find_deleg_file_locked (struct nfs4_file *f) +{ +lockdep_assert_held (&f->fi_lock); -spin_lock (&f->fi_lock);if (f->fi_deleg_file) - ret =nfsd_file_get (f->fi_deleg_file); -spin_unlock (&f->fi_lock); -return ret; +return f->fi_deleg_file; +return NULL ; }static atomic_long_t num_delegations;
@@ -2462,9 +2473,11 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) ols =openlockstateid (st); oo = ols->st_stateowner; nf = st->sc_file; - file =find_any_file (nf); + +spin_lock (&nf->fi_lock); + file =find_any_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2486,8 +2499,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
@@ -2501,9 +2514,10 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st) ols =openlockstateid (st); oo = ols->st_stateowner; nf = st->sc_file; - file =find_any_file (nf); +spin_lock (&nf->fi_lock); + file =find_any_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2523,8 +2537,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
@@ -2536,9 +2550,10 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st) ds =delegstateid (st); nf = st->sc_file; - file =find_deleg_file (nf); +spin_lock (&nf->fi_lock); + file =find_deleg_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2554,8 +2569,8 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_fname (s, file);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 69/783 genirq/irqdesc: Dont try to remove non-existing sysfs files
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 9049e1ca41983ab773d7ea244bee86d7835ec9f5 ]
Fault injection tests trigger warnings like this:
kernfs: can not remove 'chip_name', no directory
WARNING: CPU: 0 PID: 253 at fs/kernfs/dir.c:1616 kernfs_remove_by_name_ns+0xce/0xe0 RIP: 0010:kernfs_remove_by_name_ns+0xce/0xe0 Call Trace: <TASK> remove_files.isra.1+0x3f/0xb0 sysfs_remove_group+0x68/0xe0 sysfs_remove_groups+0x41/0x70 __kobject_del+0x45/0xc0 kobject_del+0x29/0x40 free_desc+0x42/0x70 irq_free_descs+0x5e/0x90
The reason is that the interrupt descriptor sysfs handling does not roll back on a failing kobject_add() during allocation. If the descriptor is freed later on, kobject_del() is invoked with a not added kobject resulting in the above warnings.
A proper rollback in case of a kobject_add() failure would be the straight forward solution. But this is not possible due to the way how interrupt descriptor sysfs handling works.
Interrupt descriptors are allocated before sysfs becomes available. So the sysfs files for the early allocated descriptors are added later in the boot process. At this point there can be nothing useful done about a failing kobject_add(). For consistency the interrupt descriptor allocation always treats kobject_add() failures as non-critical and just emits a warning.
To solve this problem, keep track in the interrupt descriptor whether kobject_add() was successful or not and make the invocation of kobject_del() conditional on that.
[ tglx: Massage changelog, comments and use a state bit. ]
--- kernel/irq/internals.h | 2 ++ kernel/irq/irqdesc.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)
kernel/irq/internals.h +2 -0
@@ -52,6 +52,7 @@ enum {* IRQS_PENDING - irq is pending and replayed later * IRQS_SUSPENDED - irq is suspended * IRQS_NMI - irq line is used to deliver NMIs +* IRQS_SYSFS - descriptor has been added to sysfs */ enum {IRQS_AUTODETECT =0x00000001 ,
@@ -64,6 +65,7 @@ enum {IRQS_SUSPENDED =0x00000800 ,IRQS_TIMINGS =0x00001000 ,IRQS_NMI =0x00002000 , + IRQS_SYSFS = 0x00004000, };#include "debug.h"
kernel/irq/irqdesc.c +9 -6
@@ -288,22 +288,25 @@ static void irq_sysfs_add(int irq, struct irq_desc *desc)if (irq_kobj_base) {/* * Continue even in case of failure as this is nothing -* crucial. +* crucial and failures in the late irq_sysfs_init() +* cannot be rolled back. */ if (kobject_add (&desc->kobj, irq_kobj_base,"%d" , irq))pr_warn ("Failed to add kobject for irq %d\n" , irq); +else + desc->istate |=IRQS_SYSFS ; } }static void irq_sysfs_del (struct irq_desc *desc) {/* -* If irq_sysfs_init() has not yet been invoked (early boot), then -* irq_kobj_base is NULL and the descriptor was never added. -* kobject_del() complains about a object with no parent, so make -* it conditional. +* Only invoke kobject_del() when kobject_add() was successfully +* invoked for the descriptor. This covers both early boot, where +* sysfs is not initialized yet, and the case of a failed +* kobject_add() invocation. */ -if (irq_kobj_base) +if (desc->istate &IRQS_SYSFS )kobject_del (&desc->kobj); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 70/783 cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 91fda1f88c0968f1491ab150bb01690525af150a ]
pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count after using pci_get_device(). Let's add it.
--- drivers/cpufreq/amd_freq_sensitivity.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/cpufreq/amd_freq_sensitivity.c +2 -0
@@ -124,6 +124,8 @@ static int __init amd_freq_sensitivity_init(void)if (!pcidev) {if (!boot_cpu_has (X86_FEATURE_PROC_FEEDBACK ))return -ENODEV ; + }else { +pci_dev_put (pcidev); }if (rdmsrl_safe (MSR_AMD64_FREQ_SENSITIVITY_ACTUAL , &val))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 71/783 libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit 2e41f274f9aa71cdcc69dc1f26a3f9304a651804 ]
Patch series "fix error when writing negative value to simple attribute files".
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), but some attribute files want to accept a negative value.
This patch (of 3):
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value.
This adds DEFINE_SIMPLE_ATTRIBUTE_SIGNED for a signed value.
--- fs/libfs.c | 22 +++++++++++++++++++--- include/linux/fs.h | 12 ++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-)
fs/libfs.c +19 -3
@@ -955,8 +955,8 @@ ssize_t simple_attr_read(struct file *file, char __user *buf,EXPORT_SYMBOL_GPL (simple_attr_read);/* interpret the buffer as a number to call the set function with */ -ssize_t simple_attr_write (struct file *file,const char __user *buf, -size_t len,loff_t *ppos) +static ssize_t simple_attr_write_xsigned (struct file *file,const char __user *buf, +size_t len,loff_t *ppos,bool is_signed) {struct simple_attr *attr;unsigned long long val;
@@ -977,7 +977,10 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, goto out; attr->set_buf[size] ='\0' ; - ret =kstrtoull (attr->set_buf,0 , &val); +if (is_signed) + ret =kstrtoll (attr->set_buf,0 , &val); +else + ret =kstrtoull (attr->set_buf,0 , &val);if (ret) goto out; ret = attr->set (attr->data, val);
@@ -987,8 +990,21 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,mutex_unlock (&attr->mutex);return ret; } + +ssize_t simple_attr_write (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return simple_attr_write_xsigned (file, buf, len, ppos, false); +}EXPORT_SYMBOL_GPL (simple_attr_write); +ssize_t simple_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return simple_attr_write_xsigned (file, buf, len, ppos, true); +} +EXPORT_SYMBOL_GPL (simple_attr_write_signed); +/** * generic_fh_to_dentry - generic helper for the fh_to_dentry export operation * @sb: filesystem to do the file handle conversion on
include/linux/fs.h +10 -2
@@ -3345,7 +3345,7 @@ void simple_transaction_set(struct file *file, size_t n);* All attributes contain a text representation of a numeric value * that are accessed with the get() and set() functions. */ -#define DEFINE_SIMPLE_ATTRIBUTE (__fops, __get, __set, __fmt) \ +#define DEFINE_SIMPLE_ATTRIBUTE_XSIGNED (__fops, __get, __set, __fmt, __is_signed) \ static int __fops ## _open(struct inode *inode, struct file *file) \ { \ __simple_attr_check_format(__fmt, 0ull); \
@@ -3356,10 +3356,16 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = simple_attr_read, \ - .write = simple_attr_write, \ + .write = (__is_signed) ? simple_attr_write_signed : simple_attr_write, \ .llseek = generic_file_llseek, \ } +#define DEFINE_SIMPLE_ATTRIBUTE (__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, false) + +#define DEFINE_SIMPLE_ATTRIBUTE_SIGNED (__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, true) + static inline __printf(1, 2) void __simple_attr_check_format(const char *fmt, ...) {
@@ -3374,6 +3380,8 @@ ssize_t simple_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);ssize_t simple_attr_write (struct file *file,const char __user *buf,size_t len,loff_t *ppos); +ssize_t simple_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos);struct ctl_table ; int proc_nr_files(struct ctl_table *table, int write,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 72/783 lib/notifier-error-inject: fix error when writing -errno to debugfs file
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit f883c3edd2c432a2931ec8773c70a570115a50fe ]
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()").
This restores the previous behaviour by using newly introduced DEFINE_SIMPLE_ATTRIBUTE_SIGNED instead of DEFINE_SIMPLE_ATTRIBUTE.
--- lib/notifier-error-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/notifier-error-inject.c +1 -1
@@ -15,7 +15,7 @@ static int debugfs_errno_get(void *data, u64 *val)return 0 ; } -DEFINE_SIMPLE_ATTRIBUTE (fops_errno, debugfs_errno_get, debugfs_errno_set, +DEFINE_SIMPLE_ATTRIBUTE_SIGNED (fops_errno, debugfs_errno_get, debugfs_errno_set,"%lld\n" ); static struct dentry *debugfs_create_errno(const char *name, umode_t mode,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 73/783 docs: fault-injection: fix non-working usage of negative values
In reply to Greg Kroah-HartmanFrom: Wolfram Sang <[email protected]>
[ Upstream commit 005747526d4f3c2ec995891e95cb7625161022f9 ]
Fault injection uses debugfs in a way that the provided values via sysfs are interpreted as u64. Providing negative numbers results in an error:
/sys/kernel/debug/fail_function# echo -1 > times
sh: write error: Invalid argument
Update the docs and examples to use "printf %#x <val>" in these cases. For "retval", reword the paragraph a little and fix a typo.
Stable-dep-of: d472cf797c4e ("debugfs: fix error when writing negative value to atomic_t debugfs file")
--- .../fault-injection/fault-injection.rst | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-)
Documentation/fault-injection/fault-injection.rst +14 -10
@@ -78,8 +78,10 @@ configuration of fault-injection capabilities. - /sys/kernel/debug/fail*/times: - specifies how many times failures may happen at most. - A value of -1 means "no limit". + specifies how many times failures may happen at most. A value of -1 + means "no limit". Note, though, that this file only accepts unsigned + values. So, if you want to specify -1, you better use 'printf' instead + of 'echo', e.g.: $ printf %#x -1 > times - /sys/kernel/debug/fail*/space:
@@ -167,11 +169,13 @@ configuration of fault-injection capabilities. - ERRNO: retval must be -1 to -MAX_ERRNO (-4096). - ERR_NULL: retval must be 0 or -1 to -MAX_ERRNO (-4096). -- /sys/kernel/debug/fail_function/<functiuon-name>/retval: +- /sys/kernel/debug/fail_function/<function-name>/retval: - specifies the "error" return value to inject to the given - function for given function. This will be created when - user specifies new injection entry. + specifies the "error" return value to inject to the given function. + This will be created when the user specifies a new injection entry. + Note that this file only accepts unsigned values. So, if you want to + use a negative errno, you better use 'printf' instead of 'echo', e.g.: + $ printf %#x -12 > retval Boot option ^^^^^^^^^^^
@@ -255,7 +259,7 @@ Application Examples echo Y > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - echo -1 > /sys/kernel/debug/$FAILTYPE/times + printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -309,7 +313,7 @@ Application Examples echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - echo -1 > /sys/kernel/debug/$FAILTYPE/times + printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -336,11 +340,11 @@ Application Examples FAILTYPE=fail_function FAILFUNC=open_ctree echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject - echo -12 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval + printf %#x -12 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval - echo -1 > /sys/kernel/debug/$FAILTYPE/times + printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 74/783 debugfs: fix error when writing negative value to atomic_t debugfs file
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit d472cf797c4e268613dbce5ec9b95d0bcae19ecb ]
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value for a debugfs file created by debugfs_create_atomic_t().
This restores the previous behaviour by introducing DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value.
--- .../fault-injection/fault-injection.rst | 10 +++---- fs/debugfs/file.c | 28 +++++++++++++++---- include/linux/debugfs.h | 19 +++++++++++-- 3 files changed, 43 insertions(+), 14 deletions(-)
Documentation/fault-injection/fault-injection.rst +4 -6
@@ -79,9 +79,7 @@ configuration of fault-injection capabilities. - /sys/kernel/debug/fail*/times: specifies how many times failures may happen at most. A value of -1 - means "no limit". Note, though, that this file only accepts unsigned - values. So, if you want to specify -1, you better use 'printf' instead - of 'echo', e.g.: $ printf %#x -1 > times + means "no limit". - /sys/kernel/debug/fail*/space:
@@ -259,7 +257,7 @@ Application Examples echo Y > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -313,7 +311,7 @@ Application Examples echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -344,7 +342,7 @@ Application Examples echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
fs/debugfs/file.c +22 -6
@@ -378,8 +378,8 @@ ssize_t debugfs_attr_read(struct file *file, char __user *buf, }EXPORT_SYMBOL_GPL (debugfs_attr_read); -ssize_t debugfs_attr_write (struct file *file,const char __user *buf, -size_t len,loff_t *ppos) +static ssize_t debugfs_attr_write_xsigned (struct file *file,const char __user *buf, +size_t len,loff_t *ppos,bool is_signed) {struct dentry *dentry =F_DENTRY (file);ssize_t ret;
@@ -387,12 +387,28 @@ ssize_t debugfs_attr_write(struct file *file, const char __user *buf, ret =debugfs_file_get (dentry);if (unlikely (ret))return ret; - ret =simple_attr_write (file, buf, len, ppos); +if (is_signed) + ret =simple_attr_write_signed (file, buf, len, ppos); +else + ret =simple_attr_write (file, buf, len, ppos);debugfs_file_put (dentry);return ret; } + +ssize_t debugfs_attr_write (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return debugfs_attr_write_xsigned (file, buf, len, ppos, false); +}EXPORT_SYMBOL_GPL (debugfs_attr_write); +ssize_t debugfs_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return debugfs_attr_write_xsigned (file, buf, len, ppos, true); +} +EXPORT_SYMBOL_GPL (debugfs_attr_write_signed); + static struct dentry *debugfs_create_mode_unsafe(const char *name, umode_t mode, struct dentry *parent, void *value, const struct file_operations *fops,
@@ -748,11 +764,11 @@ static int debugfs_atomic_t_get(void *data, u64 *val) *val =atomic_read ((atomic_t *)data);return 0 ; } -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t, debugfs_atomic_t_get, +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t, debugfs_atomic_t_get, debugfs_atomic_t_set,"%lld\n" ); -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t_ro, debugfs_atomic_t_get,NULL , +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t_ro, debugfs_atomic_t_get,NULL ,"%lld\n" ); -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t_wo,NULL , debugfs_atomic_t_set, +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t_wo,NULL , debugfs_atomic_t_set,"%lld\n" );/**
include/linux/debugfs.h +17 -2
@@ -45,7 +45,7 @@ struct debugfs_u32_array {extern struct dentry *arch_debugfs_dir; -#define DEFINE_DEBUGFS_ATTRIBUTE (__fops, __get, __set, __fmt) \ +#define DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED (__fops, __get, __set, __fmt, __is_signed) \ static int __fops ## _open(struct inode *inode, struct file *file) \ { \ __simple_attr_check_format(__fmt, 0ull); \
@@ -56,10 +56,16 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = debugfs_attr_read, \ - .write = debugfs_attr_write, \ + .write = (__is_signed) ? debugfs_attr_write_signed : debugfs_attr_write, \ .llseek = no_llseek, \ } +#define DEFINE_DEBUGFS_ATTRIBUTE (__fops, __get, __set, __fmt) \ + DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, false) + +#define DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (__fops, __get, __set, __fmt) \ + DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, true) +typedef struct vfsmount *(*debugfs_automount_t )(struct dentry *,void *);#if defined(CONFIG_DEBUG_FS )
@@ -102,6 +108,8 @@ ssize_t debugfs_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);ssize_t debugfs_attr_write (struct file *file,const char __user *buf,size_t len,loff_t *ppos); +ssize_t debugfs_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos);struct dentry *debugfs_rename (struct dentry *old_dir,struct dentry *old_dentry,struct dentry *new_dir,const char *new_name);
@@ -249,6 +257,13 @@ static inline ssize_t debugfs_attr_write(struct file *file,return -ENODEV ; } +static inline ssize_t debugfs_attr_write_signed (struct file *file, +const char __user *buf, +size_t len,loff_t *ppos) +{ +return -ENODEV ; +} +static inline struct dentry *debugfs_rename (struct dentry *old_dir,struct dentry *old_dentry,struct dentry *new_dir,char *new_name) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 75/783 ocfs2: ocfs2_mount_volume does cleanup job before return error
In reply to Greg Kroah-HartmanFrom: Heming Zhao via Ocfs2-devel <[email protected]>
[ Upstream commit 0737e01de9c411e4db87dcedf4a9789d41b1c5c1 ]
After this patch, when error, ocfs2_fill_super doesn't take care to release resources which are allocated in ocfs2_mount_volume.
Stable-dep-of: ce2fcf1516d6 ("ocfs2: fix memory leak in ocfs2_mount_volume()")
--- fs/ocfs2/super.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-)
fs/ocfs2/super.c +23 -12
@@ -1787,11 +1787,10 @@ static int ocfs2_get_sector(struct super_block *sb,static int ocfs2_mount_volume (struct super_block *sb) {int status =0 ; -int unlock_super =0 ;struct ocfs2_super *osb =OCFS2_SB (sb);if (ocfs2_is_hard_readonly (osb)) - goto leave; + goto out;mutex_init (&osb->obs_trim_fs_mutex);
@@ -1801,44 +1800,56 @@ static int ocfs2_mount_volume(struct super_block *sb)if (status == -EBADR &&ocfs2_userspace_stack (osb))mlog (ML_ERROR ,"couldn't mount because cluster name on" " disk does not match the running cluster name.\n" ); - goto leave; + goto out; } status =ocfs2_super_lock (osb,1 );if (status <0 ) {mlog_errno (status); - goto leave; + goto out_dlm; } - unlock_super =1 ;/* This will load up the node map and add ourselves to it. */ status =ocfs2_find_slot (osb);if (status <0 ) {mlog_errno (status); - goto leave; + goto out_super_lock; }/* load all node-local system inodes */ status =ocfs2_init_local_system_inodes (osb);if (status <0 ) {mlog_errno (status); - goto leave; + goto out_super_lock; } status =ocfs2_check_volume (osb);if (status <0 ) {mlog_errno (status); - goto leave; + goto out_system_inodes; } status =ocfs2_truncate_log_init (osb); -if (status <0 ) +if (status <0 ) {mlog_errno (status); + goto out_system_inodes; + } -leave: -if (unlock_super) -ocfs2_super_unlock (osb,1 ); +ocfs2_super_unlock (osb,1 ); +return 0 ; +out_system_inodes: +if (osb->local_alloc_state ==OCFS2_LA_ENABLED ) +ocfs2_shutdown_local_alloc (osb); +ocfs2_release_system_inodes (osb); +/* before journal shutdown, we should release slot_info */ +ocfs2_free_slot_info (osb); +ocfs2_journal_shutdown (osb); +out_super_lock: +ocfs2_super_unlock (osb,1 ); +out_dlm: +ocfs2_dlm_shutdown (osb,0 ); +out:return status; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 76/783 ocfs2: rewrite error handling of ocfs2_fill_super
In reply to Greg Kroah-HartmanFrom: Heming Zhao via Ocfs2-devel <[email protected]>
[ Upstream commit f1e75d128b46e3b066e7b2e7cfca10491109d44d ]
Current ocfs2_fill_super() uses one goto label "read_super_error" to handle all error cases. And with previous serial patches, the error handling should fork more branches to handle different error cases. This patch rewrite the error handling of ocfs2_fill_super.
Stable-dep-of: ce2fcf1516d6 ("ocfs2: fix memory leak in ocfs2_mount_volume()")
--- fs/ocfs2/super.c | 67 +++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 35 deletions(-)
fs/ocfs2/super.c +32 -35
@@ -984,28 +984,27 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)if (!ocfs2_parse_options (sb, data, &parsed_options,0 )) { status = -EINVAL ; - goto read_super_error; + goto out; }/* probe for superblock */ status =ocfs2_sb_probe (sb, &bh, §or_size, &stats);if (status <0 ) {mlog (ML_ERROR ,"superblock probe failed!\n" ); - goto read_super_error; + goto out; } status =ocfs2_initialize_super (sb, bh, sector_size, &stats); - osb =OCFS2_SB (sb); -if (status <0 ) { -mlog_errno (status); - goto read_super_error; - }brelse (bh); bh =NULL ; +if (status <0 ) + goto out; + + osb =OCFS2_SB (sb);if (!ocfs2_check_set_options (sb, &parsed_options)) { status = -EINVAL ; - goto read_super_error; + goto out_super; } osb->s_mount_opt = parsed_options.mount_opt; osb->s_atime_quantum = parsed_options.atime_quantum;
@@ -1022,7 +1021,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) status =ocfs2_verify_userspace_stack (osb, &parsed_options);if (status) - goto read_super_error; + goto out_super; sb->s_magic =OCFS2_SUPER_MAGIC ;
@@ -1036,7 +1035,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) status = -EACCES ;mlog (ML_ERROR ,"Readonly device detected but readonly " "mount was not specified.\n" ); - goto read_super_error; + goto out_super; }/* You should not be able to start a local heartbeat
@@ -1045,7 +1044,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) status = -EROFS ;mlog (ML_ERROR ,"Local heartbeat specified on readonly " "device.\n" ); - goto read_super_error; + goto out_super; } status =ocfs2_check_journals_nolocks (osb);
@@ -1054,9 +1053,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)mlog (ML_ERROR ,"Recovery required on readonly " "file system, but write access is " "unavailable.\n" ); - else -mlog_errno (status ); - goto read_super_error; + goto out_super; }ocfs2_set_ro_flag (osb,1 );
@@ -1072,10 +1069,8 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) } status =ocfs2_verify_heartbeat (osb); -if (status <0 ) { -mlog_errno (status); - goto read_super_error; - } +if (status <0 ) + goto out_super; osb->osb_debug_root =debugfs_create_dir (osb->uuid_str, ocfs2_debugfs_root);
@@ -1089,15 +1084,14 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) status =ocfs2_mount_volume (sb);if (status <0 ) - goto read_super_error; + goto out_debugfs;if (osb->root_inode) inode =igrab (osb->root_inode);if (!inode) { status = -EIO ; -mlog_errno (status); - goto read_super_error; + goto out_dismount; } osb->osb_dev_kset = kset_create_and_add(sb->s_id, NULL,
@@ -1105,7 +1099,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)if (!osb->osb_dev_kset) { status = -ENOMEM ;mlog (ML_ERROR ,"Unable to create device kset %s.\n" , sb->s_id); - goto read_super_error; + goto out_dismount; }/* Create filecheck sysfs related directories/files at
@@ -1114,14 +1108,13 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) status = -ENOMEM ;mlog (ML_ERROR ,"Unable to create filecheck sysfs directory at " "/sys/fs/ocfs2/%s/filecheck.\n" , sb->s_id); - goto read_super_error; + goto out_dismount; } root =d_make_root (inode);if (!root) { status = -ENOMEM ; -mlog_errno (status); - goto read_super_error; + goto out_dismount; } sb->s_root = root;
@@ -1168,17 +1161,21 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)return status; -read_super_error: -brelse (bh); - -if (status) -mlog_errno (status); +out_dismount: +atomic_set (&osb->vol_state,VOLUME_DISABLED ); +wake_up (&osb->osb_mount_event); +ocfs2_dismount_volume (sb,1 ); + goto out; -if (osb) { -atomic_set (&osb->vol_state,VOLUME_DISABLED ); -wake_up (&osb->osb_mount_event); -ocfs2_dismount_volume (sb,1 ); - } +out_debugfs: +debugfs_remove_recursive (osb->osb_debug_root); +out_super: +ocfs2_release_system_inodes (osb); +kfree (osb->recovery_map); +ocfs2_delete_osb (osb); +kfree (osb); +out: +mlog_errno (status);return status; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 77/783 ocfs2: fix memory leak in ocfs2_mount_volume()
In reply to Greg Kroah-HartmanFrom: Li Zetao <[email protected]>
[ Upstream commit ce2fcf1516d674a174d9b34d1e1024d64de9fba3 ]
There is a memory leak reported by kmemleak:
unreferenced object 0xffff88810cc65e60 (size 32):
comm "mount.ocfs2", pid 23753, jiffies 4302528942 (age 34735.105s)
hex dump (first 32 bytes):
10 00 00 00 00 00 00 00 00 01 01 01 01 01 01 01 ................
01 01 01 01 01 01 01 01 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8170f73d>] __kmalloc+0x4d/0x150
[<ffffffffa0ac3f51>] ocfs2_compute_replay_slots+0x121/0x330 [ocfs2]
[<ffffffffa0b65165>] ocfs2_check_volume+0x485/0x900 [ocfs2]
[<ffffffffa0b68129>] ocfs2_mount_volume.isra.0+0x1e9/0x650 [ocfs2]
[<ffffffffa0b7160b>] ocfs2_fill_super+0xe0b/0x1740 [ocfs2]
[<ffffffff818e1fe2>] mount_bdev+0x312/0x400
[<ffffffff819a086d>] legacy_get_tree+0xed/0x1d0
[<ffffffff818de82d>] vfs_get_tree+0x7d/0x230
[<ffffffff81957f92>] path_mount+0xd62/0x1760
[<ffffffff81958a5a>] do_mount+0xca/0xe0
[<ffffffff81958d3c>] __x64_sys_mount+0x12c/0x1a0
[<ffffffff82f26f15>] do_syscall_64+0x35/0x80
[<ffffffff8300006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0This call stack is related to two problems. Firstly, the ocfs2 super uses "replay_map" to trace online/offline slots, in order to recover offline slots during recovery and mount. But when ocfs2_truncate_log_init() returns an error in ocfs2_mount_volume(), the memory of "replay_map" will not be freed in error handling path. Secondly, the memory of "replay_map" will not be freed if d_make_root() returns an error in ocfs2_fill_super(). But the memory of "replay_map" will be freed normally when completing recovery and mount in ocfs2_complete_mount_recovery().
Fix the first problem by adding error handling path to free "replay_map" when ocfs2_truncate_log_init() fails. And fix the second problem by calling ocfs2_free_replay_slots(osb) in the error handling path "out_dismount". In addition, since ocfs2_free_replay_slots() is static, it is necessary to remove its static attribute and declare it in header file.
--- fs/ocfs2/journal.c | 2 +- fs/ocfs2/journal.h | 1 + fs/ocfs2/super.c | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-)
fs/ocfs2/journal.c +1 -1
@@ -159,7 +159,7 @@ static void ocfs2_queue_replay_slots(struct ocfs2_super *osb, replay_map->rm_state =REPLAY_DONE ; } -static void ocfs2_free_replay_slots (struct ocfs2_super *osb) +void ocfs2_free_replay_slots (struct ocfs2_super *osb) {struct ocfs2_replay_map *replay_map = osb->replay_map;
fs/ocfs2/journal.h +1 -0
@@ -152,6 +152,7 @@ int ocfs2_recovery_init(struct ocfs2_super *osb);void ocfs2_recovery_exit (struct ocfs2_super *osb);int ocfs2_compute_replay_slots (struct ocfs2_super *osb); +void ocfs2_free_replay_slots (struct ocfs2_super *osb);/* * Journal Control: * Initialize, Load, Shutdown, Wipe a journal.
fs/ocfs2/super.c +4 -1
@@ -1164,6 +1164,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) out_dismount:atomic_set (&osb->vol_state,VOLUME_DISABLED );wake_up (&osb->osb_mount_event); +ocfs2_free_replay_slots (osb);ocfs2_dismount_volume (sb,1 ); goto out;
@@ -1829,12 +1830,14 @@ static int ocfs2_mount_volume(struct super_block *sb) status =ocfs2_truncate_log_init (osb);if (status <0 ) {mlog_errno (status); - goto out_system_inodes; + goto out_check_volume; }ocfs2_super_unlock (osb,1 );return 0 ; +out_check_volume: +ocfs2_free_replay_slots (osb); out_system_inodes:if (osb->local_alloc_state ==OCFS2_LA_ENABLED )ocfs2_shutdown_local_alloc (osb);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 78/783 rapidio: fix possible name leaks when rio_add_device() fails
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit f9574cd48679926e2a569e1957a5a1bcc8a719ac ]
Patch series "rapidio: fix three possible memory leaks".
This patchset fixes three name leaks in error handling.
- patch #1 fixes two name leaks while rio_add_device() fails.
- patch #2 fixes a name leak while rio_register_mport() fails.
This patch (of 2):
If rio_add_device() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and the 'rdev' can be freed in rio_release_dev().
--- drivers/rapidio/devices/rio_mport_cdev.c | 7 +++++-- drivers/rapidio/rio-scan.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/rapidio/devices/rio_mport_cdev.c +5 -2
@@ -1803,8 +1803,11 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,rio_init_dbell_res (&rdev->riores[RIO_DOORBELL_RESOURCE ],0 ,0xffff ); err =rio_add_device (rdev); -if (err) - goto cleanup; +if (err) { +put_device (&rdev->dev); +return err; + } +rio_dev_get (rdev);return 0 ;
drivers/rapidio/rio-scan.c +6 -2
@@ -454,8 +454,12 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, 0, 0xffff); ret =rio_add_device (rdev); -if (ret) - goto cleanup; +if (ret) { +if (rswitch) +kfree (rswitch->route_table); +put_device (&rdev->dev); +return NULL ; + }rio_dev_get (rdev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 79/783 rapidio: rio: fix possible name leak in rio_register_mport()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit e92a216d16bde65d21a3227e0fb2aa0794576525 ]
If device_register() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and list_del() is called to delete the port from rio_mports.
--- drivers/rapidio/rio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/rapidio/rio.c +7 -2
@@ -2267,11 +2267,16 @@ int rio_register_mport(struct rio_mport *port)atomic_set (&port->state,RIO_DEVICE_RUNNING ); res =device_register (&port->dev); -if (res) +if (res) {dev_err (&port->dev,"RIO: mport%d registration failed ERR=%d\n" , port->id, res); -else +mutex_lock (&rio_mport_list_lock); +list_del (&port->node); +mutex_unlock (&rio_mport_list_lock); +put_device (&port->dev); + }else {dev_dbg (&port->dev,"RIO: registered mport%d\n" , port->id); + }return res; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 80/783 clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 2a97d55333e4299f32c98cca6dc5c4db1c5855fc ]
The Renesas Compare Match Timer 0 and 1 (CMT0/1) variants have a register to control the clock supply to the individual channels. Currently the driver does not touch this register, and relies on the documented initial value, which has the clock supply enabled for all channels present.
However, when Linux starts on the APE6-EVM development board, only the clock supply to the first CMT1 channel is enabled. Hence the first channel (used as a clockevent) works, while the second channel (used as a clocksource) does not. Note that the default system clocksource is the Cortex-A15 architectured timer, and the user needs to manually switch to the CMT1 clocksource to trigger the broken behavior.
Fix this by removing the fragile dependency on implicit reset and/or boot loader state, and by enabling the clock supply explicitly for all channels used instead. This requires postponing the clk_disable() call, else the timer's registers cannot be accessed in sh_cmt_setup_channel().
Stable-dep-of: 3f44f7156f59 ("clocksource/drivers/sh_cmt: Access registers according to spec")
--- drivers/clocksource/sh_cmt.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
drivers/clocksource/sh_cmt.c +13 -3
@@ -235,6 +235,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {#define CMCNT 1/* channel register */ #define CMCOR 2/* channel register */ +#define CMCLKE 0x1000/* CLK Enable Register (R-Car Gen2) */ +static inline u32 sh_cmt_read_cmstr (struct sh_cmt_channel *ch) {if (ch->iostart)
@@ -849,6 +851,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, unsigned int hwidx, bool clockevent, bool clocksource, struct sh_cmt_device *cmt) { + u32 value;int ret;/* Skip unused channels. */
@@ -878,6 +881,11 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, ch->iostart = cmt->mapbase + ch->hwidx *0x100 ; ch->ioctrl = ch->iostart +0x10 ; ch->timer_bit =0 ; + +/* Enable the clock supply to the channel */ + value =ioread32 (cmt->mapbase +CMCLKE ); + value |=BIT (hwidx); +iowrite32 (value, cmt->mapbase +CMCLKE );break ; }
@@ -1010,12 +1018,10 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)else cmt->rate =clk_get_rate (cmt->clk) /8 ; -clk_disable (cmt->clk); -/* Map the memory resource(s). */ ret =sh_cmt_map_memory (cmt);if (ret <0 ) - goto err_clk_unprepare; + goto err_clk_disable;/* Allocate and setup the channels. */ cmt->num_channels =hweight8 (cmt->hw_channels);
@@ -1043,6 +1049,8 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) mask &= ~(1 << hwidx); } +clk_disable (cmt->clk); +platform_set_drvdata (pdev, cmt);return 0 ;
@@ -1050,6 +1058,8 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) err_unmap:kfree (cmt->channels);iounmap (cmt->mapbase); +err_clk_disable: +clk_disable (cmt->clk); err_clk_unprepare:clk_unprepare (cmt->clk); err_clk_put:
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 81/783 clocksource/drivers/sh_cmt: Access registers according to spec
In reply to Greg Kroah-HartmanFrom: Wolfram Sang <[email protected]>
[ Upstream commit 3f44f7156f59cae06e9160eafb5d8b2dfd09e639 ]
Documentation for most CMTs say that it takes two input clocks before changes propagate to the timer. This is especially relevant when the timer is stopped to change further settings.
Implement the delays according to the spec. To avoid unnecessary delays in atomic mode, also check if the to-be-written value actually differs.
CMCNT is a bit special because testing showed that it requires 3 cycles to propagate, which affects all CMTs. Also, the WRFLAG needs to be checked before writing. This fixes "cannot clear CMCNT" messages which occur often on R-Car Gen4 SoCs, but only very rarely on older SoCs for some reason.
--- drivers/clocksource/sh_cmt.c | 88 ++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 33 deletions(-)
drivers/clocksource/sh_cmt.c +55 -33
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/iopoll.h> #include <linux/ioport.h> #include <linux/irq.h> #include <linux/module.h>
@@ -116,6 +117,7 @@ struct sh_cmt_device {void __iomem *mapbase;struct clk *clk;unsigned long rate; +unsigned int reg_delay;raw_spinlock_t lock;/* Protect the shared start/stop register */
@@ -247,10 +249,17 @@ static inline u32 sh_cmt_read_cmstr(struct sh_cmt_channel *ch)static inline void sh_cmt_write_cmstr (struct sh_cmt_channel *ch,u32 value) { -if (ch->iostart) - ch->cmt->info->write_control (ch->iostart,0 , value); -else - ch->cmt->info->write_control (ch->cmt->mapbase,0 , value); +u32 old_value =sh_cmt_read_cmstr (ch); + +if (value != old_value) { +if (ch->iostart) { + ch->cmt->info->write_control (ch->iostart,0 , value); +udelay (ch->cmt->reg_delay); + }else { + ch->cmt->info->write_control (ch->cmt->mapbase,0 , value); +udelay (ch->cmt->reg_delay); + } + } }static inline u32 sh_cmt_read_cmcsr (struct sh_cmt_channel *ch)
@@ -260,7 +269,12 @@ static inline u32 sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)static inline void sh_cmt_write_cmcsr (struct sh_cmt_channel *ch,u32 value) { - ch->cmt->info->write_control (ch->ioctrl,CMCSR , value); +u32 old_value =sh_cmt_read_cmcsr (ch); + +if (value != old_value) { + ch->cmt->info->write_control (ch->ioctrl,CMCSR , value); +udelay (ch->cmt->reg_delay); + } }static inline u32 sh_cmt_read_cmcnt (struct sh_cmt_channel *ch)
@@ -268,14 +282,33 @@ static inline u32 sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)return ch->cmt->info->read_count (ch->ioctrl,CMCNT ); } -static inline void sh_cmt_write_cmcnt (struct sh_cmt_channel *ch,u32 value) +static inline int sh_cmt_write_cmcnt (struct sh_cmt_channel *ch,u32 value) { +/* Tests showed that we need to wait 3 clocks here */ +unsigned int cmcnt_delay =DIV_ROUND_UP (3 * ch->cmt->reg_delay,2 ); +u32 reg; + +if (ch->cmt->info->model >SH_CMT_16BIT ) { +int ret =read_poll_timeout_atomic (sh_cmt_read_cmcsr, reg, + !(reg &SH_CMT32_CMCSR_WRFLG ), +1 , cmcnt_delay, false, ch); +if (ret <0 ) +return ret; + } + ch->cmt->info->write_count (ch->ioctrl,CMCNT , value); +udelay (cmcnt_delay); +return 0 ; }static inline void sh_cmt_write_cmcor (struct sh_cmt_channel *ch,u32 value) { - ch->cmt->info->write_count (ch->ioctrl,CMCOR , value); +u32 old_value = ch->cmt->info->read_count (ch->ioctrl,CMCOR ); + +if (value != old_value) { + ch->cmt->info->write_count (ch->ioctrl,CMCOR , value); +udelay (ch->cmt->reg_delay); + } }static u32 sh_cmt_get_counter (struct sh_cmt_channel *ch,u32 *has_wrapped)
@@ -319,7 +352,7 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)static int sh_cmt_enable (struct sh_cmt_channel *ch) { -int k, ret; +int ret;pm_runtime_get_sync (&ch->cmt->pdev->dev);dev_pm_syscore_device (&ch->cmt->pdev->dev, true);
@@ -347,26 +380,9 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch) }sh_cmt_write_cmcor (ch,0xffffffff ); -sh_cmt_write_cmcnt (ch,0 ); - -/* -* According to the sh73a0 user's manual, as CMCNT can be operated -* only by the RCLK (Pseudo 32 kHz), there's one restriction on -* modifying CMCNT register; two RCLK cycles are necessary before -* this register is either read or any modification of the value -* it holds is reflected in the LSI's actual operation. -* -* While at it, we're supposed to clear out the CMCNT as of this -* moment, so make sure it's processed properly here. This will -* take RCLKx2 at maximum. -*/ -for (k =0 ; k <100 ; k++) { -if (!sh_cmt_read_cmcnt (ch)) -break ; -udelay (1 ); - } + ret =sh_cmt_write_cmcnt (ch,0 ); -if (sh_cmt_read_cmcnt (ch)) { +if (ret ||sh_cmt_read_cmcnt (ch)) {dev_err (&ch->cmt->pdev->dev,"ch%u: cannot clear CMCNT\n" , ch->index); ret = -ETIMEDOUT ;
@@ -976,8 +992,8 @@ MODULE_DEVICE_TABLE(of, sh_cmt_of_table);static int sh_cmt_setup (struct sh_cmt_device *cmt,struct platform_device *pdev) { -unsigned int mask; -unsigned int i; +unsigned int mask, i; +unsigned long rate;int ret; cmt->pdev = pdev;
@@ -1013,10 +1029,16 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)if (ret <0 ) goto err_clk_unprepare; -if (cmt->info->width ==16 ) - cmt->rate =clk_get_rate (cmt->clk) /512 ; -else - cmt->rate =clk_get_rate (cmt->clk) /8 ; + rate =clk_get_rate (cmt->clk); +if (!rate) { + ret = -EINVAL ; + goto err_clk_disable; + } + +/* We shall wait 2 input clks after register writes */ +if (cmt->info->model >=SH_CMT_48BIT ) + cmt->reg_delay =DIV_ROUND_UP (2UL *USEC_PER_SEC , rate); + cmt->rate = rate / (cmt->info->width ==16 ?512 :8 );/* Map the memory resource(s). */ ret =sh_cmt_map_memory (cmt);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 82/783 futex: Move to kernel/futex/
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 77e52ae35463521041906c510fe580d15663bb93 ]
In preparation for splitup..
Stable-dep-of: 90d758896787 ("futex: Resend potentially swallowed owner death notification")
---
MAINTAINERS | 2 +-
kernel/Makefile | 2 +-
kernel/futex/Makefile | 3 +++
kernel/{futex.c => futex/core.c} | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
create mode 100644 kernel/futex/Makefile
rename kernel/{futex.c => futex/core.c} (99%)MAINTAINERS +1 -1
@@ -7280,7 +7280,7 @@ F: Documentation/locking/*futex* F: include/asm-generic/futex.h F: include/linux/futex.h F: include/uapi/linux/futex.h -F: kernel/futex.c +F: kernel/futex/* F: tools/perf/bench/futex* F: tools/testing/selftests/futex/
kernel/Makefile +1 -1
@@ -53,7 +53,7 @@ obj-$(CONFIG_FREEZER) += freezer.o obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += time/ -obj-$(CONFIG_FUTEX) += futex.o +obj-$(CONFIG_FUTEX) += futex/ obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_SMP) += smp.o ifneq ($(CONFIG_SMP),y)
kernel/futex/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-y += core.o
kernel/futex/core.c renamed from kernel/futex.c +1 -1
@@ -42,7 +42,7 @@#include <asm/futex.h> -#include "locking/rtmutex_common.h" +#include "../locking/rtmutex_common.h" /* * READ this before attempting to hack on futexes!
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 83/783 futex: Resend potentially swallowed owner death notification
In reply to Greg Kroah-HartmanFrom: Alexey Izbyshev <[email protected]>
[ Upstream commit 90d758896787048fa3d4209309d4800f3920e66f ]
Commit ca16d5bee598 ("futex: Prevent robust futex exit race") addressed two cases when tasks waiting on a robust non-PI futex remained blocked despite the futex not being owned anymore:
* if the owner died after writing zero to the futex word, but before waking up a waiter
* if a task waiting on the futex was woken up, but died before updating the futex word (effectively swallowing the notification without acting on it)
In the second case, the task could be woken up either by the previous owner (after the futex word was reset to zero) or by the kernel (after the OWNER_DIED bit was set and the TID part of the futex word was reset to zero) if the previous owner died without the resetting the futex.
Because the referenced commit wakes up a potential waiter only if the whole futex word is zero, the latter subcase remains unaddressed.
Fix this by looking only at the TID part of the futex when deciding whether a wake up is needed.
--- kernel/futex/core.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
kernel/futex/core.c +18 -10
@@ -3405,6 +3405,7 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, bool pi, bool pending_op) {u32 uval, nval, mval; +pid_t owner;int err;/* Futex address must be 32bit aligned */
@@ -3426,6 +3427,10 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,* 2. A woken up waiter is killed before it can acquire the * futex in user space. * +* In the second case, the wake up notification could be generated +* by the unlock path in user space after setting the futex value +* to zero or by the kernel after setting the OWNER_DIED bit below. +* * In both cases the TID validation below prevents a wakeup of * potential waiters which can cause these waiters to block * forever.
@@ -3434,24 +3439,27 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,* * 1) task->robust_list->list_op_pending != NULL * @pending_op == true -* 2) User space futex value == 0 +* 2) The owner part of user space futex value == 0 * 3) Regular futex: @pi == false * * If these conditions are met, it is safe to attempt waking up a * potential waiter without touching the user space futex value and -* trying to set the OWNER_DIED bit. The user space futex value is -* uncontended and the rest of the user space mutex state is -* consistent, so a woken waiter will just take over the -* uncontended futex. Setting the OWNER_DIED bit would create -* inconsistent state and malfunction of the user space owner died -* handling. -*/ -if (pending_op && !pi && !uval) { +* trying to set the OWNER_DIED bit. If the futex value is zero, +* the rest of the user space mutex state is consistent, so a woken +* waiter will just take over the uncontended futex. Setting the +* OWNER_DIED bit would create inconsistent state and malfunction +* of the user space owner died handling. Otherwise, the OWNER_DIED +* bit is already set, and the woken waiter is expected to deal with +* this. +*/ + owner = uval &FUTEX_TID_MASK ; + +if (pending_op && !pi && !owner) {futex_wake (uaddr,1 ,1 ,FUTEX_BITSET_MATCH_ANY );return 0 ; } -if ((uval &FUTEX_TID_MASK ) !=task_pid_vnr (curr)) +if (owner !=task_pid_vnr (curr))return 0 ;/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 84/783 cpu/hotplug: Make target_store() a nop when target == state
In reply to Greg Kroah-HartmanFrom: Phil Auld <[email protected]>
[ Upstream commit 64ea6e44f85b9b75925ebe1ba0e6e8430cc4e06f ]
Writing the current state back in hotplug/target calls cpu_down() which will set cpu dying even when it isn't and then nothing will ever clear it. A stress test that reads values and writes them back for all cpu device files in sysfs will trigger the BUG() in select_fallback_rq once all cpus are marked as dying.
kernel/cpu.c::target_store()
...
if (st->state < target)
ret = cpu_up(dev->id, target);
else
ret = cpu_down(dev->id, target);cpu_down() -> cpu_set_state()
bool bringup = st->state < target; ... if (cpu_dying(cpu) != !bringup) set_cpu_dying(cpu, !bringup);
Fix this by letting state==target fall through in the target_store() conditional. Also make sure st->target == target in that case.
--- kernel/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/cpu.c +3 -1
@@ -2231,8 +2231,10 @@ static ssize_t write_cpuhp_target(struct device *dev,if (st->state < target) ret =cpu_up (dev->id, target); -else +else if (st->state > target) ret =cpu_down (dev->id, target); +else if (WARN_ON (st->target != target)) + st->target = target; out:unlock_device_hotplug ();return ret ? ret : count;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 85/783 clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 180d35a7c05d520314a590c99ad8643d0213f28b ]
If clk_get_rate() fails which is called after clk_prepare_enable(), clk_disable_unprepare() need be called in error path to disable the clock in dmtimer_systimer_init_clock().
--- drivers/clocksource/timer-ti-dm-systimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/timer-ti-dm-systimer.c +3 -1
@@ -345,8 +345,10 @@ static int __init dmtimer_systimer_init_clock(struct dmtimer_systimer *t,return error; r =clk_get_rate (clock); -if (!r) +if (!r) { +clk_disable_unprepare (clock);return -ENODEV ; + }if (is_ick) t->ick = clock;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 86/783 ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
In reply to Greg Kroah-HartmanFrom: Li Zetao <[email protected]>
[ Upstream commit 470188b09e92d83c5a997f25f0e8fb8cd2bc3469 ]
There is an use-after-free reported by KASAN:
BUG: KASAN: use-after-free in acpi_ut_remove_reference+0x3b/0x82 Read of size 1 at addr ffff888112afc460 by task modprobe/2111 CPU: 0 PID: 2111 Comm: modprobe Not tainted 6.1.0-rc7-dirty Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), Call Trace: <TASK> kasan_report+0xae/0xe0 acpi_ut_remove_reference+0x3b/0x82 acpi_ut_copy_iobject_to_iobject+0x3be/0x3d5 acpi_ds_store_object_to_local+0x15d/0x3a0 acpi_ex_store+0x78d/0x7fd acpi_ex_opcode_1A_1T_1R+0xbe4/0xf9b acpi_ps_parse_aml+0x217/0x8d5 ... </TASK>
The root cause of the problem is that the acpi_operand_object is freed when acpi_ut_walk_package_tree() fails in acpi_ut_copy_ipackage_to_ipackage(), lead to repeated release in acpi_ut_copy_iobject_to_iobject(). The problem was introduced by "8aa5e56eeb61" commit, this commit is to fix memory leak in acpi_ut_copy_iobject_to_iobject(), repeatedly adding remove operation, lead to "acpi_operand_object" used after free.
Fix it by removing acpi_ut_remove_reference() in acpi_ut_copy_ipackage_to_ipackage(). acpi_ut_copy_ipackage_to_ipackage() is called to copy an internal package object into another internal package object, when it fails, the memory of acpi_operand_object should be freed by the caller.
--- drivers/acpi/acpica/utcopy.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/acpi/acpica/utcopy.c +0 -7
@@ -916,13 +916,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, status =acpi_ut_walk_package_tree (source_obj, dest_obj, acpi_ut_copy_ielement_to_ielement, walk_state); -if (ACPI_FAILURE (status)) { - -/* On failure, delete the destination package object */ - -acpi_ut_remove_reference (dest_obj); - } -return_ACPI_STATUS (status); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 87/783 uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
In reply to Greg Kroah-HartmanFrom: Oleg Nesterov <[email protected]>
[ Upstream commit cefa72129e45313655d53a065b8055aaeb01a0c9 ]
Intel ICC -hotpatch inserts 2-byte "0x66 0x90" NOP at the start of each function to reserve extra space for hot-patching, and currently it is not possible to probe these functions because branch_setup_xol_ops() wrongly rejects NOP with REP prefix as it treats them like word-sized branch instructions.
--- arch/x86/kernel/uprobes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/uprobes.c +3 -1
@@ -722,8 +722,9 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)switch (opc1) {case 0xeb :/* jmp 8 */ case 0xe9 :/* jmp 32 */ -case 0x90 :/* prefix* + nop; same as jmp with .offs = 0 */ break ; +case 0x90 :/* prefix* + nop; same as jmp with .offs = 0 */ + goto setup;case 0xe8 :/* call relative */ branch_clear_offset (auprobe, insn);
@@ -753,6 +754,7 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)return -ENOTSUPP ; } +setup: auprobe->branch.opc1 = opc1; auprobe->branch.ilen = insn->length; auprobe->branch.offs = insn->immediate.value;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 88/783 x86/xen: Fix memory leak in xen_smp_intr_init{_pv}()
In reply to Greg Kroah-HartmanFrom: Xiu Jianfeng <[email protected]>
[ Upstream commit 69143f60868b3939ddc89289b29db593b647295e ]
These local variables @{resched|pmu|callfunc...}_name saves the new string allocated by kasprintf(), and when bind_{v}ipi_to_irqhandler() fails, it goes to the @fail tag, and calls xen_smp_intr_free{_pv}() to free resource, however the new string is not saved, which cause a memory leak issue. fix it.
--- arch/x86/xen/smp.c | 24 ++++++++++++------------ arch/x86/xen/smp_pv.c | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-)
arch/x86/xen/smp.c +12 -12
@@ -32,30 +32,30 @@ static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)void xen_smp_intr_free (unsigned int cpu) { +kfree (per_cpu (xen_resched_irq, cpu).name); +per_cpu (xen_resched_irq, cpu).name =NULL ;if (per_cpu (xen_resched_irq, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_resched_irq, cpu).irq,NULL );per_cpu (xen_resched_irq, cpu).irq =-1 ; -kfree (per_cpu (xen_resched_irq, cpu).name); -per_cpu (xen_resched_irq, cpu).name =NULL ; } +kfree (per_cpu (xen_callfunc_irq, cpu).name); +per_cpu (xen_callfunc_irq, cpu).name =NULL ;if (per_cpu (xen_callfunc_irq, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_callfunc_irq, cpu).irq,NULL );per_cpu (xen_callfunc_irq, cpu).irq =-1 ; -kfree (per_cpu (xen_callfunc_irq, cpu).name); -per_cpu (xen_callfunc_irq, cpu).name =NULL ; } +kfree (per_cpu (xen_debug_irq, cpu).name); +per_cpu (xen_debug_irq, cpu).name =NULL ;if (per_cpu (xen_debug_irq, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_debug_irq, cpu).irq,NULL );per_cpu (xen_debug_irq, cpu).irq =-1 ; -kfree (per_cpu (xen_debug_irq, cpu).name); -per_cpu (xen_debug_irq, cpu).name =NULL ; } +kfree (per_cpu (xen_callfuncsingle_irq, cpu).name); +per_cpu (xen_callfuncsingle_irq, cpu).name =NULL ;if (per_cpu (xen_callfuncsingle_irq, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_callfuncsingle_irq, cpu).irq,NULL );per_cpu (xen_callfuncsingle_irq, cpu).irq =-1 ; -kfree (per_cpu (xen_callfuncsingle_irq, cpu).name); -per_cpu (xen_callfuncsingle_irq, cpu).name =NULL ; } }
@@ -65,6 +65,7 @@ int xen_smp_intr_init(unsigned int cpu)char *resched_name, *callfunc_name, *debug_name; resched_name =kasprintf (GFP_KERNEL ,"resched%d" , cpu); +per_cpu (xen_resched_irq, cpu).name = resched_name; rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR, cpu, xen_reschedule_interrupt,
@@ -74,9 +75,9 @@ int xen_smp_intr_init(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_resched_irq, cpu).irq = rc; -per_cpu (xen_resched_irq, cpu).name = resched_name; callfunc_name =kasprintf (GFP_KERNEL ,"callfunc%d" , cpu); +per_cpu (xen_callfunc_irq, cpu).name = callfunc_name; rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR, cpu, xen_call_function_interrupt,
@@ -86,10 +87,10 @@ int xen_smp_intr_init(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_callfunc_irq, cpu).irq = rc; -per_cpu (xen_callfunc_irq, cpu).name = callfunc_name;if (!xen_fifo_events) { debug_name =kasprintf (GFP_KERNEL ,"debug%d" , cpu); +per_cpu (xen_debug_irq, cpu).name = debug_name; rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, xen_debug_interrupt, IRQF_PERCPU | IRQF_NOBALANCING,
@@ -97,10 +98,10 @@ int xen_smp_intr_init(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_debug_irq, cpu).irq = rc; -per_cpu (xen_debug_irq, cpu).name = debug_name; } callfunc_name =kasprintf (GFP_KERNEL ,"callfuncsingle%d" , cpu); +per_cpu (xen_callfuncsingle_irq, cpu).name = callfunc_name; rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR, cpu, xen_call_function_single_interrupt,
@@ -110,7 +111,6 @@ int xen_smp_intr_init(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_callfuncsingle_irq, cpu).irq = rc; -per_cpu (xen_callfuncsingle_irq, cpu).name = callfunc_name;return 0 ;
arch/x86/xen/smp_pv.c +6 -6
@@ -98,18 +98,18 @@ asmlinkage __visible void cpu_bringup_and_idle(void)void xen_smp_intr_free_pv (unsigned int cpu) { +kfree (per_cpu (xen_irq_work, cpu).name); +per_cpu (xen_irq_work, cpu).name =NULL ;if (per_cpu (xen_irq_work, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_irq_work, cpu).irq,NULL );per_cpu (xen_irq_work, cpu).irq =-1 ; -kfree (per_cpu (xen_irq_work, cpu).name); -per_cpu (xen_irq_work, cpu).name =NULL ; } +kfree (per_cpu (xen_pmu_irq, cpu).name); +per_cpu (xen_pmu_irq, cpu).name =NULL ;if (per_cpu (xen_pmu_irq, cpu).irq >=0 ) {unbind_from_irqhandler (per_cpu (xen_pmu_irq, cpu).irq,NULL );per_cpu (xen_pmu_irq, cpu).irq =-1 ; -kfree (per_cpu (xen_pmu_irq, cpu).name); -per_cpu (xen_pmu_irq, cpu).name =NULL ; } }
@@ -119,6 +119,7 @@ int xen_smp_intr_init_pv(unsigned int cpu)char *callfunc_name, *pmu_name; callfunc_name =kasprintf (GFP_KERNEL ,"irqwork%d" , cpu); +per_cpu (xen_irq_work, cpu).name = callfunc_name; rc = bind_ipi_to_irqhandler(XEN_IRQ_WORK_VECTOR, cpu, xen_irq_work_interrupt,
@@ -128,10 +129,10 @@ int xen_smp_intr_init_pv(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_irq_work, cpu).irq = rc; -per_cpu (xen_irq_work, cpu).name = callfunc_name;if (is_xen_pmu) { pmu_name =kasprintf (GFP_KERNEL ,"pmu%d" , cpu); +per_cpu (xen_pmu_irq, cpu).name = pmu_name; rc = bind_virq_to_irqhandler(VIRQ_XENPMU, cpu, xen_pmu_irq_handler, IRQF_PERCPU|IRQF_NOBALANCING,
@@ -139,7 +140,6 @@ int xen_smp_intr_init_pv(unsigned int cpu)if (rc <0 ) goto fail;per_cpu (xen_pmu_irq, cpu).irq = rc; -per_cpu (xen_pmu_irq, cpu).name = pmu_name; }return 0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 89/783 x86/xen: Fix memory leak in xen_init_lock_cpu()
In reply to Greg Kroah-HartmanFrom: Xiu Jianfeng <[email protected]>
[ Upstream commit ca84ce153d887b1dc8b118029976cc9faf2a9b40 ]
In xen_init_lock_cpu(), the @name has allocated new string by kasprintf(), if bind_ipi_to_irqhandler() fails, it should be freed, otherwise may lead to a memory leak issue, fix it.
--- arch/x86/xen/spinlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/xen/spinlock.c +3 -3
@@ -75,6 +75,7 @@ void xen_init_lock_cpu(int cpu) cpu, per_cpu(lock_kicker_irq, cpu)); name =kasprintf (GFP_KERNEL ,"spinlock%d" , cpu); +per_cpu (irq_name, cpu) = name; irq = bind_ipi_to_irqhandler(XEN_SPIN_UNLOCK_VECTOR, cpu, dummy_handler,
@@ -85,7 +86,6 @@ void xen_init_lock_cpu(int cpu)if (irq >=0 ) {disable_irq (irq);/* make sure it's never delivered */ per_cpu (lock_kicker_irq, cpu) = irq; -per_cpu (irq_name, cpu) = name; }printk ("cpu %d spinlock event irq %d\n" , cpu, irq);
@@ -98,6 +98,8 @@ void xen_uninit_lock_cpu(int cpu)if (!xen_pvspin)return ; +kfree (per_cpu (irq_name, cpu)); +per_cpu (irq_name, cpu) =NULL ;/* * When booting the kernel with 'mitigations=auto,nosmt', the secondary * CPUs are not activated, and lock_kicker_irq is not initialized.
@@ -108,8 +110,6 @@ void xen_uninit_lock_cpu(int cpu)unbind_from_irqhandler (irq,NULL );per_cpu (lock_kicker_irq, cpu) =-1 ; -kfree (per_cpu (irq_name, cpu)); -per_cpu (irq_name, cpu) =NULL ; }PV_CALLEE_SAVE_REGS_THUNK (xen_vcpu_stolen);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 90/783 xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
In reply to Greg Kroah-HartmanFrom: Harshit Mogalapalli <[email protected]>
[ Upstream commit 8b997b2bb2c53b76a6db6c195930e9ab8e4b0c79 ]
As 'kdata.num' is user-controlled data, if user tries to allocate memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it creates a stack trace and messes up dmesg with a warning.
Call trace:
-> privcmd_ioctl
--> privcmd_ioctl_mmap_resource
Add __GFP_NOWARN in order to avoid too large allocation warning. This is detected by static analysis using smatch.
--- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/privcmd.c +1 -1
@@ -760,7 +760,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file, goto out; } - pfns =kcalloc (kdata.num,sizeof (*pfns),GFP_KERNEL ); + pfns =kcalloc (kdata.num,sizeof (*pfns),GFP_KERNEL | __GFP_NOWARN);if (!pfns) { rc = -ENOMEM ; goto out;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 91/783 PM: runtime: Improve path in rpm_idle() when no callback
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit 5a2bd1b1c64e1ac5627db3767ac465f18606315c ]
When pm_runtime_no_callbacks() has been called for a struct device to set the dev->power.no_callbacks flag for it, it enables rpm_idle() to take a slightly quicker path by assuming that a ->runtime_idle() callback would have returned 0 to indicate success.
A device that does not have the dev->power.no_callbacks flag set for it, may still be missing a corresponding ->runtime_idle() callback, in which case the slower path in rpm_idle() is taken. Let's improve the behaviour for this case, by aligning code to the quicker path.
Stable-dep-of: bc80c2e438dc ("PM: runtime: Do not call __rpm_callback() from rpm_idle()")
--- drivers/base/power/runtime.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/base/power/runtime.c +5 -5
@@ -464,7 +464,10 @@ static int rpm_idle(struct device *dev, int rpmflags)/* Pending requests need to be canceled. */ dev->power.request =RPM_REQ_NONE ; -if (dev->power.no_callbacks) + callback =RPM_GET_CALLBACK (dev, runtime_idle); + +/* If no callback assume success. */ +if (!callback || dev->power.no_callbacks) goto out;/* Carry out an asynchronous or a synchronous idle notification. */
@@ -480,10 +483,7 @@ static int rpm_idle(struct device *dev, int rpmflags) dev->power.idle_notification = true; - callback =RPM_GET_CALLBACK (dev, runtime_idle); - -if (callback) - retval =__rpm_callback (callback, dev); + retval =__rpm_callback (callback, dev); dev->power.idle_notification = false;wake_up_all (&dev->power.wait_queue);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 92/783 PM: runtime: Do not call __rpm_callback() from rpm_idle()
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
[ Upstream commit bc80c2e438dcbfcf748452ec0f7ad5b79ff3ad88 ]
Calling __rpm_callback() from rpm_idle() after adding device links support to the former is a clear mistake.
Not only it causes rpm_idle() to carry out unnecessary actions, but it is also against the assumption regarding the stability of PM-runtime status across __rpm_callback() invocations, because rpm_suspend() and rpm_resume() may run in parallel with __rpm_callback() when it is called by rpm_idle() and the device's PM-runtime status can be updated by any of them.
--- drivers/base/power/runtime.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/base/power/runtime.c +11 -1
@@ -483,7 +483,17 @@ static int rpm_idle(struct device *dev, int rpmflags) dev->power.idle_notification = true; - retval =__rpm_callback (callback, dev); +if (dev->power.irq_safe) +spin_unlock (&dev->power.lock); +else +spin_unlock_irq (&dev->power.lock); + + retval =callback (dev); + +if (dev->power.irq_safe) +spin_lock (&dev->power.lock); +else +spin_lock_irq (&dev->power.lock); dev->power.idle_notification = false;wake_up_all (&dev->power.wait_queue);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 93/783 platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]()
In reply to Greg Kroah-HartmanFrom: Yu Liao <[email protected]>
[ Upstream commit 727cc0147f5066e359aca65cc6cc5e6d64cc15d8 ]
The ACPI buffer memory (out.pointer) returned by wmi_evaluate_method() is not freed after the call, so it leads to memory leak.
The method results in ACPI buffer is not used, so just pass NULL to wmi_evaluate_method() which fixes the memory leak.
--- drivers/platform/x86/mxm-wmi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/platform/x86/mxm-wmi.c +2 -6
@@ -35,13 +35,11 @@ int mxm_wmi_call_mxds(int adapter) .xarg = 1, };struct acpi_buffer input = { (acpi_size )sizeof (args), &args }; -struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER ,NULL };acpi_status status;printk ("calling mux switch %d\n" , adapter); - status =wmi_evaluate_method (MXM_WMMX_GUID ,0x0 , adapter, &input, - &output); + status =wmi_evaluate_method (MXM_WMMX_GUID ,0x0 , adapter, &input,NULL );if (ACPI_FAILURE (status))return status;
@@ -60,13 +58,11 @@ int mxm_wmi_call_mxmx(int adapter) .xarg = 1, };struct acpi_buffer input = { (acpi_size )sizeof (args), &args }; -struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER ,NULL };acpi_status status;printk ("calling mux switch %d\n" , adapter); - status =wmi_evaluate_method (MXM_WMMX_GUID ,0x0 , adapter, &input, - &output); + status =wmi_evaluate_method (MXM_WMMX_GUID ,0x0 , adapter, &input,NULL );if (ACPI_FAILURE (status))return status;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 94/783 platform/x86: intel_scu_ipc: fix possible name leak in __intel_scu_ipc_register()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 0b3d0cb7c0bed2fd6454f77ed75e7a662c6efd12 ]
In some error paths before device_register(), the names allocated by dev_set_name() are not freed. Move dev_set_name() front to device_register(), so the name can be freed while calling put_device().
--- drivers/platform/x86/intel_scu_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel_scu_ipc.c +1 -1
@@ -583,7 +583,6 @@ __intel_scu_ipc_register(struct device *parent, scu->dev.parent = parent; scu->dev.class = &intel_scu_ipc_class; scu->dev.release = intel_scu_ipc_release; -dev_set_name (&scu->dev,"intel_scu_ipc" );if (!request_mem_region (scu_data->mem.start,resource_size (&scu_data->mem),"intel_scu_ipc" )) {
@@ -612,6 +611,7 @@ __intel_scu_ipc_register(struct device *parent,* After this point intel_scu_ipc_release() takes care of * releasing the SCU IPC resources once refcount drops to zero. */ +dev_set_name (&scu->dev,"intel_scu_ipc" ); err =device_register (&scu->dev);if (err) {put_device (&scu->dev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 95/783 MIPS: BCM63xx: Add check for NULL for clk in clk_enable
In reply to Greg Kroah-HartmanFrom: Anastasia Belova <[email protected]>
[ Upstream commit ee9ef11bd2a59c2fefaa0959e5efcdf040d7c654 ]
Check clk for NULL before calling clk_enable_unlocked where clk is dereferenced. There is such check in other implementations of clk_enable.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- arch/mips/bcm63xx/clk.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/bcm63xx/clk.c +2 -0
@@ -361,6 +361,8 @@ static struct clk clk_periph = {*/ int clk_enable (struct clk *clk) { +if (!clk) +return 0 ;mutex_lock (&clocks_mutex);clk_enable_unlocked (clk);mutex_unlock (&clocks_mutex);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 96/783 MIPS: OCTEON: warn only once if deprecated link status is being used
In reply to Greg Kroah-HartmanFrom: Ladislav Michl <[email protected]>
[ Upstream commit 4c587a982603d7e7e751b4925809a1512099a690 ]
Avoid flooding kernel log with warnings.
--- arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/cavium-octeon/executive/cvmx-helper-board.c +1 -1
@@ -211,7 +211,7 @@ union cvmx_helper_link_info __cvmx_helper_board_link_get(int ipd_port) {union cvmx_helper_link_info result; -WARN (!octeon_is_simulation (), +WARN_ONCE (!octeon_is_simulation (),"Using deprecated link status - please update your DT" );/* Unless we fix it later, all links are defaulted to down */
arch/mips/cavium-octeon/executive/cvmx-helper.c +1 -1
@@ -1100,7 +1100,7 @@ union cvmx_helper_link_info cvmx_helper_link_get(int ipd_port)if (index ==0 ) result =__cvmx_helper_rgmii_link_get (ipd_port);else { -WARN (1 ,"Using deprecated link status - please update your DT" ); +WARN_ONCE (1 ,"Using deprecated link status - please update your DT" ); result.s.full_duplex =1 ; result.s.link_up =1 ; result.s.speed =1000 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 97/783 fs: sysv: Fix sysv_nblocks() returns wrong value
In reply to Greg Kroah-HartmanFrom: Chen Zhongjin <[email protected]>
[ Upstream commit e0c49bd2b4d3cd1751491eb2d940bce968ac65e9 ]
sysv_nblocks() returns 'blocks' rather than 'res', which only counting the number of triple-indirect blocks and causing sysv_getattr() gets a wrong result.
[AV: this is actually a sysv counterpart of minixfs fix - 0fcd426de9d0 "[PATCH] minix block usage counting fix" in historical tree; mea culpa, should've thought to check fs/sysv back then...]
--- fs/sysv/itree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/sysv/itree.c +1 -1
@@ -438,7 +438,7 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size) res += blocks; direct =1 ; } -return blocks; +return res; } int sysv_getattr(const struct path *path, struct kstat *stat,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 98/783 rapidio: fix possible UAF when kfifo_alloc() fails
In reply to Greg Kroah-HartmanFrom: Wang Weiyang <[email protected]>
[ Upstream commit 02d7d89f816951e0862147d751b1150d67aaebdd ]
If kfifo_alloc() fails in mport_cdev_open(), goto err_fifo and just free priv. But priv is still in the chdev->file_list, then list traversal may cause UAF. This fixes the following smatch warning:
drivers/rapidio/devices/rio_mport_cdev.c:1930 mport_cdev_open() warn: '&priv->list' not removed from list
--- drivers/rapidio/devices/rio_mport_cdev.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/rapidio/devices/rio_mport_cdev.c +3 -4
@@ -1903,10 +1903,6 @@ static int mport_cdev_open(struct inode *inode, struct file *filp) priv->md = chdev; -mutex_lock (&chdev->file_mutex); -list_add_tail (&priv->list, &chdev->file_list); -mutex_unlock (&chdev->file_mutex); -INIT_LIST_HEAD (&priv->db_filters);INIT_LIST_HEAD (&priv->pw_filters);spin_lock_init (&priv->fifo_lock);
@@ -1925,6 +1921,9 @@ static int mport_cdev_open(struct inode *inode, struct file *filp)spin_lock_init (&priv->req_lock);mutex_init (&priv->dma_lock);#endif +mutex_lock (&chdev->file_mutex); +list_add_tail (&priv->list, &chdev->file_list); +mutex_unlock (&chdev->file_mutex); filp->private_data = priv; goto out;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 99/783 eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit fd4e60bf0ef8eb9edcfa12dda39e8b6ee9060492 ]
Commit ee62c6b2dc93 ("eventfd: change int to __u64 in eventfd_signal()") forgot to change int to __u64 in the CONFIG_EVENTFD=n stub function.
--- include/linux/eventfd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/eventfd.h +1 -1
@@ -62,7 +62,7 @@ static inline struct eventfd_ctx *eventfreturn ERR_PTR (-ENOSYS ); } -static inline int eventfd_signal (struct eventfd_ctx *ctx,int n) +static inline int eventfd_signal (struct eventfd_ctx *ctx,__u64 n) {return -ENOSYS ; }
Greg Kroah-Hartman
maintainerPATCH 100/783 relay: fix type mismatch when allocating memory in relay_create_buf()
In reply to Greg Kroah-HartmanFrom: Gavrilov Ilia <[email protected]>
[ Upstream commit 4d8586e04602fe42f0a782d2005956f8b6302678 ]
The 'padding' field of the 'rchan_buf' structure is an array of 'size_t' elements, but the memory is allocated for an array of 'size_t *' elements.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- kernel/relay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/relay.c +2 -2
@@ -163,13 +163,13 @@ static struct rchan_buf *relay_create_buf(struct rchan *chan) {struct rchan_buf *buf; -if (chan->n_subbufs >KMALLOC_MAX_SIZE /sizeof (size_t *)) +if (chan->n_subbufs >KMALLOC_MAX_SIZE /sizeof (size_t ))return NULL ; buf =kzalloc (sizeof (struct rchan_buf ),GFP_KERNEL );if (!buf)return NULL ; - buf->padding =kmalloc_array (chan->n_subbufs,sizeof (size_t *), + buf->padding =kmalloc_array (chan->n_subbufs,sizeof (size_t ),GFP_KERNEL );if (!buf->padding) goto free_buf;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 101/783 hfs: Fix OOB Write in hfs_asc2mac
In reply to Greg Kroah-HartmanFrom: ZhangPeng <[email protected]>
[ Upstream commit c53ed55cb275344086e32a7080a6b19cb183650b ]
Syzbot reported a OOB Write bug:
loop0: detected capacity change from 0 to 64
==================================================================
BUG: KASAN: slab-out-of-bounds in hfs_asc2mac+0x467/0x9a0 fs/hfs/trans.c:133 Write of size 1 at addr ffff88801848314e by task syz-executor391/3632 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 hfs_asc2mac+0x467/0x9a0 fs/hfs/trans.c:133 hfs_cat_build_key+0x92/0x170 fs/hfs/catalog.c:28 hfs_lookup+0x1ab/0x2c0 fs/hfs/dir.c:31 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3710 do_filp_open+0x264/0x4f0 fs/namei.c:3740
If in->len is much larger than HFS_NAMELEN(31) which is the maximum length of an HFS filename, a OOB write could occur in hfs_asc2mac(). In that case, when the dst reaches the boundary, the srclen is still greater than 0, which causes a OOB write.
Fix this by adding a check on dstlen in while() before writing to dst address.
--- fs/hfs/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfs/trans.c +1 -1
@@ -109,7 +109,7 @@ void hfs_asc2mac(struct super_block *sb, struct hfs_name *out, const struct qstrif (nls_io) {wchar_t ch; -while (srclen >0 ) { +while (srclen >0 && dstlen >0 ) { size = nls_io->char2uni (src, srclen, &ch);if (size <0 ) { ch ='?' ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 102/783 rapidio: devices: fix missing put_device in mport_cdev_open
In reply to Greg Kroah-HartmanFrom: Cai Xinchen <[email protected]>
[ Upstream commit d5b6e6eba3af11cb2a2791fa36a2524990fcde1a ]
When kfifo_alloc fails, the refcount of chdev->dev is left incremental. We should use put_device(&chdev->dev) to decrease the ref count of chdev->dev to avoid refcount leak.
--- drivers/rapidio/devices/rio_mport_cdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/rapidio/devices/rio_mport_cdev.c +1 -0
@@ -1911,6 +1911,7 @@ static int mport_cdev_open(struct inode *inode, struct file *filp)sizeof (struct rio_event ) *MPORT_EVENT_DEPTH , GFP_KERNEL);if (ret <0 ) { +put_device (&chdev->dev);dev_err (&chdev->dev,DRV_NAME ": kfifo_alloc failed\n" ); ret = -ENOMEM ; goto err_fifo;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 103/783 wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
In reply to Greg Kroah-HartmanFrom: Fedor Pchelkin <[email protected]>
[ Upstream commit c2a94de38c74e86f49124ac14f093d6a5c377a90 ]
Syzkaller reports a long-known leak of urbs inath9k_hif_usb_dealloc_tx_urbs().
The cause of the leak is that usb_get_urb() is called but usb_free_urb() (or usb_put_urb()) is not called inside usb_kill_urb() as urb->dev or urb->ep fields have not been initialized and usb_kill_urb() returns immediately.
The patch removes trying to kill urbs located in hif_dev->tx.tx_buf because hif_dev->tx.tx_buf is not supposed to contain urbs which are in pending state (the pending urbs are stored in hif_dev->tx.tx_pending). The tx.tx_lock is acquired so there should not be any changes in the list.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/net/wireless/ath/ath9k/hif_usb.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/wireless/ath/ath9k/hif_usb.c +0 -4
@@ -781,14 +781,10 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_buf, list) { -usb_get_urb (tx_buf->urb); -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags); -usb_kill_urb (tx_buf->urb);list_del (&tx_buf->list);usb_free_urb (tx_buf->urb);kfree (tx_buf->buf);kfree (tx_buf); -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); }spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 104/783 wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
In reply to Greg Kroah-HartmanFrom: Fedor Pchelkin <[email protected]>
[ Upstream commit dd95f2239fc846795fc926787c3ae0ca701c9840 ]
It is possible that skb is freed in ath9k_htc_rx_msg(), then usb_submit_urb() fails and we try to free skb again. It causes use-after-free bug. Moreover, if alloc_skb() fails, urb->context becomes NULL but rx_buf is not freed and there can be a memory leak.
The patch removes unnecessary nskb and makes skb processing more clear: it is supposed that ath9k_htc_rx_msg() either frees old skb or passes its managing to another callback function.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/net/wireless/ath/ath9k/hif_usb.c | 28 +++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath9k/hif_usb.c +15 -13
@@ -709,14 +709,13 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)struct rx_buf *rx_buf = (struct rx_buf *)urb->context;struct hif_device_usb *hif_dev = rx_buf->hif_dev;struct sk_buff *skb = rx_buf->skb; -struct sk_buff *nskb;int ret;if (!skb)return ;if (!hif_dev) - goto free; + goto free_skb;switch (urb->status) {case 0 :
@@ -725,7 +724,7 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)case -ECONNRESET :case -ENODEV :case -ESHUTDOWN : - goto free; + goto free_skb;default :skb_reset_tail_pointer (skb);skb_trim (skb,0 );
@@ -736,25 +735,27 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)if (likely (urb->actual_length !=0 )) {skb_put (skb, urb->actual_length); -/* Process the command first */ +/* +* Process the command first. +* skb is either freed here or passed to be +* managed to another callback function. +*/ ath9k_htc_rx_msg (hif_dev->htc_handle, skb, skb->len,USB_REG_IN_PIPE ); - - nskb =alloc_skb (MAX_REG_IN_BUF_SIZE ,GFP_ATOMIC ); -if (!nskb) { + skb =alloc_skb (MAX_REG_IN_BUF_SIZE ,GFP_ATOMIC ); +if (!skb) {dev_err (&hif_dev->udev->dev,"ath9k_htc: REG_IN memory allocation failure\n" ); - urb->context =NULL ; -return ; + goto free_rx_buf; } - rx_buf->skb = nskb; + rx_buf->skb = skb;usb_fill_int_urb (urb, hif_dev->udev,usb_rcvintpipe (hif_dev->udev,USB_REG_IN_PIPE ), - nskb->data,MAX_REG_IN_BUF_SIZE , + skb->data,MAX_REG_IN_BUF_SIZE , ath9k_hif_usb_reg_in_cb, rx_buf,1 ); }
@@ -763,12 +764,13 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) ret =usb_submit_urb (urb,GFP_ATOMIC );if (ret) {usb_unanchor_urb (urb); - goto free; + goto free_skb; }return ; -free: +free_skb:kfree_skb (skb); +free_rx_buf:kfree (rx_buf); urb->context =NULL ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 105/783 wifi: rtl8xxxu: Fix reading the vendor of combo chips
In reply to Greg Kroah-HartmanFrom: Bitterblue Smith <[email protected]>
[ Upstream commit 6f103aeb5e985ac08f3a4a049a2c17294f40cff9 ]
The wifi + bluetooth combo chips (RTL8723AU and RTL8723BU) read the chip vendor from the wrong register because the val32 variable gets overwritten. Add one more variable to avoid this.
This had no real effect on RTL8723BU. It may have had an effect on RTL8723AU.
--- .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +8 -8
@@ -1607,18 +1607,18 @@ static void rtl8xxxu_print_chipinfo(struct rtl8xxxu_priv *priv)static int rtl8xxxu_identify_chip (struct rtl8xxxu_priv *priv) {struct device *dev = &priv->udev->dev; -u32 val32, bonding; +u32 val32, bonding, sys_cfg;u16 val16; - val32 =rtl8xxxu_read32 (priv,REG_SYS_CFG ); - priv->chip_cut = (val32 &SYS_CFG_CHIP_VERSION_MASK ) >> + sys_cfg =rtl8xxxu_read32 (priv,REG_SYS_CFG ); + priv->chip_cut = (sys_cfg &SYS_CFG_CHIP_VERSION_MASK ) >>SYS_CFG_CHIP_VERSION_SHIFT ; -if (val32 &SYS_CFG_TRP_VAUX_EN ) { +if (sys_cfg &SYS_CFG_TRP_VAUX_EN ) {dev_info (dev,"Unsupported test chip\n" );return -ENOTSUPP ; } -if (val32 &SYS_CFG_BT_FUNC ) { +if (sys_cfg &SYS_CFG_BT_FUNC ) {if (priv->chip_cut >=3 ) {sprintf (priv->chip_name,"8723BU" ); priv->rtl_chip =RTL8723B ;
@@ -1640,7 +1640,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)if (val32 &MULTI_GPS_FUNC_EN ) priv->has_gps =1 ; priv->is_multi_func =1 ; - }else if (val32 &SYS_CFG_TYPE_ID ) { + }else if (sys_cfg &SYS_CFG_TYPE_ID ) { bonding =rtl8xxxu_read32 (priv,REG_HPON_FSM ); bonding &=HPON_FSM_BONDING_MASK ; if (priv->fops->tx_desc_size ==
@@ -1688,7 +1688,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)case RTL8188E :case RTL8192E :case RTL8723B : -switch (val32 &SYS_CFG_VENDOR_EXT_MASK ) { +switch (sys_cfg &SYS_CFG_VENDOR_EXT_MASK ) {case SYS_CFG_VENDOR_ID_TSMC :sprintf (priv->chip_vendor,"TSMC" );break ;
@@ -1705,7 +1705,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv) }break ;default : -if (val32 &SYS_CFG_VENDOR_ID ) { +if (sys_cfg &SYS_CFG_VENDOR_ID ) {sprintf (priv->chip_vendor,"UMC" ); priv->vendor_umc =1 ; }else {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 106/783 drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge
In reply to Greg Kroah-HartmanFrom: Abhinav Kumar <[email protected]>
[ Upstream commit 9a0cdcd6649b76f0b7ceec0e55b0a718321e34d3 ]
adv7533 bridge tries to dynamically switch lanes based on the mode by detaching and attaching the mipi dsi device.
This approach is incorrect because this method of dynamic switch of detaching and attaching the mipi dsi device also results in removing and adding the component which is not necessary.
This approach is also prone to deadlocks. So for example, on the db410c whenever this path is executed with lockdep enabled, this results in a deadlock due to below ordering of locks.
-> #1 (crtc_ww_class_acquire){+.+.}-{0:0}:
lock_acquire+0x6c/0x90
drm_modeset_acquire_init+0xf4/0x150
drmm_mode_config_init+0x220/0x770
msm_drm_bind+0x13c/0x654
try_to_bring_up_aggregate_device+0x164/0x1d0
__component_add+0xa8/0x174
component_add+0x18/0x2c
dsi_dev_attach+0x24/0x30
dsi_host_attach+0x98/0x14c
devm_mipi_dsi_attach+0x38/0xb0
adv7533_attach_dsi+0x8c/0x110
adv7511_probe+0x5a0/0x930
i2c_device_probe+0x30c/0x350
really_probe.part.0+0x9c/0x2b0
__driver_probe_device+0x98/0x144
driver_probe_device+0xac/0x14c
__device_attach_driver+0xbc/0x124
bus_for_each_drv+0x78/0xd0
__device_attach+0xa8/0x1c0
device_initial_probe+0x18/0x24
bus_probe_device+0xa0/0xac
deferred_probe_work_func+0x90/0xd0
process_one_work+0x28c/0x6b0
worker_thread+0x240/0x444
kthread+0x110/0x114
ret_from_fork+0x10/0x20-> #0 (component_mutex){+.+.}-{3:3}:
__lock_acquire+0x1280/0x20ac
lock_acquire.part.0+0xe0/0x230
lock_acquire+0x6c/0x90
__mutex_lock+0x84/0x400
mutex_lock_nested+0x3c/0x70
component_del+0x34/0x170
dsi_dev_detach+0x24/0x30
dsi_host_detach+0x20/0x64
mipi_dsi_detach+0x2c/0x40
adv7533_mode_set+0x64/0x90
adv7511_bridge_mode_set+0x210/0x214
drm_bridge_chain_mode_set+0x5c/0x84
crtc_set_mode+0x18c/0x1dc
drm_atomic_helper_commit_modeset_disables+0x40/0x50
msm_atomic_commit_tail+0x1d0/0x6e0
commit_tail+0xa4/0x180
drm_atomic_helper_commit+0x178/0x3b0
drm_atomic_commit+0xa4/0xe0
drm_client_modeset_commit_atomic+0x228/0x284
drm_client_modeset_commit_locked+0x64/0x1d0
drm_client_modeset_commit+0x34/0x60
drm_fb_helper_lastclose+0x74/0xcc
drm_lastclose+0x3c/0x80
drm_release+0xfc/0x114
__fput+0x70/0x224
____fput+0x14/0x20
task_work_run+0x88/0x1a0
do_exit+0x350/0xa50
do_group_exit+0x38/0xa4
__wake_up_parent+0x0/0x34
invoke_syscall+0x48/0x114
el0_svc_common.constprop.0+0x60/0x11c
do_el0_svc+0x30/0xc0
el0_svc+0x58/0x100
el0t_64_sync_handler+0x1b0/0x1bc
el0t_64_sync+0x18c/0x190Due to above reasons, remove the dynamic lane switching code from adv7533 bridge chip and filter out the modes which would need different number of lanes as compared to the initialization time using the mode_valid callback.
This can be potentially re-introduced by using the pre_enable() callback but this needs to be evaluated first whether such an approach will work so this will be done with a separate change.
changes since RFC:
- Fix commit text and add TODO comment
changes in v2:
- Fix checkpatch formatting errors
--- drivers/gpu/drm/bridge/adv7511/adv7511.h | 3 ++- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 18 ++++++++++---- drivers/gpu/drm/bridge/adv7511/adv7533.c | 25 ++++++++++---------- 3 files changed, 29 insertions(+), 17 deletions(-)
drivers/gpu/drm/bridge/adv7511/adv7511.h +2 -1
@@ -394,7 +394,8 @@ static inline int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)void adv7533_dsi_power_on (struct adv7511 *adv);void adv7533_dsi_power_off (struct adv7511 *adv); -void adv7533_mode_set (struct adv7511 *adv,const struct drm_display_mode *mode); +enum drm_mode_status adv7533_mode_valid (struct adv7511 *adv, +const struct drm_display_mode *mode);int adv7533_patch_registers (struct adv7511 *adv);int adv7533_patch_cec_registers (struct adv7511 *adv);int adv7533_attach_dsi (struct adv7511 *adv);
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +14 -4
@@ -697,7 +697,7 @@ adv7511_detect(struct adv7511 *adv7511, struct drm_connector *connector) }static enum drm_mode_status adv7511_mode_valid (struct adv7511 *adv7511, -struct drm_display_mode *mode) +const struct drm_display_mode *mode) {if (mode->clock >165000 )return MODE_CLOCK_HIGH ;
@@ -791,9 +791,6 @@ static void adv7511_mode_set(struct adv7511 *adv7511,regmap_update_bits (adv7511->regmap,0x17 ,0x60 , (vsync_polarity <<6 ) | (hsync_polarity <<5 )); -if (adv7511->type ==ADV7533 || adv7511->type ==ADV7535 ) -adv7533_mode_set (adv7511, adj_mode); -drm_mode_copy (&adv7511->curr_mode, adj_mode);/*
@@ -913,6 +910,18 @@ static void adv7511_bridge_mode_set(struct drm_bridge *bridge,adv7511_mode_set (adv, mode, adj_mode); } +static enum drm_mode_status adv7511_bridge_mode_valid (struct drm_bridge *bridge, +const struct drm_display_info *info, +const struct drm_display_mode *mode) +{ +struct adv7511 *adv =bridge_to_adv7511 (bridge); + +if (adv->type ==ADV7533 || adv->type ==ADV7535 ) +return adv7533_mode_valid (adv, mode); +else +return adv7511_mode_valid (adv, mode); +} +static int adv7511_bridge_attach (struct drm_bridge *bridge,enum drm_bridge_attach_flags flags) {
@@ -963,6 +972,7 @@ static const struct drm_bridge_funcs adv7511_bridge_funcs = { .enable = adv7511_bridge_enable, .disable = adv7511_bridge_disable, .mode_set = adv7511_bridge_mode_set, + .mode_valid = adv7511_bridge_mode_valid, .attach = adv7511_bridge_attach, .detect = adv7511_bridge_detect, .get_edid = adv7511_bridge_get_edid,
drivers/gpu/drm/bridge/adv7511/adv7533.c +13 -12
@@ -100,26 +100,27 @@ void adv7533_dsi_power_off(struct adv7511 *adv)regmap_write (adv->regmap_cec,0x27 ,0x0b ); } -void adv7533_mode_set (struct adv7511 *adv,const struct drm_display_mode *mode) +enum drm_mode_status adv7533_mode_valid (struct adv7511 *adv, +const struct drm_display_mode *mode) { +int lanes;struct mipi_dsi_device *dsi = adv->dsi; -int lanes, ret; - -if (adv->num_dsi_lanes !=4 ) -return ;if (mode->clock >80000 ) lanes =4 ;else lanes =3 ; -if (lanes != dsi->lanes) { -mipi_dsi_detach (dsi); - dsi->lanes = lanes; - ret =mipi_dsi_attach (dsi); -if (ret) -dev_err (&dsi->dev,"failed to change host lanes\n" ); - } +/* +* TODO: add support for dynamic switching of lanes +* by using the bridge pre_enable() op . Till then filter +* out the modes which shall need different number of lanes +* than what was configured in the device tree. +*/ +if (lanes != dsi->lanes) +return MODE_BAD ; + +return MODE_OK ; }int adv7533_patch_registers (struct adv7511 *adv)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 107/783 libbpf: Fix use-after-free in btf_dump_name_dups
In reply to Greg Kroah-HartmanFrom: Xu Kuohai <[email protected]>
[ Upstream commit 93c660ca40b5d2f7c1b1626e955a8e9fa30e0749 ]
ASAN reports an use-after-free in btf_dump_name_dups:
ERROR: AddressSanitizer: heap-use-after-free on address 0xffff927006db at pc 0xaaaab5dfb618 bp 0xffffdd89b890 sp 0xffffdd89b928 READ of size 2 at 0xffff927006db thread T0
#0 0xaaaab5dfb614 in __interceptor_strcmp.part.0 (test_progs+0x21b614)
#1 0xaaaab635f144 in str_equal_fn tools/lib/bpf/btf_dump.c:127
#2 0xaaaab635e3e0 in hashmap_find_entry tools/lib/bpf/hashmap.c:143
#3 0xaaaab635e72c in hashmap__find tools/lib/bpf/hashmap.c:212
#4 0xaaaab6362258 in btf_dump_name_dups tools/lib/bpf/btf_dump.c:1525
#5 0xaaaab636240c in btf_dump_resolve_name tools/lib/bpf/btf_dump.c:1552
#6 0xaaaab6362598 in btf_dump_type_name tools/lib/bpf/btf_dump.c:1567
#7 0xaaaab6360b48 in btf_dump_emit_struct_def tools/lib/bpf/btf_dump.c:912
#8 0xaaaab6360630 in btf_dump_emit_type tools/lib/bpf/btf_dump.c:798
#9 0xaaaab635f720 in btf_dump__dump_type tools/lib/bpf/btf_dump.c:282
#10 0xaaaab608523c in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:236
#11 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875
#12 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062
#13 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697
#14 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308
#15 0xaaaab5d65990 (test_progs+0x185990)0xffff927006db is located 11 bytes inside of 16-byte region [0xffff927006d0,0xffff927006e0) freed by thread T0 here:
#0 0xaaaab5e2c7c4 in realloc (test_progs+0x24c7c4)
#1 0xaaaab634f4a0 in libbpf_reallocarray tools/lib/bpf/libbpf_internal.h:191
#2 0xaaaab634f840 in libbpf_add_mem tools/lib/bpf/btf.c:163
#3 0xaaaab636643c in strset_add_str_mem tools/lib/bpf/strset.c:106
#4 0xaaaab6366560 in strset__add_str tools/lib/bpf/strset.c:157
#5 0xaaaab6352d70 in btf__add_str tools/lib/bpf/btf.c:1519
#6 0xaaaab6353e10 in btf__add_field tools/lib/bpf/btf.c:2032
#7 0xaaaab6084fcc in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:232
#8 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875
#9 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062
#10 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697
#11 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308
#12 0xaaaab5d65990 (test_progs+0x185990)previously allocated by thread T0 here:
#0 0xaaaab5e2c7c4 in realloc (test_progs+0x24c7c4)
#1 0xaaaab634f4a0 in libbpf_reallocarray tools/lib/bpf/libbpf_internal.h:191
#2 0xaaaab634f840 in libbpf_add_mem tools/lib/bpf/btf.c:163
#3 0xaaaab636643c in strset_add_str_mem tools/lib/bpf/strset.c:106
#4 0xaaaab6366560 in strset__add_str tools/lib/bpf/strset.c:157
#5 0xaaaab6352d70 in btf__add_str tools/lib/bpf/btf.c:1519
#6 0xaaaab6353ff0 in btf_add_enum_common tools/lib/bpf/btf.c:2070
#7 0xaaaab6354080 in btf__add_enum tools/lib/bpf/btf.c:2102
#8 0xaaaab6082f50 in test_btf_dump_incremental tools/testing/selftests/bpf/prog_tests/btf_dump.c:162
#9 0xaaaab6097530 in test_btf_dump tools/testing/selftests/bpf/prog_tests/btf_dump.c:875
#10 0xaaaab6314ed0 in run_one_test tools/testing/selftests/bpf/test_progs.c:1062
#11 0xaaaab631a0a8 in main tools/testing/selftests/bpf/test_progs.c:1697
#12 0xffff9676d214 in __libc_start_main ../csu/libc-start.c:308
#13 0xaaaab5d65990 (test_progs+0x185990)The reason is that the key stored in hash table name_map is a string address, and the string memory is allocated by realloc() function, when the memory is resized by realloc() later, the old memory may be freed, so the address stored in name_map references to a freed memory, causing use-after-free.
Fix it by storing duplicated string address in name_map.
--- tools/lib/bpf/btf_dump.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-)
tools/lib/bpf/btf_dump.c +26 -3
@@ -188,6 +188,17 @@ static int btf_dump_resize(struct btf_dump *d)return 0 ; } +static void btf_dump_free_names (struct hashmap *map) +{ +size_t bkt; +struct hashmap_entry *cur; + +hashmap__for_each_entry (map, cur, bkt) +free ((void *)cur->key); + +hashmap__free (map); +} +void btf_dump__free (struct btf_dump *d) {int i;
@@ -206,8 +217,8 @@ void btf_dump__free(struct btf_dump *d)free (d->cached_names);free (d->emit_queue);free (d->decl_stack); -hashmap__free (d->type_names); -hashmap__free (d->ident_names); +btf_dump_free_names (d->type_names); +btf_dump_free_names (d->ident_names);free (d); }
@@ -1392,11 +1403,23 @@ static void btf_dump_emit_type_chain(struct btf_dump *d,static size_t btf_dump_name_dups (struct btf_dump *d,struct hashmap *name_map,const char *orig_name) { +char *old_name, *new_name;size_t dup_cnt =0 ; +int err; + + new_name =strdup (orig_name); +if (!new_name) +return 1 ;hashmap__find (name_map, orig_name, (void **)&dup_cnt); dup_cnt++; -hashmap__set (name_map, orig_name, (void *)dup_cnt,NULL ,NULL ); + + err =hashmap__set (name_map, new_name, (void *)dup_cnt, + (const void **)&old_name,NULL ); +if (err) +free (new_name); + +free (old_name);return dup_cnt; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 108/783 libbpf: Fix null-pointer dereference in find_prog_by_sec_insn()
In reply to Greg Kroah-HartmanFrom: Shung-Hsi Yu <[email protected]>
[ Upstream commit d0d382f95a9270dcf803539d6781d6bd67e3f5b2 ]
When there are no program sections, obj->programs is left unallocated, and find_prog_by_sec_insn()'s search lands on &obj->programs[0] == NULL, and will cause null-pointer dereference in the following access to prog->sec_idx.
Guard the search with obj->nr_programs similar to what's being done in __bpf_program__iter() to prevent null-pointer access from happening.
--- tools/lib/bpf/libbpf.c | 3 +++ 1 file changed, 3 insertions(+)
tools/lib/bpf/libbpf.c +3 -0
@@ -3479,6 +3479,9 @@ static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,int l =0 , r = obj->nr_programs -1 , m;struct bpf_program *prog; +if (!obj->nr_programs) +return NULL ; +while (l < r) { m = l + (r - l +1 ) /2 ; prog = &obj->programs[m];
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 109/783 pata_ipx4xx_cf: Fix unsigned comparison with less than zero
In reply to Greg Kroah-HartmanFrom: Junlin Yang <[email protected]>
[ Upstream commit c38ae56ee034623c59e39c0130ca0dec086c1a39 ]
The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format.
./drivers/ata/pata_ixp4xx_cf.c:168:5-8:
WARNING: Unsigned expression compared with zero: irq > 0
--- drivers/ata/pata_ixp4xx_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/pata_ixp4xx_cf.c +1 -1
@@ -135,12 +135,12 @@ static void ixp4xx_setup_port(struct ata_port *ap,static int ixp4xx_pata_probe (struct platform_device *pdev) { -unsigned int irq;struct resource *cs0, *cs1;struct ata_host *host;struct ata_port *ap;struct ixp4xx_pata_data *data =dev_get_platdata (&pdev->dev);int ret; +int irq; cs0 =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); cs1 =platform_get_resource (pdev,IORESOURCE_MEM ,1 );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 110/783 media: coda: jpeg: Add check for kmalloc
In reply to Greg Kroah-HartmanFrom: Jiasheng Jiang <[email protected]>
[ Upstream commit f30ce3d3760b22ee33c8d9c2e223764ad30bdc5f ]
As kmalloc can return NULL pointer, it should be better to check the return value and return error, same as coda_jpeg_decode_header.
--- drivers/media/platform/coda/coda-jpeg.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/media/platform/coda/coda-jpeg.c +8 -2
@@ -1052,10 +1052,16 @@ static int coda9_jpeg_start_encoding(struct coda_ctx *ctx)v4l2_err (&dev->v4l2_dev,"error loading Huffman tables\n" );return ret; } -if (!ctx->params.jpeg_qmat_tab[0 ]) +if (!ctx->params.jpeg_qmat_tab[0 ]) { ctx->params.jpeg_qmat_tab[0 ] =kmalloc (64 ,GFP_KERNEL ); -if (!ctx->params.jpeg_qmat_tab[1 ]) +if (!ctx->params.jpeg_qmat_tab[0 ]) +return -ENOMEM ; + } +if (!ctx->params.jpeg_qmat_tab[1 ]) { ctx->params.jpeg_qmat_tab[1 ] =kmalloc (64 ,GFP_KERNEL ); +if (!ctx->params.jpeg_qmat_tab[1 ]) +return -ENOMEM ; + }coda_set_jpeg_compression_quality (ctx, ctx->params.jpeg_quality);return 0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 111/783 media: i2c: ad5820: Fix error path
In reply to Greg Kroah-HartmanFrom: Ricardo Ribalda <[email protected]>
[ Upstream commit 9fce241660f37d9e95e93c0ae6fba8cfefa5797b ]
Error path seems to be swaped. Fix the order and provide some meaningful names.
--- drivers/media/i2c/ad5820.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/media/i2c/ad5820.c +5 -5
@@ -329,18 +329,18 @@ static int ad5820_probe(struct i2c_client *client, ret =media_entity_pads_init (&coil->subdev.entity,0 ,NULL );if (ret <0 ) - goto cleanup2; + goto clean_mutex; ret =v4l2_async_register_subdev (&coil->subdev);if (ret <0 ) - goto cleanup; + goto clean_entity;return ret; -cleanup2: -mutex_destroy (&coil->power_lock); -cleanup: +clean_entity:media_entity_cleanup (&coil->subdev.entity); +clean_mutex: +mutex_destroy (&coil->power_lock);return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 112/783 venus: pm_helpers: Fix error check in vcodec_domains_get()
In reply to Greg Kroah-HartmanFrom: Tang Bin <[email protected]>
[ Upstream commit 0f6e8d8c94a82e85e1b9b62a7671990740dc6f70 ]
In the function vcodec_domains_get(), dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it.
--- drivers/media/platform/qcom/venus/pm_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/venus/pm_helpers.c +2 -2
@@ -764,8 +764,8 @@ static int vcodec_domains_get(struct venus_core *core)for (i =0 ; i < res->vcodec_pmdomains_num; i++) { pd =dev_pm_domain_attach_by_name (dev, res->vcodec_pmdomains[i]); -if (IS_ERR (pd)) -return PTR_ERR (pd); +if (IS_ERR_OR_NULL (pd)) +return PTR_ERR (pd) ? : -ENODATA ; core->pmdomains[i] = pd; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 113/783 media: exynos4-is: Use v4l2_async_notifier_add_fwnode_remote_subdev
In reply to Greg Kroah-HartmanFrom: Ezequiel Garcia <[email protected]>
[ Upstream commit 3a2822bfe45c50abd9f76a8547a77a1f6a0e8c8d ]
The use of v4l2_async_notifier_add_subdev will be discouraged. Drivers are instead encouraged to use a helper such as v4l2_async_notifier_add_fwnode_remote_subdev.
This fixes a misuse of the API, as v4l2_async_notifier_add_subdev should get a kmalloc'ed struct v4l2_async_subdev, removing some boilerplate code while at it.
Use the appropriate helper v4l2_async_notifier_add_fwnode_remote_subdev, which handles the needed setup, instead of open-coding it.
Stable-dep-of: f98a5c2e1c43 ("media: exynos4-is: don't rely on the v4l2_async_subdev internals")
--- drivers/media/platform/exynos4-is/media-dev.c | 24 ++++++++++--------- drivers/media/platform/exynos4-is/media-dev.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-)
drivers/media/platform/exynos4-is/media-dev.c +13 -11
@@ -401,6 +401,7 @@ static int fimc_md_parse_one_endpoint(struct fimc_md *fmd,int index = fmd->num_sensors;struct fimc_source_info *pd = &fmd->sensor[index].pdata;struct device_node *rem, *np; +struct v4l2_async_subdev *asd;struct v4l2_fwnode_endpoint endpoint = { .bus_type =0 };int ret;
@@ -418,10 +419,10 @@ static int fimc_md_parse_one_endpoint(struct fimc_md *fmd, pd->mux_id = (endpoint.base.port -1 ) &0x1 ; rem =of_graph_get_remote_port_parent (ep); -of_node_put (ep);if (rem ==NULL ) {v4l2_info (&fmd->v4l2_dev,"Remote device at %pOF not found\n" , ep); +of_node_put (ep);return 0 ; }
@@ -450,6 +451,7 @@ static int fimc_md_parse_one_endpoint(struct fimc_md *fmd,* checking parent's node name. */ np =of_get_parent (rem); +of_node_put (rem);if (of_node_name_eq (np,"i2c-isp" )) pd->fimc_bus_type =FIMC_BUS_TYPE_ISP_WRITEBACK ;
@@ -458,20 +460,19 @@ static int fimc_md_parse_one_endpoint(struct fimc_md *fmd,of_node_put (np);if (WARN_ON (index >=ARRAY_SIZE (fmd->sensor))) { -of_node_put (rem); +of_node_put (ep);return -EINVAL ; } - fmd->sensor[index].asd.match_type =V4L2_ASYNC_MATCH_FWNODE ; - fmd->sensor[index].asd.match.fwnode =of_fwnode_handle (rem); + asd =v4l2_async_notifier_add_fwnode_remote_subdev ( + &fmd->subdev_notifier,of_fwnode_handle (ep),sizeof (*asd)); - ret =v4l2_async_notifier_add_subdev (&fmd->subdev_notifier, - &fmd->sensor[index].asd); -if (ret) { -of_node_put (rem); -return ret; - } +of_node_put (ep); + +if (IS_ERR (asd)) +return PTR_ERR (asd); + fmd->sensor[index].asd = asd; fmd->num_sensors++;return 0 ;
@@ -1377,7 +1378,8 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,/* Find platform data for this sensor subdev */ for (i =0 ; i <ARRAY_SIZE (fmd->sensor); i++) -if (fmd->sensor[i].asd.match.fwnode == +if (fmd->sensor[i].asd && + fmd->sensor[i].asd->match.fwnode ==of_fwnode_handle (subdev->dev->of_node)) si = &fmd->sensor[i];
drivers/media/platform/exynos4-is/media-dev.h +1 -1
@@ -83,7 +83,7 @@ struct fimc_camclk_info {*/ struct fimc_sensor_info {struct fimc_source_info pdata; -struct v4l2_async_subdev asd; +struct v4l2_async_subdev *asd;struct v4l2_subdev *subdev;struct fimc_dev *host; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 114/783 media: exynos4-is: dont rely on the v4l2_async_subdev internals
In reply to Greg Kroah-HartmanFrom: Marek Szyprowski <[email protected]>
[ Upstream commit f98a5c2e1c4396488c27274ba82afc11725a4bcc ]
Commit 1f391df44607 ("media: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()") changed the data that is stored in the v4l2_async_subdev internals from the fwnode pointer to the parent device to the fwnode pointer to the matched endpoint. This broke the sensor matching code, which relied on the particular fwnode data in the v4l2_async_subdev internals. Fix this by simply matching the v4l2_async_subdev pointer, which is already available there.
--- drivers/media/platform/exynos4-is/media-dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/exynos4-is/media-dev.c +1 -3
@@ -1378,9 +1378,7 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,/* Find platform data for this sensor subdev */ for (i =0 ; i <ARRAY_SIZE (fmd->sensor); i++) -if (fmd->sensor[i].asd && - fmd->sensor[i].asd->match.fwnode == -of_fwnode_handle (subdev->dev->of_node)) +if (fmd->sensor[i].asd == asd) si = &fmd->sensor[i];if (si ==NULL )
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 115/783 can: kvaser_usb: do not increase tx statistics when sending error message frames
In reply to Greg Kroah-HartmanFrom: Vincent Mailhol <[email protected]>
[ Upstream commit 0b0ce2c67795672115ac6ca28351a78799cd114b ]
The CAN error message frames (i.e. error skb) are an interface specific to socket CAN. The payload of the CAN error message frames does not correspond to any actual data sent on the wire. Only an error flag and a delimiter are transmitted when an error occurs (c.f. ISO 11898-1 section 10.4.4.2 "Error flag").
For this reason, it makes no sense to increment the tx_packets and tx_bytes fields of struct net_device_stats when sending an error message frame because no actual payload will be transmitted on the wire.
N.B. Sending error message frames is a very specific feature which, at the moment, is only supported by the Kvaser Hydra hardware. Please refer to [1] for more details on the topic.
Stable-dep-of: 35364f5b41a4 ("can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device")
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c +6 -1
@@ -293,6 +293,7 @@ struct kvaser_cmd {#define KVASER_USB_HYDRA_CF_FLAG_OVERRUN BIT(1)#define KVASER_USB_HYDRA_CF_FLAG_REMOTE_FRAME BIT(4)#define KVASER_USB_HYDRA_CF_FLAG_EXTENDED_ID BIT(5) +#define KVASER_USB_HYDRA_CF_FLAG_TX_ACK BIT(6)/* CAN frame flags. Used in ext_rx_can and ext_tx_can */ #define KVASER_USB_HYDRA_CF_FLAG_OSM_NACK BIT(12)#define KVASER_USB_HYDRA_CF_FLAG_ABL BIT(13)
@@ -1099,6 +1100,7 @@ static void kvaser_usb_hydra_tx_acknowledge(const struct kvaser_usb *dev,struct kvaser_usb_net_priv *priv;unsigned long irq_flags;bool one_shot_fail = false; +bool is_err_frame = false;u16 transid =kvaser_usb_hydra_get_cmd_transid (cmd); priv =kvaser_usb_hydra_net_priv_from_cmd (dev, cmd);
@@ -1117,10 +1119,13 @@ static void kvaser_usb_hydra_tx_acknowledge(const struct kvaser_usb *dev,kvaser_usb_hydra_one_shot_fail (priv, cmd_ext); one_shot_fail = true; } + + is_err_frame = flags &KVASER_USB_HYDRA_CF_FLAG_TX_ACK && + flags &KVASER_USB_HYDRA_CF_FLAG_ERROR_FRAME ; } context = &priv->tx_contexts[transid % dev->max_tx_urbs]; -if (!one_shot_fail) { +if (!one_shot_fail && !is_err_frame) {struct net_device_stats *stats = &priv->netdev->stats; stats->tx_packets++;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 116/783 can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit 35364f5b41a4917fe94a3f393d149b63ec583297 ]
Use the CMD_GET_CAPABILITIES_REQ command to query the device for certain capabilities. We are only interested in LISTENONLY mode and wither the device reports CAN error counters.
--- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 144 +++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +143 -1
@@ -73,6 +73,8 @@#define CMD_TX_ACKNOWLEDGE 50#define CMD_CAN_ERROR_EVENT 51#define CMD_FLUSH_QUEUE_REPLY 68 +#define CMD_GET_CAPABILITIES_REQ 95 +#define CMD_GET_CAPABILITIES_RESP 96#define CMD_LEAF_LOG_MESSAGE 106
@@ -82,6 +84,8 @@#define KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK BIT(5)#define KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK BIT(6) +#define KVASER_USB_LEAF_SWOPTION_EXT_CAP BIT(12) +/* error factors */ #define M16C_EF_ACKE BIT(0)#define M16C_EF_CRCE BIT(1)
@@ -277,6 +281,28 @@ struct leaf_cmd_log_message {u8 data[8 ]; } __packed; +/* Sub commands for cap_req and cap_res */ +#define KVASER_USB_LEAF_CAP_CMD_LISTEN_MODE 0x02 +#define KVASER_USB_LEAF_CAP_CMD_ERR_REPORT 0x05 +struct kvaser_cmd_cap_req { +__le16 padding0; +__le16 cap_cmd; +__le16 padding1; +__le16 channel; +} __packed; + +/* Status codes for cap_res */ +#define KVASER_USB_LEAF_CAP_STAT_OK 0x00 +#define KVASER_USB_LEAF_CAP_STAT_NOT_IMPL 0x01 +#define KVASER_USB_LEAF_CAP_STAT_UNAVAIL 0x02 +struct kvaser_cmd_cap_res { +__le16 padding; +__le16 cap_cmd; +__le16 status; +__le32 mask; +__le32 value; +} __packed; +struct kvaser_cmd {u8 len;u8 id;
@@ -294,6 +320,8 @@ struct kvaser_cmd {struct leaf_cmd_chip_state_event chip_state_event;struct leaf_cmd_error_event error_event;struct leaf_cmd_log_message log_message; +struct kvaser_cmd_cap_req cap_req; +struct kvaser_cmd_cap_res cap_res; }__packed leaf;union {
@@ -323,6 +351,7 @@ static const u8 kvaser_usb_leaf_cmd_sizes_leaf[] = { [CMD_LEAF_LOG_MESSAGE] = kvaser_fsize(u.leaf.log_message), [CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.leaf.chip_state_event), [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.leaf.error_event), + [CMD_GET_CAPABILITIES_RESP] = kvaser_fsize(u.leaf.cap_res),/* ignored events: */ [CMD_FLUSH_QUEUE_REPLY] = CMD_SIZE_ANY, };
@@ -607,6 +636,9 @@ static void kvaser_usb_leaf_get_software_info_leaf(struct kvaser_usb *dev, dev->fw_version =le32_to_cpu (softinfo->fw_version); dev->max_tx_urbs =le16_to_cpu (softinfo->max_outstanding_tx); +if (sw_options &KVASER_USB_LEAF_SWOPTION_EXT_CAP ) + dev->card_data.capabilities |=KVASER_USB_CAP_EXT_CAP ; +if (dev->driver_info->quirks &KVASER_USB_QUIRK_IGNORE_CLK_FREQ ) {/* Firmware expects bittiming parameters calculated for 16MHz * clock, regardless of the actual clock
@@ -694,6 +726,116 @@ static int kvaser_usb_leaf_get_card_info(struct kvaser_usb *dev)return 0 ; } +static int kvaser_usb_leaf_get_single_capability (struct kvaser_usb *dev, +u16 cap_cmd_req,u16 *status) +{ +struct kvaser_usb_dev_card_data *card_data = &dev->card_data; +struct kvaser_cmd *cmd; +u32 value =0 ; +u32 mask =0 ; +u16 cap_cmd_res; +int err; +int i; + + cmd =kzalloc (sizeof (*cmd),GFP_KERNEL ); +if (!cmd) +return -ENOMEM ; + + cmd->id =CMD_GET_CAPABILITIES_REQ ; + cmd->u.leaf.cap_req.cap_cmd =cpu_to_le16 (cap_cmd_req); + cmd->len =CMD_HEADER_LEN +sizeof (struct kvaser_cmd_cap_req ); + + err =kvaser_usb_send_cmd (dev, cmd, cmd->len); +if (err) + goto end; + + err =kvaser_usb_leaf_wait_cmd (dev,CMD_GET_CAPABILITIES_RESP , cmd); +if (err) + goto end; + + *status =le16_to_cpu (cmd->u.leaf.cap_res.status); + +if (*status !=KVASER_USB_LEAF_CAP_STAT_OK ) + goto end; + + cap_cmd_res =le16_to_cpu (cmd->u.leaf.cap_res.cap_cmd); +switch (cap_cmd_res) { +case KVASER_USB_LEAF_CAP_CMD_LISTEN_MODE : +case KVASER_USB_LEAF_CAP_CMD_ERR_REPORT : + value =le32_to_cpu (cmd->u.leaf.cap_res.value); + mask =le32_to_cpu (cmd->u.leaf.cap_res.mask); +break ; +default : +dev_warn (&dev->intf->dev,"Unknown capability command %u\n" , + cap_cmd_res); +break ; + } + +for (i =0 ; i < dev->nchannels; i++) { +if (BIT (i) & (value & mask)) { +switch (cap_cmd_res) { +case KVASER_USB_LEAF_CAP_CMD_LISTEN_MODE : + card_data->ctrlmode_supported |= +CAN_CTRLMODE_LISTENONLY ; +break ; +case KVASER_USB_LEAF_CAP_CMD_ERR_REPORT : + card_data->capabilities |= +KVASER_USB_CAP_BERR_CAP ; +break ; + } + } + } + +end: +kfree (cmd); + +return err; +} + +static int kvaser_usb_leaf_get_capabilities_leaf (struct kvaser_usb *dev) +{ +int err; +u16 status; + +if (!(dev->card_data.capabilities &KVASER_USB_CAP_EXT_CAP )) { +dev_info (&dev->intf->dev, +"No extended capability support. Upgrade device firmware.\n" ); +return 0 ; + } + + err =kvaser_usb_leaf_get_single_capability (dev, +KVASER_USB_LEAF_CAP_CMD_LISTEN_MODE , + &status); +if (err) +return err; +if (status) +dev_info (&dev->intf->dev, +"KVASER_USB_LEAF_CAP_CMD_LISTEN_MODE failed %u\n" , + status); + + err =kvaser_usb_leaf_get_single_capability (dev, +KVASER_USB_LEAF_CAP_CMD_ERR_REPORT , + &status); +if (err) +return err; +if (status) +dev_info (&dev->intf->dev, +"KVASER_USB_LEAF_CAP_CMD_ERR_REPORT failed %u\n" , + status); + +return 0 ; +} + +static int kvaser_usb_leaf_get_capabilities (struct kvaser_usb *dev) +{ +int err =0 ; + +if (dev->driver_info->family ==KVASER_LEAF ) + err =kvaser_usb_leaf_get_capabilities_leaf (dev); + +return err; +} +static void kvaser_usb_leaf_tx_acknowledge (const struct kvaser_usb *dev,const struct kvaser_cmd *cmd) {
@@ -1490,7 +1632,7 @@ const struct kvaser_usb_dev_ops kvaser_usb_leaf_dev_ops = { .dev_get_software_info = kvaser_usb_leaf_get_software_info, .dev_get_software_details = NULL, .dev_get_card_info = kvaser_usb_leaf_get_card_info, - .dev_get_capabilities = NULL, + .dev_get_capabilities = kvaser_usb_leaf_get_capabilities, .dev_set_opt_mode = kvaser_usb_leaf_set_opt_mode, .dev_start_chip = kvaser_usb_leaf_start_chip, .dev_stop_chip = kvaser_usb_leaf_stop_chip,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 117/783 can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit 7ea56128dbf904a3359bcf9289cccdfa3c85c7e8 ]
Prepare for handling CMD_ERROR_EVENT. Rename struct {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event.
--- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +19 -19
@@ -233,7 +233,7 @@ struct kvaser_cmd_tx_acknowledge_header {u8 tid; } __packed; -struct leaf_cmd_error_event { +struct leaf_cmd_can_error_event {u8 tid;u8 flags;__le16 time[3 ];
@@ -245,7 +245,7 @@ struct leaf_cmd_error_event {u8 error_factor; } __packed; -struct usbcan_cmd_error_event { +struct usbcan_cmd_can_error_event {u8 tid;u8 padding;u8 tx_errors_count_ch0;
@@ -318,7 +318,7 @@ struct kvaser_cmd {struct leaf_cmd_softinfo softinfo;struct leaf_cmd_rx_can rx_can;struct leaf_cmd_chip_state_event chip_state_event; -struct leaf_cmd_error_event error_event; +struct leaf_cmd_can_error_event can_error_event;struct leaf_cmd_log_message log_message;struct kvaser_cmd_cap_req cap_req;struct kvaser_cmd_cap_res cap_res;
@@ -328,7 +328,7 @@ struct kvaser_cmd {struct usbcan_cmd_softinfo softinfo;struct usbcan_cmd_rx_can rx_can;struct usbcan_cmd_chip_state_event chip_state_event; -struct usbcan_cmd_error_event error_event; +struct usbcan_cmd_can_error_event can_error_event; }__packed usbcan;struct kvaser_cmd_tx_can tx_can;
@@ -350,7 +350,7 @@ static const u8 kvaser_usb_leaf_cmd_sizes_leaf[] = { [CMD_RX_EXT_MESSAGE] = kvaser_fsize(u.leaf.rx_can), [CMD_LEAF_LOG_MESSAGE] = kvaser_fsize(u.leaf.log_message), [CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.leaf.chip_state_event), - [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.leaf.error_event), + [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.leaf.can_error_event), [CMD_GET_CAPABILITIES_RESP] = kvaser_fsize(u.leaf.cap_res),/* ignored events: */ [CMD_FLUSH_QUEUE_REPLY] = CMD_SIZE_ANY,
@@ -365,7 +365,7 @@ static const u8 kvaser_usb_leaf_cmd_sizes_usbcan[] = { [CMD_RX_STD_MESSAGE] = kvaser_fsize(u.usbcan.rx_can), [CMD_RX_EXT_MESSAGE] = kvaser_fsize(u.usbcan.rx_can), [CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.usbcan.chip_state_event), - [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.usbcan.error_event), + [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.usbcan.can_error_event),/* ignored events: */ [CMD_USBCAN_CLOCK_OVERFLOW_EVENT] = CMD_SIZE_ANY, };
@@ -1137,11 +1137,11 @@ static void kvaser_usb_leaf_usbcan_rx_error(const struct kvaser_usb *dev,case CMD_CAN_ERROR_EVENT : es.channel =0 ; - es.status = cmd->u.usbcan.error_event.status_ch0; - es.txerr = cmd->u.usbcan.error_event.tx_errors_count_ch0; - es.rxerr = cmd->u.usbcan.error_event.rx_errors_count_ch0; + es.status = cmd->u.usbcan.can_error_event.status_ch0; + es.txerr = cmd->u.usbcan.can_error_event.tx_errors_count_ch0; + es.rxerr = cmd->u.usbcan.can_error_event.rx_errors_count_ch0; es.usbcan.other_ch_status = - cmd->u.usbcan.error_event.status_ch1; + cmd->u.usbcan.can_error_event.status_ch1;kvaser_usb_leaf_usbcan_conditionally_rx_error (dev, &es);/* The USBCAN firmware supports up to 2 channels.
@@ -1149,13 +1149,13 @@ static void kvaser_usb_leaf_usbcan_rx_error(const struct kvaser_usb *dev,*/ if (dev->nchannels ==MAX_USBCAN_NET_DEVICES ) { es.channel =1 ; - es.status = cmd->u.usbcan.error_event.status_ch1; + es.status = cmd->u.usbcan.can_error_event.status_ch1; es.txerr = - cmd->u.usbcan.error_event.tx_errors_count_ch1; + cmd->u.usbcan.can_error_event.tx_errors_count_ch1; es.rxerr = - cmd->u.usbcan.error_event.rx_errors_count_ch1; + cmd->u.usbcan.can_error_event.rx_errors_count_ch1; es.usbcan.other_ch_status = - cmd->u.usbcan.error_event.status_ch0; + cmd->u.usbcan.can_error_event.status_ch0;kvaser_usb_leaf_usbcan_conditionally_rx_error (dev, &es); }break ;
@@ -1172,11 +1172,11 @@ static void kvaser_usb_leaf_leaf_rx_error(const struct kvaser_usb *dev,switch (cmd->id) {case CMD_CAN_ERROR_EVENT : - es.channel = cmd->u.leaf.error_event.channel; - es.status = cmd->u.leaf.error_event.status; - es.txerr = cmd->u.leaf.error_event.tx_errors_count; - es.rxerr = cmd->u.leaf.error_event.rx_errors_count; - es.leaf.error_factor = cmd->u.leaf.error_event.error_factor; + es.channel = cmd->u.leaf.can_error_event.channel; + es.status = cmd->u.leaf.can_error_event.status; + es.txerr = cmd->u.leaf.can_error_event.tx_errors_count; + es.rxerr = cmd->u.leaf.can_error_event.rx_errors_count; + es.leaf.error_factor = cmd->u.leaf.can_error_event.error_factor;break ;case CMD_LEAF_LOG_MESSAGE : es.channel = cmd->u.leaf.log_message.channel;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 118/783 can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit b24cb2d169e0c9dce664a959e1f2aa9781285dc9 ]
The device will send an error event command, to indicate certain errors. This indicates a misbehaving driver, and should never occur.
--- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +99 -0
@@ -69,6 +69,7 @@#define CMD_GET_CARD_INFO_REPLY 35#define CMD_GET_SOFTWARE_INFO 38#define CMD_GET_SOFTWARE_INFO_REPLY 39 +#define CMD_ERROR_EVENT 45#define CMD_FLUSH_QUEUE 48#define CMD_TX_ACKNOWLEDGE 50#define CMD_CAN_ERROR_EVENT 51
@@ -257,6 +258,28 @@ struct usbcan_cmd_can_error_event {__le16 time; } __packed; +/* CMD_ERROR_EVENT error codes */ +#define KVASER_USB_LEAF_ERROR_EVENT_TX_QUEUE_FULL 0x8 +#define KVASER_USB_LEAF_ERROR_EVENT_PARAM 0x9 + +struct leaf_cmd_error_event { +u8 tid; +u8 error_code; +__le16 timestamp[3 ]; +__le16 padding; +__le16 info1; +__le16 info2; +} __packed; + +struct usbcan_cmd_error_event { +u8 tid; +u8 error_code; +__le16 info1; +__le16 info2; +__le16 timestamp; +__le16 padding; +} __packed; +struct kvaser_cmd_ctrl_mode {u8 tid;u8 channel;
@@ -320,6 +343,7 @@ struct kvaser_cmd {struct leaf_cmd_chip_state_event chip_state_event;struct leaf_cmd_can_error_event can_error_event;struct leaf_cmd_log_message log_message; +struct leaf_cmd_error_event error_event;struct kvaser_cmd_cap_req cap_req;struct kvaser_cmd_cap_res cap_res; }__packed leaf;
@@ -329,6 +353,7 @@ struct kvaser_cmd {struct usbcan_cmd_rx_can rx_can;struct usbcan_cmd_chip_state_event chip_state_event;struct usbcan_cmd_can_error_event can_error_event; +struct usbcan_cmd_error_event error_event; }__packed usbcan;struct kvaser_cmd_tx_can tx_can;
@@ -352,6 +377,7 @@ static const u8 kvaser_usb_leaf_cmd_sizes_leaf[] = { [CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.leaf.chip_state_event), [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.leaf.can_error_event), [CMD_GET_CAPABILITIES_RESP] = kvaser_fsize(u.leaf.cap_res), + [CMD_ERROR_EVENT] = kvaser_fsize(u.leaf.error_event),/* ignored events: */ [CMD_FLUSH_QUEUE_REPLY] = CMD_SIZE_ANY, };
@@ -366,6 +392,7 @@ static const u8 kvaser_usb_leaf_cmd_sizes_usbcan[] = { [CMD_RX_EXT_MESSAGE] = kvaser_fsize(u.usbcan.rx_can), [CMD_CHIP_STATE_EVENT] = kvaser_fsize(u.usbcan.chip_state_event), [CMD_CAN_ERROR_EVENT] = kvaser_fsize(u.usbcan.can_error_event), + [CMD_ERROR_EVENT] = kvaser_fsize(u.usbcan.error_event),/* ignored events: */ [CMD_USBCAN_CLOCK_OVERFLOW_EVENT] = CMD_SIZE_ANY, };
@@ -1308,6 +1335,74 @@ static void kvaser_usb_leaf_rx_can_msg(const struct kvaser_usb *dev,netif_rx (skb); } +static void kvaser_usb_leaf_error_event_parameter (const struct kvaser_usb *dev, +const struct kvaser_cmd *cmd) +{ +u16 info1 =0 ; + +switch (dev->driver_info->family) { +case KVASER_LEAF : + info1 =le16_to_cpu (cmd->u.leaf.error_event.info1); +break ; +case KVASER_USBCAN : + info1 =le16_to_cpu (cmd->u.usbcan.error_event.info1); +break ; + } + +/* info1 will contain the offending cmd_no */ +switch (info1) { +case CMD_SET_CTRL_MODE : +dev_warn (&dev->intf->dev, +"CMD_SET_CTRL_MODE error in parameter\n" ); +break ; + +case CMD_SET_BUS_PARAMS : +dev_warn (&dev->intf->dev, +"CMD_SET_BUS_PARAMS error in parameter\n" ); +break ; + +default : +dev_warn (&dev->intf->dev, +"Unhandled parameter error event cmd_no (%u)\n" , + info1); +break ; + } +} + +static void kvaser_usb_leaf_error_event (const struct kvaser_usb *dev, +const struct kvaser_cmd *cmd) +{ +u8 error_code =0 ; + +switch (dev->driver_info->family) { +case KVASER_LEAF : + error_code = cmd->u.leaf.error_event.error_code; +break ; +case KVASER_USBCAN : + error_code = cmd->u.usbcan.error_event.error_code; +break ; + } + +switch (error_code) { +case KVASER_USB_LEAF_ERROR_EVENT_TX_QUEUE_FULL : +/* Received additional CAN message, when firmware TX queue is +* already full. Something is wrong with the driver. +* This should never happen! +*/ +dev_err (&dev->intf->dev, +"Received error event TX_QUEUE_FULL\n" ); +break ; +case KVASER_USB_LEAF_ERROR_EVENT_PARAM : +kvaser_usb_leaf_error_event_parameter (dev, cmd); +break ; + +default : +dev_warn (&dev->intf->dev, +"Unhandled error event (%d)\n" , error_code); +break ; + } +} +static void kvaser_usb_leaf_start_chip_reply (const struct kvaser_usb *dev,const struct kvaser_cmd *cmd) {
@@ -1386,6 +1481,10 @@ static void kvaser_usb_leaf_handle_command(const struct kvaser_usb *dev,kvaser_usb_leaf_tx_acknowledge (dev, cmd);break ; +case CMD_ERROR_EVENT : +kvaser_usb_leaf_error_event (dev, cmd); +break ; +/* Ignored commands */ case CMD_USBCAN_CLOCK_OVERFLOW_EVENT :if (dev->driver_info->family !=KVASER_USBCAN )
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 119/783 can: kvaser_usb_leaf: Set Warning state even without bus errors
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
[ Upstream commit df1b7af2761b935f63b4a53e789d41ed859edf61 ]
kvaser_usb_leaf_rx_error_update_can_state() sets error state according to error counters when the hardware does not indicate a specific state directly.
However, this is currently gated behind a check for M16C_STATE_BUS_ERROR which does not always seem to be set when error counters are increasing, and may not be set when error counters are decreasing.
This causes the CAN_STATE_ERROR_WARNING state to not be set in some cases even when appropriate.
Change the code to set error state from counters even without M16C_STATE_BUS_ERROR.
The Error-Passive case seems superfluous as it is already set via M16C_STATE_BUS_PASSIVE flag above, but it is kept for now.
Tested with 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778.
--- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +8 -12
@@ -965,20 +965,16 @@ kvaser_usb_leaf_rx_error_update_can_state(struct kvaser_usb_net_priv *priv, new_state =CAN_STATE_BUS_OFF ; }else if (es->status &M16C_STATE_BUS_PASSIVE ) { new_state =CAN_STATE_ERROR_PASSIVE ; - }else if (es->status &M16C_STATE_BUS_ERROR ) { + }else if ((es->status &M16C_STATE_BUS_ERROR ) && + cur_state >=CAN_STATE_BUS_OFF ) {/* Guard against spurious error events after a busoff */ -if (cur_state <CAN_STATE_BUS_OFF ) { -if (es->txerr >=128 || es->rxerr >=128 ) - new_state =CAN_STATE_ERROR_PASSIVE ; -else if (es->txerr >=96 || es->rxerr >=96 ) - new_state =CAN_STATE_ERROR_WARNING ; -else if (cur_state >CAN_STATE_ERROR_ACTIVE ) - new_state =CAN_STATE_ERROR_ACTIVE ; - } - } - -if (!es->status) + }else if (es->txerr >=128 || es->rxerr >=128 ) { + new_state =CAN_STATE_ERROR_PASSIVE ; + }else if (es->txerr >=96 || es->rxerr >=96 ) { + new_state =CAN_STATE_ERROR_WARNING ; + }else { new_state =CAN_STATE_ERROR_ACTIVE ; + }if (new_state != cur_state) { tx_state = (es->txerr >= es->rxerr) ? new_state :0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 120/783 can: kvaser_usb_leaf: Fix improved state not being reported
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
[ Upstream commit 8d21f5927ae604881f98587fabf6753f88730968 ]
The tested 0bfd:0017 Kvaser Memorator Professional HS/HS FW 2.0.50 and 0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778 do not seem to send any unsolicited events when error counters decrease or when the device transitions from ERROR_PASSIVE to ERROR_ACTIVE (or WARNING).
This causes the interface to e.g. indefinitely stay in the ERROR_PASSIVE state.
Fix that by asking for chip state (inc. counters) event every 0.5 secs when error counters are non-zero.
Since there are non-error-counter devices, also always poll in ERROR_PASSIVE even if the counters show zero.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 7 +++ .../net/can/usb/kvaser_usb/kvaser_usb_core.c | 19 +++++- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 58 +++++++++++++++++++ 3 files changed, 81 insertions(+), 3 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb.h +7 -0
@@ -104,6 +104,9 @@ struct kvaser_usb_net_priv {struct can_priv can;struct can_berr_counter bec; +/* subdriver-specific data */ +void *sub_priv; +struct kvaser_usb *dev;struct net_device *netdev;int channel;
@@ -125,6 +128,8 @@ struct kvaser_usb_net_priv {* * @dev_setup_endpoints: setup USB in and out endpoints * @dev_init_card: initialize card +* @dev_init_channel: initialize channel +* @dev_remove_channel: uninitialize channel * @dev_get_software_info: get software info * @dev_get_software_details: get software details * @dev_get_card_info: get card info
@@ -146,6 +151,8 @@ struct kvaser_usb_dev_ops { struct can_berr_counter *bec);int (*dev_setup_endpoints)(struct kvaser_usb *dev);int (*dev_init_card)(struct kvaser_usb *dev); +int (*dev_init_channel)(struct kvaser_usb_net_priv *priv); +void (*dev_remove_channel)(struct kvaser_usb_net_priv *priv);int (*dev_get_software_info)(struct kvaser_usb *dev);int (*dev_get_software_details)(struct kvaser_usb *dev);int (*dev_get_card_info)(struct kvaser_usb *dev);
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +16 -3
@@ -645,6 +645,7 @@ static const struct net_device_ops kvaser_usb_netdev_ops = {static void kvaser_usb_remove_interfaces (struct kvaser_usb *dev) { +const struct kvaser_usb_dev_ops *ops = dev->driver_info->ops;int i;for (i =0 ; i < dev->nchannels; i++) {
@@ -660,6 +661,9 @@ static void kvaser_usb_remove_interfaces(struct kvaser_usb *dev)if (!dev->nets[i])continue ; +if (ops->dev_remove_channel) + ops->dev_remove_channel (dev->nets[i]); +free_candev (dev->nets[i]->netdev); } }
@@ -727,17 +731,26 @@ static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel) dev->nets[channel] = priv; +if (ops->dev_init_channel) { + err = ops->dev_init_channel (priv); +if (err) + goto err; + } + err =register_candev (netdev);if (err) {dev_err (&dev->intf->dev,"Failed to register CAN device\n" ); -free_candev (netdev); - dev->nets[channel] =NULL ; -return err; + goto err; }netdev_dbg (netdev,"device registered\n" );return 0 ; + +err: +free_candev (netdev); + dev->nets[channel] =NULL ; +return err; } static int kvaser_usb_probe(struct usb_interface *intf,
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +58 -0
122 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 121/783 can: kvaser_usb_leaf: Fix wrong CAN state after stopping
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
[ Upstream commit a11249acf802341294557895d8e5f6aef080253f ]
0bfd:0124 Kvaser Mini PCI Express 2xHS FW 4.18.778 sends a CMD_CHIP_STATE_EVENT indicating bus-off after stopping the device, causing a stopped device to appear as CAN_STATE_BUS_OFF instead of CAN_STATE_STOPPED.
Fix that by not handling error events on stopped devices.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +4 -0
@@ -1049,6 +1049,10 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev, leaf = priv->sub_priv; stats = &priv->netdev->stats; +/* Ignore e.g. state change to bus-off reported just after stopping */ +if (!netif_running (priv->netdev)) +return ; +/* Update all of the CAN interface's state and error counters before * trying any memory allocation that can actually fail with -ENOMEM. *
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 122/783 can: kvaser_usb_leaf: Fix bogus restart events
In reply to Greg Kroah-HartmanFrom: Anssi Hannula <[email protected]>
[ Upstream commit 90904d326269a38fe5dd895fb2db7c03199654c4 ]
When auto-restart is enabled, the kvaser_usb_leaf driver considers transition from any state >= CAN_STATE_BUS_OFF as a bus-off recovery event (restart).
However, these events may occur at interface startup time before kvaser_usb_open() has set the state to CAN_STATE_ERROR_ACTIVE, causing restarts counter to increase and CAN_ERR_RESTARTED to be sent despite no actual restart having occurred.
Fix that by making the auto-restart condition checks more strict so that they only trigger when the interface was actually in the BUS_OFF state.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +3 -3
@@ -899,7 +899,7 @@ static void kvaser_usb_leaf_tx_acknowledge(const struct kvaser_usb *dev, context = &priv->tx_contexts[tid % dev->max_tx_urbs];/* Sometimes the state change doesn't come after a bus-off event */ -if (priv->can.restart_ms && priv->can.state >=CAN_STATE_BUS_OFF ) { +if (priv->can.restart_ms && priv->can.state ==CAN_STATE_BUS_OFF ) {struct sk_buff *skb;struct can_frame *cf;
@@ -1002,7 +1002,7 @@ kvaser_usb_leaf_rx_error_update_can_state(struct kvaser_usb_net_priv *priv, }if (priv->can.restart_ms && - cur_state >=CAN_STATE_BUS_OFF && + cur_state ==CAN_STATE_BUS_OFF && new_state <CAN_STATE_BUS_OFF ) priv->can.can_stats.restarts++;
@@ -1092,7 +1092,7 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev, }if (priv->can.restart_ms && - old_state >=CAN_STATE_BUS_OFF && + old_state ==CAN_STATE_BUS_OFF && new_state <CAN_STATE_BUS_OFF ) { cf->can_id |=CAN_ERR_RESTARTED ;netif_carrier_on (priv->netdev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 123/783 can: kvaser_usb: Add struct kvaser_usb_busparams
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit 00e5786177649c1e3110f9454fdd34e336597265 ]
Add struct kvaser_usb_busparams containing the busparameters used in CMD_{SET,GET}_BUSPARAMS* commands.
Stable-dep-of: 39d3df6b0ea8 ("can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming")
--- drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 8 +++++ .../net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 32 +++++++------------ .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 18 ++++------- 3 files changed, 27 insertions(+), 31 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb.h +8 -0
@@ -76,6 +76,14 @@ struct kvaser_usb_tx_urb_context {int dlc; }; +struct kvaser_usb_busparams { +__le32 bitrate; +u8 tseg1; +u8 tseg2; +u8 sjw; +u8 nsamples; +} __packed; +struct kvaser_usb {struct usb_device *udev;struct usb_interface *intf;
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c +12 -20
@@ -193,17 +193,9 @@ struct kvaser_cmd_chip_state_event {#define KVASER_USB_HYDRA_BUS_MODE_CANFD_ISO 0x01#define KVASER_USB_HYDRA_BUS_MODE_NONISO 0x02struct kvaser_cmd_set_busparams { -__le32 bitrate; -u8 tseg1; -u8 tseg2; -u8 sjw; -u8 nsamples; +struct kvaser_usb_busparams busparams_arb;u8 reserved0[4 ]; -__le32 bitrate_d; -u8 tseg1_d; -u8 tseg2_d; -u8 sjw_d; -u8 nsamples_d; +struct kvaser_usb_busparams busparams_data;u8 canfd_mode;u8 reserved1[7 ]; } __packed;
@@ -1515,11 +1507,11 @@ static int kvaser_usb_hydra_set_bittiming(struct net_device *netdev)return -ENOMEM ; cmd->header.cmd_no =CMD_SET_BUSPARAMS_REQ ; - cmd->set_busparams_req.bitrate =cpu_to_le32 (bt->bitrate); - cmd->set_busparams_req.sjw = (u8 )sjw; - cmd->set_busparams_req.tseg1 = (u8 )tseg1; - cmd->set_busparams_req.tseg2 = (u8 )tseg2; - cmd->set_busparams_req.nsamples =1 ; + cmd->set_busparams_req.busparams_arb.bitrate =cpu_to_le32 (bt->bitrate); + cmd->set_busparams_req.busparams_arb.sjw = (u8 )sjw; + cmd->set_busparams_req.busparams_arb.tseg1 = (u8 )tseg1; + cmd->set_busparams_req.busparams_arb.tseg2 = (u8 )tseg2; + cmd->set_busparams_req.busparams_arb.nsamples =1 ;kvaser_usb_hydra_set_cmd_dest_he (cmd, dev->card_data.hydra.channel_to_he[priv->channel]);
@@ -1549,11 +1541,11 @@ static int kvaser_usb_hydra_set_data_bittiming(struct net_device *netdev)return -ENOMEM ; cmd->header.cmd_no =CMD_SET_BUSPARAMS_FD_REQ ; - cmd->set_busparams_req.bitrate_d =cpu_to_le32 (dbt->bitrate); - cmd->set_busparams_req.sjw_d = (u8 )sjw; - cmd->set_busparams_req.tseg1_d = (u8 )tseg1; - cmd->set_busparams_req.tseg2_d = (u8 )tseg2; - cmd->set_busparams_req.nsamples_d =1 ; + cmd->set_busparams_req.busparams_data.bitrate =cpu_to_le32 (dbt->bitrate); + cmd->set_busparams_req.busparams_data.sjw = (u8 )sjw; + cmd->set_busparams_req.busparams_data.tseg1 = (u8 )tseg1; + cmd->set_busparams_req.busparams_data.tseg2 = (u8 )tseg2; + cmd->set_busparams_req.busparams_data.nsamples =1 ;if (priv->can.ctrlmode &CAN_CTRLMODE_FD ) {if (priv->can.ctrlmode &CAN_CTRLMODE_FD_NON_ISO )
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +7 -11
@@ -163,11 +163,7 @@ struct usbcan_cmd_softinfo {struct kvaser_cmd_busparams {u8 tid;u8 channel; -__le32 bitrate; -u8 tseg1; -u8 tseg2; -u8 sjw; -u8 no_samp; +struct kvaser_usb_busparams busparams; } __packed;struct kvaser_cmd_tx_can {
@@ -1703,15 +1699,15 @@ static int kvaser_usb_leaf_set_bittiming(struct net_device *netdev) cmd->len =CMD_HEADER_LEN +sizeof (struct kvaser_cmd_busparams ); cmd->u.busparams.channel = priv->channel; cmd->u.busparams.tid =0xff ; - cmd->u.busparams.bitrate =cpu_to_le32 (bt->bitrate); - cmd->u.busparams.sjw = bt->sjw; - cmd->u.busparams.tseg1 = bt->prop_seg + bt->phase_seg1; - cmd->u.busparams.tseg2 = bt->phase_seg2; + cmd->u.busparams.busparams.bitrate =cpu_to_le32 (bt->bitrate); + cmd->u.busparams.busparams.sjw = bt->sjw; + cmd->u.busparams.busparams.tseg1 = bt->prop_seg + bt->phase_seg1; + cmd->u.busparams.busparams.tseg2 = bt->phase_seg2;if (priv->can.ctrlmode &CAN_CTRLMODE_3_SAMPLES ) - cmd->u.busparams.no_samp =3 ; + cmd->u.busparams.busparams.nsamples =3 ;else - cmd->u.busparams.no_samp =1 ; + cmd->u.busparams.busparams.nsamples =1 ; rc =kvaser_usb_send_cmd (dev, cmd, cmd->len);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 124/783 can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit 39d3df6b0ea80f9b515c632ca07b39b1c156edee ]
The device will respond with a CMD_ERROR_EVENT command, with error_code KVASER_USB_{LEAF,HYDRA}_ERROR_EVENT_PARAM, if the CMD_SET_BUSPARAMS_REQ contains invalid bittiming parameters.
However, this command does not contain any channel reference.
To check if the CMD_SET_BUSPARAMS_REQ was successful, redback and compare the requested bittiming parameters with the device reported parameters.
--- drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 15 +- .../net/can/usb/kvaser_usb/kvaser_usb_core.c | 96 ++++++++++- .../net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 150 +++++++++++++++--- .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 64 ++++++-- 4 files changed, 284 insertions(+), 41 deletions(-)
drivers/net/can/usb/kvaser_usb/kvaser_usb.h +12 -3
@@ -119,9 +119,12 @@ struct kvaser_usb_net_priv {struct net_device *netdev;int channel; -struct completion start_comp, stop_comp, flush_comp; +struct completion start_comp, stop_comp, flush_comp, + get_busparams_comp;struct usb_anchor tx_submitted; +struct kvaser_usb_busparams busparams_nominal, busparams_data; +spinlock_t tx_contexts_lock;/* lock for active_tx_contexts */ int active_tx_contexts;struct kvaser_usb_tx_urb_context tx_contexts[];
@@ -131,7 +134,9 @@ struct kvaser_usb_net_priv {* struct kvaser_usb_dev_ops - Device specific functions * @dev_set_mode: used for can.do_set_mode * @dev_set_bittiming: used for can.do_set_bittiming +* @dev_get_busparams: readback arbitration busparams * @dev_set_data_bittiming: used for can.do_set_data_bittiming +* @dev_get_data_busparams: readback data busparams * @dev_get_berr_counter: used for can.do_get_berr_counter * * @dev_setup_endpoints: setup USB in and out endpoints
@@ -153,8 +158,12 @@ struct kvaser_usb_net_priv {*/ struct kvaser_usb_dev_ops {int (*dev_set_mode)(struct net_device *netdev,enum can_mode mode); -int (*dev_set_bittiming)(struct net_device *netdev); -int (*dev_set_data_bittiming)(struct net_device *netdev); +int (*dev_set_bittiming)(const struct net_device *netdev, +const struct kvaser_usb_busparams *busparams); +int (*dev_get_busparams)(struct kvaser_usb_net_priv *priv); +int (*dev_set_data_bittiming)(const struct net_device *netdev, +const struct kvaser_usb_busparams *busparams); +int (*dev_get_data_busparams)(struct kvaser_usb_net_priv *priv);int (*dev_get_berr_counter)(const struct net_device *netdev,struct can_berr_counter *bec);int (*dev_setup_endpoints)(struct kvaser_usb *dev);
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +90 -6
126 lines not on this page · raw message
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c +129 -21
240 lines not on this page · raw message
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +53 -11
115 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 125/783 drm/rockchip: lvds: fix PM usage counter unbalance in poweron
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 4dba27f1a14592ac4cf71c3bc1cc1fd05dea8015 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with the newest pm_runtime_resume_and_get to keep usage counter balanced.
--- drivers/gpu/drm/rockchip/rockchip_lvds.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/rockchip/rockchip_lvds.c +7 -3
@@ -145,7 +145,7 @@ static int rk3288_lvds_poweron(struct rockchip_lvds *lvds)DRM_DEV_ERROR (lvds->dev,"failed to enable lvds pclk %d\n" , ret);return ret; } - ret =pm_runtime_get_sync (lvds->dev); + ret =pm_runtime_resume_and_get (lvds->dev);if (ret <0 ) {DRM_DEV_ERROR (lvds->dev,"failed to get pm runtime: %d\n" , ret);clk_disable (lvds->pclk);
@@ -329,16 +329,20 @@ static int px30_lvds_poweron(struct rockchip_lvds *lvds) {int ret; - ret =pm_runtime_get_sync (lvds->dev); + ret =pm_runtime_resume_and_get (lvds->dev);if (ret <0 ) {DRM_DEV_ERROR (lvds->dev,"failed to get pm runtime: %d\n" , ret);return ret; }/* Enable LVDS mode */ -return regmap_update_bits (lvds->grf,PX30_LVDS_GRF_PD_VO_CON1 , + ret =regmap_update_bits (lvds->grf,PX30_LVDS_GRF_PD_VO_CON1 ,PX30_LVDS_MODE_EN (1 ) |PX30_LVDS_P2S_EN (1 ),PX30_LVDS_MODE_EN (1 ) |PX30_LVDS_P2S_EN (1 )); +if (ret) +pm_runtime_put (lvds->dev); + +return ret; }static void px30_lvds_poweroff (struct rockchip_lvds *lvds)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 126/783 clk: renesas: r9a06g032: Repair grave increment error
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 02693e11611e082e3c4d8653e8af028e43d31164 ]
If condition (clkspec.np != pd->dev.of_node) is true, then the driver ends up in an endless loop, forever, locking up the machine.
--- drivers/clk/renesas/r9a06g032-clocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/renesas/r9a06g032-clocks.c +1 -2
@@ -386,7 +386,7 @@ static int r9a06g032_attach_dev(struct generic_pm_domain *pd,int error;int index; -while (!of_parse_phandle_with_args (np,"clocks" ,"#clock-cells" , i, +while (!of_parse_phandle_with_args (np,"clocks" ,"#clock-cells" , i++, &clkspec)) {if (clkspec.np != pd->dev.of_node)continue ;
@@ -399,7 +399,6 @@ static int r9a06g032_attach_dev(struct generic_pm_domain *pd,if (error)return error; } - i++; }return 0 ;
Signature · 1 line
2.35.1