Skip to content

Commit

Permalink
up to 5.15.164
Browse files Browse the repository at this point in the history
  • Loading branch information
unifreq committed Jul 27, 2024
1 parent 5a08e70 commit 98c2b1d
Show file tree
Hide file tree
Showing 102 changed files with 868 additions and 366 deletions.
20 changes: 12 additions & 8 deletions Documentation/admin-guide/filesystem-monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ notifications is Ext4.

A FAN_FS_ERROR Notification has the following format::

[ Notification Metadata (Mandatory) ]
[ Generic Error Record (Mandatory) ]
[ FID record (Mandatory) ]
::

[ Notification Metadata (Mandatory) ]
[ Generic Error Record (Mandatory) ]
[ FID record (Mandatory) ]

The order of records is not guaranteed, and new records might be added
in the future. Therefore, applications must not rely on the order and
Expand All @@ -53,11 +55,13 @@ providing any additional details about the problem. This record is
identified by ``struct fanotify_event_info_header.info_type`` being set
to FAN_EVENT_INFO_TYPE_ERROR.

struct fanotify_event_info_error {
struct fanotify_event_info_header hdr;
__s32 error;
__u32 error_count;
};
::

struct fanotify_event_info_error {
struct fanotify_event_info_header hdr;
__s32 error;
__u32 error_count;
};

The `error` field identifies the type of error using errno values.
`error_count` tracks the number of errors that occurred and were
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 163
SUBLEVEL = 164
EXTRAVERSION =
NAME = Trick or Treat

Expand Down
14 changes: 2 additions & 12 deletions arch/arm/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,14 @@ extern int __get_user_64t_1(void *);
extern int __get_user_64t_2(void *);
extern int __get_user_64t_4(void *);

#define __GUP_CLOBBER_1 "lr", "cc"
#ifdef CONFIG_CPU_USE_DOMAINS
#define __GUP_CLOBBER_2 "ip", "lr", "cc"
#else
#define __GUP_CLOBBER_2 "lr", "cc"
#endif
#define __GUP_CLOBBER_4 "lr", "cc"
#define __GUP_CLOBBER_32t_8 "lr", "cc"
#define __GUP_CLOBBER_8 "lr", "cc"

#define __get_user_x(__r2, __p, __e, __l, __s) \
__asm__ __volatile__ ( \
__asmeq("%0", "r0") __asmeq("%1", "r2") \
__asmeq("%3", "r1") \
"bl __get_user_" #__s \
: "=&r" (__e), "=r" (__r2) \
: "0" (__p), "r" (__l) \
: __GUP_CLOBBER_##__s)
: "ip", "lr", "cc")

/* narrowing a double-word get into a single 32bit word register: */
#ifdef __ARMEB__
Expand All @@ -163,7 +153,7 @@ extern int __get_user_64t_4(void *);
"bl __get_user_64t_" #__s \
: "=&r" (__e), "=r" (__r2) \
: "0" (__p), "r" (__l) \
: __GUP_CLOBBER_##__s)
: "ip", "lr", "cc")
#else
#define __get_user_x_64t __get_user_x
#endif
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/msm8996.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,7 @@
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
snps,is-utmi-l1-suspend;
snps,parkmode-disable-ss-quirk;
tx-fifo-resize;
};
};
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/sdm630.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
snps,parkmode-disable-ss-quirk;

/*
* SDM630 technically supports USB3 but I
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/kernel/armv8_deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ static int run_all_insn_set_hw_mode(unsigned int cpu)
for (i = 0; i < ARRAY_SIZE(insn_emulations); i++) {
struct insn_emulation *insn = insn_emulations[i];
bool enable = READ_ONCE(insn->current_mode) == INSN_HW;
if (insn->status == INSN_UNAVAILABLE)
continue;

if (insn->set_hw_mode && insn->set_hw_mode(enable)) {
pr_warn("CPU[%u] cannot support the emulation of %s",
cpu, insn->name);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/syscalls/syscall_o32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
17 o32 break sys_ni_syscall
# 18 was sys_stat
18 o32 unused18 sys_ni_syscall
19 o32 lseek sys_lseek
19 o32 lseek sys_lseek compat_sys_lseek
20 o32 getpid sys_getpid
21 o32 mount sys_mount
22 o32 umount sys_oldumount
Expand Down
7 changes: 5 additions & 2 deletions arch/powerpc/kernel/eeh_pe.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)
{
struct eeh_dev *edev;
struct pci_dev *pdev;
struct pci_bus *bus = NULL;

if (pe->type & EEH_PE_PHB)
return pe->phb->bus;
Expand All @@ -859,9 +860,11 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)

/* Retrieve the parent PCI bus of first (top) PCI device */
edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry);
pci_lock_rescan_remove();
pdev = eeh_dev_to_pci_dev(edev);
if (pdev)
return pdev->bus;
bus = pdev->bus;
pci_unlock_rescan_remove();

return NULL;
return bus;
}
18 changes: 13 additions & 5 deletions arch/powerpc/kvm/book3s_64_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
}
rcu_read_unlock();

fdput(f);

if (!found)
if (!found) {
fdput(f);
return -EINVAL;
}

table_group = iommu_group_get_iommudata(grp);
if (WARN_ON(!table_group))
if (WARN_ON(!table_group)) {
fdput(f);
return -EFAULT;
}

for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) {
struct iommu_table *tbltmp = table_group->tables[i];
Expand All @@ -145,8 +147,10 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
break;
}
}
if (!tbl)
if (!tbl) {
fdput(f);
return -EINVAL;
}

