Skip to content

Commit 7b528bc

Browse files
committed
Merge tag 'v6.1.122' into orange-pi-6.1-rk35xx
This is the 6.1.122 stable release * tag 'v6.1.122' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux: Linux 6.1.122 drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update io_uring/rw: avoid punting to io-wq directly io_uring/rw: treat -EOPNOTSUPP for IOCB_NOWAIT like -EAGAIN io_uring/rw: split io_read() into a helper epoll: Add synchronous wakeup support for ep_poll_callback udf: Fix directory iteration for longer tail extents ceph: validate snapdirname option length when mounting of: Fix refcount leakage for OF node returned by __of_get_dma_parent() of: Fix error path in of_parse_phandle_with_args_map() udmabuf: also check for F_SEAL_FUTURE_WRITE nilfs2: prevent use of deleted inode nilfs2: fix buffer head leaks in calls to truncate_inode_pages() of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one() of/irq: Fix interrupt-map cell length check in of_irq_parse_imap_parent() NFS/pnfs: Fix a live lock between recalled layouts and layoutget io_uring: check if iowq is killed before queuing io_uring: Fix registered ring file refcount leak selftests/bpf: Use asm constraint "m" for LoongArch tracing: Add "%s" check in test_event_printk() tracing: Add missing helper functions in event pointer dereference check tracing: Fix test_event_printk() to process entire print argument KVM: x86: Play nice with protected guests in complete_hypercall_exit() Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet btrfs: tree-checker: reject inline extent items with 0 ref count zram: fix uninitialized ZRAM not releasing backing device zram: refuse to use zero sized block device as backing device sh: clk: Fix clk_enable() to return 0 on NULL clk hwmon: (tmp513) Fix interpretation of values of Temperature Result and Limit Registers hwmon: (tmp513) Fix Current Register value interpretation hwmon: (tmp513) Fix interpretation of values of Shunt Voltage and Limit Registers hwmon: (tmp513) Use SI constants from units.h hwmon: (tmp513) Simplify with dev_err_probe() hwmon: (tmp513) Don't use "proxy" headers drm/amdgpu: don't access invalid sched i915/guc: Accumulate active runtime on gt reset i915/guc: Ensure busyness counter increases motonically i915/guc: Reset engine utilization buffer before registration drm/panel: novatek-nt35950: fix return value check in nt35950_probe() drm/modes: Avoid divide by zero harder in drm_mode_vrefresh() thunderbolt: Improve redrive mode handling USB: serial: option: add Telit FE910C04 rmnet compositions USB: serial: option: add MediaTek T7XX compositions USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready USB: serial: option: add MeiG Smart SLM770A USB: serial: option: add TCL IK512 MBIM & ECM hexagon: Disable constant extender optimization for LLVM prior to 19.1.0 efivarfs: Fix error on non-existent file i2c: riic: Always round-up when calculating bus period chelsio/chtls: prevent potential integer overflow on 32bit KVM: x86: Cache CPUID.0xD XSTATE offsets+sizes during module init mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk net: mdiobus: fix an OF node reference leak netfilter: ipset: Fix for recursive locking warning net: ethernet: bgmac-platform: fix an OF node reference leak net: hinic: Fix cleanup in create_rxqs/txqs() ionic: use ee->offset when returning sprom data ionic: Fix netdev notifier unregister on failure netdevsim: prevent bad user input in nsim_dev_health_break_write() net: mscc: ocelot: fix incorrect IFH SRC_PORT field in ocelot_ifh_set_basic() net/smc: check return value of sock_recvmsg when draining clc data net/smc: check smcd_v2_ext_offset when receiving proposal msg net/smc: check iparea_offset and ipv6_prefixes_cnt when receiving proposal msg net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll net/smc: protect link down work from execute after lgr freed cxl/region: Fix region creation for greater than x2 switches i2c: pnx: Fix timeout in wait functions p2sb: Do not scan and remove the P2SB device when it is unhidden p2sb: Move P2SB hide and unhide code to p2sb_scan_and_cache() p2sb: Introduce the global flag p2sb_hidden_by_bios p2sb: Factor out p2sb_read_from_cache() platform/x86: p2sb: Make p2sb_get_devfn() return void PCI: Introduce pci_resource_n() usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled MIPS: Loongson64: DTS: Fix msi node for ls7a PCI: Add ACS quirk for Broadcom BCM5760X NIC ASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C ASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP usb: cdns3: Add quirk flag to enable suspend residency PCI: vmd: Create domain symlink before pci_bus_add_devices() PCI: Use preserve_config in place of pci_flags PCI/AER: Disable AER service on suspend net: sched: fix ordering of qlen adjustment Signed-off-by: Khusika Dhamar Gusti <[email protected]>
2 parents 32aed71 + 563edd7 commit 7b528bc

