Linux 6.1.74
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.1.74 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/kernel/signal.c | 6 arch/arm/mach-sunxi/mc_smp.c | 4 arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 3 arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts | 4 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 arch/loongarch/include/asm/elf.h | 2 arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 3 arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 3 block/blk-mq.c | 14 + drivers/acpi/resource.c | 7 drivers/android/binder.c | 2 drivers/android/binder_alloc.c | 10 - drivers/block/virtio_blk.c | 8 drivers/clk/rockchip/clk-rk3128.c | 2 drivers/clk/rockchip/clk-rk3568.c | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 drivers/gpu/drm/amd/amdgpu/soc15.c | 12 - drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 19 + drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 8 drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h | 2 drivers/gpu/drm/drm_crtc.c | 8 drivers/gpu/drm/exynos/exynos_drm_dma.c | 8 drivers/gpu/drm/exynos/exynos_hdmi.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c | 2 drivers/hid/hid-nintendo.c | 71 ++++--- drivers/hwmon/corsair-psu.c | 18 + drivers/hwtracing/coresight/coresight-etm4x.h | 2 drivers/hwtracing/ptt/hisi_ptt.c | 9 drivers/i2c/busses/i2c-rk3x.c | 13 + drivers/input/joystick/xpad.c | 1 drivers/input/keyboard/atkbd.c | 46 ++++ drivers/input/mouse/synaptics.c | 1 drivers/input/serio/i8042-acpipnpio.h | 8 drivers/leds/trigger/ledtrig-tty.c | 4 drivers/md/Kconfig | 1 drivers/md/raid5.c | 12 - drivers/net/ethernet/broadcom/tg3.c | 11 + drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 5 drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 drivers/nvme/host/core.c | 12 - drivers/nvme/host/nvme.h | 5 drivers/nvme/target/configfs.c | 3 drivers/parport/parport_serial.c | 64 ++++++ drivers/pci/quirks.c | 8 drivers/pinctrl/cirrus/Kconfig | 3 drivers/pinctrl/pinctrl-cy8c95x0.c | 4 drivers/platform/x86/intel/vbtn.c | 19 + drivers/platform/x86/thinkpad_acpi.c | 98 ++++++++-- drivers/reset/hisilicon/hi6220_reset.c | 2 drivers/s390/block/scm_blk.c | 7 drivers/uio/uio.c | 7 fs/debugfs/file.c | 8 fs/debugfs/inode.c | 27 ++ fs/debugfs/internal.h | 10 - fs/f2fs/xattr.c | 6 fs/jbd2/commit.c | 10 - fs/jbd2/journal.c | 24 +- fs/smb/client/cifspdu.h | 24 +- fs/smb/client/cifssmb.c | 6 fs/smb/client/smb2misc.c | 30 +-- fs/smb/client/smb2ops.c | 6 fs/smb/client/smb2pdu.c | 8 fs/smb/client/smb2pdu.h | 16 - fs/smb/common/smb2pdu.h | 17 + fs/smb/server/smb2pdu.c | 23 -- fs/smb/server/smbacl.c | 11 - include/linux/ieee80211.h | 4 include/linux/jbd2.h | 3 init/Kconfig | 2 kernel/trace/ring_buffer.c | 6 kernel/trace/trace.c | 12 + kernel/trace/trace.h | 1 kernel/trace/trace_events_hist.c | 12 - kernel/trace/trace_output.c | 6 lib/Kconfig.debug | 9 lib/idr.c | 2 lib/test_ida.c | 40 ++++ net/core/neighbour.c | 9 net/mac80211/ht.c | 1 net/mptcp/options.c | 1 net/qrtr/ns.c | 4 net/wireless/core.c | 2 scripts/decode_stacktrace.sh | 19 + scripts/pahole-flags.sh | 7 sound/hda/intel-nhlt.c | 33 ++- sound/pci/hda/patch_realtek.c | 16 + sound/soc/amd/yc/acp6x-mach.c | 7 sound/soc/codecs/cs43130.c | 6 sound/soc/codecs/da7219-aad.c | 2 sound/soc/codecs/hdac_hda.c | 23 ++ sound/soc/codecs/nau8822.c | 9 sound/soc/codecs/rt5645.c | 10 - sound/soc/codecs/wm8974.c | 6 sound/soc/intel/boards/bytcr_rt5640.c | 31 ++- sound/soc/intel/boards/skl_hda_dsp_generic.c | 2 sound/soc/intel/skylake/skl-pcm.c | 9 sound/soc/intel/skylake/skl-sst-ipc.c | 4 sound/soc/soc-ops.c | 2 sound/soc/sof/intel/hda-codec.c | 18 - tools/testing/selftests/alsa/mixer-test.c | 2 102 files changed, 840 insertions(+), 283 deletions(-)
Alan Maguire (1):
bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
Armin Wolf (1):
hwmon: (corsair-psu) Fix probe when built-in
Avraham Stern (1):
wifi: iwlwifi: pcie: avoid a NULL pointer dereference
Ben Greear (1):
wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap
Cameron Williams (2):
parport: parport_serial: Add Brainboxes BAR details
parport: parport_serial: Add Brainboxes device IDs and geometry
Carlos Llamas (5):
binder: use EPOLLERR from eventpoll.h
binder: fix use-after-free in shinker's callback
binder: fix trivial typo of binder_free_buf_locked()
binder: fix comment on binder_alloc_new_buf() return value scripts/decode_stacktrace.sh: optionally use LLVM utilities
Charlene Liu (1):
drm/amd/display: get dprefclk ss info from integration info table
Charles Keepax (2):
pinctrl: lochnagar: Don't build on MIPS
ASoC: wm8974: Correct boost mixer inputs
Chris Morgan (1):
clk: rockchip: rk3568: Add PLL rate for 292.5MHz
Dave Airlie (1):
nouveau/tu102: flush all pdbs on vmm flush
David Lin (1):
ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16
David Rau (1):
ASoC: da7219: Support low DC impedance headset
Dmitry Antipov (1):
smb: client, common: fix fortify warnings
Dmytro Laktyushkin (1):
drm/amd/display: update dcn315 lpddr pstate latency
Edward Adam Davis (1):
mptcp: fix uninit-value in mptcp_incoming_options
Eric Biggers (1):
f2fs: explicitly null-terminate the xattr list
Esther Shimanovich (1):
Input: i8042 - add nomux quirk for Acer P459-G2-M
Fedor Pchelkin (1):
ksmbd: free ppace array on error in parse_dacl
Florian Eckert (1):
leds: ledtrig-tty: Free allocated ttyname buffer on deactivate
Ghanshyam Agrawal (1):
kselftest: alsa: fixed a print formatting warning
Greg Kroah-Hartman (1):
Linux 6.1.74
Guanghui Feng (1):
uio: Fix use-after-free in uio_open
Guilherme G. Piccoli (1):
HID: nintendo: Prevent divide-by-zero on code
Hans de Goede (5):
platform/x86: intel-vbtn: Fix missing tablet-mode-switch events
Input: atkbd - skip ATKBD_CMD_GETID in translated mode
ASoC: Intel: bytcr_rt5640: Add quirk for the Medion Lifetab S10346
ASoC: Intel: bytcr_rt5640: Add new swapped-speakers quirk
ACPI: resource: Add another DMI match for the TongFang GMxXGxx
Heiko Stuebner (1):
arm64: dts: rockchip: fix rk356x pcie msg interrupt name
Hengqi Chen (1):
LoongArch: Preserve syscall nr across execve()
Inki Dae (1):
drm/exynos: fix a wrong error checking
James Clark (1):
coresight: etm4x: Fix width of CCITMIN field
Jani Nikula (1):
drm/crtc: fix uninitialized variable use
Jensen Huang (1):
i2c: rk3x: fix potential spinlock recursion on poll
Jeremy Soller (1):
ASoC: amd: yc: Add DMI entry to support System76 Pangolin 13
Johannes Berg (2):
wifi: cfg80211: lock wiphy mutex for rfkill poll
debugfs: fix automount d_fsdata usage
José Pekkarinen (1):
Input: psmouse - enable Synaptics InterTouch for ThinkPad L14 G1
Judy Hsiao (1):
neighbour: Don't let neigh_forced_gc() disable preemption for long
Junxiao Bi (1):
Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"
Kamil Duljas (2):
ASoC: Intel: Skylake: Fix mem leak in few functions
ASoC: Intel: Skylake: mem leak in skl register function
Keith Busch (2):
nvme-core: check for too small lba shift
nvme: introduce helper function to get ctrl state
Krzysztof Kozlowski (3):
stmmac: dwmac-loongson: drop useless check for compatible fallback
MIPS: dts: loongson: drop incorrect dwmac fallback compatible
reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
LeoLiuoc (1):
PCI: Add ACS quirk for more Zhaoxin Root Ports
Lijo Lazar (1):
drm/amdgpu: Add NULL checks for function pointers
Lu Yao (1):
drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer
Luca Weiss (1):
Input: xpad - add Razer Wolverine V2 support
Maciej Strozek (2):
ASoC: cs43130: Fix the position of const qualifier
ASoC: cs43130: Fix incorrect frame delay configuration
Martin Rodriguez Reboredo (1):
btf, scripts: Exclude Rust CUs with pahole
Matthew Wilcox (Oracle) (1):
ida: Fix crash in ida_free when the bitmap is empty
Maurizio Lombardi (1):
nvme-core: fix a memory leak in nvme_ns_info_from_identify()
Michael-CY Lee (1):
wifi: avoid offset calculation on NULL pointer
Mike Snitzer (1):
dm audit: fix Kconfig so DM_AUDIT depends on BLK_DEV_DM
Ming Lei (1):
blk-mq: don't count completed flush data request as inflight in case of quiesce
Namjae Jeon (1):
ksmbd: don't allow O_TRUNC open on read-only share
Nitesh Shetty (1):
nvme: prevent potential spectre v1 gadget
Patrick Rudolph (2):
pinctrl: cy8c95x0: Fix typo
pinctrl: cy8c95x0: Fix get_pincfg
Paulo Alcantara (1):
smb: client: fix potential OOB in smb2_dump_detail()
Peter Ujfalusi (4):
ALSA: hda: intel-nhlt: Ignore vbps when looking for DMIC 32 bps format
ASoC: Intel: skl_hda_dsp_generic: Drop HDMI routes when HDMI is not available
ASoC: hdac_hda: Conditionally register dais for HDMI and Analog
ASoC: SOF: Intel: hda-codec: Delay the codec device registration
Rob Herring (1):
arm64: dts: rockchip: Fix PCI node addresses on rk3399-gru
Ryan McClelland (1):
HID: nintendo: fix initializer element is not constant error
Sarannya S (1):
net: qrtr: ns: Return 0 if server port is not present
Shuming Fan (1):
ASoC: rt5650: add mutex to avoid the jack detection failure
Srinivas Kandagatla (1):
ASoC: ops: add correct range check for limiting volume
Stefan Binding (1):
ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models
Stefan Hajnoczi (1):
virtio_blk: fix snprintf truncation compiler warning
Stefan Wahren (1):
ARM: sun9i: smp: fix return code check of of_property_match_string
Steven Rostedt (Google) (3):
tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing
tracing: Add size check when printing trace_marker output
ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI
Thinh Tran (1):
net/tg3: fix race condition in tg3_reset_task()
Tom Jason Schwanke (1):
ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx
Vasiliy Kovalev (1):
ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro
Vineet Gupta (1):
ARC: fix spare error
Vineeth Vijayan (1):
s390/scm: fix virtual vs physical address confusion
Vishnu Sankar (1):
platform/x86: thinkpad_acpi: fix for incorrect fan reporting on some ThinkPad systems
Weihao Li (1):
clk: rockchip: rk3128: Fix HCLK_OTG gate register
Xiang Yang (1):
drm/exynos: fix a potential error pointer dereference
Ye Bin (1):
jbd2: fix soft lockup in journal_finish_inode_data_buffers()
Yicong Yang (2):
hwtracing: hisi_ptt: Handle the interrupt in hardirq context
hwtracing: hisi_ptt: Don't try to attach a task
Zhang Yi (2):
jbd2: correct the printing of write_flags in jbd2_write_superblock()
jbd2: increase the journal IO's priority
Zheng Yejian (1):
tracing: Fix uaf issue when open the hist or hist_debug file
Ziqi Zhao (1):
drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 73 +SUBLEVEL = 74 EXTRAVERSION = NAME = Curry Ramen
arch/arc/kernel/signal.c +3 -3
@@ -61,7 +61,7 @@ struct rt_sigframe {unsigned int sigret_magic; }; -static int save_arcv2_regs (struct sigcontext *mctx,struct pt_regs *regs) +static int save_arcv2_regs (struct sigcontext __user *mctx,struct pt_regs *regs) {int err =0 ;#ifndef CONFIG_ISA_ARCOMPACT
@@ -74,12 +74,12 @@ static int save_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs)#else v2abi.r58 = v2abi.r59 =0 ;#endif - err =__copy_to_user (&mctx->v2abi, &v2abi,sizeof (v2abi)); + err =__copy_to_user (&mctx->v2abi, (void const *)&v2abi,sizeof (v2abi));#endif return err; } -static int restore_arcv2_regs (struct sigcontext *mctx,struct pt_regs *regs) +static int restore_arcv2_regs (struct sigcontext __user *mctx,struct pt_regs *regs) {int err =0 ;#ifndef CONFIG_ISA_ARCOMPACT
arch/arm/mach-sunxi/mc_smp.c +2 -2
@@ -804,12 +804,12 @@ static int __init sunxi_mc_smp_init(void)for (i =0 ; i <ARRAY_SIZE (sunxi_mc_smp_data); i++) { ret =of_property_match_string (node,"enable-method" , sunxi_mc_smp_data[i].enable_method); -if (!ret) +if (ret >=0 )break ; }of_node_put (node); -if (ret) +if (ret <0 )return -ENODEV ; is_a83t = sunxi_mc_smp_data[i].is_a83t;
arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +1 -2
@@ -510,8 +510,7 @@ wacky_spi_audio: spi2@0 { &pci_rootport { mvl_wifi: wifi@0,0 { compatible = "pci1b4b,2b42"; - reg = <0x83010000 0x0 0x00000000 0x0 0x00100000 - 0x83010000 0x0 0x00100000 0x0 0x00100000>; + reg = <0x0000 0x0 0x0 0x0 0x0>; interrupt-parent = <&gpio0>; interrupts = <8 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default";
arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts +2 -2
@@ -34,8 +34,8 @@ &mipi_panel { &pci_rootport { wifi@0,0 { compatible = "qcom,ath10k"; - reg = <0x00010000 0x0 0x00000000 0x0 0x00000000>, - <0x03010010 0x0 0x00000000 0x0 0x00200000>; + reg = <0x00000000 0x0 0x00000000 0x0 0x00000000>, + <0x03000010 0x0 0x00000000 0x0 0x00200000>; qcom,ath10k-calibration-variant = "GO_DUMO"; }; };
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +1 -0
@@ -489,6 +489,7 @@ pci_rootport: pcie@0,0 { #address-cells = <3>; #size-cells = <2>; ranges; + device_type = "pci"; }; };
arch/arm64/boot/dts/rockchip/rk356x.dtsi +1 -1
@@ -958,7 +958,7 @@ pcie2x1: pcie@fe260000 { <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "sys", "pmc", "msi", "legacy", "err"; + interrupt-names = "sys", "pmc", "msg", "legacy", "err"; bus-range = <0x0 0xf>; clocks = <&cru ACLK_PCIE20_MST>, <&cru ACLK_PCIE20_SLV>, <&cru ACLK_PCIE20_DBI>, <&cru PCLK_PCIE20>,
arch/loongarch/include/asm/elf.h +1 -1
@@ -293,7 +293,7 @@ extern const char *__elf_platform; #define ELF_PLAT_INIT(_r, load_addr) do { \ _r->regs[1] = _r->regs[2] = _r->regs[3] = _r->regs[4] = 0; \ _r->regs[5] = _r->regs[6] = _r->regs[7] = _r->regs[8] = 0; \ - _r->regs[9] = _r->regs[10] = _r->regs[11] = _r->regs[12] = 0; \ + _r->regs[9] = _r->regs[10] /* syscall n */ = _r->regs[12] = 0; \ _r->regs[13] = _r->regs[14] = _r->regs[15] = _r->regs[16] = 0; \ _r->regs[17] = _r->regs[18] = _r->regs[19] = _r->regs[20] = 0; \ _r->regs[21] = _r->regs[22] = _r->regs[23] = _r->regs[24] = 0; \
arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi +1 -2
@@ -123,8 +123,7 @@ gmac@3,0 { compatible = "pci0014,7a03.0", "pci0014,7a03", "pciclass0c0320", - "pciclass0c03", - "loongson, pci-gmac"; + "pciclass0c03"; reg = <0x1800 0x0 0x0 0x0 0x0>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>,
arch/mips/boot/dts/loongson/ls7a-pch.dtsi +1 -2
@@ -186,8 +186,7 @@ gmac@3,0 { compatible = "pci0014,7a03.0", "pci0014,7a03", "pciclass020000", - "pciclass0200", - "loongson, pci-gmac"; + "pciclass0200"; reg = <0x1800 0x0 0x0 0x0 0x0>; interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
block/blk-mq.c +13 -1
@@ -1500,14 +1500,26 @@ void blk_mq_delay_kick_requeue_list(struct request_queue *q, }EXPORT_SYMBOL (blk_mq_delay_kick_requeue_list); +static bool blk_is_flush_data_rq (struct request *rq) +{ +return (rq->rq_flags &RQF_FLUSH_SEQ ) && !is_flush_rq (rq); +} +static bool blk_mq_rq_inflight (struct request *rq,void *priv) {/* * If we find a request that isn't idle we know the queue is busy * as it's checked in the iter. * Return false to stop the iteration. +* +* In case of queue quiesce, if one flush data request is completed, +* don't count it as inflight given the flush sequence is suspended, +* and the original flush data request is invisible to driver, just +* like other pending requests because of quiesce */ -if (blk_mq_request_started (rq)) { +if (blk_mq_request_started (rq) && !(blk_queue_quiesced (rq->q) && +blk_is_flush_data_rq (rq) && +blk_mq_request_completed (rq))) {bool *busy = priv; *busy = true;
drivers/acpi/resource.c +7 -0
@@ -512,6 +512,13 @@ static const struct dmi_system_id maingear_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "GMxXGxx"), }, }, + { +/* TongFang GMxXGxx sold as Eluktronics Inc. RP-15 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Eluktronics Inc." ), + DMI_MATCH(DMI_BOARD_NAME, "RP-15"), + }, + }, {/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */ .matches = {
drivers/android/binder.c +1 -1
@@ -5005,7 +5005,7 @@ static __poll_t binder_poll(struct file *filp, thread =binder_get_thread (proc);if (!thread) -return POLLERR ; +return EPOLLERR ;binder_inner_proc_lock (thread->proc); thread->looper |=BINDER_LOOPER_STATE_POLL ;
drivers/android/binder_alloc.c +7 -3
@@ -557,7 +557,7 @@ static struct binder_buffer *binder_alloc_new_buf_locked(* is the sum of the three given sizes (each rounded up to * pointer-sized boundary) * -* Return: The allocated buffer or %NULL if error +* Return: The allocated buffer or %ERR_PTR(-errno) if error */ struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size,
@@ -706,7 +706,7 @@ void binder_alloc_free_buf(struct binder_alloc *alloc,/* * We could eliminate the call to binder_alloc_clear_buf() * from binder_alloc_deferred_release() by moving this to -* binder_alloc_free_buf_locked(). However, that could +* binder_free_buf_locked(). However, that could * increase contention for the alloc mutex if clear_on_free * is used frequently for large buffers. The mutex is not * needed for correctness here.
@@ -1005,7 +1005,9 @@ enum lru_status binder_alloc_free_page(struct list_head *item, goto err_mmget;if (!mmap_read_trylock (mm)) goto err_mmap_read_lock_failed; - vma =binder_alloc_get_vma (alloc); + vma =vma_lookup (mm, page_addr); +if (vma && vma !=binder_alloc_get_vma (alloc)) + goto err_invalid_vma;list_lru_isolate (lru, item);spin_unlock (lock);
@@ -1031,6 +1033,8 @@ enum lru_status binder_alloc_free_page(struct list_head *item,mutex_unlock (&alloc->mutex);return LRU_REMOVED_RETRY ; +err_invalid_vma: +mmap_read_unlock (mm); err_mmap_read_lock_failed:mmput_async (mm); err_mmget:
drivers/block/virtio_blk.c +4 -4
@@ -609,12 +609,12 @@ static void virtblk_config_changed(struct virtio_device *vdev)static int init_vq (struct virtio_blk *vblk) {int err; -int i; +unsigned short i;vq_callback_t **callbacks;const char **names;struct virtqueue **vqs;unsigned short num_vqs; -unsigned int num_poll_vqs; +unsigned short num_poll_vqs;struct virtio_device *vdev = vblk->vdev;struct irq_affinity desc = {0 , };
@@ -658,13 +658,13 @@ static int init_vq(struct virtio_blk *vblk)for (i =0 ; i < num_vqs - num_poll_vqs; i++) { callbacks[i] = virtblk_done; -snprintf (vblk->vqs[i].name,VQ_NAME_LEN ,"req.%d" , i); +snprintf (vblk->vqs[i].name,VQ_NAME_LEN ,"req.%u" , i); names[i] = vblk->vqs[i].name; }for (; i < num_vqs; i++) { callbacks[i] =NULL ; -snprintf (vblk->vqs[i].name,VQ_NAME_LEN ,"req_poll.%d" , i); +snprintf (vblk->vqs[i].name,VQ_NAME_LEN ,"req_poll.%u" , i); names[i] = vblk->vqs[i].name; }
drivers/clk/rockchip/clk-rk3128.c +1 -1
@@ -490,7 +490,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {GATE (HCLK_I2S_2CH ,"hclk_i2s_2ch" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (7 ),2 ,GFLAGS ),GATE (0 ,"hclk_usb_peri" ,"hclk_peri" ,CLK_IGNORE_UNUSED ,RK2928_CLKGATE_CON (9 ),13 ,GFLAGS ),GATE (HCLK_HOST2 ,"hclk_host2" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (7 ),3 ,GFLAGS ), -GATE (HCLK_OTG ,"hclk_otg" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (3 ),13 ,GFLAGS ), +GATE (HCLK_OTG ,"hclk_otg" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (5 ),13 ,GFLAGS ),GATE (0 ,"hclk_peri_ahb" ,"hclk_peri" ,CLK_IGNORE_UNUSED ,RK2928_CLKGATE_CON (9 ),14 ,GFLAGS ),GATE (HCLK_SPDIF ,"hclk_spdif" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (10 ),9 ,GFLAGS ), GATE(HCLK_TSP, "hclk_tsp", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 12, GFLAGS),
drivers/clk/rockchip/clk-rk3568.c +1 -0
@@ -72,6 +72,7 @@ static struct rockchip_pll_rate_table rk3568_pll_rates[] = {RK3036_PLL_RATE (408000000 ,1 ,68 ,2 ,2 ,1 ,0 ),RK3036_PLL_RATE (312000000 ,1 ,78 ,6 ,1 ,1 ,0 ),RK3036_PLL_RATE (297000000 ,2 ,99 ,4 ,1 ,1 ,0 ), +RK3036_PLL_RATE (292500000 ,1 ,195 ,4 ,4 ,1 ,0 ),RK3036_PLL_RATE (241500000 ,2 ,161 ,4 ,2 ,1 ,0 ),RK3036_PLL_RATE (216000000 ,1 ,72 ,4 ,2 ,1 ,0 ), RK3036_PLL_RATE(200000000, 1, 100, 3, 4, 1, 0),
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +6 -0
@@ -479,6 +479,9 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,if (size &0x3 || *pos &0x3 )return -EINVAL ; +if (!adev->didt_rreg) +return -EOPNOTSUPP ; + r =pm_runtime_get_sync (adev_to_drm (adev)->dev);if (r <0 ) {pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);
@@ -535,6 +538,9 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __userif (size &0x3 || *pos &0x3 )return -EINVAL ; +if (!adev->didt_wreg) +return -EOPNOTSUPP ; + r =pm_runtime_get_sync (adev_to_drm (adev)->dev);if (r <0 ) {pm_runtime_put_autosuspend (adev_to_drm (adev)->dev);
drivers/gpu/drm/amd/amdgpu/soc15.c +8 -4
@@ -1411,9 +1411,11 @@ static void soc15_common_get_clockgating_state(void *handle, u64 *flags)if (amdgpu_sriov_vf (adev)) *flags =0 ; - adev->nbio.funcs->get_clockgating_state (adev, flags); +if (adev->nbio.funcs && adev->nbio.funcs->get_clockgating_state) + adev->nbio.funcs->get_clockgating_state (adev, flags); - adev->hdp.funcs->get_clock_gating_state (adev, flags); +if (adev->hdp.funcs && adev->hdp.funcs->get_clock_gating_state) + adev->hdp.funcs->get_clock_gating_state (adev, flags);if (adev->ip_versions[MP0_HWIP ][0 ] !=IP_VERSION (13 ,0 ,2 )) {
@@ -1429,9 +1431,11 @@ static void soc15_common_get_clockgating_state(void *handle, u64 *flags) }/* AMD_CG_SUPPORT_ROM_MGCG */ - adev->smuio.funcs->get_clock_gating_state (adev, flags); +if (adev->smuio.funcs && adev->smuio.funcs->get_clock_gating_state) + adev->smuio.funcs->get_clock_gating_state (adev, flags); - adev->df.funcs->get_clockgating_state (adev, flags); +if (adev->df.funcs && adev->df.funcs->get_clockgating_state) + adev->df.funcs->get_clockgating_state (adev, flags); } static int soc15_common_set_powergating_state(void *handle,
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +14 -5
@@ -1018,13 +1018,20 @@ static enum bp_result get_ss_info_v4_5(DC_LOG_BIOS ("AS_SIGNAL_TYPE_HDMI ss_percentage: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_DISPLAY_PORT : - ss_info->spread_spectrum_percentage = +if (bp->base.integrated_info) { +DC_LOG_BIOS ("gpuclk_ss_percentage (unit of 0.001 percent): %d\n" , bp->base.integrated_info->gpuclk_ss_percentage); + ss_info->spread_spectrum_percentage = + bp->base.integrated_info->gpuclk_ss_percentage; + ss_info->type.CENTER_MODE = + bp->base.integrated_info->gpuclk_ss_type; + }else { + ss_info->spread_spectrum_percentage = disp_cntl_tbl->dp_ss_percentage; - ss_info->spread_spectrum_range = + ss_info->spread_spectrum_range = disp_cntl_tbl->dp_ss_rate_10hz *10 ; -if (disp_cntl_tbl->dp_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) - ss_info->type.CENTER_MODE = true; - +if (disp_cntl_tbl->dp_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) + ss_info->type.CENTER_MODE = true; + }DC_LOG_BIOS ("AS_SIGNAL_TYPE_DISPLAY_PORT ss_percentage: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_GPU_PLL :
@@ -2830,6 +2837,8 @@ static enum bp_result get_integrated_info_v2_2( info->ma_channel_number = info_v2_2->umachannelnumber; info->dp_ss_control =le16_to_cpu (info_v2_2->reserved1); + info->gpuclk_ss_percentage = info_v2_2->gpuclk_ss_percentage; + info->gpuclk_ss_type = info_v2_2->gpuclk_ss_type;for (i =0 ; i <NUMBER_OF_UCHAR_FOR_GUID ; ++i) { info->ext_disp_conn_info.gu_id[i] =
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +4 -4
@@ -324,7 +324,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_A, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -332,7 +332,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_B, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -340,7 +340,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_C, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -348,7 +348,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_D, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h +2 -0
@@ -417,6 +417,8 @@ struct integrated_info {/* V2.1 */ struct edp_info edp1_info;struct edp_info edp2_info; +uint32_t gpuclk_ss_percentage; +uint32_t gpuclk_ss_type; };/*
drivers/gpu/drm/drm_crtc.c +4 -4
@@ -715,8 +715,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,struct drm_mode_set set;uint32_t __user *set_connectors_ptr;struct drm_modeset_acquire_ctx ctx; -int ret; -int i; +int ret, i, num_connectors =0 ;if (!drm_core_check_feature (dev,DRIVER_MODESET ))return -EOPNOTSUPP ;
@@ -871,6 +870,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, connector->name); connector_set[i] = connector; + num_connectors++; } }
@@ -879,7 +879,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, set.y = crtc_req->y; set.mode = mode; set.connectors = connector_set; - set.num_connectors = crtc_req->count_connectors; + set.num_connectors = num_connectors; set.fb = fb;if (drm_drv_uses_atomic_modeset (dev))
@@ -892,7 +892,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,drm_framebuffer_put (fb);if (connector_set) { -for (i =0 ; i < crtc_req->count_connectors; i++) { +for (i =0 ; i < num_connectors; i++) {if (connector_set[i])drm_connector_put (connector_set[i]); }
drivers/gpu/drm/exynos/exynos_drm_dma.c +3 -5
@@ -107,18 +107,16 @@ int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,return 0 ;if (!priv->mapping) { -void *mapping; +void *mapping =NULL ;if (IS_ENABLED (CONFIG_ARM_DMA_USE_IOMMU )) mapping =arm_iommu_create_mapping (&platform_bus_type,EXYNOS_DEV_ADDR_START ,EXYNOS_DEV_ADDR_SIZE );else if (IS_ENABLED (CONFIG_IOMMU_DMA )) mapping =iommu_get_domain_for_dev (priv->dma_dev); -else - mapping =ERR_PTR (-ENODEV ); -if (IS_ERR (mapping)) -return PTR_ERR (mapping); +if (!mapping) +return -ENODEV ; priv->mapping = mapping; }
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -0
@@ -1861,6 +1861,8 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)return ret; crtc =exynos_drm_crtc_get_by_type (drm_dev,EXYNOS_DISPLAY_TYPE_HDMI ); +if (IS_ERR (crtc)) +return PTR_ERR (crtc); crtc->pipe_clk = &hdata->phy_clk; ret =hdmi_create_connector (encoder);
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmtu102.c +1 -1
@@ -31,7 +31,7 @@ tu102_vmm_flush(struct nvkm_vmm *vmm, int depth) type |=0x00000001 ;/* PAGE_ALL */ if (atomic_read (&vmm->engref[NVKM_SUBDEV_BAR ])) - type |=0x00000004 ;/* HUB_ONLY */ + type |=0x00000006 ;/* HUB_ONLY | ALL PDB (hack) */ mutex_lock (&vmm->mmu->mutex);
drivers/hid/hid-nintendo.c +42 -29
100 lines not on this page · raw message
drivers/hwmon/corsair-psu.c +17 -1
@@ -837,7 +837,23 @@ static struct hid_driver corsairpsu_driver = { .reset_resume = corsairpsu_resume,#endif }; -module_hid_driver (corsairpsu_driver); + +static int __init corsair_init (void ) +{ +return hid_register_driver (&corsairpsu_driver); +} + +static void __exit corsair_exit(void) +{ +hid_unregister_driver (&corsairpsu_driver); +} + +/* +* With module_init() the driver would load before the HID bus when +* built-in, so use late_initcall() instead. +*/ +late_initcall (corsair_init); +module_exit (corsair_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Wilken Gottwalt <[email protected]>" );
drivers/hwtracing/coresight/coresight-etm4x.h +1 -1
@@ -1032,7 +1032,7 @@ struct etmv4_drvdata {u8 ctxid_size;u8 vmid_size;u8 ccsize; -u8 ccitmin; +u16 ccitmin;u8 s_ex_level;u8 ns_ex_level;u8 q_support;
drivers/hwtracing/ptt/hisi_ptt.c +6 -3
@@ -342,9 +342,9 @@ static int hisi_ptt_register_irq(struct hisi_ptt *hisi_ptt)return ret; hisi_ptt->trace_irq =pci_irq_vector (pdev,HISI_PTT_TRACE_DMA_IRQ ); - ret =devm_request_threaded_irq (&pdev->dev, hisi_ptt->trace_irq, -NULL , hisi_ptt_isr,0 , -DRV_NAME , hisi_ptt); + ret =devm_request_irq (&pdev->dev, hisi_ptt->trace_irq, hisi_ptt_isr, +IRQF_NOBALANCING |IRQF_NO_THREAD ,DRV_NAME , + hisi_ptt);if (ret) {pci_err (pdev,"failed to request irq %d, ret = %d\n" , hisi_ptt->trace_irq, ret);
@@ -659,6 +659,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)return -EOPNOTSUPP ; } +if (event->attach_state &PERF_ATTACH_TASK ) +return -EOPNOTSUPP ; +if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)return -ENOENT ;
drivers/i2c/busses/i2c-rk3x.c +11 -2
@@ -178,6 +178,7 @@ struct rk3x_i2c_soc_data {* @clk: function clk for rk3399 or function & Bus clks for others * @pclk: Bus clk for rk3399 * @clk_rate_nb: i2c clk rate change notify +* @irq: irq number * @t: I2C known timing information * @lock: spinlock for the i2c bus * @wait: the waitqueue to wait for i2c transfer
@@ -200,6 +201,7 @@ struct rk3x_i2c {struct clk *clk;struct clk *pclk;struct notifier_block clk_rate_nb; +int irq;/* Settings */ struct i2c_timings t;
@@ -1087,13 +1089,18 @@ static int rk3x_i2c_xfer_common(struct i2c_adapter *adap,spin_unlock_irqrestore (&i2c->lock, flags); -rk3x_i2c_start (i2c); -if (!polling) { +rk3x_i2c_start (i2c); + timeout =wait_event_timeout (i2c->wait, !i2c->busy,msecs_to_jiffies (WAIT_TIMEOUT )); }else { +disable_irq (i2c->irq); +rk3x_i2c_start (i2c); + timeout =rk3x_i2c_wait_xfer_poll (i2c); + +enable_irq (i2c->irq); }spin_lock_irqsave (&i2c->lock, flags);
@@ -1310,6 +1317,8 @@ static int rk3x_i2c_probe(struct platform_device *pdev)return ret; } + i2c->irq = irq; +platform_set_drvdata (pdev, i2c);if (i2c->soc_data->calc_timings == rk3x_i2c_v0_calc_timings) {
drivers/input/joystick/xpad.c +1 -0
@@ -286,6 +286,7 @@ static const struct xpad_device { { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, + { 0x1532, 0x0a29, "Razer Wolverine V2", 0, XTYPE_XBOXONE }, { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, { 0x15e4, 0x3f0a, "Xbox Airflo wired controller", 0, XTYPE_XBOX360 }, { 0x15e4, 0x3f10, "Batarang Xbox 360 controller", 0, XTYPE_XBOX360 },
drivers/input/keyboard/atkbd.c +42 -4
60 lines not on this page · raw message
drivers/input/mouse/synaptics.c +1 -0
@@ -183,6 +183,7 @@ static const char * const smbus_pnp_ids[] = {"LEN009b" ,/* T580 */ "LEN0402" ,/* X1 Extreme Gen 2 / P1 Gen 2 */ "LEN040f" ,/* P1 Gen 3 */ +"LEN0411" ,/* L14 Gen 1 */ "LEN200f" ,/* T450s */ "LEN2044" ,/* L470 */ "LEN2054", /* E480 */
drivers/input/serio/i8042-acpipnpio.h +8 -0
@@ -360,6 +360,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { }, .driver_data = (void *)(SERIO_QUIRK_DRITEK) }, + { +/* Acer TravelMate P459-G2-M */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate P459-G2-M"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX ) + }, {/* Amoi M636/A737 */ .matches = {
drivers/leds/trigger/ledtrig-tty.c +4 -0
@@ -168,6 +168,10 @@ static void ledtrig_tty_deactivate(struct led_classdev *led_cdev)cancel_delayed_work_sync (&trigger_data->dwork); +kfree (trigger_data->ttyname); +tty_kref_put (trigger_data->tty); + trigger_data->tty =NULL ; +kfree (trigger_data); }
drivers/md/Kconfig +1 -0
@@ -650,6 +650,7 @@ config DM_ZONED config DM_AUDIT bool "DM audit events" + depends on BLK_DEV_DM depends on AUDIT help Generate audit events for device-mapper.
drivers/md/raid5.c +0 -12
@@ -36,7 +36,6 @@*/ #include <linux/blkdev.h> -#include <linux/delay.h> #include <linux/kthread.h> #include <linux/raid/pq.h> #include <linux/async_tx.h>
@@ -6833,18 +6832,7 @@ static void raid5d(struct md_thread *thread)spin_unlock_irq (&conf->device_lock);md_check_recovery (mddev);spin_lock_irq (&conf->device_lock); - -/* -* Waiting on MD_SB_CHANGE_PENDING below may deadlock -* seeing md_check_recovery() is needed to clear -* the flag when using mdmon. -*/ -continue ; } - -wait_event_lock_irq (mddev->sb_wait, - !test_bit (MD_SB_CHANGE_PENDING , &mddev->sb_flags), - conf->device_lock); }pr_debug ("%d stripes handled\n" , handled);
drivers/net/ethernet/broadcom/tg3.c +10 -1
@@ -6447,6 +6447,14 @@ static void tg3_dump_state(struct tg3 *tp)int i;u32 *regs; +/* If it is a PCI error, all registers will be 0xffff, +* we don't dump them out, just report the error and return +*/ +if (tp->pdev->error_state != pci_channel_io_normal) { +netdev_err (tp->dev,"PCI channel ERROR!\n" ); +return ; + } + regs =kzalloc (TG3_REG_BLK_SIZE ,GFP_ATOMIC );if (!regs)return ;
@@ -11184,7 +11192,8 @@ static void tg3_reset_task(struct work_struct *work)rtnl_lock ();tg3_full_lock (tp,0 ); -if (tp->pcierr_recovery || !netif_running (tp->dev)) { +if (tp->pcierr_recovery || !netif_running (tp->dev) || + tp->pdev->error_state != pci_channel_io_normal) {tg3_flag_clear (tp,RESET_TASK_PENDING );tg3_full_unlock (tp);rtnl_unlock ();
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +0 -5
@@ -59,11 +59,6 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_idreturn -ENODEV ; } -if (!of_device_is_compatible (np,"loongson, pci-gmac" )) { -pr_info ("dwmac_loongson_pci: Incompatible OF node\n" ); -return -ENODEV ; - } - plat =devm_kzalloc (&pdev->dev,sizeof (*plat),GFP_KERNEL );if (!plat)return -ENOMEM ;
drivers/net/wireless/intel/iwlwifi/pcie/rx.c +1 -1
@@ -1381,7 +1381,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,* if it is true then one of the handlers took the page. */ -if (reclaim) { +if (reclaim && txq) {u16 sequence =le16_to_cpu (pkt->hdr.sequence);int index =SEQ_TO_INDEX (sequence);int cmd_index =iwl_txq_get_cmd_index (txq, index);
drivers/nvme/host/core.c +8 -4
@@ -1511,7 +1511,8 @@ static int nvme_ns_info_from_identify(struct nvme_ctrl *ctrl,if (id->ncap ==0 ) {/* namespace not allocated or attached */ info->is_removed = true; -return -ENODEV ; + ret = -ENODEV ; + goto error; } info->anagrpid = id->anagrpid;
@@ -1529,8 +1530,10 @@ static int nvme_ns_info_from_identify(struct nvme_ctrl *ctrl, !memchr_inv(ids->nguid, 0, sizeof(ids->nguid)))memcpy (ids->nguid, id->nguid,sizeof (ids->nguid)); } + +error:kfree (id); -return 0 ; +return ret; } static int nvme_ns_info_from_id_cs_indep(struct nvme_ctrl *ctrl,
@@ -1922,9 +1925,10 @@ static void nvme_update_disk_info(struct gendisk *disk,/* * The block layer can't support LBA sizes larger than the page size -* yet, so catch this early and don't allow block I/O. +* or smaller than a sector size yet, so catch this early and don't +* allow block I/O. */ -if (ns->lba_shift >PAGE_SHIFT ) { +if (ns->lba_shift >PAGE_SHIFT || ns->lba_shift <SECTOR_SHIFT ) { capacity =0 ; bs = (1 <<9 ); }
drivers/nvme/host/nvme.h +5 -0
@@ -382,6 +382,11 @@ struct nvme_ctrl {enum nvme_dctype dctype; }; +static inline enum nvme_ctrl_state nvme_ctrl_state (struct nvme_ctrl *ctrl) +{ +return READ_ONCE (ctrl->state); +} +enum nvme_iopolicy {NVME_IOPOLICY_NUMA ,NVME_IOPOLICY_RR ,
drivers/nvme/target/configfs.c +3 -0
@@ -16,6 +16,7 @@#endif #include <crypto/hash.h> #include <crypto/kpp.h> +#include <linux/nospec.h> #include "nvmet.h"
@@ -508,6 +509,7 @@ static ssize_t nvmet_ns_ana_grpid_store(struct config_item *item,down_write (&nvmet_ana_sem); oldgrpid = ns->anagrpid; + newgrpid =array_index_nospec (newgrpid,NVMET_MAX_ANAGRPS ); nvmet_ana_group_enabled[newgrpid]++; ns->anagrpid = newgrpid; nvmet_ana_group_enabled[oldgrpid]--;
@@ -1580,6 +1582,7 @@ static struct config_group *nvmet_ana_groups_make_group( grp->grpid = grpid;down_write (&nvmet_ana_sem); + grpid =array_index_nospec (grpid,NVMET_MAX_ANAGRPS ); nvmet_ana_group_enabled[grpid]++;up_write (&nvmet_ana_sem);
drivers/parport/parport_serial.c +64 -0
88 lines not on this page · raw message
drivers/pci/quirks.c +6 -2
@@ -4602,17 +4602,21 @@ static int pci_quirk_xgene_acs(struct pci_dev *dev, u16 acs_flags)* But the implementation could block peer-to-peer transactions between them * and provide ACS-like functionality. */ -static int pci_quirk_zhaoxin_pcie_ports_acs (struct pci_dev *dev,u16 acs_flags) +static int pci_quirk_zhaoxin_pcie_ports_acs (struct pci_dev *dev,u16 acs_flags) {if (!pci_is_pcie (dev) || ((pci_pcie_type (dev) !=PCI_EXP_TYPE_ROOT_PORT ) && (pci_pcie_type (dev) !=PCI_EXP_TYPE_DOWNSTREAM )))return -ENOTTY ; +/* +* Future Zhaoxin Root Ports and Switch Downstream Ports will +* implement ACS capability in accordance with the PCIe Spec. +*/ switch (dev->device) { case 0x0710 ... 0x071e:case 0x0721 : - case 0x0723 ... 0x0732: + case 0x0723 ... 0x0752:return pci_acs_ctrl_enabled (acs_flags,PCI_ACS_SV |PCI_ACS_RR |PCI_ACS_CR |PCI_ACS_UF ); }
drivers/pinctrl/cirrus/Kconfig +2 -1
@@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config PINCTRL_LOCHNAGAR tristate "Cirrus Logic Lochnagar pinctrl driver" - depends on MFD_LOCHNAGAR + # Avoid clash caused by MIPS defining RST, which is used in the driver + depends on MFD_LOCHNAGAR && !MIPS select GPIOLIB select PINMUX select PINCONF
drivers/pinctrl/pinctrl-cy8c95x0.c +3 -1
@@ -749,6 +749,8 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip, ret =regmap_read (chip->regmap, reg, ®_val);if (reg_val & bit) arg =1 ; +if (param ==PIN_CONFIG_OUTPUT_ENABLE ) + arg = !arg; *config =pinconf_to_config_packed (param, (u16 )arg); out:
@@ -857,7 +859,7 @@ static int cy8c95x0_setup_gpiochip(struct cy8c95x0_pinctrl *chip) gc->get_direction = cy8c95x0_gpio_get_direction; gc->get_multiple = cy8c95x0_gpio_get_multiple; gc->set_multiple = cy8c95x0_gpio_set_multiple; - gc->set_config = gpiochip_generic_config, + gc->set_config = gpiochip_generic_config; gc->can_sleep = true; gc->add_pin_ranges = cy8c95x0_add_pin_ranges;
drivers/platform/x86/intel/vbtn.c +15 -4
@@ -73,10 +73,10 @@ struct intel_vbtn_priv {bool wakeup_mode; }; -static void detect_tablet_mode (struct platform_device *device) +static void detect_tablet_mode (struct device *dev) { -struct intel_vbtn_priv *priv =dev_get_drvdata (&device->dev); -acpi_handle handle =ACPI_HANDLE (&device->dev); +struct intel_vbtn_priv *priv =dev_get_drvdata (dev); +acpi_handle handle =ACPI_HANDLE (dev);unsigned long long vgbs;acpi_status status;int m;
@@ -89,6 +89,8 @@ static void detect_tablet_mode(struct platform_device *device)input_report_switch (priv->switches_dev,SW_TABLET_MODE , m); m = (vgbs &VGBS_DOCK_MODE_FLAG ) ?1 :0 ;input_report_switch (priv->switches_dev,SW_DOCK , m); + +input_sync (priv->switches_dev); }/*
@@ -134,7 +136,7 @@ static int intel_vbtn_input_setup(struct platform_device *device) priv->switches_dev->id.bustype =BUS_HOST ;if (priv->has_switches) { -detect_tablet_mode (device); +detect_tablet_mode (&device->dev); ret =input_register_device (priv->switches_dev);if (ret)
@@ -198,6 +200,9 @@ static void notify_handler(acpi_handle handle, u32 event, void *context) autorelease = val && (!ke_rel || ke_rel->type ==KE_IGNORE );sparse_keymap_report_event (input_dev, event, val, autorelease); + +/* Some devices need this to report further events */ +acpi_evaluate_object (handle,"VBDL" ,NULL ,NULL ); }/*
@@ -358,7 +363,13 @@ static void intel_vbtn_pm_complete(struct device *dev)static int intel_vbtn_pm_resume (struct device *dev) { +struct intel_vbtn_priv *priv =dev_get_drvdata (dev); +intel_vbtn_pm_complete (dev); + +if (priv->has_switches) +detect_tablet_mode (dev); +return 0 ; }
drivers/platform/x86/thinkpad_acpi.c +85 -13
201 lines not on this page · raw message
drivers/reset/hisilicon/hi6220_reset.c +1 -1
@@ -164,7 +164,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)if (!data)return -ENOMEM ; - type = (enum hi6220_reset_ctrl_type )of_device_get_match_data (dev); + type = (uintptr_t )of_device_get_match_data (dev); regmap =syscon_node_to_regmap (np);if (IS_ERR (regmap)) {
drivers/s390/block/scm_blk.c +4 -3
@@ -17,6 +17,7 @@#include <linux/blk-mq.h> #include <linux/slab.h> #include <linux/list.h> +#include <linux/io.h> #include <asm/eadm.h> #include "scm_blk.h"
@@ -130,7 +131,7 @@ static void scm_request_done(struct scm_request *scmrq)for (i =0 ; i < nr_requests_per_io && scmrq->request[i]; i++) { msb = &scmrq->aob->msb[i]; - aidaw = msb->data_addr; + aidaw = (u64 )phys_to_virt (msb->data_addr);if ((msb->flags &MSB_FLAG_IDA ) && aidaw &&IS_ALIGNED (aidaw,PAGE_SIZE ))
@@ -195,12 +196,12 @@ static int scm_request_prepare(struct scm_request *scmrq) msb->scm_addr = scmdev->address + ((u64 )blk_rq_pos (req) <<9 ); msb->oc = (rq_data_dir (req) ==READ ) ?MSB_OC_READ :MSB_OC_WRITE ; msb->flags |=MSB_FLAG_IDA ; - msb->data_addr = (u64 ) aidaw; + msb->data_addr = (u64 )virt_to_phys (aidaw);rq_for_each_segment (bv, req, iter) {WARN_ON (bv.bv_offset); msb->blk_count += bv.bv_len >>12 ; - aidaw->data_addr = (u64 )page_address (bv.bv_page); + aidaw->data_addr =virt_to_phys (page_address (bv.bv_page)); aidaw++; }
drivers/uio/uio.c +3 -4
@@ -466,13 +466,13 @@ static int uio_open(struct inode *inode, struct file *filep)mutex_lock (&minor_lock); idev =idr_find (&uio_idr,iminor (inode)); -mutex_unlock (&minor_lock);if (!idev) { ret = -ENODEV ; +mutex_unlock (&minor_lock); goto out; } -get_device (&idev->dev); +mutex_unlock (&minor_lock);if (!try_module_get (idev->owner)) { ret = -ENODEV ;
@@ -1064,9 +1064,8 @@ void uio_unregister_device(struct uio_info *info)wake_up_interruptible (&idev->wait);kill_fasync (&idev->async_queue,SIGIO ,POLL_HUP ); -device_unregister (&idev->dev); -uio_free_minor (minor); +device_unregister (&idev->dev);return ; }
fs/debugfs/file.c +8 -0
@@ -84,6 +84,14 @@ int debugfs_file_get(struct dentry *dentry)struct debugfs_fsdata *fsd;void *d_fsd; +/* +* This could only happen if some debugfs user erroneously calls +* debugfs_file_get() on a dentry that isn't even a file, let +* them know about it. +*/ +if (WARN_ON (!d_is_reg (dentry))) +return -EINVAL ; + d_fsd =READ_ONCE (dentry->d_fsdata);if (!((unsigned long )d_fsd &DEBUGFS_FSDATA_IS_REAL_FOPS_BIT )) { fsd = d_fsd;
fs/debugfs/inode.c +20 -7
@@ -237,17 +237,19 @@ static const struct super_operations debugfs_super_operations = {static void debugfs_release_dentry (struct dentry *dentry) { -void *fsd = dentry->d_fsdata; +struct debugfs_fsdata *fsd = dentry->d_fsdata; -if (!((unsigned long )fsd &DEBUGFS_FSDATA_IS_REAL_FOPS_BIT )) -kfree (dentry->d_fsdata); +if ((unsigned long )fsd &DEBUGFS_FSDATA_IS_REAL_FOPS_BIT ) +return ; + +kfree (fsd); }static struct vfsmount *debugfs_automount (struct path *path) { -debugfs_automount_t f; - f = (debugfs_automount_t )path->dentry->d_fsdata; -return f (path->dentry,d_inode (path->dentry)->i_private); +struct debugfs_fsdata *fsd = path->dentry->d_fsdata; + +return fsd->automount (path->dentry,d_inode (path->dentry)->i_private); }static const struct dentry_operations debugfs_dops = {
@@ -635,13 +637,23 @@ struct dentry *debugfs_create_automount(const char *name, void *data) {struct dentry *dentry =start_creating (name, parent); +struct debugfs_fsdata *fsd;struct inode *inode;if (IS_ERR (dentry))return dentry; + fsd =kzalloc (sizeof (*fsd),GFP_KERNEL ); +if (!fsd) { +failed_creating (dentry); +return ERR_PTR (-ENOMEM ); + } + + fsd->automount = f; +if (!(debugfs_allow &DEBUGFS_ALLOW_API )) {failed_creating (dentry); +kfree (fsd);return ERR_PTR (-EPERM ); }
@@ -649,13 +661,14 @@ struct dentry *debugfs_create_automount(const char *name,if (unlikely (!inode)) {pr_err ("out of free dentries, can not create automount '%s'\n" , name); +kfree (fsd);return failed_creating (dentry); }make_empty_dir_inode (inode); inode->i_flags |=S_AUTOMOUNT ; inode->i_private = data; - dentry->d_fsdata = (void *)f; + dentry->d_fsdata = fsd;/* directory inodes start off with i_nlink == 2 (for "." entry) */ inc_nlink (inode);d_instantiate (dentry, inode);
fs/debugfs/internal.h +8 -2
@@ -17,8 +17,14 @@ extern const struct file_operations debugfs_full_proxy_file_operations;struct debugfs_fsdata {const struct file_operations *real_fops; -refcount_t active_users; -struct completion active_users_drained; +union { +/* automount_fn is used when real_fops is NULL */ +debugfs_automount_t automount; +struct { +refcount_t active_users; +struct completion active_users_drained; + }; + }; };/*
fs/f2fs/xattr.c +6 -0
@@ -754,6 +754,12 @@ static int __f2fs_setxattr(struct inode *inode, int index,memcpy (pval, value, size); last->e_value_size =cpu_to_le16 (size); new_hsize += newsize; +/* +* Explicitly add the null terminator. The unused xattr space +* is supposed to always be zeroed, which would make this +* unnecessary, but don't depend on that. +*/ + *(u32 *)((u8 *)last + newsize) =0 ; } error =write_all_xattrs (inode, new_hsize, base_addr, ipage);
fs/jbd2/commit.c +6 -4
@@ -123,7 +123,7 @@ static int journal_submit_commit_record(journal_t *journal,struct commit_header *tmp;struct buffer_head *bh;struct timespec64 now; -blk_opf_t write_flags =REQ_OP_WRITE |REQ_SYNC ; +blk_opf_t write_flags =REQ_OP_WRITE |JBD2_JOURNAL_REQ_FLAGS ; *cbh =NULL ;
@@ -300,6 +300,7 @@ static int journal_finish_inode_data_buffers(journal_t *journal,if (!ret) ret = err; } +cond_resched ();spin_lock (&journal->j_list_lock); jinode->i_flags &= ~JI_COMMIT_RUNNING ;smp_mb ();
@@ -429,8 +430,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)*/ jbd2_journal_update_sb_log_tail (journal, journal->j_tail_sequence, - journal->j_tail, -REQ_SYNC ); + journal->j_tail,0 );mutex_unlock (&journal->j_checkpoint_mutex); }else {jbd2_debug (3 ,"superblock not updated\n" );
@@ -749,6 +749,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)for (i =0 ; i < bufs; i++) {struct buffer_head *bh = wbuf[i]; +/* * Compute checksum. */
@@ -761,7 +762,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)clear_buffer_dirty (bh);set_buffer_uptodate (bh); bh->b_end_io = journal_end_buffer_io_sync; -submit_bh (REQ_OP_WRITE |REQ_SYNC , bh); +submit_bh (REQ_OP_WRITE |JBD2_JOURNAL_REQ_FLAGS , + bh); }cond_resched ();
fs/jbd2/journal.c +14 -10
@@ -1109,8 +1109,7 @@ int __jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block)* space and if we lose sb update during power failure we'd replay * old transaction with possibly newly overwritten data. */ - ret =jbd2_journal_update_sb_log_tail (journal, tid, block, -REQ_SYNC |REQ_FUA ); + ret =jbd2_journal_update_sb_log_tail (journal, tid, block,REQ_FUA );if (ret) goto out;
@@ -1597,8 +1596,7 @@ static int journal_reset(journal_t *journal)*/ jbd2_journal_update_sb_log_tail (journal, journal->j_tail_sequence, - journal->j_tail, -REQ_SYNC |REQ_FUA ); + journal->j_tail,REQ_FUA );mutex_unlock (&journal->j_checkpoint_mutex); }return jbd2_journal_start_thread (journal);
@@ -1620,9 +1618,16 @@ static int jbd2_write_superblock(journal_t *journal, blk_opf_t write_flags)return -EIO ; } -trace_jbd2_write_superblock (journal, write_flags); +/* +* Always set high priority flags to exempt from block layer's +* QOS policies, e.g. writeback throttle. +*/ + write_flags |=JBD2_JOURNAL_REQ_FLAGS ;if (!(journal->j_flags &JBD2_BARRIER )) write_flags &= ~(REQ_FUA |REQ_PREFLUSH ); + +trace_jbd2_write_superblock (journal, write_flags); +if (buffer_write_io_error (bh)) {/* * Oh, dear. A previous attempt to write the journal
@@ -1871,7 +1876,7 @@ void jbd2_journal_update_sb_errno(journal_t *journal)jbd2_debug (1 ,"JBD2: updating superblock error (errno %d)\n" , errcode); sb->s_errno =cpu_to_be32 (errcode); -jbd2_write_superblock (journal,REQ_SYNC |REQ_FUA ); +jbd2_write_superblock (journal,REQ_FUA ); }EXPORT_SYMBOL (jbd2_journal_update_sb_errno);
@@ -2176,8 +2181,7 @@ int jbd2_journal_destroy(journal_t *journal) ++journal->j_transaction_sequence;write_unlock (&journal->j_state_lock); -jbd2_mark_journal_empty (journal, -REQ_SYNC |REQ_PREFLUSH |REQ_FUA ); +jbd2_mark_journal_empty (journal,REQ_PREFLUSH |REQ_FUA );mutex_unlock (&journal->j_checkpoint_mutex); }else err = -EIO ;
@@ -2486,7 +2490,7 @@ int jbd2_journal_flush(journal_t *journal, unsigned int flags)* the magic code for a fully-recovered superblock. Any future * commits of data to the journal will restore the current * s_start value. */ -jbd2_mark_journal_empty (journal,REQ_SYNC |REQ_FUA ); +jbd2_mark_journal_empty (journal,REQ_FUA );if (flags) err =__jbd2_journal_erase (journal, flags);
@@ -2536,7 +2540,7 @@ int jbd2_journal_wipe(journal_t *journal, int write)if (write) {/* Lock to make assertions happy... */ mutex_lock_io (&journal->j_checkpoint_mutex); -jbd2_mark_journal_empty (journal,REQ_SYNC |REQ_FUA ); +jbd2_mark_journal_empty (journal,REQ_FUA );mutex_unlock (&journal->j_checkpoint_mutex); }
fs/smb/client/cifspdu.h +14 -10
@@ -882,11 +882,13 @@ typedef struct smb_com_open_rsp {__u8 OplockLevel;__u16 Fid;__le32 CreateAction; -__le64 CreationTime; -__le64 LastAccessTime; -__le64 LastWriteTime; -__le64 ChangeTime; -__le32 FileAttributes; +struct_group (common_attributes, + __le64 CreationTime; + __le64 LastAccessTime; + __le64 LastWriteTime; + __le64 ChangeTime; + __le32 FileAttributes; + );__le64 AllocationSize;__le64 EndOfFile;__le16 FileType;
@@ -2268,11 +2270,13 @@ typedef struct {/* QueryFileInfo/QueryPathinfo (also for SetPath/SetFile) data buffer formats */ /******************************************************************************/ typedef struct { /* data block encoding of response to level 263 QPathInfo */ - __le64 CreationTime; - __le64 LastAccessTime; - __le64 LastWriteTime; - __le64 ChangeTime; - __le32 Attributes; + struct_group(common_attributes, + __le64 CreationTime; + __le64 LastAccessTime; + __le64 LastWriteTime; + __le64 ChangeTime; + __le32 Attributes; + ); __u32 Pad1; __le64 AllocationSize; __le64 EndOfFile; /* size ie offset to first free byte in file */
fs/smb/client/cifssmb.c +4 -2
@@ -1234,8 +1234,10 @@ CIFS_open(const unsigned int xid, struct cifs_open_parms *oparms, int *oplock, *oplock |=CIFS_CREATE_ACTION ;if (buf) { -/* copy from CreationTime to Attributes */ -memcpy ((char *)buf, (char *)&rsp->CreationTime,36 ); +/* copy commonly used attributes */ +memcpy (&buf->common_attributes, + &rsp->common_attributes, +sizeof (buf->common_attributes));/* the file_info buf is endian converted by caller */ buf->AllocationSize = rsp->AllocationSize; buf->EndOfFile = rsp->EndOfFile;
fs/smb/client/smb2misc.c +15 -15
@@ -173,6 +173,21 @@ smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *server) } mid =le64_to_cpu (shdr->MessageId); +if (check_smb2_hdr (shdr, mid)) +return 1 ; + +if (shdr->StructureSize !=SMB2_HEADER_STRUCTURE_SIZE ) { +cifs_dbg (VFS ,"Invalid structure size %u\n" , +le16_to_cpu (shdr->StructureSize)); +return 1 ; + } + + command =le16_to_cpu (shdr->Command); +if (command >=NUMBER_OF_SMB2_COMMANDS ) { +cifs_dbg (VFS ,"Invalid SMB2 command %d\n" , command); +return 1 ; + } +if (len < pdu_size) {if ((len >= hdr_size) && (shdr->Status !=0 )) {
@@ -193,21 +208,6 @@ smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *server)return 1 ; } -if (check_smb2_hdr (shdr, mid)) -return 1 ; - -if (shdr->StructureSize !=SMB2_HEADER_STRUCTURE_SIZE ) { -cifs_dbg (VFS ,"Invalid structure size %u\n" , -le16_to_cpu (shdr->StructureSize)); -return 1 ; - } - - command =le16_to_cpu (shdr->Command); -if (command >=NUMBER_OF_SMB2_COMMANDS ) { -cifs_dbg (VFS ,"Invalid SMB2 command %d\n" , command); -return 1 ; - } -if (smb2_rsp_struct_sizes[command] != pdu->StructureSize2) {if (command !=SMB2_OPLOCK_BREAK_HE && (shdr->Status ==0 || pdu->StructureSize2 !=SMB2_ERROR_STRUCTURE_SIZE2_LE )) {
fs/smb/client/smb2ops.c +4 -2
@@ -398,8 +398,10 @@ smb2_dump_detail(void *buf, struct TCP_Server_Info *server)cifs_server_dbg (VFS ,"Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n" , shdr->Command, shdr->Status, shdr->Flags, shdr->MessageId, shdr->Id.SyncId.ProcessId); -cifs_server_dbg (VFS ,"smb buf %p len %u\n" , buf, - server->ops->calc_smb_size (buf)); +if (!server->ops->check_message (buf, server->total_read, server)) { +cifs_server_dbg (VFS ,"smb buf %p len %u\n" , buf, + server->ops->calc_smb_size (buf)); + }#endif }
fs/smb/client/smb2pdu.c +3 -5
@@ -3429,12 +3429,10 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, }else {trace_smb3_close_done (xid, persistent_fid, tcon->tid, ses->Suid); -/* -* Note that have to subtract 4 since struct network_open_info -* has a final 4 byte pad that close response does not have -*/ if (pbuf) -memcpy (pbuf, (char *)&rsp->CreationTime,sizeof (*pbuf) -4 ); +memcpy (&pbuf->network_open_info, + &rsp->network_open_info, +sizeof (pbuf->network_open_info)); }atomic_dec (&tcon->num_remote_opens);
fs/smb/client/smb2pdu.h +9 -7
@@ -339,13 +339,15 @@ struct smb2_file_reparse_point_info { } __packed;struct smb2_file_network_open_info { -__le64 CreationTime; -__le64 LastAccessTime; -__le64 LastWriteTime; -__le64 ChangeTime; -__le64 AllocationSize; -__le64 EndOfFile; -__le32 Attributes; + struct_group(network_open_info, + __le64 CreationTime; +__le64 LastAccessTime; +__le64 LastWriteTime; +__le64 ChangeTime; +__le64 AllocationSize; +__le64 EndOfFile; +__le32 Attributes; + );__le32 Reserved; } __packed;/* level 34 Query also similar returned in close rsp and open rsp */
fs/smb/common/smb2pdu.h +10 -7
@@ -699,13 +699,16 @@ struct smb2_close_rsp {__le16 StructureSize;/* 60 */ __le16 Flags;__le32 Reserved; -__le64 CreationTime; -__le64 LastAccessTime; -__le64 LastWriteTime; -__le64 ChangeTime; -__le64 AllocationSize;/* Beginning of FILE_STANDARD_INFO equivalent */ -__le64 EndOfFile; -__le32 Attributes; +struct_group (network_open_info, + __le64 CreationTime; + __le64 LastAccessTime; + __le64 LastWriteTime; + __le64 ChangeTime; +/* Beginning of FILE_STANDARD_INFO equivalent */ + __le64 AllocationSize; + __le64 EndOfFile; + __le32 Attributes; + ); } __packed;
fs/smb/server/smb2pdu.c +9 -14
@@ -2969,7 +2969,7 @@ int smb2_open(struct ksmbd_work *work) &may_flags);if (!test_tree_conn_flag (tcon,KSMBD_TREE_CONN_FLAG_WRITABLE )) { -if (open_flags &O_CREAT ) { +if (open_flags & (O_CREAT |O_TRUNC )) {ksmbd_debug (SMB ,"User does not have write permission\n" ); rc = -EACCES ;
@@ -5941,12 +5941,6 @@ static int smb2_set_info_file(struct ksmbd_work *work, struct ksmbd_file *fp, }case FILE_RENAME_INFORMATION : { -if (!test_tree_conn_flag (work->tcon,KSMBD_TREE_CONN_FLAG_WRITABLE )) { -ksmbd_debug (SMB , -"User does not have write permission\n" ); -return -EACCES ; - } -if (buf_len <sizeof (struct smb2_file_rename_info ))return -EINVAL ;
@@ -5966,12 +5960,6 @@ static int smb2_set_info_file(struct ksmbd_work *work, struct ksmbd_file *fp, }case FILE_DISPOSITION_INFORMATION : { -if (!test_tree_conn_flag (work->tcon,KSMBD_TREE_CONN_FLAG_WRITABLE )) { -ksmbd_debug (SMB , -"User does not have write permission\n" ); -return -EACCES ; - } -if (buf_len <sizeof (struct smb2_file_disposition_info ))return -EINVAL ;
@@ -6033,7 +6021,7 @@ int smb2_set_info(struct ksmbd_work *work) {struct smb2_set_info_req *req;struct smb2_set_info_rsp *rsp; -struct ksmbd_file *fp; +struct ksmbd_file *fp =NULL ;int rc =0 ;unsigned int id =KSMBD_NO_FID , pid =KSMBD_NO_FID ;
@@ -6053,6 +6041,13 @@ int smb2_set_info(struct ksmbd_work *work) rsp =smb2_get_msg (work->response_buf); } +if (!test_tree_conn_flag (work->tcon,KSMBD_TREE_CONN_FLAG_WRITABLE )) { +ksmbd_debug (SMB ,"User does not have write permission\n" ); +pr_err ("User does not have write permission\n" ); + rc = -EACCES ; + goto err_out; + } +if (!has_file_id (id)) { id = req->VolatileFileId; pid = req->PersistentFileId;
fs/smb/server/smbacl.c +7 -4
@@ -401,10 +401,6 @@ static void parse_dacl(struct user_namespace *user_ns,if (num_aces >ULONG_MAX /sizeof (struct smb_ace *))return ; - ppace =kmalloc_array (num_aces,sizeof (struct smb_ace *),GFP_KERNEL ); -if (!ppace) -return ; - ret =init_acl_state (&acl_state, num_aces);if (ret)return ;
@@ -414,6 +410,13 @@ static void parse_dacl(struct user_namespace *user_ns,return ; } + ppace =kmalloc_array (num_aces,sizeof (struct smb_ace *),GFP_KERNEL ); +if (!ppace) { +free_acl_state (&default_acl_state); +free_acl_state (&acl_state); +return ; + } +/* * reset rwx permissions for user/group/other. * Also, if num_aces is 0 i.e. DACL has no ACEs,
include/linux/ieee80211.h +3 -1
@@ -2658,12 +2658,14 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)static inline const struct ieee80211_he_6ghz_oper *ieee80211_he_6ghz_oper (const struct ieee80211_he_operation *he_oper) { -const u8 *ret = (const void *)&he_oper->optional; +const u8 *ret;u32 he_oper_params;if (!he_oper)return NULL ; + ret = (const void *)&he_oper->optional; + he_oper_params =le32_to_cpu (he_oper->he_oper_params);if (!(he_oper_params &IEEE80211_HE_OPERATION_6GHZ_OP_INFO ))
include/linux/jbd2.h +3 -0
@@ -1374,6 +1374,9 @@ JBD2_FEATURE_INCOMPAT_FUNCS(csum2, CSUM_V2) JBD2_FEATURE_INCOMPAT_FUNCS(csum3, CSUM_V3)JBD2_FEATURE_INCOMPAT_FUNCS (fast_commit,FAST_COMMIT ) +/* Journal high priority write IO operation flags */ +#define JBD2_JOURNAL_REQ_FLAGS (REQ_META | REQ_SYNC | REQ_IDLE) +/* * Journal flag definitions */
init/Kconfig +1 -1
@@ -1914,7 +1914,7 @@ config RUST depends on !MODVERSIONS depends on !GCC_PLUGINS depends on !RANDSTRUCT - depends on !DEBUG_INFO_BTF + depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE select CONSTRUCTORS help Enables Rust support in the kernel.
kernel/trace/ring_buffer.c +6 -0
@@ -3644,6 +3644,12 @@ rb_reserve_next_event(struct trace_buffer *buffer,int nr_loops =0 ;int add_ts_default; +/* ring buffer does cmpxchg, make sure it is safe in NMI context */ +if (!IS_ENABLED (CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG ) && + (unlikely (in_nmi ()))) { +return NULL ; + } +rb_start_commit (cpu_buffer);/* The commit page can not change after this */
kernel/trace/trace.c +11 -1
@@ -4679,7 +4679,11 @@ static int s_show(struct seq_file *m, void *v) iter->leftover = ret; }else { -print_trace_line (iter); + ret =print_trace_line (iter); +if (ret ==TRACE_TYPE_PARTIAL_LINE ) { + iter->seq.full =0 ; +trace_seq_puts (&iter->seq,"[LINE TOO BIG]\n" ); + } ret =trace_print_seq (m, &iter->seq);/* * If we overflow the seq_file buffer, then it will
@@ -4912,6 +4916,12 @@ int tracing_release_file_tr(struct inode *inode, struct file *filp)return 0 ; } +int tracing_single_release_file_tr (struct inode *inode,struct file *filp) +{ +tracing_release_file_tr (inode, filp); +return single_release (inode, filp); +} +static int tracing_mark_open (struct inode *inode,struct file *filp) {stream_open (inode, filp);
kernel/trace/trace.h +1 -0
@@ -592,6 +592,7 @@ int tracing_open_generic(struct inode *inode, struct file *filp);int tracing_open_generic_tr (struct inode *inode,struct file *filp);int tracing_open_file_tr (struct inode *inode,struct file *filp);int tracing_release_file_tr (struct inode *inode,struct file *filp); +int tracing_single_release_file_tr (struct inode *inode,struct file *filp);bool tracing_is_disabled (void );bool tracer_tracing_is_on (struct trace_array *tr);void tracer_tracing_on (struct trace_array *tr);
kernel/trace/trace_events_hist.c +8 -4
@@ -5532,10 +5532,12 @@ static int event_hist_open(struct inode *inode, struct file *file) {int ret; - ret =security_locked_down (LOCKDOWN_TRACEFS ); + ret =tracing_open_file_tr (inode, file);if (ret)return ret; +/* Clear private_data to avoid warning in single_open() */ + file->private_data =NULL ;return single_open (file, hist_show, file); }
@@ -5543,7 +5545,7 @@ const struct file_operations event_hist_fops = { .open = event_hist_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = tracing_single_release_file_tr, };#ifdef CONFIG_HIST_TRIGGERS_DEBUG
@@ -5809,10 +5811,12 @@ static int event_hist_debug_open(struct inode *inode, struct file *file) {int ret; - ret =security_locked_down (LOCKDOWN_TRACEFS ); + ret =tracing_open_file_tr (inode, file);if (ret)return ret; +/* Clear private_data to avoid warning in single_open() */ + file->private_data =NULL ;return single_open (file, hist_debug_show, file); }
@@ -5820,7 +5824,7 @@ const struct file_operations event_hist_debug_fops = { .open = event_hist_debug_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = tracing_single_release_file_tr, };#endif
kernel/trace/trace_output.c +4 -2
@@ -1445,11 +1445,12 @@ static enum print_line_t trace_print_print(struct trace_iterator *iter, {struct print_entry *field;struct trace_seq *s = &iter->seq; +int max = iter->ent_size - offsetof(struct print_entry , buf);trace_assign_type (field, iter->ent);seq_print_ip_sym (s, field->ip, flags); -trace_seq_printf (s,": %s" , field->buf); +trace_seq_printf (s,": %.*s" , max, field->buf);return trace_handle_return (s); }
@@ -1458,10 +1459,11 @@ static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags, struct trace_event *event) {struct print_entry *field; +int max = iter->ent_size - offsetof(struct print_entry , buf);trace_assign_type (field, iter->ent); -trace_seq_printf (&iter->seq,"# %lx %s" , field->ip, field->buf); +trace_seq_printf (&iter->seq,"# %lx %.*s" , field->ip, max, field->buf);return trace_handle_return (&iter->seq); }
lib/Kconfig.debug +9 -0
@@ -364,6 +364,15 @@ config PAHOLE_HAS_BTF_TAG btf_decl_tag) or not. Currently only clang compiler implements these attributes, so make the config depend on CC_IS_CLANG. +config PAHOLE_HAS_LANG_EXCLUDE + def_bool PAHOLE_VERSION >= 124 + help + Support for the --lang_exclude flag which makes pahole exclude + compilation units from the supplied language. Used in Kbuild to + omit Rust CUs which are not supported in version 1.24 of pahole, + otherwise it would emit malformed kernel and module binaries when + using DEBUG_INFO_BTF_MODULES. + config DEBUG_INFO_BTF_MODULES def_bool y depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
lib/idr.c +1 -1
@@ -508,7 +508,7 @@ void ida_free(struct ida *ida, unsigned int id) goto delete;xas_store (&xas,xa_mk_value (v)); }else { -if (!test_bit (bit, bitmap->bitmap)) +if (!bitmap || !test_bit (bit, bitmap->bitmap)) goto err;__clear_bit (bit, bitmap->bitmap);xas_set_mark (&xas,XA_FREE_MARK );
lib/test_ida.c +40 -0
@@ -150,6 +150,45 @@ static void ida_check_conv(struct ida *ida)IDA_BUG_ON (ida, !ida_is_empty (ida)); } +/* +* Check various situations where we attempt to free an ID we don't own. +*/ +static void ida_check_bad_free (struct ida *ida) +{ +unsigned long i; + +printk ("vvv Ignore \"not allocated\" warnings\n" ); +/* IDA is empty; all of these will fail */ +ida_free (ida,0 ); +for (i =0 ; i <31 ; i++) +ida_free (ida,1 << i); + +/* IDA contains a single value entry */ +IDA_BUG_ON (ida,ida_alloc_min (ida,3 ,GFP_KERNEL ) !=3 ); +ida_free (ida,0 ); +for (i =0 ; i <31 ; i++) +ida_free (ida,1 << i); + +/* IDA contains a single bitmap */ +IDA_BUG_ON (ida,ida_alloc_min (ida,1023 ,GFP_KERNEL ) !=1023 ); +ida_free (ida,0 ); +for (i =0 ; i <31 ; i++) +ida_free (ida,1 << i); + +/* IDA contains a tree */ +IDA_BUG_ON (ida,ida_alloc_min (ida, (1 <<20 ) -1 ,GFP_KERNEL ) != (1 <<20 ) -1 ); +ida_free (ida,0 ); +for (i =0 ; i <31 ; i++) +ida_free (ida,1 << i); +printk ("^^^ \"not allocated\" warnings over\n" ); + +ida_free (ida,3 ); +ida_free (ida,1023 ); +ida_free (ida, (1 <<20 ) -1 ); + +IDA_BUG_ON (ida, !ida_is_empty (ida)); +} +static DEFINE_IDA (ida);static int ida_checks (void )
@@ -162,6 +201,7 @@ static int ida_checks(void)ida_check_leaf (&ida,1024 *64 );ida_check_max (&ida);ida_check_conv (&ida); +ida_check_bad_free (&ida);printk ("IDA: %u of %u tests passed\n" , tests_passed, tests_run);return (tests_run != tests_passed) ?0 : -EINVAL ;
net/core/neighbour.c +8 -1
@@ -253,9 +253,11 @@ static int neigh_forced_gc(struct neigh_table *tbl) {int max_clean =atomic_read (&tbl->gc_entries) -READ_ONCE (tbl->gc_thresh2); +u64 tmax =ktime_get_ns () +NSEC_PER_MSEC ;unsigned long tref = jiffies -5 *HZ ;struct neighbour *n, *tmp;int shrunk =0 ; +int loop =0 ;NEIGH_CACHE_STAT_INC (tbl, forced_gc_runs);
@@ -278,11 +280,16 @@ static int neigh_forced_gc(struct neigh_table *tbl) shrunk++;if (shrunk >= max_clean)break ; +if (++loop ==16 ) { +if (ktime_get_ns () > tmax) + goto unlock; + loop =0 ; + } } }WRITE_ONCE (tbl->last_flush, jiffies); - +unlock:write_unlock_bh (&tbl->lock);return shrunk;
net/mac80211/ht.c +1 -0
@@ -271,6 +271,7 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,case NL80211_CHAN_WIDTH_80 :case NL80211_CHAN_WIDTH_80P80 :case NL80211_CHAN_WIDTH_160 : +case NL80211_CHAN_WIDTH_320 : bw = ht_cap.cap &IEEE80211_HT_CAP_SUP_WIDTH_20_40 ?IEEE80211_STA_RX_BW_40 :IEEE80211_STA_RX_BW_20 ;break ;
net/mptcp/options.c +1 -0
@@ -103,6 +103,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->suboptions |=OPTION_MPTCP_DSS ; mp_opt->use_map =1 ; mp_opt->mpc_map =1 ; + mp_opt->use_ack =0 ; mp_opt->data_len =get_unaligned_be16 (ptr); ptr +=2 ; }
net/qrtr/ns.c +3 -1
@@ -569,7 +569,9 @@ static int ctrl_cmd_del_server(struct sockaddr_qrtr *from,if (!node)return -ENOENT ; -return server_del (node, port, true); +server_del (node, port, true); + +return 0 ; } static int ctrl_cmd_new_lookup(struct sockaddr_qrtr *from,
net/wireless/core.c +2 -0
@@ -216,7 +216,9 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) {struct cfg80211_registered_device *rdev = data; +wiphy_lock (&rdev->wiphy);rdev_rfkill_poll (rdev); +wiphy_unlock (&rdev->wiphy); } void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev,
scripts/decode_stacktrace.sh +17 -2
@@ -16,6 +16,21 @@ elif type c++filt >/dev/null 2>&1 ; then cppfilt_opts=-i fi +UTIL_SUFFIX= +if [[ -z ${LLVM:-} ]]; then + UTIL_PREFIX=${CROSS_COMPILE:-} +else + UTIL_PREFIX=llvm- + if [[ ${LLVM} == */ ]]; then + UTIL_PREFIX=${LLVM}${UTIL_PREFIX} + elif [[ ${LLVM} == -* ]]; then + UTIL_SUFFIX=${LLVM} + fi +fi + +READELF=${UTIL_PREFIX}readelf${UTIL_SUFFIX} +ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} + if [[ $1 == "-r" ]] ; then vmlinux="" basepath="auto"
@@ -75,7 +90,7 @@ find_module() { if [[ "$modpath" != "" ]] ; then for fn in $(find "$modpath" -name "${module//_/[-_]}.ko*") ; do - if readelf -WS "$fn" | grep -qwF .debug_line ; then + if ${READELF} -WS "$fn" | grep -qwF .debug_line ; then echo $fn return fi
@@ -169,7 +184,7 @@ parse_symbol() { if [[ $aarray_support == true && "${cache[$module,$address]+isset}" == "isset" ]]; then local code=${cache[$module,$address]} else - local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address" 2>/dev/null) + local code=$(${ADDR2LINE} -i -e "$objfile" "$address" 2>/dev/null) if [[ $aarray_support == true ]]; then cache[$module,$address]=$code fi
scripts/pahole-flags.sh +7 -0
@@ -19,5 +19,12 @@ fi if [ "${pahole_ver}" -ge "122" ]; then extra_paholeopt="${extra_paholeopt} -j" fi +if [ "${pahole_ver}" -ge "124" ]; then + # see PAHOLE_HAS_LANG_EXCLUDE + extra_paholeopt="${extra_paholeopt} --lang_exclude=rust" +fi +if [ "${pahole_ver}" -ge "125" ]; then + extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_inconsistent_proto --btf_gen_optimized" +fi echo ${extra_paholeopt}
sound/hda/intel-nhlt.c +29 -4
@@ -238,7 +238,7 @@ EXPORT_SYMBOL(intel_nhlt_ssp_mclk_mask);static struct nhlt_specific_cfg *nhlt_get_specific_cfg (struct device *dev,struct nhlt_fmt *fmt,u8 num_ch, -u32 rate,u8 vbps,u8 bps) +u32 rate,u8 vbps,u8 bps,bool ignore_vbps) {struct nhlt_fmt_cfg *cfg = fmt->fmt_config;struct wav_fmt *wfmt;
@@ -255,8 +255,12 @@ nhlt_get_specific_cfg(struct device *dev, struct nhlt_fmt *fmt, u8 num_ch,dev_dbg (dev,"Endpoint format: ch=%d fmt=%d/%d rate=%d\n" , wfmt->channels, _vbps, _bps, wfmt->samples_per_sec); +/* +* When looking for exact match of configuration ignore the vbps +* from NHLT table when ignore_vbps is true +*/ if (wfmt->channels == num_ch && wfmt->samples_per_sec == rate && - vbps == _vbps && bps == _bps) + (ignore_vbps || vbps == _vbps) && bps == _bps)return &cfg->config; cfg = (struct nhlt_fmt_cfg *)(cfg->config.caps + cfg->config.size);
@@ -289,6 +293,7 @@ intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt, {struct nhlt_specific_cfg *cfg;struct nhlt_endpoint *epnt; +bool ignore_vbps = false;struct nhlt_fmt *fmt;int i;
@@ -298,7 +303,26 @@ intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt,dev_dbg (dev,"Looking for configuration:\n" );dev_dbg (dev," vbus_id=%d link_type=%d dir=%d, dev_type=%d\n" , bus_id, link_type, dir, dev_type); -dev_dbg (dev," ch=%d fmt=%d/%d rate=%d\n" , num_ch, vbps, bps, rate); +if (link_type ==NHLT_LINK_DMIC && bps ==32 && (vbps ==24 || vbps ==32 )) { +/* +* The DMIC hardware supports only one type of 32 bits sample +* size, which is 24 bit sampling on the MSB side and bits[1:0] +* are used for indicating the channel number. +* It has been observed that some NHLT tables have the vbps +* specified as 32 while some uses 24. +* The format these variations describe are identical, the +* hardware is configured and behaves the same way. +* Note: when the samples assumed to be vbps=32 then the 'noise' +* introduced by the lower two bits (channel number) have no +* real life implication on audio quality. +*/ +dev_dbg (dev, +" ch=%d fmt=%d rate=%d (vbps is ignored for DMIC 32bit format)\n" , + num_ch, bps, rate); + ignore_vbps = true; + }else { +dev_dbg (dev," ch=%d fmt=%d/%d rate=%d\n" , num_ch, vbps, bps, rate); + }dev_dbg (dev,"Endpoint count=%d\n" , nhlt->endpoint_count); epnt = (struct nhlt_endpoint *)nhlt->desc;
@@ -307,7 +331,8 @@ intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt,if (nhlt_check_ep_match (dev, epnt, bus_id, link_type, dir, dev_type)) { fmt = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); - cfg =nhlt_get_specific_cfg (dev, fmt, num_ch, rate, vbps, bps); + cfg =nhlt_get_specific_cfg (dev, fmt, num_ch, rate, + vbps, bps, ignore_vbps);if (cfg)return cfg; }
sound/pci/hda/patch_realtek.c +15 -1
@@ -7108,6 +7108,7 @@ enum {ALC290_FIXUP_SUBWOOFER_HSJACK ,ALC269_FIXUP_THINKPAD_ACPI ,ALC269_FIXUP_DMIC_THINKPAD_ACPI , +ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ,ALC255_FIXUP_ASUS_MIC_NO_PRESENCE , ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -7454,6 +7455,14 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc269_fixup_pincfg_U7x7_headset_mic, }, + [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl []) { + {0x18 ,0x03a19020 },/* headset mic */ + {0x1b ,0x90170150 },/* speaker */ + { } + }, + }, [ALC269_FIXUP_AMIC] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl []) {
@@ -9598,6 +9607,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8735 ,"HP ProBook 435 G7" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ),SND_PCI_QUIRK (0x103c ,0x8736 ,"HP" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x8760 ,"HP" ,ALC285_FIXUP_HP_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x876e ,"HP ENVY x360 Convertible 13-ay0xxx" ,ALC245_FIXUP_HP_X360_MUTE_LEDS ),SND_PCI_QUIRK (0x103c ,0x877a ,"HP" ,ALC285_FIXUP_HP_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x877d ,"HP" ,ALC236_FIXUP_HP_MUTE_LED ), SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation",
@@ -9770,17 +9780,20 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x1d1f ,"ASUS ROG Strix G17 2023 (G713PV)" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1d42 ,"ASUS Zephyrus G14 2022" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1d4e ,"ASUS TM420" ,ALC256_FIXUP_ASUS_HPE ), +SND_PCI_QUIRK (0x1043 ,0x1da2 ,"ASUS UP6502ZA/ZD" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1e02 ,"ASUS UX3402ZA" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x16a3 ,"ASUS UX3402VA" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1f62 ,"ASUS UX7602ZM" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1e11 ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA502 ), -SND_PCI_QUIRK (0x1043 ,0x1e12 ,"ASUS UM3402" ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x1043 ,0x1e12 ,"ASUS UM6702RA/RC" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1e51 ,"ASUS Zephyrus M15" ,ALC294_FIXUP_ASUS_GU502_PINS ),SND_PCI_QUIRK (0x1043 ,0x1e5e ,"ASUS ROG Strix G513" ,ALC294_FIXUP_ASUS_G513_PINS ),SND_PCI_QUIRK (0x1043 ,0x1e8e ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA401 ), +SND_PCI_QUIRK (0x1043 ,0x1ee2 ,"ASUS UM3402" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x1043 ,0x1c52 ,"ASUS Zephyrus G15 2022" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1f11 ,"ASUS Zephyrus G14" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1f12 ,"ASUS UM5302" ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x1043 ,0x1f62 ,"ASUS UX7602ZM" ,ALC245_FIXUP_CS35L41_SPI_2 ),SND_PCI_QUIRK (0x1043 ,0x1f92 ,"ASUS ROG Flow X16" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x3030 ,"ASUS ZN270IE" ,ALC256_FIXUP_ASUS_AIO_GPIO2 ), SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2),
@@ -10032,6 +10045,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1d72 ,0x1901 ,"RedmiBook 14" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1945 ,"Redmi G" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1d72 ,0x1947 ,"RedmiBook Air" ,ALC255_FIXUP_XIAOMI_HEADSET_MIC ), +SND_PCI_QUIRK (0x2782 ,0x0232 ,"CHUWI CoreBook XPro" ,ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO ),SND_PCI_QUIRK (0x8086 ,0x2074 ,"Intel NUC 8" ,ALC233_FIXUP_INTEL_NUC8_DMIC ),SND_PCI_QUIRK (0x8086 ,0x2080 ,"Intel NUC 8 Rugged" ,ALC256_FIXUP_INTEL_NUC8_RUGGED ), SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
sound/soc/amd/yc/acp6x-mach.c +7 -0
@@ -353,6 +353,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_VERSION, "pang12"), } }, + { + .driver_data = &acp6x_card, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "System76"), + DMI_MATCH(DMI_PRODUCT_VERSION, "pang13"), + } + }, {} };
sound/soc/codecs/cs43130.c +3 -3
@@ -579,7 +579,7 @@ static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk,break ;case SND_SOC_DAIFMT_LEFT_J : hi_size = bitwidth_sclk; - frm_delay =2 ; + frm_delay =0 ; frm_phase =1 ;break ;case SND_SOC_DAIFMT_DSP_A :
@@ -1683,7 +1683,7 @@ static ssize_t hpload_dc_r_show(struct device *dev,return cs43130_show_dc (dev, buf,HP_RIGHT ); } -static u16 const cs43130_ac_freq[CS43130_AC_FREQ ] = { +static const u16 cs43130_ac_freq[CS43130_AC_FREQ ] = {24 ,43 ,93 ,
@@ -2363,7 +2363,7 @@ static const struct regmap_config cs43130_regmap = { .use_single_write = true, }; -static u16 const cs43130_dc_threshold[CS43130_DC_THRESHOLD ] = { +static const u16 cs43130_dc_threshold[CS43130_DC_THRESHOLD ] = {50 ,120 , };
sound/soc/codecs/da7219-aad.c +1 -1
@@ -663,7 +663,7 @@ static struct da7219_aad_pdata *da7219_aad_fw_to_pdata(struct device *dev) aad_pdata->mic_det_thr =da7219_aad_fw_mic_det_thr (dev, fw_val32); else - aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_500_OHMS; + aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_200_OHMS;if (fwnode_property_read_u32 (aad_np,"dlg,jack-ins-deb" , &fw_val32) >=0 ) aad_pdata->jack_ins_deb =
sound/soc/codecs/hdac_hda.c +20 -3
@@ -124,6 +124,9 @@ static struct snd_soc_dai_driver hdac_hda_dais[] = { .sig_bits = 24, }, }, +}; + +static struct snd_soc_dai_driver hdac_hda_hdmi_dais[] = { { .id =HDAC_HDMI_0_DAI_ID , .name ="intel-hdmi-hifi1" ,
@@ -578,8 +581,16 @@ static const struct snd_soc_component_driver hdac_hda_codec = { .endianness = 1, }; +static const struct snd_soc_component_driver hdac_hda_hdmi_codec = { + .probe = hdac_hda_codec_probe, + .remove = hdac_hda_codec_remove, + .idle_bias_on = false, + .endianness =1 , +}; +static int hdac_hda_dev_probe (struct hdac_device *hdev) { +struct hdac_hda_priv *hda_pvt =dev_get_drvdata (&hdev->dev);struct hdac_ext_link *hlink;int ret;
@@ -592,9 +603,15 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev)snd_hdac_ext_bus_link_get (hdev->bus, hlink);/* ASoC specific initialization */ - ret =devm_snd_soc_register_component (&hdev->dev, - &hdac_hda_codec, hdac_hda_dais, -ARRAY_SIZE (hdac_hda_dais)); +if (hda_pvt->need_display_power) + ret =devm_snd_soc_register_component (&hdev->dev, + &hdac_hda_hdmi_codec, hdac_hda_hdmi_dais, +ARRAY_SIZE (hdac_hda_hdmi_dais)); +else + ret =devm_snd_soc_register_component (&hdev->dev, + &hdac_hda_codec, hdac_hda_dais, +ARRAY_SIZE (hdac_hda_dais)); +if (ret <0 ) {dev_err (&hdev->dev,"failed to register HDA codec %d\n" , ret);return ret;
sound/soc/codecs/nau8822.c +6 -3
@@ -184,6 +184,7 @@ static int nau8822_eq_get(struct snd_kcontrol *kcontrol,struct soc_bytes_ext *params = (void *)kcontrol->private_value;int i, reg;u16 reg_val, *val; +__be16 tmp; val = (u16 *)ucontrol->value.bytes.data; reg =NAU8822_REG_EQ1 ;
@@ -192,8 +193,8 @@ static int nau8822_eq_get(struct snd_kcontrol *kcontrol,/* conversion of 16-bit integers between native CPU format * and big endian format */ - reg_val =cpu_to_be16 (reg_val); -memcpy (val + i, ®_val,sizeof (reg_val)); + tmp =cpu_to_be16 (reg_val); +memcpy (val + i, &tmp,sizeof (tmp)); }return 0 ;
@@ -216,6 +217,7 @@ static int nau8822_eq_put(struct snd_kcontrol *kcontrol,void *data;u16 *val, value;int i, reg, ret; +__be16 *tmp; data =kmemdup (ucontrol->value.bytes.data, params->max,GFP_KERNEL |GFP_DMA );
@@ -228,7 +230,8 @@ static int nau8822_eq_put(struct snd_kcontrol *kcontrol,/* conversion of 16-bit integers between native CPU format * and big endian format */ - value =be16_to_cpu (*(val + i)); + tmp = (__be16 *)(val + i); + value =be16_to_cpup (tmp); ret =snd_soc_component_write (component, reg + i, value);if (ret) { dev_err(component->dev,
sound/soc/codecs/rt5645.c +9 -1
@@ -448,6 +448,7 @@ struct rt5645_priv {struct regulator_bulk_data supplies[ARRAY_SIZE (rt5645_supply_names)];struct rt5645_eq_param_s *eq_param;struct timer_list btn_check_timer; +struct mutex jd_mutex;int codec_type;int sysclk;
@@ -3189,6 +3190,8 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_insert5645_enable_push_button_irq (component, true); } }else { +if (rt5645->en_button_func) +rt5645_enable_push_button_irq (component, false);snd_soc_dapm_disable_pin (dapm,"Mic Det Power" );snd_soc_dapm_sync (dapm); rt5645->jack_type =SND_JACK_HEADPHONE ;
@@ -3269,6 +3272,8 @@ static void rt5645_jack_detect_work(struct work_struct *work)if (!rt5645->component)return ; +mutex_lock (&rt5645->jd_mutex); +switch (rt5645->pdata.jd_mode) {case 0 :/* Not using rt5645 JD */ if (rt5645->gpiod_hp_det) {
@@ -3295,7 +3300,7 @@ static void rt5645_jack_detect_work(struct work_struct *work)if (!val && (rt5645->jack_type ==0 )) {/* jack in */ report =rt5645_jack_detect (rt5645->component,1 ); - }else if (!val && rt5645->jack_type !=0 ) { + }else if (!val && rt5645->jack_type ==SND_JACK_HEADSET ) {/* for push button and jack out */ btn_type =0 ;if (snd_soc_component_read (rt5645->component,RT5645_INT_IRQ_ST ) &0x4 ) {
@@ -3351,6 +3356,8 @@ static void rt5645_jack_detect_work(struct work_struct *work)rt5645_jack_detect (rt5645->component,0 ); } +mutex_unlock (&rt5645->jd_mutex); +snd_soc_jack_report (rt5645->hp_jack, report,SND_JACK_HEADPHONE );snd_soc_jack_report (rt5645->mic_jack, report,SND_JACK_MICROPHONE );if (rt5645->en_button_func)
@@ -4119,6 +4126,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c) }timer_setup (&rt5645->btn_check_timer, rt5645_btn_check_callback,0 ); +mutex_init (&rt5645->jd_mutex);INIT_DELAYED_WORK (&rt5645->jack_detect_work, rt5645_jack_detect_work);INIT_DELAYED_WORK (&rt5645->rcclock_work, rt5645_rcclock_work);
sound/soc/codecs/wm8974.c +3 -3
@@ -186,7 +186,7 @@ SOC_DAPM_SINGLE("PCM Playback Switch", WM8974_MONOMIX, 0, 1, 0),/* Boost mixer */ static const struct snd_kcontrol_new wm8974_boost_mixer[] = { -SOC_DAPM_SINGLE ("Aux Switch" ,WM8974_INPPGA ,6 ,1 ,1 ), +SOC_DAPM_SINGLE ("PGA Switch" ,WM8974_INPPGA ,6 ,1 ,1 ), };/* Input PGA */
@@ -246,8 +246,8 @@ static const struct snd_soc_dapm_route wm8974_dapm_routes[] = {/* Boost Mixer */ {"ADC", NULL, "Boost Mixer"}, - {"Boost Mixer", "Aux Switch", "Aux Input"}, - {"Boost Mixer", NULL, "Input PGA"}, + {"Boost Mixer", NULL, "Aux Input"}, + {"Boost Mixer", "PGA Switch", "Input PGA"}, {"Boost Mixer", NULL, "MICP"}, /* Input PGA */
sound/soc/intel/boards/bytcr_rt5640.c +25 -6
@@ -83,6 +83,7 @@ enum {#define BYT_RT5640_HSMIC2_ON_IN1 BIT(27)#define BYT_RT5640_JD_HP_ELITEP_1000G2 BIT(28)#define BYT_RT5640_USE_AMCR0F28 BIT(29) +#define BYT_RT5640_SWAPPED_SPEAKERS BIT(30)#define BYTCR_INPUT_DEFAULTS \ (BYT_RT5640_IN3_MAP | \
@@ -157,6 +158,8 @@ static void log_quirks(struct device *dev)dev_info (dev,"quirk MONO_SPEAKER enabled\n" );if (byt_rt5640_quirk &BYT_RT5640_NO_SPEAKERS )dev_info (dev,"quirk NO_SPEAKERS enabled\n" ); +if (byt_rt5640_quirk &BYT_RT5640_SWAPPED_SPEAKERS ) +dev_info (dev,"quirk SWAPPED_SPEAKERS enabled\n" );if (byt_rt5640_quirk &BYT_RT5640_LINEOUT )dev_info (dev,"quirk LINEOUT enabled\n" );if (byt_rt5640_quirk &BYT_RT5640_LINEOUT_AS_HP2 )
@@ -884,6 +887,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {BYT_RT5640_SSP0_AIF1 | BYT_RT5640_MCLK_EN), }, + { +/* Medion Lifetab S10346 */ + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"AMI Corporation" ), +DMI_MATCH (DMI_BOARD_NAME ,"Aptio CRB" ), +/* Above strings are much too generic, also match on BIOS date */ + DMI_MATCH(DMI_BIOS_DATE, "10/22/2015"), + }, + .driver_data = (void *)(BYTCR_INPUT_DEFAULTS | +BYT_RT5640_SWAPPED_SPEAKERS | +BYT_RT5640_SSP0_AIF1 | + BYT_RT5640_MCLK_EN), + }, { /* Mele PCG03 Mini PC */ .matches = { DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Mini PC"),
@@ -1609,11 +1625,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)const char *platform_name;struct acpi_device *adev;struct device *codec_dev; +const char *cfg_spk;bool sof_parent;int ret_val =0 ;int dai_index =0 ; -int i, cfg_spk; -int aif; +int i, aif; is_bytcr = false; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );
@@ -1773,13 +1789,16 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) }if (byt_rt5640_quirk &BYT_RT5640_NO_SPEAKERS ) { - cfg_spk =0 ; + cfg_spk ="0" ; spk_type ="none" ; }else if (byt_rt5640_quirk &BYT_RT5640_MONO_SPEAKER ) { - cfg_spk =1 ; + cfg_spk ="1" ; spk_type ="mono" ; + }else if (byt_rt5640_quirk &BYT_RT5640_SWAPPED_SPEAKERS ) { + cfg_spk ="swapped" ; + spk_type ="swapped" ; }else { - cfg_spk =2 ; + cfg_spk ="2" ; spk_type ="stereo" ; }
@@ -1794,7 +1813,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) headset2_string =" cfg-hs2:in1" ;snprintf (byt_rt5640_components,sizeof (byt_rt5640_components), -"cfg-spk:%d cfg-mic:%s aif:%d%s%s" , cfg_spk, +"cfg-spk:%s cfg-mic:%s aif:%d%s%s" , cfg_spk, map_name[BYT_RT5640_MAP (byt_rt5640_quirk)], aif, lineout_string, headset2_string); byt_rt5640_card.components = byt_rt5640_components;
sound/soc/intel/boards/skl_hda_dsp_generic.c +2 -0
@@ -157,6 +157,8 @@ static int skl_hda_fill_card_info(struct snd_soc_acpi_mach_params *mach_params) card->dapm_widgets = skl_hda_widgets; card->num_dapm_widgets =ARRAY_SIZE (skl_hda_widgets);if (!ctx->idisp_codec) { + card->dapm_routes = &skl_hda_map[IDISP_ROUTE_COUNT ]; + num_route -=IDISP_ROUTE_COUNT ;for (i =0 ; i <IDISP_DAI_COUNT ; i++) { skl_hda_be_dai_links[i].codecs = dummy_codec; skl_hda_be_dai_links[i].num_codecs =
sound/soc/intel/skylake/skl-pcm.c +7 -2
@@ -251,8 +251,10 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,snd_pcm_set_sync (substream); mconfig =skl_tplg_fe_get_cpr_module (dai, substream->stream); -if (!mconfig) +if (!mconfig) { +kfree (dma_params);return -EINVAL ; + }skl_tplg_d0i3_get (skl, mconfig->d0i3_caps);
@@ -1471,6 +1473,7 @@ int skl_platform_register(struct device *dev) dais =krealloc (skl->dais,sizeof (skl_fe_dai) +sizeof (skl_platform_dai),GFP_KERNEL );if (!dais) { +kfree (skl->dais); ret = -ENOMEM ; goto err; }
@@ -1483,8 +1486,10 @@ int skl_platform_register(struct device *dev) ret =devm_snd_soc_register_component (dev, &skl_component, skl->dais, num_dais); -if (ret) +if (ret) { +kfree (skl->dais);dev_err (dev,"soc component registration failed %d\n" , ret); + } err:return ret; }
sound/soc/intel/skylake/skl-sst-ipc.c +3 -1
@@ -1003,8 +1003,10 @@ int skl_ipc_get_large_config(struct sst_generic_ipc *ipc, reply.size = (reply.header >>32 ) &IPC_DATA_OFFSET_SZ_MASK ; buf =krealloc (reply.data, reply.size,GFP_KERNEL ); -if (!buf) +if (!buf) { +kfree (reply.data);return -ENOMEM ; + } *payload = buf; *bytes = reply.size;
sound/soc/soc-ops.c +1 -1
@@ -661,7 +661,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card, kctl =snd_soc_card_get_kcontrol (card, name);if (kctl) {struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value; -if (max <= mc->max) { +if (max <= mc->max - mc->min) { mc->platform_max = max; ret =0 ; }
sound/soc/sof/intel/hda-codec.c +9 -9
@@ -54,8 +54,16 @@ static int request_codec_module(struct hda_codec *codec)static int hda_codec_load_module (struct hda_codec *codec) { -int ret =request_codec_module (codec); +int ret; + + ret =snd_hdac_device_register (&codec->core); +if (ret) { +dev_err (&codec->core.dev,"failed to register hdac device\n" ); +put_device (&codec->core.dev); +return ret; + } + ret =request_codec_module (codec);if (ret <=0 ) { codec->probe_id =HDA_CODEC_ID_GENERIC ; ret =request_codec_module (codec);
@@ -112,7 +120,6 @@ EXPORT_SYMBOL_NS(hda_codec_jack_check, SND_SOC_SOF_HDA_AUDIO_CODEC);static struct hda_codec *hda_codec_device_init (struct hdac_bus *bus,int addr,int type) {struct hda_codec *codec; -int ret; codec =snd_hda_codec_device_init (to_hda_bus (bus), addr,"ehdaudio%dD%d" , bus->idx, addr);if (IS_ERR (codec)) {
@@ -122,13 +129,6 @@ static struct hda_codec *hda_codec_device_init(struct hdac_bus *bus, int addr, i codec->core.type = type; - ret =snd_hdac_device_register (&codec->core); -if (ret) { -dev_err (bus->dev,"failed to register hdac device\n" ); -put_device (&codec->core.dev); -return ERR_PTR (ret); - } -return codec; }
tools/testing/selftests/alsa/mixer-test.c +1 -1
@@ -177,7 +177,7 @@ static void find_controls(void) err =snd_ctl_elem_info (card_data->handle, ctl_data->info);if (err <0 ) { -ksft_print_msg ("%s getting info for %d\n" , +ksft_print_msg ("%s getting info for %s\n" ,snd_strerror (err), ctl_data->name); }