rcu_read_lock();
list_for_each_entry_rcu(stit, &stt->iommu_tables, next) {
Expand All @@ -157,20 +161,23 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
/* stit is being destroyed */
iommu_tce_table_put(tbl);
rcu_read_unlock();
fdput(f);
return -ENOTTY;
}
/*
* The table is already known to this KVM, we just increased
* its KVM reference counter and can return.
*/
rcu_read_unlock();
fdput(f);
return 0;
}
rcu_read_unlock();

stit = kzalloc(sizeof(*stit), GFP_KERNEL);
if (!stit) {
iommu_tce_table_put(tbl);
fdput(f);
return -ENOMEM;
}

Expand All @@ -179,6 +186,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,

list_add_rcu(&stit->next, &stt->iommu_tables);

fdput(f);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ static int alloc_dispatch_log_kmem_cache(void)
{
void (*ctor)(void *) = get_dtl_cache_ctor();

dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES,
DISPATCH_LOG_BYTES, 0, ctor);
dtl_cache = kmem_cache_create_usercopy("dtl", DISPATCH_LOG_BYTES,
DISPATCH_LOG_BYTES, 0, 0, DISPATCH_LOG_BYTES, ctor);
if (!dtl_cache) {
pr_warn("Failed to create dispatch trace log buffer cache\n");
pr_warn("Stolen time statistics will be unreliable\n");
Expand Down
3 changes: 2 additions & 1 deletion arch/riscv/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
bool (*fn)(void *, unsigned long), void *arg)
{
unsigned long fp, sp, pc;
int graph_idx = 0;
int level = 0;

if (regs) {
Expand Down Expand Up @@ -70,7 +71,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
pc = regs->ra;
} else {
fp = frame->fp;
pc = ftrace_graph_ret_addr(current, NULL, frame->ra,
pc = ftrace_graph_ret_addr(current, &graph_idx, frame->ra,
&frame->ra);
if (pc == (unsigned long)ret_from_exception) {
if (unlikely(!__kernel_text_address(pc) || !fn(arg, pc)))
Expand Down
9 changes: 7 additions & 2 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,13 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
if (ec->busy_polling || bits > 8)
acpi_ec_burst_enable(ec);

for (i = 0; i < bytes; ++i, ++address, ++value)
for (i = 0; i < bytes; ++i, ++address, ++value) {
result = (function == ACPI_READ) ?
acpi_ec_read(ec, address, value) :
acpi_ec_write(ec, address, *value);
if (result < 0)
break;
}

if (ec->busy_polling || bits > 8)
acpi_ec_burst_disable(ec);
Expand All @@ -1318,8 +1321,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
return AE_NOT_FOUND;
case -ETIME:
return AE_TIME;
default:
case 0:
return AE_OK;
default:
return AE_ERROR;
}
}

Expand Down
40 changes: 16 additions & 24 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/sched.h> /* need_resched() */
#include <linux/sort.h>
#include <linux/tick.h>
#include <linux/cpuidle.h>
#include <linux/cpu.h>
Expand Down Expand Up @@ -385,28 +384,24 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
return;
}

static int acpi_cst_latency_cmp(const void *a, const void *b)
static void acpi_cst_latency_sort(struct acpi_processor_cx *states, size_t length)
{
const struct acpi_processor_cx *x = a, *y = b;
int i, j, k;

if (!(x->valid && y->valid))
return 0;
if (x->latency > y->latency)
return 1;
if (x->latency < y->latency)
return -1;
return 0;
}
static void acpi_cst_latency_swap(void *a, void *b, int n)
{
struct acpi_processor_cx *x = a, *y = b;
u32 tmp;
for (i = 1; i < length; i++) {
if (!states[i].valid)
continue;

if (!(x->valid && y->valid))
return;
tmp = x->latency;
x->latency = y->latency;
y->latency = tmp;
for (j = i - 1, k = i; j >= 0; j--) {
if (!states[j].valid)
continue;

if (states[j].latency > states[k].latency)
swap(states[j].latency, states[k].latency);

k = j;
}
}
}

static int acpi_processor_power_verify(struct acpi_processor *pr)
Expand Down Expand Up @@ -451,10 +446,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)

if (buggy_latency) {
pr_notice("FW issue: working around C-state latencies out of order\n");
sort(&pr->power.states[1], max_cstate,
sizeof(struct acpi_processor_cx),
acpi_cst_latency_cmp,
acpi_cst_latency_swap);
acpi_cst_latency_sort(&pr->power.states[1], max_cstate);
}

lapic_timer_propagate_broadcast(pr);
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/null_blk/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1749,8 +1749,8 @@ static int null_validate_conf(struct nullb_device *dev)
return -EINVAL;
}

dev->blocksize = round_down(dev->blocksize, 512);
dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096);
if (blk_validate_block_size(dev->blocksize))
return -EINVAL;

if (dev->queue_mode == NULL_Q_MQ && dev->use_per_node_hctx) {
if (dev->submit_queues != nr_online_nodes)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,7 +2148,7 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{
uint32_t instance;
int instance;

DRM_DEBUG("IH: SDMA trap\n");
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,
if (r)
goto error_unlock;

if (bo_va->it.start)
if (bo_va->it.start && bo_va->bo)
r = radeon_vm_bo_update(rdev, bo_va, bo_va->bo->tbo.resource);

error_unlock:
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
config DRM_VMWGFX
tristate "DRM driver for VMware Virtual GPU"
depends on DRM && PCI && MMU
depends on X86 || ARM64
depends on (X86 && HYPERVISOR_GUEST) || ARM64
select DRM_TTM
select MAPPING_DIRTY_HELPERS
# Only needed for the transitional use of drm_crtc_init - can be removed
Expand Down
Loading

0 comments on commit 98c2b1d

Please sign in to comment.