File tree

77 files changed

+723
-232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+723
-232
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 1
4-
SUBLEVEL = 121
4+
SUBLEVEL = 122
55
EXTRAVERSION =
66
NAME = Curry Ramen
77

arch/hexagon/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ KBUILD_LDFLAGS += $(ldflags-y)
3232
TIR_NAME := r19
3333
KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__
3434
KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME)
35+
36+
# Disable HexagonConstExtenders pass for LLVM versions prior to 19.1.0
37+
# https://github.com/llvm/llvm-project/issues/99714
38+
ifneq ($(call clang-min-version, 190100),y)
39+
KBUILD_CFLAGS += -mllvm -hexagon-cext=false
40+
endif

arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
compatible = "loongson,pch-msi-1.0";
3434
reg = <0 0x2ff00000 0 0x8>;
3535
interrupt-controller;
36+
#interrupt-cells = <1>;
3637
msi-controller;
3738
loongson,msi-base-vec = <64>;
3839
loongson,msi-num-vecs = <192>;

arch/x86/kvm/cpuid.c

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@
3333
u32 kvm_cpu_caps[NR_KVM_CPU_CAPS] __read_mostly;
3434
EXPORT_SYMBOL_GPL(kvm_cpu_caps);
3535

36+
struct cpuid_xstate_sizes {
37+
u32 eax;
38+
u32 ebx;
39+
u32 ecx;
40+
};
41+
42+
static struct cpuid_xstate_sizes xstate_sizes[XFEATURE_MAX] __ro_after_init;
43+
44+
void __init kvm_init_xstate_sizes(void)
45+
{
46+
u32 ign;
47+
int i;
48+
49+
for (i = XFEATURE_YMM; i < ARRAY_SIZE(xstate_sizes); i++) {
50+
struct cpuid_xstate_sizes *xs = &xstate_sizes[i];
51+
52+
cpuid_count(0xD, i, &xs->eax, &xs->ebx, &xs->ecx, &ign);
53+
}
54+
}
55+
3656
u32 xstate_required_size(u64 xstate_bv, bool compacted)
3757
{
3858
int feature_bit = 0;
@@ -41,14 +61,15 @@ u32 xstate_required_size(u64 xstate_bv, bool compacted)
4161
xstate_bv &= XFEATURE_MASK_EXTEND;
4262
while (xstate_bv) {
4363
if (xstate_bv & 0x1) {
44-
u32 eax, ebx, ecx, edx, offset;
45-
cpuid_count(0xD, feature_bit, &eax, &ebx, &ecx, &edx);
64+
struct cpuid_xstate_sizes *xs = &xstate_sizes[feature_bit];
65+
u32 offset;
66+
4667
/* ECX[1]: 64B alignment in compacted form */
4768
if (compacted)
48-
offset = (ecx & 0x2) ? ALIGN(ret, 64) : ret;
69+
offset = (xs->ecx & 0x2) ? ALIGN(ret, 64) : ret;
4970
else
50-
offset = ebx;
51-
ret = max(ret, offset + eax);
71+
offset = xs->ebx;
72+
ret = max(ret, offset + xs->eax);
5273
}
5374

5475
xstate_bv >>= 1;

arch/x86/kvm/cpuid.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
3232
bool kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx,
3333
u32 *ecx, u32 *edx, bool exact_only);
3434

35+
void __init kvm_init_xstate_sizes(void);
3536
u32 xstate_required_size(u64 xstate_bv, bool compacted);
3637

3738
int cpuid_query_maxphyaddr(struct kvm_vcpu *vcpu);

arch/x86/kvm/x86.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9712,7 +9712,7 @@ static int complete_hypercall_exit(struct kvm_vcpu *vcpu)
97129712
{
97139713
u64 ret = vcpu->run->hypercall.ret;
97149714

9715-
if (!is_64_bit_mode(vcpu))
9715+
if (!is_64_bit_hypercall(vcpu))
97169716
ret = (u32)ret;
97179717
kvm_rax_write(vcpu, ret);
97189718
++vcpu->stat.hypercalls;
@@ -13820,6 +13820,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
1382013820

1382113821
static int __init kvm_x86_init(void)
1382213822
{
13823+
kvm_init_xstate_sizes();
13824+
1382313825
kvm_mmu_x86_module_init();
1382413826
mitigate_smt_rsb &= boot_cpu_has_bug(X86_BUG_SMT_RSB) && cpu_smt_possible();
1382513827
return 0;

drivers/block/zram/zram_drv.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ static ssize_t backing_dev_store(struct device *dev,
530530
}
531531

532532
nr_pages = i_size_read(inode) >> PAGE_SHIFT;
533+
/* Refuse to use zero sized device (also prevents self reference) */
534+
if (!nr_pages) {
535+
err = -EINVAL;
536+
goto out;
537+
}
538+
533539
bitmap_sz = BITS_TO_LONGS(nr_pages) * sizeof(long);
534540
bitmap = kvzalloc(bitmap_sz, GFP_KERNEL);
535541
if (!bitmap) {
@@ -1162,12 +1168,16 @@ static void zram_meta_free(struct zram *zram, u64 disksize)
11621168
size_t num_pages = disksize >> PAGE_SHIFT;
11631169
size_t index;
11641170

1171+
if (!zram->table)
1172+
return;
1173+
11651174
/* Free all pages that are still in this zram device */
11661175
for (index = 0; index < num_pages; index++)
11671176
zram_free_page(zram, index);
11681177

11691178
zs_destroy_pool(zram->mem_pool);
11701179
vfree(zram->table);
1180+
zram->table = NULL;
11711181
}
11721182

11731183
static bool zram_meta_alloc(struct zram *zram, u64 disksize)
@@ -1716,11 +1726,6 @@ static void zram_reset_device(struct zram *zram)
17161726

17171727
zram->limit_pages = 0;
17181728

1719-
if (!init_done(zram)) {
1720-
up_write(&zram->init_lock);
1721-
return;
1722-
}
1723-
17241729
set_capacity_and_notify(zram->disk, 0);
17251730
part_stat_set_all(zram->disk->part0, 0);
17261731

drivers/cxl/core/region.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ static int cxl_port_setup_targets(struct cxl_port *port,
974974
struct cxl_region_params *p = &cxlr->params;
975975
struct cxl_decoder *cxld = cxl_rr->decoder;
976976
struct cxl_switch_decoder *cxlsd;
977+
struct cxl_port *iter = port;
977978
u16 eig, peig;
978979
u8 eiw, peiw;
979980

@@ -990,16 +991,26 @@ static int cxl_port_setup_targets(struct cxl_port *port,
990991

991992
cxlsd = to_cxl_switch_decoder(&cxld->dev);
992993
if (cxl_rr->nr_targets_set) {
993-
int i, distance;
994+
int i, distance = 1;
995+
struct cxl_region_ref *cxl_rr_iter;
994996

995997
/*
996-
* Passthrough decoders impose no distance requirements between
997-
* peers
998+
* The "distance" between peer downstream ports represents which
999+
* endpoint positions in the region interleave a given port can
1000+
* host.
1001+
*
1002+
* For example, at the root of a hierarchy the distance is
1003+
* always 1 as every index targets a different host-bridge. At
1004+
* each subsequent switch level those ports map every Nth region
1005+
* position where N is the width of the switch == distance.
9981006
*/
999-
if (cxl_rr->nr_targets == 1)
1000-
distance = 0;
1001-
else
1002-
distance = p->nr_targets / cxl_rr->nr_targets;
1007+
do {
1008+
cxl_rr_iter = cxl_rr_load(iter, cxlr);
1009+
distance *= cxl_rr_iter->nr_targets;
1010+
iter = to_cxl_port(iter->dev.parent);
1011+
} while (!is_cxl_root(iter));
1012+
distance *= cxlrd->cxlsd.cxld.interleave_ways;
1013+
10031014
for (i = 0; i < cxl_rr->nr_targets_set; i++)
10041015
if (ep->dport == cxlsd->target[i]) {
10051016
rc = check_last_peer(cxled, ep, cxl_rr,

drivers/dma-buf/udmabuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static const struct dma_buf_ops udmabuf_ops = {
164164
};
165165

166166
#define SEALS_WANTED (F_SEAL_SHRINK)
167-
#define SEALS_DENIED (F_SEAL_WRITE)
167+
#define SEALS_DENIED (F_SEAL_WRITE|F_SEAL_FUTURE_WRITE)
168168

169169
static long udmabuf_create(struct miscdevice *device,
170170
struct udmabuf_create_list *head,

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,
150150

151151
void amdgpu_job_free_resources(struct amdgpu_job *job)
152152
{
153-
struct amdgpu_ring *ring = to_amdgpu_ring(job->base.sched);
154153
struct dma_fence *f;
155154
unsigned i;
156155

@@ -163,7 +162,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job)
163162
f = NULL;
164163

165164
for (i = 0; i < job->num_ibs; ++i)
166-
amdgpu_ib_free(ring->adev, &job->ibs[i], f);
165+
amdgpu_ib_free(NULL, &job->ibs[i], f);
167166
}
168167

169168
static void amdgpu_job_free_cb(struct drm_sched_job *s_job)

0 commit comments

Comments
 (0)