Linux 6.17.12
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.17.12 kernel.
All users of the 6.17 kernel series must upgrade.
The updated 6.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.17.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
------------
Documentation/devicetree/bindings/serial/renesas,rsci.yaml | 2 Documentation/process/2.Process.rst | 6 Makefile | 2 arch/arm64/include/asm/alternative.h | 7 arch/arm64/kernel/alternative.c | 19 +- arch/arm64/kernel/module.c | 9 - arch/loongarch/kernel/machine_kexec.c | 2 arch/x86/include/asm/kvm_host.h | 9 + arch/x86/kvm/svm/svm.c | 24 +-- arch/x86/kvm/x86.c | 21 ++ crypto/zstd.c | 7 drivers/acpi/acpi_mrrm.c | 43 ++++- drivers/bluetooth/btrtl.c | 24 +-- drivers/comedi/comedi_fops.c | 42 +++++ drivers/comedi/drivers/c6xdigio.c | 46 ++++-- drivers/comedi/drivers/multiq3.c | 9 + drivers/comedi/drivers/pcl818.c | 5 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 12 - drivers/hid/hid-apple.c | 1 drivers/hid/hid-elecom.c | 6 drivers/hid/hid-ids.h | 4 drivers/hid/hid-input.c | 5 drivers/hid/hid-lenovo.c | 17 ++ drivers/hid/hid-quirks.c | 3 drivers/iio/adc/ad4080.c | 9 - drivers/net/wireless/realtek/rtl8xxxu/core.c | 3 drivers/net/wireless/realtek/rtw88/rtw8822cu.c | 2 drivers/nvme/host/core.c | 3 drivers/pinctrl/qcom/pinctrl-msm.c | 2 drivers/platform/x86/acer-wmi.c | 4 drivers/platform/x86/amd/pmc/pmc-quirks.c | 25 +++ drivers/platform/x86/amd/pmc/pmc.c | 3 drivers/platform/x86/amd/pmc/pmc.h | 1 drivers/platform/x86/hp/hp-wmi.c | 6 drivers/platform/x86/huawei-wmi.c | 4 drivers/platform/x86/intel/hid.c | 1 drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c | 4 drivers/spi/spi-imx.c | 15 +- drivers/spi/spi-xilinx.c | 2 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 14 + drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 13 + drivers/tty/serial/8250/8250_pci.c | 37 +++++ drivers/tty/serial/sh-sci.c | 12 + drivers/usb/serial/belkin_sa.c | 28 ++- drivers/usb/serial/ftdi_sio.c | 72 +++------- drivers/usb/serial/kobil_sct.c | 18 +- drivers/usb/serial/option.c | 22 ++- fs/bfs/inode.c | 19 ++ fs/ext4/inline.c | 14 + fs/jbd2/transaction.c | 19 +- fs/smb/client/fs_context.c | 2 fs/smb/server/transport_ipc.c | 7 kernel/locking/spinlock_debug.c | 4 kernel/sched/ext.c | 4 kernel/trace/ftrace.c | 40 ++++- samples/vfs/test-statx.c | 6 samples/watch_queue/watch_test.c | 6 sound/hda/codecs/realtek/alc269.c | 9 + sound/soc/sdca/sdca_functions.c | 3 sound/usb/quirks.c | 6 61 files changed, 559 insertions(+), 207 deletions(-)
Adrian Barnaś (1):
arm64: Reject modules with internal alternative callbacks
Alexander Sverdlin (1):
locking/spinlock/debug: Fix data-race in do_raw_write_lock
Alexey Nepomnyashih (1):
ext4: add i_data_sem protection in ext4_destroy_inline_data_nolock()
Alvaro Gamez Machado (1):
spi: xilinx: increase number of retries before declaring stall
Antheas Kapenekakis (3):
platform/x86/amd/pmc: Add support for Van Gogh SoC platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk list platform/x86/amd/pmc: Add spurious_8042 to Xbox Ally
Antoniu Miclaus (1):
iio: adc: ad4080: fix chip identification
April Grimoire (1):
HID: apple: Add SONiX AK870 PRO to non_apple_keyboards quirk list
Armin Wolf (1):
platform/x86: acer-wmi: Ignore backlight event
Bagas Sanjaya (1):
Documentation: process: Also mention Sasha Levin as stable tree maintainer
Baojun Xu (1):
ALSA: hda/tas2781: Add new quirk for HP new projects
Biju Das (2):
dt-bindings: serial: rsci: Drop "uart-has-rtscts: false"
serial: sh-sci: Fix deadlock during RSCI FIFO overrun error
Deepanshu Kartikey (1):
ext4: refresh inline data size before write operations
Edip Hazuri (1):
platform/x86: hp-wmi: mark Victus 16-r0 and 16-s0 for victus_s fan and thermal profile support
Fabio Porcedda (2):
USB: serial: option: add Telit Cinterion FE910C04 new compositions
USB: serial: option: move Telit 0x10c7 composition in the right place
Giovanni Cabiddu (1):
crypto: zstd - fix double-free in per-CPU stream cleanup
Greg Kroah-Hartman (1):
Linux 6.17.12
Harish Kasiviswanathan (1):
drm/amdkfd: Fix GPU mappings for APU after prefetch
Huacai Chen (1):
LoongArch: Mask all interrupts during kexec/kdump
Ian Abbott (1):
comedi: c6xdigio: Fix invalid PNP driver unregistration
Ian Forbes (1):
drm/vmwgfx: Use kref in vmw_bo_dirty
Jia Ston (1):
platform/x86: huawei-wmi: add keys for HONOR models
Johan Hovold (3):
USB: serial: ftdi_sio: match on interface number for jtag
USB: serial: belkin_sa: fix TIOCMBIS and TIOCMBIC
USB: serial: kobil_sct: fix TIOCMBIS and TIOCMBIC
Kaushlendra Kumar (1):
ACPI: MRRM: Fix memory leaks and improve error handling
Keith Busch (1):
nvme: fix admin request_queue lifetime
Krishna Chomal (1):
platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support
Kuppuswamy Sathyanarayanan (1):
platform/x86: intel-uncore-freq: Add additional client processors
Lauri Tirkkonen (1):
HID: lenovo: fixup Lenovo Yoga Slim 7x Keyboard rdesc
Linus Torvalds (1):
samples: work around glibc redefining some of our defines wrong
Lushih Hsieh (1):
ALSA: usb-audio: Add native DSD quirks for PureAudio DAC series
Magne Bruno (1):
serial: add support of CPCI cards
Marcos Vega (1):
platform/x86: hp-wmi: Add Omen MAX 16-ah0xx fan support and thermal profile
Mario Limonciello (AMD) (1):
HID: hid-input: Extend Elan ignore battery quirk to USB
Max Chou (1):
Bluetooth: btrtl: Avoid loading the config file on security chips
Naoki Ueki (1):
HID: elecom: Add support for ELECOM M-XT3URBK (018F)
Navaneeth K (3):
staging: rtl8723bs: fix out-of-bounds read in rtw_get_ie() parser
staging: rtl8723bs: fix stack buffer overflow in OnAssocReq IE parsing
staging: rtl8723bs: fix out-of-bounds read in OnBeacon ESR IE parsing
Nikita Zhandarovich (3):
comedi: pcl818: fix null-ptr-deref in pcl818_ai_cancel()
comedi: multiq3: sanitize config options in multiq3_attach()
comedi: check device's attached status in compat ioctls
Niranjan H Y (1):
ASoC: SDCA: bug fix while parsing mipi-sdca-control-cn-list
Omar Sandoval (1):
KVM: SVM: Don't skip unrelated instruction if INT3/INTO is replaced
Praveen Talari (1):
pinctrl: qcom: msm: Fix deadlock in pinmux configuration
Qianchang Zhao (1):
ksmbd: ipc: fix use-after-free in ipc_msg_send_request
Robin Gong (1):
spi: imx: keep dma request disabled before dma transfer setup
Slark Xiao (1):
USB: serial: option: add Foxconn T99W760
Song Liu (1):
ftrace: bpf: Fix IPMODIFY + DIRECT in modify_ftrace_direct()
Srinivas Pandruvada (1):
platform/x86/intel/hid: Add Nova Lake support
Tetsuo Handa (1):
bfs: Reconstruct file type when loading from disk
Ye Bin (1):
jbd2: avoid bug_on in jbd2_journal_get_create_access() when file system corrupted
Yiqi Sun (1):
smb: fix invalid username check in smb3_fs_context_parse_param()
Zenm Chen (2):
wifi: rtl8xxxu: Add USB ID 2001:3328 for D-Link AN3U rev. A1
wifi: rtw88: Add USB ID 2001:3329 for D-Link AC13U rev. A1Zqiang (2):
sched_ext: Fix possible deadlock in the deferred_irq_workfn()
sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/serial/renesas,rsci.yaml +0 -2
@@ -54,8 +54,6 @@ properties: power-domains: maxItems: 1 - uart-has-rtscts: false - required: - compatible - reg
Documentation/process/2.Process.rst +4 -2
@@ -104,8 +104,10 @@ kernels go out with a handful of known regressions though, hopefully, none of them are serious. Once a stable release is made, its ongoing maintenance is passed off to the -"stable team," currently Greg Kroah-Hartman. The stable team will release -occasional updates to the stable release using the 5.x.y numbering scheme. +"stable team," currently consists of Greg Kroah-Hartman and Sasha Levin. The +stable team will release occasional updates to the stable release using the +5.x.y numbering scheme. + To be considered for an update release, a patch must (1) fix a significant bug, and (2) already be merged into the mainline for the next development kernel. Kernels will typically receive stable updates for a little more
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 17 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm64/include/asm/alternative.h +5 -2
@@ -26,9 +26,12 @@ void __init apply_alternatives_all(void);bool alternative_is_applied (u16 cpucap);#ifdef CONFIG_MODULES -void apply_alternatives_module (void *start,size_t length); +int apply_alternatives_module (void *start,size_t length);#else -static inline void apply_alternatives_module (void *start,size_t length) { } +static inline int apply_alternatives_module (void *start,size_t length) +{ +return 0 ; +}#endif void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
arch/arm64/kernel/alternative.c +12 -7
@@ -139,9 +139,9 @@ static noinstr void clean_dcache_range_nopatch(u64 start, u64 end) }while (cur += d_size, cur < end); } -static void __apply_alternatives (const struct alt_region *region, -bool is_module, -unsigned long *cpucap_mask) +static int __apply_alternatives (const struct alt_region *region, +bool is_module, +unsigned long *cpucap_mask) {struct alt_instr *alt;__le32 *origptr, *updptr;
@@ -166,10 +166,13 @@ static void __apply_alternatives(const struct alt_region *region, updptr = is_module ? origptr :lm_alias (origptr); nr_inst = alt->orig_len /AARCH64_INSN_SIZE ; -if (ALT_HAS_CB (alt)) +if (ALT_HAS_CB (alt)) { alt_cb =ALT_REPL_PTR (alt); -else +if (is_module && !core_kernel_text ((unsigned long )alt_cb)) +return -ENOEXEC ; + }else { alt_cb = patch_alternative; + }alt_cb (alt, origptr, updptr, nr_inst);
@@ -193,6 +196,8 @@ static void __apply_alternatives(const struct alt_region *region,bitmap_and (applied_alternatives, applied_alternatives, system_cpucaps,ARM64_NCAPS ); } + +return 0 ; }static void __init apply_alternatives_vdso (void )
@@ -277,7 +282,7 @@ void __init apply_boot_alternatives(void) } #ifdef CONFIG_MODULES -void apply_alternatives_module(void *start, size_t length) +int apply_alternatives_module(void *start, size_t length) { struct alt_region region = { .begin = start,
@@ -287,7 +292,7 @@ void apply_alternatives_module(void *start, size_t length)bitmap_fill (all_capabilities,ARM64_NCAPS ); - __apply_alternatives(®ion, true, &all_capabilities[0]); + return __apply_alternatives(®ion, true, &all_capabilities[0]); }#endif
arch/arm64/kernel/module.c +7 -2
@@ -489,8 +489,13 @@ int module_finalize(const Elf_Ehdr *hdr,int ret; s =find_section (hdr, sechdrs,".altinstructions" ); -if (s) -apply_alternatives_module ((void *)s->sh_addr, s->sh_size); +if (s) { + ret =apply_alternatives_module ((void *)s->sh_addr, s->sh_size); +if (ret <0 ) { +pr_err ("module %s: error occurred when applying alternatives\n" , me->name); +return ret; + } + }if (scs_is_dynamic ()) { s =find_section (hdr, sechdrs,".init.eh_frame" );
arch/loongarch/kernel/machine_kexec.c +2 -0
@@ -249,6 +249,7 @@ void machine_crash_shutdown(struct pt_regs *regs)#ifdef CONFIG_SMP crash_smp_send_stop ();#endif +machine_kexec_mask_interrupts ();cpumask_set_cpu (crashing_cpu, &cpus_in_crash);pr_info ("Starting crashdump kernel...\n" );
@@ -286,6 +287,7 @@ void machine_kexec(struct kimage *image)/* We do not want to be bothered. */ local_irq_disable (); +machine_kexec_mask_interrupts ();pr_notice ("EFI boot flag 0x%lx\n" , efi_boot);pr_notice ("Command line at 0x%lx\n" , cmdline_ptr);
arch/x86/include/asm/kvm_host.h +9 -0
@@ -2123,6 +2123,11 @@ u64 vcpu_tsc_khz(struct kvm_vcpu *vcpu);* the gfn, i.e. retrying the instruction will hit a * !PRESENT fault, which results in a new shadow page * and sends KVM back to square one. +* +* EMULTYPE_SKIP_SOFT_INT - Set in combination with EMULTYPE_SKIP to only skip +* an instruction if it could generate a given software +* interrupt, which must be encoded via +* EMULTYPE_SET_SOFT_INT_VECTOR(). */ #define EMULTYPE_NO_DECODE (1 << 0)#define EMULTYPE_TRAP_UD (1 << 1)
@@ -2133,6 +2138,10 @@ u64 vcpu_tsc_khz(struct kvm_vcpu *vcpu);#define EMULTYPE_PF (1 << 6)#define EMULTYPE_COMPLETE_USER_EXIT (1 << 7)#define EMULTYPE_WRITE_PF_TO_SP (1 << 8) +#define EMULTYPE_SKIP_SOFT_INT (1 << 9) + +#define EMULTYPE_SET_SOFT_INT_VECTOR (v) ((u32)((v) & 0xff) << 16) +#define EMULTYPE_GET_SOFT_INT_VECTOR (e) (((e) >> 16) & 0xff)static inline bool kvm_can_emulate_event_vectoring (int emul_type) {
arch/x86/kvm/svm/svm.c +13 -11
@@ -280,6 +280,7 @@ static void svm_set_interrupt_shadow(struct kvm_vcpu *vcpu, int mask) }static int __svm_skip_emulated_instruction (struct kvm_vcpu *vcpu, +int emul_type,bool commit_side_effects) {struct vcpu_svm *svm =to_svm (vcpu);
@@ -301,7 +302,7 @@ static int __svm_skip_emulated_instruction(struct kvm_vcpu *vcpu,if (unlikely (!commit_side_effects)) old_rflags = svm->vmcb->save.rflags; -if (!kvm_emulate_instruction (vcpu,EMULTYPE_SKIP )) +if (!kvm_emulate_instruction (vcpu, emul_type))return 0 ;if (unlikely (!commit_side_effects))
@@ -319,11 +320,13 @@ static int __svm_skip_emulated_instruction(struct kvm_vcpu *vcpu,static int svm_skip_emulated_instruction (struct kvm_vcpu *vcpu) { -return __svm_skip_emulated_instruction (vcpu, true); +return __svm_skip_emulated_instruction (vcpu,EMULTYPE_SKIP , true); } -static int svm_update_soft_interrupt_rip (struct kvm_vcpu *vcpu) +static int svm_update_soft_interrupt_rip (struct kvm_vcpu *vcpu,u8 vector) { +const int emul_type =EMULTYPE_SKIP |EMULTYPE_SKIP_SOFT_INT | +EMULTYPE_SET_SOFT_INT_VECTOR (vector);unsigned long rip, old_rip =kvm_rip_read (vcpu);struct vcpu_svm *svm =to_svm (vcpu);
@@ -339,7 +342,7 @@ static int svm_update_soft_interrupt_rip(struct kvm_vcpu *vcpu)* in use, the skip must not commit any side effects such as clearing * the interrupt shadow or RFLAGS.RF. */ -if (!__svm_skip_emulated_instruction (vcpu, !nrips)) +if (!__svm_skip_emulated_instruction (vcpu, emul_type, !nrips))return -EIO ; rip =kvm_rip_read (vcpu);
@@ -375,7 +378,7 @@ static void svm_inject_exception(struct kvm_vcpu *vcpu)kvm_deliver_exception_payload (vcpu, ex);if (kvm_exception_is_soft (ex->vector) && -svm_update_soft_interrupt_rip (vcpu)) +svm_update_soft_interrupt_rip (vcpu, ex->vector))return ; svm->vmcb->control.event_inj = ex->vector
@@ -3662,11 +3665,12 @@ static bool svm_set_vnmi_pending(struct kvm_vcpu *vcpu)static void svm_inject_irq (struct kvm_vcpu *vcpu,bool reinjected) { +struct kvm_queued_interrupt *intr = &vcpu->arch.interrupt;struct vcpu_svm *svm =to_svm (vcpu);u32 type; -if (vcpu->arch.interrupt.soft) { -if (svm_update_soft_interrupt_rip (vcpu)) +if (intr->soft) { +if (svm_update_soft_interrupt_rip (vcpu, intr->nr))return ; type =SVM_EVTINJ_TYPE_SOFT ;
@@ -3674,12 +3678,10 @@ static void svm_inject_irq(struct kvm_vcpu *vcpu, bool reinjected) type =SVM_EVTINJ_TYPE_INTR ; } -trace_kvm_inj_virq (vcpu->arch.interrupt.nr, - vcpu->arch.interrupt.soft, reinjected); +trace_kvm_inj_virq (intr->nr, intr->soft, reinjected); ++vcpu->stat.irq_injections; - svm->vmcb->control.event_inj = vcpu->arch.interrupt.nr | -SVM_EVTINJ_VALID | type; + svm->vmcb->control.event_inj = intr->nr |SVM_EVTINJ_VALID | type; } void svm_complete_interrupt_delivery(struct kvm_vcpu *vcpu, int delivery_mode,
arch/x86/kvm/x86.c +21 -0
@@ -9021,6 +9021,23 @@ static bool is_vmware_backdoor_opcode(struct x86_emulate_ctxt *ctxt)return false; } +static bool is_soft_int_instruction (struct x86_emulate_ctxt *ctxt, +int emulation_type) +{ +u8 vector =EMULTYPE_GET_SOFT_INT_VECTOR (emulation_type); + +switch (ctxt->b) { +case 0xcc : +return vector ==BP_VECTOR ; +case 0xcd : +return vector == ctxt->src.val; +case 0xce : +return vector ==OF_VECTOR ; +default : +return false; + } +} +/* * Decode an instruction for emulation. The caller is responsible for handling * code breakpoints. Note, manually detecting code breakpoints is unnecessary
@@ -9131,6 +9148,10 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,* injecting single-step #DBs. */ if (emulation_type &EMULTYPE_SKIP ) { +if (emulation_type &EMULTYPE_SKIP_SOFT_INT && + !is_soft_int_instruction (ctxt, emulation_type)) +return 0 ; +if (ctxt->mode !=X86EMUL_MODE_PROT64 ) ctxt->eip = (u32 )ctxt->_eip;else
crypto/zstd.c +1 -6
@@ -75,11 +75,6 @@ static int zstd_init(struct crypto_acomp *acomp_tfm)return ret; } -static void zstd_exit (struct crypto_acomp *acomp_tfm) -{ -crypto_acomp_free_streams (&zstd_streams); -} -static int zstd_compress_one (struct acomp_req *req,struct zstd_ctx *ctx,const void *src,void *dst,unsigned int *dlen) {
@@ -297,7 +292,6 @@ static struct acomp_alg zstd_acomp = { .cra_module = THIS_MODULE, }, .init = zstd_init, - .exit = zstd_exit, .compress = zstd_compress, .decompress = zstd_decompress, };
@@ -310,6 +304,7 @@ static int __init zstd_mod_init(void) static void __exit zstd_mod_fini(void) {crypto_unregister_acomp (&zstd_acomp); +crypto_acomp_free_streams (&zstd_streams); }module_init (zstd_mod_init);
drivers/acpi/acpi_mrrm.c +33 -10
59 lines not on this page · raw message
drivers/bluetooth/btrtl.c +13 -11
@@ -50,7 +50,7 @@#define RTL_CHIP_SUBVER (&(struct rtl_vendor_cmd) {{0x10, 0x38, 0x04, 0x28, 0x80}})#define RTL_CHIP_REV (&(struct rtl_vendor_cmd) {{0x10, 0x3A, 0x04, 0x28, 0x80}}) -#define RTL_SEC_PROJ (&(struct rtl_vendor_cmd) {{0x10, 0xA4, 0x0D, 0x00, 0xb0}}) +#define RTL_SEC_PROJ (&(struct rtl_vendor_cmd) {{0x10, 0xA4, 0xAD, 0x00, 0xb0}})#define RTL_PATCH_SNIPPETS 0x01#define RTL_PATCH_DUMMY_HEADER 0x02
@@ -534,7 +534,6 @@ static int rtlbt_parse_firmware_v2(struct hci_dev *hdev, {struct rtl_epatch_header_v2 *hdr;int rc; -u8 reg_val[2 ];u8 key_id;u32 num_sections;struct rtl_section *section;
@@ -549,14 +548,7 @@ static int rtlbt_parse_firmware_v2(struct hci_dev *hdev, .len = btrtl_dev->fw_len - 7, /* Cut the tail */ }; - rc =btrtl_vendor_read_reg16 (hdev,RTL_SEC_PROJ , reg_val); -if (rc <0 ) -return -EIO ; - key_id = reg_val[0 ]; - -rtl_dev_dbg (hdev,"%s: key id %u" , __func__, key_id); - - btrtl_dev->key_id = key_id; + key_id = btrtl_dev->key_id; hdr =rtl_iov_pull_data (&iov,sizeof (*hdr));if (!hdr)
@@ -1070,6 +1062,8 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,u16 hci_rev, lmp_subver;u8 hci_ver, lmp_ver, chip_type =0 ;int ret; +int rc; +u8 key_id;u8 reg_val[2 ]; btrtl_dev =kzalloc (sizeof (*btrtl_dev),GFP_KERNEL );
@@ -1180,6 +1174,14 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, goto err_free; } + rc =btrtl_vendor_read_reg16 (hdev,RTL_SEC_PROJ , reg_val); +if (rc <0 ) + goto err_free; + + key_id = reg_val[0 ]; + btrtl_dev->key_id = key_id; +rtl_dev_info (hdev,"%s: key id %u" , __func__, key_id); + btrtl_dev->fw_len = -EIO ;if (lmp_subver ==RTL_ROM_LMP_8852A && hci_rev ==0x000c ) { snprintf(fw_name, sizeof(fw_name), "%s_v2.bin",
@@ -1202,7 +1204,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, goto err_free; } -if (btrtl_dev->ic_info->cfg_name) { +if (btrtl_dev->ic_info->cfg_name && !btrtl_dev->key_id) {if (postfix) {snprintf (cfg_name,sizeof (cfg_name),"%s-%s.bin" , btrtl_dev->ic_info->cfg_name, postfix);
drivers/comedi/comedi_fops.c +36 -6
78 lines not on this page · raw message
drivers/comedi/drivers/c6xdigio.c +35 -11
63 lines not on this page · raw message
drivers/comedi/drivers/multiq3.c +9 -0
@@ -67,6 +67,11 @@#define MULTIQ3_TRSFRCNTR_OL 0x10/* xfer CNTR to OL (x and y) */ #define MULTIQ3_EFLAG_RESET 0x06/* reset E bit of flag reg */ +/* +* Limit on the number of optional encoder channels +*/ +#define MULTIQ3_MAX_ENC_CHANS 8 +static void multiq3_set_ctrl (struct comedi_device *dev,unsigned int bits) {/*
@@ -312,6 +317,10 @@ static int multiq3_attach(struct comedi_device *dev, s->insn_read = multiq3_encoder_insn_read; s->insn_config = multiq3_encoder_insn_config; +/* sanity check for number of encoder channels */ +if (s->n_chan >MULTIQ3_MAX_ENC_CHANS ) + s->n_chan =MULTIQ3_MAX_ENC_CHANS ; +for (i =0 ; i < s->n_chan; i++)multiq3_encoder_reset (dev, i);
drivers/comedi/drivers/pcl818.c +2 -3
@@ -1111,10 +1111,9 @@ static void pcl818_detach(struct comedi_device *dev) {struct pcl818_private *devpriv = dev->private; -if (devpriv) { -pcl818_ai_cancel (dev, dev->read_subdev); +if (devpriv)pcl818_reset (dev); - } +pcl818_free_dma (dev);comedi_legacy_detach (dev); }
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +2 -0
@@ -3688,6 +3688,8 @@ svm_range_set_attr(struct kfd_process *p, struct mm_struct *mm,svm_range_apply_attrs (p, prange, nattr, attrs, &update_mapping);/* TODO: unmap ranges from GPU that lost access */ } + update_mapping |= !p->xnack_enabled && !list_empty (&remap_list); +list_for_each_entry_safe (prange, next, &remove_list, update_list) { pr_debug("unlink old 0x%p prange 0x%p [0x%lx 0x%lx]\n", prange->svms, prange, prange->start,
drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c +5 -7
@@ -32,22 +32,22 @@ enum vmw_bo_dirty_method {/** * struct vmw_bo_dirty - Dirty information for buffer objects +* @ref_count: Reference count for this structure. Must be first member! * @start: First currently dirty bit * @end: Last currently dirty bit + 1 * @method: The currently used dirty method * @change_count: Number of consecutive method change triggers -* @ref_count: Reference count for this structure * @bitmap_size: The size of the bitmap in bits. Typically equal to the * nuber of pages in the bo. * @bitmap: A bitmap where each bit represents a page. A set bit means a * dirty page. */ struct vmw_bo_dirty { +struct kref ref_count;unsigned long start;unsigned long end;enum vmw_bo_dirty_method method;unsigned int change_count; -unsigned int ref_count;unsigned long bitmap_size;unsigned long bitmap[]; };
@@ -221,7 +221,7 @@ int vmw_bo_dirty_add(struct vmw_bo *vbo)int ret;if (dirty) { - dirty->ref_count++; +kref_get (&dirty->ref_count);return 0 ; }
@@ -235,7 +235,7 @@ int vmw_bo_dirty_add(struct vmw_bo *vbo) dirty->bitmap_size = num_pages; dirty->start = dirty->bitmap_size; dirty->end =0 ; - dirty->ref_count =1 ; +kref_init (&dirty->ref_count);if (num_pages <PAGE_SIZE /sizeof (pte_t)) { dirty->method =VMW_BO_DIRTY_PAGETABLE ; }else {
@@ -274,10 +274,8 @@ void vmw_bo_dirty_release(struct vmw_bo *vbo) {struct vmw_bo_dirty *dirty = vbo->dirty; -if (dirty && --dirty->ref_count ==0 ) { -kvfree (dirty); +if (dirty &&kref_put (&dirty->ref_count, (void *)kvfree)) vbo->dirty =NULL ; - } }/**
drivers/hid/hid-apple.c +1 -0
@@ -355,6 +355,7 @@ static const struct apple_key_translation swapped_fn_leftctrl_keys[] = {static const struct apple_non_apple_keyboard non_apple_keyboards[] = { {"SONiX USB DEVICE" }, + {"SONiX AK870 PRO" }, {"Keychron" }, {"AONE" }, {"GANSS" },
drivers/hid/hid-elecom.c +4 -2
@@ -75,7 +75,8 @@ static const __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,*/ mouse_button_fixup (hdev, rdesc, *rsize,20 ,28 ,22 ,14 ,8 );break ; -case USB_DEVICE_ID_ELECOM_M_XT3URBK : +case USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB : +case USB_DEVICE_ID_ELECOM_M_XT3URBK_018F :case USB_DEVICE_ID_ELECOM_M_XT3DRBK :case USB_DEVICE_ID_ELECOM_M_XT4DRBK :/*
@@ -119,7 +120,8 @@ static const __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,static const struct hid_device_id elecom_devices[] = { {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_BM084 ) }, {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XGL20DLBK ) }, - {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XT3URBK ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XT3URBK_018F ) }, {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XT3DRBK ) }, {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_XT4DRBK ) }, {HID_USB_DEVICE (USB_VENDOR_ID_ELECOM ,USB_DEVICE_ID_ELECOM_M_DT1URBK ) },
drivers/hid/hid-ids.h +3 -1
@@ -449,7 +449,8 @@#define USB_VENDOR_ID_ELECOM 0x056e#define USB_DEVICE_ID_ELECOM_BM084 0x0061#define USB_DEVICE_ID_ELECOM_M_XGL20DLBK 0x00e6 -#define USB_DEVICE_ID_ELECOM_M_XT3URBK 0x00fb +#define USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB 0x00fb +#define USB_DEVICE_ID_ELECOM_M_XT3URBK_018F 0x018f#define USB_DEVICE_ID_ELECOM_M_XT3DRBK 0x00fc#define USB_DEVICE_ID_ELECOM_M_XT4DRBK 0x00fd#define USB_DEVICE_ID_ELECOM_M_DT1URBK 0x00fe
@@ -718,6 +719,7 @@#define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350#define I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720 0x837a#define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396 +#define I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD 0x8987#define USB_DEVICE_ID_ITE8595 0x8595#define USB_DEVICE_ID_ITE_MEDION_E1239T 0xce50
drivers/hid/hid-input.c +3 -2
@@ -386,10 +386,11 @@ static const struct hid_device_id hid_battery_quirks[] = { {HID_I2C_DEVICE (USB_VENDOR_ID_ELAN ,I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM ), HID_BATTERY_QUIRK_AVOID_QUERY },/* -* Elan I2C-HID touchscreens seem to all report a non present battery, -* set HID_BATTERY_QUIRK_IGNORE for all Elan I2C-HID devices. +* Elan HID touchscreens seem to all report a non present battery, +* set HID_BATTERY_QUIRK_IGNORE for all Elan I2C and USB HID devices. */ { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE }, {} };
drivers/hid/hid-lenovo.c +17 -0
@@ -148,6 +148,14 @@ static const __u8 lenovo_tpIIbtkbd_need_fixup_collection[] = { 0x81, 0x01, /* Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) */ }; +static const __u8 lenovo_yoga7x_kbd_need_fixup_collection[] = { +0x15 ,0x00 ,// Logical Minimum (0) +0x25 ,0x65 ,// Logical Maximum (101) +0x05 ,0x07 ,// Usage Page (Keyboard) +0x19 ,0x00 ,// Usage Minimum (0) +0x29 ,0xDD ,// Usage Maximum (221) +}; +static const __u8 *lenovo_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize) {
@@ -177,6 +185,13 @@ static const __u8 *lenovo_report_fixup(struct hid_device *hdev, __u8 *rdesc, rdesc[260 ] =0x01 ;/* report count (2) = 0x01 */ }break ; +case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD : +if (*rsize ==176 && +memcmp (&rdesc[52 ], lenovo_yoga7x_kbd_need_fixup_collection, +sizeof (lenovo_yoga7x_kbd_need_fixup_collection)) ==0 ) { + rdesc[55 ] = rdesc[61 ];// logical maximum = usage maximum + } +break ; }return rdesc; }
@@ -1538,6 +1553,8 @@ static const struct hid_device_id lenovo_devices[] = { USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X12_TAB) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X12_TAB2) }, + { HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC, + USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD) }, { } };
drivers/hid/hid-quirks.c +2 -1
@@ -410,7 +410,8 @@ static const struct hid_device_id hid_have_special_driver[] = { #if IS_ENABLED(CONFIG_HID_ELECOM) { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XGL20DLBK) }, - { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK_00FB) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK_018F) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT4DRBK) }, { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) },
drivers/iio/adc/ad4080.c +6 -3
@@ -125,7 +125,7 @@/* Miscellaneous Definitions */ #define AD4080_SPI_READ BIT(7) -#define AD4080_CHIP_ID GENMASK(2, 0) +#define AD4080_CHIP_ID 0x0050#define AD4080_LVDS_CNV_CLK_CNT_MAX 7
@@ -445,7 +445,8 @@ static int ad4080_setup(struct iio_dev *indio_dev) {struct ad4080_state *st =iio_priv (indio_dev);struct device *dev =regmap_get_device (st->regmap); -unsigned int id; +__le16 id_le; +u16 id;int ret; ret = regmap_write(st->regmap, AD4080_REG_INTERFACE_CONFIG_A,
@@ -458,10 +459,12 @@ static int ad4080_setup(struct iio_dev *indio_dev)if (ret)return ret; - ret =regmap_read (st->regmap,AD4080_REG_CHIP_TYPE , &id); + ret =regmap_bulk_read (st->regmap,AD4080_REG_PRODUCT_ID_L , &id_le, +sizeof (id_le));if (ret)return ret; + id =le16_to_cpu (id_le);if (id !=AD4080_CHIP_ID )dev_info (dev,"Unrecognized CHIP_ID 0x%X\n" , id);
drivers/net/wireless/realtek/rtl8xxxu/core.c +3 -0
@@ -8113,6 +8113,9 @@ static const struct usb_device_id dev_table[] = {/* TP-Link TL-WN823N V2 */ {USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0135, 0xff, 0xff, 0xff), .driver_info = (unsigned long)&rtl8192fu_fops}, +/* D-Link AN3U rev. A1 */ +{USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3328, 0xff, 0xff, 0xff), + .driver_info = (unsigned long)&rtl8192fu_fops}, #ifdef CONFIG_RTL8XXXU_UNTESTED /* Still supported by rtlwifi */ {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x8176, 0xff, 0xff, 0xff),
drivers/net/wireless/realtek/rtw88/rtw8822cu.c +2 -0
@@ -21,6 +21,8 @@ static const struct usb_device_id rtw_8822cu_id_table[] = { .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, { USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* Alpha - Alpha */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3329, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* D-Link AC13U rev. A1 */ {}, };MODULE_DEVICE_TABLE (usb, rtw_8822cu_id_table);
drivers/nvme/host/core.c +2 -1
@@ -4896,7 +4896,6 @@ void nvme_remove_admin_tag_set(struct nvme_ctrl *ctrl)*/ nvme_stop_keep_alive (ctrl);blk_mq_destroy_queue (ctrl->admin_q); -blk_put_queue (ctrl->admin_q);if (ctrl->ops->flags &NVME_F_FABRICS ) {blk_mq_destroy_queue (ctrl->fabrics_q);blk_put_queue (ctrl->fabrics_q);
@@ -5040,6 +5039,8 @@ static void nvme_free_ctrl(struct device *dev) container_of(dev, struct nvme_ctrl, ctrl_device);struct nvme_subsystem *subsys = ctrl->subsys; +if (ctrl->admin_q) +blk_put_queue (ctrl->admin_q);if (!subsys || ctrl->instance != subsys->instance)ida_free (&nvme_instance_ida, ctrl->instance);nvme_free_cels (ctrl);
drivers/pinctrl/qcom/pinctrl-msm.c +1 -1
@@ -215,7 +215,7 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev,*/ if (d && i != gpio_func && !test_and_set_bit (d->hwirq, pctrl->disabled_for_mux)) -disable_irq (irq); +disable_irq_nosync (irq);raw_spin_lock_irqsave (&pctrl->lock, flags);
drivers/platform/x86/acer-wmi.c +4 -0
@@ -102,6 +102,7 @@ MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026");enum acer_wmi_event_ids {WMID_HOTKEY_EVENT =0x1 , +WMID_BACKLIGHT_EVENT =0x4 ,WMID_ACCEL_OR_KBD_DOCK_EVENT =0x5 ,WMID_GAMING_TURBO_KEY_EVENT =0x7 ,WMID_AC_EVENT =0x8 ,
@@ -2369,6 +2370,9 @@ static void acer_wmi_notify(union acpi_object *obj, void *context)sparse_keymap_report_event (acer_wmi_input_dev, scancode,1 , true); }break ; +case WMID_BACKLIGHT_EVENT : +/* Already handled by acpi-video */ +break ;case WMID_ACCEL_OR_KBD_DOCK_EVENT :acer_gsensor_event ();acer_kbd_dock_event (&return_value);
drivers/platform/x86/amd/pmc/pmc-quirks.c +25 -0
@@ -122,6 +122,14 @@ static const struct dmi_system_id fwbug_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "21A1"), } }, + { + .ident = "ROG Xbox Ally RC73YA", + .driver_data = &quirk_spurious_8042, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, "RC73YA"), + } + },/* https://bugzilla.kernel.org/show_bug.cgi?id=218024 */ { .ident = "V14 G4 AMN",
@@ -204,6 +212,23 @@ static const struct dmi_system_id fwbug_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "82ND"), } }, +/* https://gitlab.freedesktop.org/drm/amd/-/issues/4618 */ + { + .ident = "Lenovo Legion Go 2", + .driver_data = &quirk_s2idle_bug, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "83N0"), + } + }, + { + .ident ="Lenovo Legion Go 2" , + .driver_data = &quirk_s2idle_bug, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "83N1"), + } + }, /* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */ { .ident = "HP Laptop 15s-eq2xxx",
drivers/platform/x86/amd/pmc/pmc.c +3 -0
@@ -106,6 +106,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev)switch (dev->cpu_id) {case AMD_CPU_ID_PCO :case AMD_CPU_ID_RN : +case AMD_CPU_ID_VG :case AMD_CPU_ID_YC :case AMD_CPU_ID_CB : dev->num_ips =12 ;
@@ -517,6 +518,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)case AMD_CPU_ID_PCO :return MSG_OS_HINT_PCO ;case AMD_CPU_ID_RN : +case AMD_CPU_ID_VG :case AMD_CPU_ID_YC :case AMD_CPU_ID_CB :case AMD_CPU_ID_PS :
@@ -717,6 +719,7 @@ static const struct pci_device_id pmc_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SHP) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_VG) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) }, { }
drivers/platform/x86/amd/pmc/pmc.h +1 -0
@@ -156,6 +156,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);#define AMD_CPU_ID_RN 0x1630#define AMD_CPU_ID_PCO AMD_CPU_ID_RV#define AMD_CPU_ID_CZN AMD_CPU_ID_RN +#define AMD_CPU_ID_VG 0x1645#define AMD_CPU_ID_YC 0x14B5#define AMD_CPU_ID_CB 0x14D8#define AMD_CPU_ID_PS 0x14E8
drivers/platform/x86/hp/hp-wmi.c +4 -2
@@ -92,9 +92,11 @@ static const char * const victus_thermal_profile_boards[] = {"8A25" }; -/* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */ +/* DMI Board names of Victus 16-r and Victus 16-s laptops */ static const char *const victus_s_thermal_profile_boards[] = { -"8C99" ,"8C9C" +"8BBE" ,"8BD4" ,"8BD5" , +"8C78" ,"8C99" ,"8C9C" , +"8D41" , };enum hp_wmi_radio {
drivers/platform/x86/huawei-wmi.c +4 -0
@@ -81,6 +81,10 @@ static const struct key_entry huawei_wmi_keymap[] = { { KE_KEY, 0x289, { KEY_WLAN } },// Huawei |M| key { KE_KEY, 0x28a, { KEY_CONFIG } }, +// HONOR YOYO key + { KE_KEY, 0x28b, { KEY_NOTIFICATION_CENTER } }, +// HONOR print screen + { KE_KEY, 0x28e, { KEY_PRINT } },// Keyboard backlit { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } }, { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } },
drivers/platform/x86/intel/hid.c +1 -0
@@ -55,6 +55,7 @@ static const struct acpi_device_id intel_hid_ids[] = { { "INTC10CB" }, { "INTC10CC" }, { "INTC10F1" }, + { "INTC10F2" }, { } };MODULE_DEVICE_TABLE (acpi, intel_hid_ids);
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c +4 -0
@@ -256,6 +256,10 @@ static const struct x86_cpu_id intel_uncore_cpu_ids[] = {X86_MATCH_VFM (INTEL_ARROWLAKE ,NULL ),X86_MATCH_VFM (INTEL_ARROWLAKE_H ,NULL ),X86_MATCH_VFM (INTEL_LUNARLAKE_M ,NULL ), +X86_MATCH_VFM (INTEL_PANTHERLAKE_L ,NULL ), +X86_MATCH_VFM (INTEL_WILDCATLAKE_L ,NULL ), +X86_MATCH_VFM (INTEL_NOVALAKE ,NULL ), + X86_MATCH_VFM(INTEL_NOVALAKE_L, NULL), {} };MODULE_DEVICE_TABLE (x86cpu, intel_uncore_cpu_ids);
drivers/spi/spi-imx.c +11 -4
@@ -519,9 +519,15 @@ static void mx51_ecspi_trigger(struct spi_imx_data *spi_imx) {u32 reg; - reg =readl (spi_imx->base +MX51_ECSPI_CTRL ); - reg |=MX51_ECSPI_CTRL_XCH ; -writel (reg, spi_imx->base +MX51_ECSPI_CTRL ); +if (spi_imx->usedma) { + reg =readl (spi_imx->base +MX51_ECSPI_DMA ); + reg |=MX51_ECSPI_DMA_TEDEN |MX51_ECSPI_DMA_RXDEN ; +writel (reg, spi_imx->base +MX51_ECSPI_DMA ); + }else { + reg =readl (spi_imx->base +MX51_ECSPI_CTRL ); + reg |=MX51_ECSPI_CTRL_XCH ; +writel (reg, spi_imx->base +MX51_ECSPI_CTRL ); + } }static void mx51_ecspi_disable (struct spi_imx_data *spi_imx)
@@ -759,7 +765,6 @@ static void mx51_setup_wml(struct spi_imx_data *spi_imx)writel (MX51_ECSPI_DMA_RX_WML (spi_imx->wml -1 ) |MX51_ECSPI_DMA_TX_WML (tx_wml) |MX51_ECSPI_DMA_RXT_WML (spi_imx->wml) | -MX51_ECSPI_DMA_TEDEN |MX51_ECSPI_DMA_RXDEN |MX51_ECSPI_DMA_RXTDEN , spi_imx->base +MX51_ECSPI_DMA ); }
@@ -1520,6 +1525,8 @@ static int spi_imx_dma_transfer(struct spi_imx_data *spi_imx,reinit_completion (&spi_imx->dma_tx_completion);dma_async_issue_pending (controller->dma_tx); + spi_imx->devtype_data->trigger (spi_imx); + transfer_timeout =spi_imx_calculate_timeout (spi_imx, transfer->len);/* Wait SDMA to finish the data transfer.*/
drivers/spi/spi-xilinx.c +1 -1
@@ -300,7 +300,7 @@ static int xilinx_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)/* Read out all the data from the Rx FIFO */ rx_words = n_words; - stalled =10 ; + stalled =32 ;while (rx_words) { if (rx_words == n_words && !(stalled--) && !(sr & XSPI_SR_TX_EMPTY_MASK) &&
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +8 -6
@@ -140,22 +140,24 @@ u8 *rtw_get_ie(u8 *pbuf, signed int index, signed int *len, signed int limit)signed int tmp, i;u8 *p; -if (limit <1 ) +if (limit <2 )return NULL ; p = pbuf; i =0 ; *len =0 ; -while (1 ) { +while (i +2 <= limit) { + tmp = *(p +1 ); +if (i +2 + tmp > limit) +break ; +if (*p == index) { - *len = *(p +1 ); + *len = tmp;return p; } - tmp = *(p +1 ); + p += (tmp +2 ); i += (tmp +2 ); -if (i >= limit) -break ; }return NULL ; }
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +9 -4
@@ -579,9 +579,11 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame) p =rtw_get_ie (pframe +sizeof (struct ieee80211_hdr_3addr ) + _BEACON_IE_OFFSET_,WLAN_EID_EXT_SUPP_RATES , &ielen, precv_frame->u.hdr.len -sizeof (struct ieee80211_hdr_3addr ) - _BEACON_IE_OFFSET_);if (p && ielen >0 ) { -if ((*(p +1 + ielen) ==0x2D ) && (*(p +2 + ielen) !=0x2D )) -/* Invalid value 0x2D is detected in Extended Supported Rates (ESR) IE. Try to fix the IE length to avoid failed Beacon parsing. */ - *(p +1 ) = ielen -1 ; +if (p +2 + ielen < pframe + len) { +if ((*(p +1 + ielen) ==0x2D ) && (*(p +2 + ielen) !=0x2D )) +/* Invalid value 0x2D is detected in Extended Supported Rates (ESR) IE. Try to fix the IE length to avoid failed Beacon parsing. */ + *(p +1 ) = ielen -1 ; + } }if (pmlmeext->sitesurvey_res.state ==SCAN_PROCESS ) {
@@ -1033,6 +1035,9 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame) status =WLAN_STATUS_CHALLENGE_FAIL ; goto OnAssocReqFail; }else { +if (ie_len >sizeof (supportRate)) + ie_len =sizeof (supportRate); +memcpy (supportRate, p+2 , ie_len); supportRateNum = ie_len;
@@ -1040,7 +1045,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame) pkt_len - WLAN_HDR_A3_LEN - ie_offset);if (p) { -if (supportRateNum <=sizeof (supportRate)) { +if (supportRateNum + ie_len <=sizeof (supportRate)) {memcpy (supportRate+supportRateNum, p+2 , ie_len); supportRateNum += ie_len; }
drivers/tty/serial/8250/8250_pci.c +37 -0
@@ -95,6 +95,11 @@#define PCI_DEVICE_ID_MOXA_CP138E_A 0x1381#define PCI_DEVICE_ID_MOXA_CP168EL_A 0x1683 +#define PCI_DEVICE_ID_ADDIDATA_CPCI7500 0x7003 +#define PCI_DEVICE_ID_ADDIDATA_CPCI7500_NG 0x7024 +#define PCI_DEVICE_ID_ADDIDATA_CPCI7420_NG 0x7025 +#define PCI_DEVICE_ID_ADDIDATA_CPCI7300_NG 0x7026 +/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
@@ -5996,6 +6001,38 @@ static const struct pci_device_id serial_pci_tbl[] = {0 , pbn_ADDIDATA_PCIe_8_3906250 }, + { PCI_VENDOR_ID_ADDIDATA, +PCI_DEVICE_ID_ADDIDATA_CPCI7500 , +PCI_ANY_ID , +PCI_ANY_ID , +0 , +0 , + pbn_b0_4_115200 }, + + { PCI_VENDOR_ID_ADDIDATA, +PCI_DEVICE_ID_ADDIDATA_CPCI7500_NG , +PCI_ANY_ID , +PCI_ANY_ID , +0 , +0 , + pbn_b0_4_115200 }, + + { PCI_VENDOR_ID_ADDIDATA, +PCI_DEVICE_ID_ADDIDATA_CPCI7420_NG , +PCI_ANY_ID , +PCI_ANY_ID , +0 , +0 , + pbn_b0_2_115200 }, + + { PCI_VENDOR_ID_ADDIDATA, +PCI_DEVICE_ID_ADDIDATA_CPCI7300_NG , +PCI_ANY_ID , +PCI_ANY_ID , +0 , +0 , + pbn_b0_1_115200 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,PCI_VENDOR_ID_IBM ,0x0299 , 0, 0, pbn_b0_bt_2_115200 },
drivers/tty/serial/sh-sci.c +10 -2
@@ -1024,8 +1024,16 @@ static int sci_handle_fifo_overrun(struct uart_port *port) status = s->ops->read_reg (port, s->params->overrun_reg);if (status & s->params->overrun_mask) { - status &= ~s->params->overrun_mask; - s->ops->write_reg (port, s->params->overrun_reg, status); +if (s->type ==SCI_PORT_RSCI ) { +/* +* All of the CFCLR_*C clearing bits match the corresponding +* CSR_*status bits. So, reuse the overrun mask for clearing. +*/ + s->ops->clear_SCxSR (port, s->params->overrun_mask); + }else { + status &= ~s->params->overrun_mask; + s->ops->write_reg (port, s->params->overrun_reg, status); + } port->icount.overrun++;
drivers/usb/serial/belkin_sa.c +17 -11
@@ -435,7 +435,7 @@ static int belkin_sa_tiocmset(struct tty_struct *tty,struct belkin_sa_private *priv =usb_get_serial_port_data (port);unsigned long control_state;unsigned long flags; -int retval; +int retval =0 ;int rts =0 ;int dtr =0 ;
@@ -452,26 +452,32 @@ static int belkin_sa_tiocmset(struct tty_struct *tty, }if (clear &TIOCM_RTS ) { control_state &= ~TIOCM_RTS ; - rts =0 ; + rts =1 ; }if (clear &TIOCM_DTR ) { control_state &= ~TIOCM_DTR ; - dtr =0 ; + dtr =1 ; } priv->control_state = control_state;spin_unlock_irqrestore (&priv->lock, flags); - retval =BSA_USB_CMD (BELKIN_SA_SET_RTS_REQUEST , rts); -if (retval <0 ) { -dev_err (&port->dev,"Set RTS error %d\n" , retval); - goto exit; +if (rts) { + retval =BSA_USB_CMD (BELKIN_SA_SET_RTS_REQUEST , + !!(control_state &TIOCM_RTS )); +if (retval <0 ) { +dev_err (&port->dev,"Set RTS error %d\n" , retval); + goto exit; + } } - retval =BSA_USB_CMD (BELKIN_SA_SET_DTR_REQUEST , dtr); -if (retval <0 ) { -dev_err (&port->dev,"Set DTR error %d\n" , retval); - goto exit; +if (dtr) { + retval =BSA_USB_CMD (BELKIN_SA_SET_DTR_REQUEST , + !!(control_state &TIOCM_DTR )); +if (retval <0 ) { +dev_err (&port->dev,"Set DTR error %d\n" , retval); + goto exit; + } } exit:return retval;
drivers/usb/serial/ftdi_sio.c +24 -48
136 lines not on this page · raw message
drivers/usb/serial/kobil_sct.c +9 -9
@@ -418,7 +418,7 @@ static int kobil_tiocmset(struct tty_struct *tty,struct usb_serial_port *port = tty->driver_data;struct device *dev = &port->dev;struct kobil_private *priv; -int result; +int result =0 ;int dtr =0 ;int rts =0 ;
@@ -435,12 +435,12 @@ static int kobil_tiocmset(struct tty_struct *tty,if (set &TIOCM_DTR ) dtr =1 ;if (clear &TIOCM_RTS ) - rts =0 ; + rts =1 ;if (clear &TIOCM_DTR ) - dtr =0 ; + dtr =1 ; -if (priv->device_type ==KOBIL_ADAPTER_B_PRODUCT_ID ) { -if (dtr !=0 ) +if (dtr && priv->device_type ==KOBIL_ADAPTER_B_PRODUCT_ID ) { +if (set &TIOCM_DTR )dev_dbg (dev,"%s - Setting DTR\n" , __func__);else dev_dbg (dev,"%s - Clearing DTR\n" , __func__);
@@ -448,13 +448,13 @@ static int kobil_tiocmset(struct tty_struct *tty,usb_sndctrlpipe (port->serial->dev,0 ), SUSBCRequest_SetStatusLinesOrQueues,USB_TYPE_VENDOR |USB_RECIP_ENDPOINT |USB_DIR_OUT , - ((dtr !=0 ) ?SUSBCR_SSL_SETDTR :SUSBCR_SSL_CLRDTR ), + ((set &TIOCM_DTR ) ?SUSBCR_SSL_SETDTR :SUSBCR_SSL_CLRDTR ),0 ,NULL ,0 , KOBIL_TIMEOUT); - }else { -if (rts !=0 ) + }else if (rts) { +if (set &TIOCM_RTS )dev_dbg (dev,"%s - Setting RTS\n" , __func__);else dev_dbg (dev,"%s - Clearing RTS\n" , __func__);
@@ -462,7 +462,7 @@ static int kobil_tiocmset(struct tty_struct *tty,usb_sndctrlpipe (port->serial->dev,0 ), SUSBCRequest_SetStatusLinesOrQueues,USB_TYPE_VENDOR |USB_RECIP_ENDPOINT |USB_DIR_OUT , - ((rts !=0 ) ?SUSBCR_SSL_SETRTS :SUSBCR_SSL_CLRRTS ), + ((set &TIOCM_RTS ) ?SUSBCR_SSL_SETRTS :SUSBCR_SSL_CLRRTS ),0 ,NULL , 0,
drivers/usb/serial/option.c +19 -3
@@ -1433,17 +1433,31 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10b3, 0xff, 0xff, 0x60) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c0, 0xff), /* Telit FE910C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c1, 0xff), /* Telit FE910C04 (RNDIS) */ + .driver_info = NCTRL(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c2, 0xff), /* Telit FE910C04 (MBIM) */ + .driver_info = NCTRL(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c3, 0xff), /* Telit FE910C04 (ECM) */ + .driver_info = NCTRL(4) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c4, 0xff), /* Telit FE910C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c5, 0xff), /* Telit FE910C04 (RNDIS) */ + .driver_info = NCTRL(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c6, 0xff), /* Telit FE910C04 (MBIM) */ + .driver_info = NCTRL(4) }, + { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x30), /* Telit FE910C04 (ECM) */ + .driver_info = NCTRL(4) }, + { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x40) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c8, 0xff), /* Telit FE910C04 (rmnet) */ .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c9, 0xff), /* Telit FE910C04 (MBIM) */ + .driver_info = NCTRL(3) | RSVD(4) | RSVD(5) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10cb, 0xff), /* Telit FE910C04 (RNDIS) */ + .driver_info = NCTRL(3) | RSVD(4) | RSVD(5) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x30), /* Telit FN990B (rmnet) */ .driver_info = NCTRL(5) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x60) }, - { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x30), /* Telit FE910C04 (ECM) */ - .driver_info = NCTRL(4) }, - { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x30), /* Telit FN990B (MBIM) */ .driver_info = NCTRL(6) }, { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x40) },
@@ -2376,6 +2390,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0f0, 0xff), /* Foxconn T99W373 MBIM */ .driver_info = RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe123, 0xff), /* Foxconn T99W760 MBIM */ + .driver_info = RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff), /* Foxconn T99W651 RNDIS */ .driver_info = RSVD(5) | RSVD(6) }, { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe15f, 0xff), /* Foxconn T99W709 */
fs/bfs/inode.c +18 -1
@@ -61,7 +61,19 @@ struct inode *bfs_iget(struct super_block *sb, unsigned long ino) off = (ino -BFS_ROOT_INO ) %BFS_INODES_PER_BLOCK ; di = (struct bfs_inode *)bh->b_data + off; - inode->i_mode =0x0000FFFF &le32_to_cpu (di->i_mode); +/* +* https://martin.hinner.info/fs/bfs/bfs-structure.html explains that +* BFS in SCO UnixWare environment used only lower 9 bits of di->i_mode +* value. This means that, although bfs_write_inode() saves whole +* inode->i_mode bits (which include S_IFMT bits and S_IS{UID,GID,VTX} +* bits), middle 7 bits of di->i_mode value can be garbage when these +* bits were not saved by bfs_write_inode(). +* Since we can't tell whether middle 7 bits are garbage, use only +* lower 12 bits (i.e. tolerate S_IS{UID,GID,VTX} bits possibly being +* garbage) and reconstruct S_IFMT bits for Linux environment from +* di->i_vtype value. +*/ + inode->i_mode =0x00000FFF &le32_to_cpu (di->i_mode);if (le32_to_cpu (di->i_vtype) ==BFS_VDIR ) { inode->i_mode |=S_IFDIR ; inode->i_op = &bfs_dir_inops;
@@ -71,6 +83,11 @@ struct inode *bfs_iget(struct super_block *sb, unsigned long ino) inode->i_op = &bfs_file_inops; inode->i_fop = &bfs_file_operations; inode->i_mapping->a_ops = &bfs_aops; + }else { +brelse (bh); +printf ("Unknown vtype=%u %s:%08lx\n" , +le32_to_cpu (di->i_vtype), inode->i_sb->s_id, ino); + goto error; }BFS_I (inode)->i_sblock =le32_to_cpu (di->i_sblock);
fs/ext4/inline.c +12 -2
@@ -418,7 +418,12 @@ static int ext4_prepare_inline_data(handle_t *handle, struct inode *inode,return -ENOSPC ;ext4_write_lock_xattr (inode, &no_expand); - +/* +* ei->i_inline_size may have changed since the initial check +* if other xattrs were added. Recalculate to ensure +* ext4_update_inline_data() validates against current capacity. +*/ + (void )ext4_find_inline_data_nolock (inode);if (ei->i_inline_off) ret =ext4_update_inline_data (handle, inode, len);else
@@ -446,9 +451,13 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle,if (!ei->i_inline_off)return 0 ; +down_write (&ei->i_data_sem); + error =ext4_get_inode_loc (inode, &is.iloc); -if (error) +if (error) { +up_write (&ei->i_data_sem);return error; + } error =ext4_xattr_ibody_find (inode, &i, &is);if (error)
@@ -487,6 +496,7 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle,brelse (is.iloc.bh);if (error == -ENODATA ) error =0 ; +up_write (&ei->i_data_sem);return error; }
fs/jbd2/transaction.c +14 -5
@@ -1284,14 +1284,23 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)* committing transaction's lists, but it HAS to be in Forget state in * that case: the transaction must have deleted the buffer for it to be * reused here. +* In the case of file system data inconsistency, for example, if the +* block bitmap of a referenced block is not set, it can lead to the +* situation where a block being committed is allocated and used again. +* As a result, the following condition will not be satisfied, so here +* we directly trigger a JBD abort instead of immediately invoking +* bugon. */ spin_lock (&jh->b_state_lock); -J_ASSERT_JH (jh, (jh->b_transaction == transaction || - jh->b_transaction ==NULL || - (jh->b_transaction == journal->j_committing_transaction && - jh->b_jlist == BJ_Forget))); +if (!(jh->b_transaction == transaction || jh->b_transaction ==NULL || + (jh->b_transaction == journal->j_committing_transaction && + jh->b_jlist == BJ_Forget)) || jh->b_next_transaction !=NULL ) { + err = -EROFS ; +spin_unlock (&jh->b_state_lock); +jbd2_journal_abort (journal, err); + goto out; + } -J_ASSERT_JH (jh, jh->b_next_transaction ==NULL );J_ASSERT_JH (jh,buffer_locked (jh2bh (jh)));if (jh->b_transaction ==NULL ) {
fs/smb/client/fs_context.c +1 -1
@@ -1472,7 +1472,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,break ; } -if (strnlen (param->string,CIFS_MAX_USERNAME_LEN ) > +if (strnlen (param->string,CIFS_MAX_USERNAME_LEN ) ==CIFS_MAX_USERNAME_LEN ) {pr_warn ("username too long\n" ); goto cifs_parse_mount_err;
fs/smb/server/transport_ipc.c +5 -2
@@ -553,12 +553,16 @@ static void *ipc_msg_send_request(struct ksmbd_ipc_msg *msg, unsigned int handleup_write (&ipc_msg_table_lock); ret =ipc_msg_send (msg); -if (ret) +if (ret) { +down_write (&ipc_msg_table_lock); goto out; + } ret =wait_event_interruptible_timeout (entry.wait, entry.response !=NULL ,IPC_WAIT_TIMEOUT ); + +down_write (&ipc_msg_table_lock);if (entry.response) { ret =ipc_validate_msg (&entry);if (ret) {
@@ -567,7 +571,6 @@ static void *ipc_msg_send_request(struct ksmbd_ipc_msg *msg, unsigned int handle } } out: -down_write (&ipc_msg_table_lock);hash_del (&entry.ipc_table_hlist);up_write (&ipc_msg_table_lock);return entry.response;
kernel/locking/spinlock_debug.c +2 -2
@@ -184,8 +184,8 @@ void do_raw_read_unlock(rwlock_t *lock)static inline void debug_write_lock_before (rwlock_t *lock) {RWLOCK_BUG_ON (lock->magic !=RWLOCK_MAGIC , lock,"bad magic" ); -RWLOCK_BUG_ON (lock->owner == current, lock,"recursion" ); -RWLOCK_BUG_ON (lock->owner_cpu ==raw_smp_processor_id (), +RWLOCK_BUG_ON (READ_ONCE (lock->owner) == current, lock,"recursion" ); +RWLOCK_BUG_ON (READ_ONCE (lock->owner_cpu) ==raw_smp_processor_id (), lock,"cpu recursion" ); }
kernel/sched/ext.c +2 -2
@@ -5377,8 +5377,8 @@ void __init init_sched_ext_class(void)BUG_ON (!zalloc_cpumask_var_node (&rq->scx.cpus_to_kick_if_idle,GFP_KERNEL , n));BUG_ON (!zalloc_cpumask_var_node (&rq->scx.cpus_to_preempt,GFP_KERNEL , n));BUG_ON (!zalloc_cpumask_var_node (&rq->scx.cpus_to_wait,GFP_KERNEL , n)); -init_irq_work (&rq->scx.deferred_irq_work, deferred_irq_workfn); -init_irq_work (&rq->scx.kick_cpus_irq_work, kick_cpus_irq_workfn); + rq->scx.deferred_irq_work =IRQ_WORK_INIT_HARD (deferred_irq_workfn); + rq->scx.kick_cpus_irq_work =IRQ_WORK_INIT_HARD (kick_cpus_irq_workfn);if (cpu_online (cpu))cpu_rq (cpu)->scx.flags |=SCX_RQ_ONLINE ;
kernel/trace/ftrace.c +31 -9
@@ -1971,7 +1971,8 @@ static void ftrace_hash_rec_enable_modify(struct ftrace_ops *ops)*/ static int __ftrace_hash_update_ipmodify (struct ftrace_ops *ops,struct ftrace_hash *old_hash, -struct ftrace_hash *new_hash) +struct ftrace_hash *new_hash, +bool update_target) {struct ftrace_page *pg;struct dyn_ftrace *rec, *end =NULL ;
@@ -2006,10 +2007,13 @@ static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops,if (rec->flags &FTRACE_FL_DISABLED )continue ; -/* We need to update only differences of filter_hash */ +/* +* Unless we are updating the target of a direct function, +* we only need to update differences of filter_hash +*/ in_old = !!ftrace_lookup_ip (old_hash, rec->ip); in_new = !!ftrace_lookup_ip (new_hash, rec->ip); -if (in_old == in_new) +if (!update_target && (in_old == in_new))continue ;if (in_new) {
@@ -2020,7 +2024,16 @@ static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops,if (is_ipmodify) goto rollback; -FTRACE_WARN_ON (rec->flags &FTRACE_FL_DIRECT ); +/* +* If this is called by __modify_ftrace_direct() +* then it is only changing where the direct +* pointer is jumping to, and the record already +* points to a direct trampoline. If it isn't, +* then it is a bug to update ipmodify on a direct +* caller. +*/ +FTRACE_WARN_ON (!update_target && + (rec->flags &FTRACE_FL_DIRECT ));/* * Another ops with IPMODIFY is already
@@ -2076,7 +2089,7 @@ static int ftrace_hash_ipmodify_enable(struct ftrace_ops *ops)if (ftrace_hash_empty (hash)) hash =NULL ; -return __ftrace_hash_update_ipmodify (ops,EMPTY_HASH , hash); +return __ftrace_hash_update_ipmodify (ops,EMPTY_HASH , hash, false); }/* Disabling always succeeds */
@@ -2087,7 +2100,7 @@ static void ftrace_hash_ipmodify_disable(struct ftrace_ops *ops)if (ftrace_hash_empty (hash)) hash =NULL ; -__ftrace_hash_update_ipmodify (ops, hash,EMPTY_HASH ); +__ftrace_hash_update_ipmodify (ops, hash,EMPTY_HASH , false); } static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,
@@ -2101,7 +2114,7 @@ static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,if (ftrace_hash_empty (new_hash)) new_hash =NULL ; -return __ftrace_hash_update_ipmodify (ops, old_hash, new_hash); +return __ftrace_hash_update_ipmodify (ops, old_hash, new_hash, false); }static void print_ip_ins (const char *fmt,const unsigned char *p)
@@ -6114,7 +6127,7 @@ EXPORT_SYMBOL_GPL(unregister_ftrace_direct);static int __modify_ftrace_direct (struct ftrace_ops *ops,unsigned long addr) { -struct ftrace_hash *hash; +struct ftrace_hash *hash = ops->func_hash->filter_hash;struct ftrace_func_entry *entry, *iter;static struct ftrace_ops tmp_ops = { .func = ftrace_stub,
@@ -6134,13 +6147,21 @@ __modify_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)if (err)return err; +/* +* Call __ftrace_hash_update_ipmodify() here, so that we can call +* ops->ops_func for the ops. This is needed because the above +* register_ftrace_function_nolock() worked on tmp_ops. +*/ + err =__ftrace_hash_update_ipmodify (ops, hash, hash, true); +if (err) + goto out; +/* * Now the ftrace_ops_list_func() is called to do the direct callers. * We can safely change the direct functions attached to each entry. */ mutex_lock (&ftrace_lock); - hash = ops->func_hash->filter_hash; size =1 << hash->size_bits;for (i =0 ; i < size; i++) {hlist_for_each_entry (iter, &hash->buckets[i], hlist) {
@@ -6155,6 +6176,7 @@ __modify_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)mutex_unlock (&ftrace_lock); +out:/* Removing the tmp_ops will add the updated direct callers to the functions */ unregister_ftrace_function (&tmp_ops);
samples/vfs/test-statx.c +6 -0
@@ -19,6 +19,12 @@#include <time.h> #include <sys/syscall.h> #include <sys/types.h> + +// Work around glibc header silliness +#undef AT_RENAME_NOREPLACE +#undef AT_RENAME_EXCHANGE +#undef AT_RENAME_WHITEOUT +#include <linux/stat.h> #include <linux/fcntl.h> #define statx foo
samples/watch_queue/watch_test.c +6 -0
@@ -16,6 +16,12 @@#include <errno.h> #include <sys/ioctl.h> #include <limits.h> + +// Work around glibc header silliness +#undef AT_RENAME_NOREPLACE +#undef AT_RENAME_EXCHANGE +#undef AT_RENAME_WHITEOUT +#include <linux/watch_queue.h> #include <linux/unistd.h> #include <linux/keyctl.h>
sound/hda/codecs/realtek/alc269.c +9 -0
@@ -6685,6 +6685,15 @@ static const struct hda_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8e60 ,"HP Trekker " ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x103c ,0x8e61 ,"HP Trekker " ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x103c ,0x8e62 ,"HP Trekker " ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x103c ,0x8ed5 ,"HP Merino13X" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8ed6 ,"HP Merino13" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8ed7 ,"HP Merino14" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8ed8 ,"HP Merino16" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8ed9 ,"HP Merino14W" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8eda ,"HP Merino16W" ,ALC245_FIXUP_TAS2781_SPI_2 ), +SND_PCI_QUIRK (0x103c ,0x8f40 ,"HP Lampas14" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x103c ,0x8f41 ,"HP Lampas16" ,ALC287_FIXUP_TAS2781_I2C ), +SND_PCI_QUIRK (0x103c ,0x8f42 ,"HP LampasW14" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x1043 ,0x1032 ,"ASUS VivoBook X513EA" ,ALC256_FIXUP_ASUS_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x1034 ,"ASUS GU605C" ,ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1 ), SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
sound/soc/sdca/sdca_functions.c +2 -1
@@ -894,7 +894,8 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *entireturn ret; } - control->values =devm_kzalloc (dev,hweight64 (control->cn_list),GFP_KERNEL ); + control->values =devm_kcalloc (dev,hweight64 (control->cn_list), +sizeof (int ),GFP_KERNEL );if (!control->values)return -ENOMEM ;
sound/usb/quirks.c +6 -0
@@ -2022,6 +2022,8 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,case USB_ID (0x16d0 ,0x09d8 ):/* NuPrime IDA-8 */ case USB_ID (0x16d0 ,0x09db ):/* NuPrime Audio DAC-9 */ case USB_ID (0x16d0 ,0x09dd ):/* Encore mDSD */ +case USB_ID (0x16d0 ,0x0ab1 ):/* PureAudio APA DAC */ +case USB_ID (0x16d0 ,0xeca1 ):/* PureAudio Lotus DAC5, DAC5 SE, DAC5 Pro */ case USB_ID (0x1db5 ,0x0003 ):/* Bryston BDA3 */ case USB_ID (0x20a0 ,0x4143 ):/* WaveIO USB Audio 2.0 */ case USB_ID (0x22e1 ,0xca01 ):/* HDTA Serenade DSD */
@@ -2289,6 +2291,10 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_IGNORE_CLOCK_SOURCE),DEVICE_FLG (0x1686 ,0x00dd ,/* Zoom R16/24 */ QUIRK_FLAG_TX_LENGTH |QUIRK_FLAG_CTL_MSG_DELAY_1M ), +DEVICE_FLG (0x16d0 ,0x0ab1 ,/* PureAudio APA DAC */ +QUIRK_FLAG_DSD_RAW ), +DEVICE_FLG (0x16d0 ,0xeca1 ,/* PureAudio Lotus DAC5, DAC5 SE and DAC5 Pro */ +QUIRK_FLAG_DSD_RAW ),DEVICE_FLG (0x17aa ,0x1046 ,/* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */ QUIRK_FLAG_DISABLE_AUTOSUSPEND ), DEVICE_FLG(0x17aa, 0x104d, /* Lenovo ThinkStation P620 Internal Speaker + Front Headset */