Linux 5.10.69
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.69 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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/arm/include/asm/ftrace.h | 3 arch/arm/include/asm/insn.h | 8 - arch/arm/include/asm/module.h | 10 ++ arch/arm/kernel/ftrace.c | 46 ++++++++- arch/arm/kernel/insn.c | 19 ++-- arch/arm/kernel/module-plts.c | 49 ++++++++-- arch/arm/mm/init.c | 6 + arch/arm64/kernel/cacheinfo.c | 7 - arch/mips/kernel/cacheinfo.c | 7 - arch/riscv/kernel/cacheinfo.c | 7 - arch/s390/pci/pci_mmio.c | 2 arch/um/drivers/virtio_uml.c | 4 arch/x86/kernel/cpu/cacheinfo.c | 7 - block/blk-mq.c | 14 ++ block/blk-throttle.c | 1 drivers/base/power/main.c | 2 drivers/dma-buf/Kconfig | 1 drivers/dma/Kconfig | 4 drivers/dma/acpi-dma.c | 10 +- drivers/dma/idxd/submit.c | 2 drivers/dma/sprd-dma.c | 1 drivers/dma/xilinx/xilinx_dma.c | 2 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 17 +++ drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 2 drivers/iommu/amd/init.c | 31 +++++- drivers/misc/habanalabs/gaudi/gaudi.c | 6 + drivers/misc/habanalabs/goya/goya.c | 6 + drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 51 ---------- drivers/parisc/dino.c | 18 +-- drivers/pci/controller/pci-aardvark.c | 67 +++++++++++++- drivers/pci/pci-bridge-emul.h | 2 drivers/platform/chrome/Makefile | 2 drivers/platform/chrome/cros_ec_sensorhub_ring.c | 14 ++ drivers/platform/chrome/cros_ec_trace.h | 94 ++++++++++++++++++++ drivers/pwm/pwm-img.c | 16 --- drivers/pwm/pwm-lpc32xx.c | 10 +- drivers/pwm/pwm-mxs.c | 13 +- drivers/pwm/pwm-rockchip.c | 14 -- drivers/pwm/pwm-stm32-lp.c | 2 drivers/rtc/Kconfig | 1 drivers/staging/rtl8192u/r8192U_core.c | 2 drivers/thermal/samsung/exynos_tmu.c | 1 drivers/tty/vt/vt.c | 31 +++++- fs/btrfs/volumes.c | 25 ++--- fs/ceph/caps.c | 70 +++++++++++--- fs/ceph/dir.c | 3 fs/ceph/file.c | 32 +++--- fs/ceph/inode.c | 6 - fs/ceph/mds_client.c | 38 +++++++- fs/ceph/metric.c | 7 - fs/ceph/super.h | 6 + fs/coredump.c | 4 fs/nilfs2/sysfs.c | 26 ++--- fs/nilfs2/the_nilfs.c | 9 - include/linux/cacheinfo.h | 18 --- include/linux/thermal.h | 5 - kernel/profile.c | 21 ++-- kernel/sched/idle.c | 4 kernel/sys.c | 7 - lib/Kconfig.debug | 1 net/9p/trans_virtio.c | 4 net/sctp/input.c | 3 net/sctp/sm_make_chunk.c | 13 ++ tools/bootconfig/scripts/ftrace2bconf.sh | 4 tools/include/linux/string.h | 1 tools/lib/string.c | 58 ++++++++++++ tools/perf/tests/bpf.c | 2 tools/perf/util/dso.c | 10 ++ 69 files changed, 676 insertions(+), 315 deletions(-)
Alex Sverdlin (4):
ARM: 9077/1: PLT: Move struct plt_entries definition to header
ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
ARM: 9079/1: ftrace: Add MODULE_PLTS support
ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
Anand Jain (1):
btrfs: fix lockdep warning while mounting sprout fs
Andy Shevchenko (1):
dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
Arnd Bergmann (1):
thermal/core: Fix thermal_cooling_device_register() prototype
Cyrill Gorcunov (1):
prctl: allow to setup brk for et_dyn executables
Dan Carpenter (1):
thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
Dave Jiang (1):
dmaengine: idxd: fix wq slot allocation index check
David Hildenbrand (1):
s390/pci_mmio: fully validate the VMA before calling follow_pte()
Florian Fainelli (1):
ARM: Qualify enabling of swiotlb_init()
Geert Uytterhoeven (1):
dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER
Greg Kroah-Hartman (2):
Revert "net/mlx5: Register to devlink ingress VLAN filter trap" Linux 5.10.69
Guenter Roeck (2):
parisc: Move pci_dev_is_behind_card_dino to where it is used drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
Gwendal Grignou (2):
platform/chrome: sensorhub: Add trace events for sample platform/chrome: cros_ec_trace: Fix format warnings
Jeff Layton (4):
ceph: allow ceph_put_mds_session to take NULL or ERR_PTR
ceph: cancel delayed work instead of flushing on mdsc teardown
ceph: request Fw caps before updating the mtime in ceph_write_iter
ceph: lockdep annotations for try_nonblocking_invalidate
Jiri Olsa (1):
tools lib: Adopt memchr_inv() from kernel
Johannes Berg (3):
um: virtio_uml: fix memory leak on init failures
dmaengine: idxd: depends on !UML
dmaengine: ioat: depends on !UML
Josef Bacik (1):
btrfs: update the bdev time directly when closing
Koba Ko (1):
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
Li Jinlin (1):
blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
Lukas Bulwahn (1):
Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
Marcelo Ricardo Leitner (2):
sctp: validate chunk size in __rcv_asconf_lookup
sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
Masami Hiramatsu (1):
tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh
Michael Petlan (1):
perf test: Fix bpf test sample mismatch reporting
Namhyung Kim (1):
perf tools: Allow build-id with trailing zeros
Nanyong Sun (6):
nilfs2: fix memory leak in nilfs_sysfs_create_device_group
nilfs2: fix NULL pointer in nilfs_##name##_attr_release
nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
Nathan Chancellor (1):
staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
Ofir Bitton (1):
habanalabs: add validity check for event ID received from F/W
Pali Rohár (2):
PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
PCI: aardvark: Fix reporting CRS value
Pavel Skripkin (1):
profiling: fix shift-out-of-bounds bugs
Prasad Sodagudi (1):
PM: sleep: core: Avoid setting power.must_resume to false
QiuXi (1):
coredump: fix memleak in dump_vma_snapshot()
Radhey Shyam Pandey (1):
dmaengine: xilinx_dma: Set DMA mask for coherent APIs
Sebastian Andrzej Siewior (1):
sched/idle: Make the idle timer expire in hard interrupt context
Song Liu (1):
blk-mq: allow 4x BLK_MAX_REQUEST_COUNT at blk_plug for multiple_queues
Thomas Gleixner (1):
drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
Uwe Kleine-König (5):
pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered
pwm: img: Don't modify HW state in .remove() callback
pwm: rockchip: Don't modify HW state in .remove() callback
pwm: stm32-lp: Don't modify HW state in .remove() callback
Wei Huang (1):
iommu/amd: Relocate GAMSup check to early_enable_iommus
Xie Yongji (1):
9p/trans_virtio: Remove sysfs file on probe failure
Xiubo Li (1):
ceph: remove the capsnaps when removing caps
Yu-Tung Chang (1):
rtc: rx8010: select REGMAP_I2C
Zhen Lei (1):
nilfs2: use refcount_dec_and_lock() to fix potential UAF
Zou Wei (1):
dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
nick black (1):
console: consume APC, DM, DCS
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 68 +SUBLEVEL = 69 EXTRAVERSION = NAME = Dare mighty things
arch/arm/include/asm/ftrace.h +3 -0
@@ -15,6 +15,9 @@ extern void __gnu_mcount_nc(void);#ifdef CONFIG_DYNAMIC_FTRACE struct dyn_arch_ftrace { +#ifdef CONFIG_ARM_MODULE_PLTS +struct module *mod; +#endif };static inline unsigned long ftrace_call_adjust (unsigned long addr)
arch/arm/include/asm/insn.h +4 -4
@@ -13,18 +13,18 @@ arm_gen_nop(void) }unsigned long -__arm_gen_branch (unsigned long pc,unsigned long addr,bool link); +__arm_gen_branch (unsigned long pc,unsigned long addr,bool link,bool warn);static inline unsigned long arm_gen_branch (unsigned long pc,unsigned long addr) { -return __arm_gen_branch (pc, addr, false); +return __arm_gen_branch (pc, addr, false, true); }static inline unsigned long -arm_gen_branch_link (unsigned long pc,unsigned long addr) +arm_gen_branch_link (unsigned long pc,unsigned long addr,bool warn) { -return __arm_gen_branch (pc, addr, true); +return __arm_gen_branch (pc, addr, true, warn); }#endif
arch/arm/include/asm/module.h +10 -0
@@ -19,8 +19,18 @@ enum { };#endif +#define PLT_ENT_STRIDE L1_CACHE_BYTES +#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32)) +#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT) + +struct plt_entries { +u32 ldr[PLT_ENT_COUNT ]; +u32 lit[PLT_ENT_COUNT ]; +}; +struct mod_plt_sec {struct elf32_shdr *plt; +struct plt_entries *plt_ent;int plt_count; };
arch/arm/kernel/ftrace.c +38 -8
92 lines not on this page · raw message
arch/arm/kernel/insn.c +10 -9
@@ -3,8 +3,9 @@#include <linux/kernel.h> #include <asm/opcodes.h> -static unsigned long -__arm_gen_branch_thumb2 (unsigned long pc,unsigned long addr,bool link) +static unsigned long __arm_gen_branch_thumb2 (unsigned long pc, +unsigned long addr,bool link, +bool warn) {unsigned long s, j1, j2, i1, i2, imm10, imm11;unsigned long first, second;
@@ -12,7 +13,7 @@ __arm_gen_branch_thumb2(unsigned long pc, unsigned long addr, bool link) offset = (long )addr - (long )(pc +4 );if (offset <-16777216 || offset >16777214 ) { -WARN_ON_ONCE (1 ); +WARN_ON_ONCE (warn);return 0 ; }
@@ -33,8 +34,8 @@ __arm_gen_branch_thumb2(unsigned long pc, unsigned long addr, bool link)return __opcode_thumb32_compose (first, second); } -static unsigned long -__arm_gen_branch_arm (unsigned long pc,unsigned long addr,bool link) +static unsigned long __arm_gen_branch_arm (unsigned long pc,unsigned long addr, +bool link,bool warn) {unsigned long opcode =0xea000000 ;long offset;
@@ -44,7 +45,7 @@ __arm_gen_branch_arm(unsigned long pc, unsigned long addr, bool link) offset = (long )addr - (long )(pc +8 );if (unlikely (offset <-33554432 || offset >33554428 )) { -WARN_ON_ONCE (1 ); +WARN_ON_ONCE (warn);return 0 ; }
@@ -54,10 +55,10 @@ __arm_gen_branch_arm(unsigned long pc, unsigned long addr, bool link) }unsigned long -__arm_gen_branch (unsigned long pc,unsigned long addr,bool link) +__arm_gen_branch (unsigned long pc,unsigned long addr,bool link,bool warn) {if (IS_ENABLED (CONFIG_THUMB2_KERNEL )) -return __arm_gen_branch_thumb2 (pc, addr, link); +return __arm_gen_branch_thumb2 (pc, addr, link, warn);else -return __arm_gen_branch_arm (pc, addr, link); +return __arm_gen_branch_arm (pc, addr, link, warn); }
arch/arm/kernel/module-plts.c +38 -11
97 lines not on this page · raw message
arch/arm/mm/init.c +5 -1
@@ -378,7 +378,11 @@ static void __init free_highpages(void)void __init mem_init (void ) {#ifdef CONFIG_ARM_LPAE -swiotlb_init (1 ); +if (swiotlb_force ==SWIOTLB_FORCE || + max_pfn > arm_dma_pfn_limit) +swiotlb_init (1 ); +else + swiotlb_force =SWIOTLB_NO_FORCE ;#endif set_max_mapnr (pfn_to_page (max_pfn) - mem_map);
arch/arm64/kernel/cacheinfo.c +2 -5
@@ -43,7 +43,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, this_leaf->type = type; } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {unsigned int ctype, level, leaves, fw_level;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -78,7 +78,7 @@ static int __init_cache_level(unsigned int cpu)return 0 ; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {unsigned int level, idx;enum cache_type type;
@@ -97,6 +97,3 @@ static int __populate_cache_leaves(unsigned int cpu) }return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/mips/kernel/cacheinfo.c +2 -5
@@ -17,7 +17,7 @@ do { \ leaf++; \ }while (0 ) -static int __init_cache_level(unsigned int cpu) +int init_cache_level(unsigned int cpu) {struct cpuinfo_mips *c = ¤t_cpu_data;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -69,7 +69,7 @@ static void fill_cpumask_cluster(int cpu, cpumask_t *cpu_map)cpumask_set_cpu (cpu1, cpu_map); } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {struct cpuinfo_mips *c = ¤t_cpu_data;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -98,6 +98,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/riscv/kernel/cacheinfo.c +2 -5
@@ -113,7 +113,7 @@ static void fill_cacheinfo(struct cacheinfo **this_leaf, } } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);struct device_node *np =of_cpu_device_node_get (cpu);
@@ -155,7 +155,7 @@ static int __init_cache_level(unsigned int cpu)return 0 ; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);struct cacheinfo *this_leaf = this_cpu_ci->info_list;
@@ -187,6 +187,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/s390/pci/pci_mmio.c +1 -1
@@ -128,7 +128,7 @@ static long get_pfn(unsigned long user_addr, unsigned long access,mmap_read_lock (current->mm); ret = -EINVAL ; vma =find_vma (current->mm, user_addr); -if (!vma) +if (!vma || user_addr < vma->vm_start) goto out; ret = -EACCES ;if (!(vma->vm_flags & access))
arch/um/drivers/virtio_uml.c +3 -1
@@ -1113,7 +1113,7 @@ static int virtio_uml_probe(struct platform_device *pdev) rc =os_connect_socket (pdata->socket_path); }while (rc == -EINTR );if (rc <0 ) -return rc; + goto error_free; vu_dev->sock = rc;spin_lock_init (&vu_dev->sock_lock);
@@ -1132,6 +1132,8 @@ static int virtio_uml_probe(struct platform_device *pdev) error_init:os_close_file (vu_dev->sock); +error_free: +kfree (vu_dev);return rc; }
arch/x86/kernel/cpu/cacheinfo.c +2 -5
@@ -985,7 +985,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, this_leaf->priv = base->nb; } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -1014,7 +1014,7 @@ static void get_cache_id(int cpu, struct _cpuid4_info_regs *id4_regs) id4_regs->id = c->apicid >> index_msb; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {unsigned int idx, ret;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -1033,6 +1033,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
block/blk-mq.c +13 -1
@@ -2109,6 +2109,18 @@ static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq) } } +/* +* Allow 4x BLK_MAX_REQUEST_COUNT requests on plug queue for multiple +* queues. This is important for md arrays to benefit from merging +* requests. +*/ +static inline unsigned short blk_plug_max_rq_count (struct blk_plug *plug) +{ +if (plug->multiple_queues) +return BLK_MAX_REQUEST_COUNT *4 ; +return BLK_MAX_REQUEST_COUNT ; +} +/** * blk_mq_submit_bio - Create and send a request to block device. * @bio: Bio pointer.
@@ -2202,7 +2214,7 @@ blk_qc_t blk_mq_submit_bio(struct bio *bio)else last =list_entry_rq (plug->mq_list.prev); -if (request_count >=BLK_MAX_REQUEST_COUNT || (last && +if (request_count >=blk_plug_max_rq_count (plug) || (last &&blk_rq_bytes (last) >=BLK_PLUG_FLUSH_SIZE )) {blk_flush_plug_list (plug, false);trace_block_plug (q);
block/blk-throttle.c +1 -0
@@ -2452,6 +2452,7 @@ int blk_throtl_init(struct request_queue *q)void blk_throtl_exit (struct request_queue *q) {BUG_ON (!q->td); +del_timer_sync (&q->td->service_queue.pending_timer);throtl_shutdown_wq (q);blkcg_deactivate_policy (q, &blkcg_policy_throtl);free_percpu (q->td->latency_buckets[READ ]);
drivers/base/power/main.c +1 -1
@@ -1644,7 +1644,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) } dev->power.may_skip_resume = true; - dev->power.must_resume = false; + dev->power.must_resume = !dev_pm_test_driver_flags (dev,DPM_FLAG_MAY_SKIP_RESUME );dpm_watchdog_set (&wd, dev);device_lock (dev);
drivers/dma-buf/Kconfig +1 -0
@@ -42,6 +42,7 @@ config UDMABUF config DMABUF_MOVE_NOTIFY bool "Move notify between drivers (EXPERIMENTAL)" default n + depends on DMA_SHARED_BUFFER help Don't pin buffers if the dynamic DMA-buf interface is available on both the exporter as well as the importer. This fixes a security
drivers/dma/Kconfig +2 -2
@@ -285,7 +285,7 @@ config INTEL_IDMA64 config INTEL_IDXD tristate "Intel Data Accelerators support" - depends on PCI && X86_64 + depends on PCI && X86_64 && !UML depends on PCI_MSI depends on SBITMAP select DMA_ENGINE
@@ -299,7 +299,7 @@ config INTEL_IDXD config INTEL_IOATDMA tristate "Intel I/OAT DMA support" - depends on PCI && X86_64 + depends on PCI && X86_64 && !UML select DMA_ENGINE select DMA_ENGINE_RAID select DCA
drivers/dma/acpi-dma.c +7 -3
@@ -70,10 +70,14 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp, si = (const struct acpi_csrt_shared_info *)&grp[1 ]; -/* Match device by MMIO and IRQ */ +/* Match device by MMIO */ if (si->mmio_base_low !=lower_32_bits (mem) || - si->mmio_base_high !=upper_32_bits (mem) || - si->gsi_interrupt != irq) + si->mmio_base_high !=upper_32_bits (mem)) +return 0 ; + +/* Match device by Linux vIRQ */ + ret =acpi_register_gsi (NULL , si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity); +if (ret != irq)return 0 ; dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",
drivers/dma/idxd/submit.c +1 -1
@@ -45,7 +45,7 @@ struct idxd_desc *idxd_alloc_desc(struct idxd_wq *wq, enum idxd_op_type optype)if (signal_pending_state (TASK_INTERRUPTIBLE , current))break ; idx =sbitmap_queue_get (sbq, &cpu); -if (idx >0 ) +if (idx >=0 )break ;schedule (); }
drivers/dma/sprd-dma.c +1 -0
@@ -1265,6 +1265,7 @@ static const struct of_device_id sprd_dma_match[] = { { .compatible = "sprd,sc9860-dma", }, {}, }; +MODULE_DEVICE_TABLE (of, sprd_dma_match);static int __maybe_unused sprd_dma_runtime_suspend (struct device *dev) {
drivers/dma/xilinx/xilinx_dma.c +1 -1
@@ -3070,7 +3070,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->ext_addr = false;/* Set the dma mask bits */ -dma_set_mask (xdev->dev,DMA_BIT_MASK (addr_width)); +dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width));/* Initialize the DMA engine */ xdev->common.dev = &pdev->dev;
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +16 -1
@@ -27,6 +27,9 @@#include <linux/pci.h> #include <linux/slab.h> #include <asm/div64.h> +#if IS_ENABLED (CONFIG_X86_64 ) +#include <asm/intel-family.h> +#endif #include <drm/amdgpu_drm.h> #include "ppatomctrl.h" #include "atombios.h"
@@ -1606,6 +1609,17 @@ static int smu7_disable_dpm_tasks(struct pp_hwmgr *hwmgr)return result; } +static bool intel_core_rkl_chk (void ) +{ +#if IS_ENABLED (CONFIG_X86_64 ) +struct cpuinfo_x86 *c = &cpu_data (0 ); + +return (c->x86 ==6 && c->x86_model ==INTEL_FAM6_ROCKETLAKE ); +#else +return false; +#endif +} +static void smu7_init_dpm_defaults (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -1629,7 +1643,8 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr) data->mclk_dpm_key_disabled = hwmgr->feature_mask &PP_MCLK_DPM_MASK ? false : true; data->sclk_dpm_key_disabled = hwmgr->feature_mask &PP_SCLK_DPM_MASK ? false : true; - data->pcie_dpm_key_disabled = hwmgr->feature_mask &PP_PCIE_DPM_MASK ? false : true; + data->pcie_dpm_key_disabled = +intel_core_rkl_chk () || !(hwmgr->feature_mask &PP_PCIE_DPM_MASK );/* need to set voltage control types before EVV patching */ data->voltage_control =SMU7_VOLTAGE_CONTROL_NONE ; data->vddci_control =SMU7_VOLTAGE_CONTROL_NONE ;
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c +1 -1
@@ -57,7 +57,7 @@ nvkm_control_mthd_pstate_info(struct nvkm_control *ctrl, void *data, u32 size) args->v0.count =0 ; args->v0.ustate_ac =NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE ; args->v0.ustate_dc =NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE ; - args->v0.pwrsrc = -ENOSYS ; + args->v0.pwrsrc = -ENODEV ; args->v0.pstate =NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN ; }
drivers/iommu/amd/init.c +24 -7
@@ -298,6 +298,22 @@ int amd_iommu_get_num_iommus(void)return amd_iommus_present; } +#ifdef CONFIG_IRQ_REMAP +static bool check_feature_on_all_iommus (u64 mask) +{ +bool ret = false; +struct amd_iommu *iommu; + +for_each_iommu (iommu) { + ret =iommu_feature (iommu, mask); +if (!ret) +return false; + } + +return true; +} +#endif +/* * For IVHD type 0x11/0x40, EFR is also available via IVHD. * Default to IVHD EFR since it is available sooner
@@ -854,13 +870,6 @@ static int iommu_init_ga(struct amd_iommu *iommu)int ret =0 ;#ifdef CONFIG_IRQ_REMAP -/* Note: We have already checked GASup from IVRS table. -* Now, we need to make sure that GAMSup is set. -*/ -if (AMD_IOMMU_GUEST_IR_VAPIC (amd_iommu_guest_ir) && - !iommu_feature (iommu,FEATURE_GAM_VAPIC )) - amd_iommu_guest_ir =AMD_IOMMU_GUEST_IR_LEGACY_GA ; - ret =iommu_init_ga_log (iommu);#endif /* CONFIG_IRQ_REMAP */
@@ -2396,6 +2405,14 @@ static void early_enable_iommus(void) }#ifdef CONFIG_IRQ_REMAP +/* +* Note: We have already checked GASup from IVRS table. +* Now, we need to make sure that GAMSup is set. +*/ +if (AMD_IOMMU_GUEST_IR_VAPIC (amd_iommu_guest_ir) && + !check_feature_on_all_iommus (FEATURE_GAM_VAPIC )) + amd_iommu_guest_ir =AMD_IOMMU_GUEST_IR_LEGACY_GA ; +if (AMD_IOMMU_GUEST_IR_VAPIC (amd_iommu_guest_ir)) amd_iommu_irq_ops.capability |= (1 <<IRQ_POSTING_CAP );#endif
drivers/misc/habanalabs/gaudi/gaudi.c +6 -0
@@ -5723,6 +5723,12 @@ static void gaudi_handle_eqe(struct hl_device *hdev,u8 cause;bool reset_required; +if (event_type >=GAUDI_EVENT_SIZE ) { +dev_err (hdev->dev,"Event type %u exceeds maximum of %u" , + event_type,GAUDI_EVENT_SIZE -1 ); +return ; + } + gaudi->events_stat[event_type]++; gaudi->events_stat_aggregate[event_type]++;
drivers/misc/habanalabs/goya/goya.c +6 -0
@@ -4623,6 +4623,12 @@ void goya_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entry) >> EQ_CTL_EVENT_TYPE_SHIFT);struct goya_device *goya = hdev->asic_specific; +if (event_type >=GOYA_ASYNC_EVENT_ID_SIZE ) { +dev_err (hdev->dev,"Event type %u exceeds maximum of %u" , + event_type,GOYA_ASYNC_EVENT_ID_SIZE -1 ); +return ; + } + goya->events_stat[event_type]++; goya->events_stat_aggregate[event_type]++;
drivers/net/ethernet/mellanox/mlx5/core/devlink.c +0 -51
71 lines not on this page · raw message
drivers/parisc/dino.c +9 -9
@@ -156,15 +156,6 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba) return container_of(hba, struct dino_device, hba); } -/* Check if PCI device is behind a Card-mode Dino. */ -static int pci_dev_is_behind_card_dino (struct pci_dev *dev) -{ -struct dino_device *dino_dev; - - dino_dev =DINO_DEV (parisc_walk_tree (dev->bus->bridge)); -return is_card_dino (&dino_dev->hba.dev->id); -} -/* * Dino Configuration Space Accessor Functions */
@@ -447,6 +438,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)DECLARE_PCI_FIXUP_ENABLE (PCI_VENDOR_ID_CIRRUS ,PCI_DEVICE_ID_CIRRUS_6832 , quirk_cirrus_cardbus );#ifdef CONFIG_TULIP +/* Check if PCI device is behind a Card-mode Dino. */ +static int pci_dev_is_behind_card_dino (struct pci_dev *dev) +{ +struct dino_device *dino_dev; + + dino_dev =DINO_DEV (parisc_walk_tree (dev->bus->bridge)); +return is_card_dino (&dino_dev->hba.dev->id); +} +static void pci_fixup_tulip (struct pci_dev *dev) {if (!pci_dev_is_behind_card_dino (dev))
drivers/pci/controller/pci-aardvark.c +63 -4
136 lines not on this page · raw message
drivers/pci/pci-bridge-emul.h +1 -1
@@ -54,7 +54,7 @@ struct pci_bridge_emul_pcie_conf {__le16 slotctl;__le16 slotsta;__le16 rootctl; -__le16 rsvd; +__le16 rootcap;__le32 rootsta;__le32 devcap2;__le16 devctl2;
drivers/platform/chrome/Makefile +1 -1
@@ -20,7 +20,7 @@ obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_chardev.o obj-$(CONFIG_CROS_EC_LIGHTBAR) += cros_ec_lightbar.o obj-$(CONFIG_CROS_EC_VBC) += cros_ec_vbc.o obj-$(CONFIG_CROS_EC_DEBUGFS) += cros_ec_debugfs.o -cros-ec-sensorhub-objs := cros_ec_sensorhub.o cros_ec_sensorhub_ring.o +cros-ec-sensorhub-objs := cros_ec_sensorhub.o cros_ec_sensorhub_ring.o cros_ec_trace.o obj-$(CONFIG_CROS_EC_SENSORHUB) += cros-ec-sensorhub.o obj-$(CONFIG_CROS_EC_SYSFS) += cros_ec_sysfs.o obj-$(CONFIG_CROS_USBPD_LOGGER) += cros_usbpd_logger.o
drivers/platform/chrome/cros_ec_sensorhub_ring.c +14 -0
@@ -17,6 +17,8 @@#include <linux/sort.h> #include <linux/slab.h> +#include "cros_ec_trace.h" +/* Precision of fixed point for the m values from the filter */ #define M_PRECISION BIT(23)
@@ -291,6 +293,7 @@ cros_ec_sensor_ring_ts_filter_update(struct cros_ec_sensors_ts_filter_state state->median_m =0 ; state->median_error =0 ; } +trace_cros_ec_sensorhub_filter (state, dx, dy); }/**
@@ -427,6 +430,11 @@ cros_ec_sensor_ring_process_event(struct cros_ec_sensorhub *sensorhub,if (new_timestamp - *current_timestamp >0 ) *current_timestamp = new_timestamp; } +trace_cros_ec_sensorhub_timestamp (in->timestamp, + fifo_info->timestamp, + fifo_timestamp, + *current_timestamp, + now); }if (in->flags &MOTIONSENSE_SENSOR_FLAG_ODR ) {
@@ -460,6 +468,12 @@ cros_ec_sensor_ring_process_event(struct cros_ec_sensorhub *sensorhub,/* Regular sample */ out->sensor_id = in->sensor_num; +trace_cros_ec_sensorhub_data (in->sensor_num, + fifo_info->timestamp, + fifo_timestamp, + *current_timestamp, + now); +if (*current_timestamp - now >0 ) {/* * This fix is needed to overcome the timestamp filter putting
drivers/platform/chrome/cros_ec_trace.h +94 -0
106 lines not on this page · raw message
drivers/pwm/pwm-img.c +0 -16
@@ -329,23 +329,7 @@ static int img_pwm_probe(struct platform_device *pdev)static int img_pwm_remove (struct platform_device *pdev) {struct img_pwm_chip *pwm_chip =platform_get_drvdata (pdev); -u32 val; -unsigned int i; -int ret; - - ret =pm_runtime_get_sync (&pdev->dev); -if (ret <0 ) { -pm_runtime_put (&pdev->dev); -return ret; - } - -for (i =0 ; i < pwm_chip->chip.npwm; i++) { - val =img_pwm_readl (pwm_chip,PWM_CTRL_CFG ); - val &= ~BIT (i); -img_pwm_writel (pwm_chip,PWM_CTRL_CFG , val); - } -pm_runtime_put (&pdev->dev);pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))img_pwm_runtime_suspend (&pdev->dev);
drivers/pwm/pwm-lpc32xx.c +5 -5
@@ -120,17 +120,17 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev) lpc32xx->chip.npwm =1 ; lpc32xx->chip.base =-1 ; +/* If PWM is disabled, configure the output to the default value */ + val =readl (lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); + val &= ~PWM_PIN_LEVEL ; +writel (val, lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); + ret =pwmchip_add (&lpc32xx->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to add PWM chip, error %d\n" , ret);return ret; } -/* When PWM is disable, configure the output to the default value */ - val =readl (lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); - val &= ~PWM_PIN_LEVEL ; -writel (val, lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); -platform_set_drvdata (pdev, lpc32xx);return 0 ;
drivers/pwm/pwm-mxs.c +5 -8
@@ -148,6 +148,11 @@ static int mxs_pwm_probe(struct platform_device *pdev)return ret; } +/* FIXME: Only do this if the PWM isn't already running */ + ret =stmp_reset_block (mxs->base); +if (ret) +return dev_err_probe (&pdev->dev, ret,"failed to reset PWM\n" ); + ret =pwmchip_add (&mxs->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to add pwm chip %d\n" , ret);
@@ -156,15 +161,7 @@ static int mxs_pwm_probe(struct platform_device *pdev)platform_set_drvdata (pdev, mxs); - ret =stmp_reset_block (mxs->base); -if (ret) - goto pwm_remove; -return 0 ; - -pwm_remove: -pwmchip_remove (&mxs->chip); -return ret; }static int mxs_pwm_remove (struct platform_device *pdev)
drivers/pwm/pwm-rockchip.c +0 -14
@@ -382,20 +382,6 @@ static int rockchip_pwm_remove(struct platform_device *pdev) {struct rockchip_pwm_chip *pc =platform_get_drvdata (pdev); -/* -* Disable the PWM clk before unpreparing it if the PWM device is still -* running. This should only happen when the last PWM user left it -* enabled, or when nobody requested a PWM that was previously enabled -* by the bootloader. -* -* FIXME: Maybe the core should disable all PWM devices in -* pwmchip_remove(). In this case we'd only have to call -* clk_unprepare() after pwmchip_remove(). -* -*/ -if (pwm_is_enabled (pc->chip.pwms)) -clk_disable (pc->clk); -clk_unprepare (pc->pclk);clk_unprepare (pc->clk);
drivers/pwm/pwm-stm32-lp.c +0 -2
@@ -225,8 +225,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev) {struct stm32_pwm_lp *priv =platform_get_drvdata (pdev); -pwm_disable (&priv->chip.pwms[0 ]); -return pwmchip_remove (&priv->chip); }
drivers/rtc/Kconfig +1 -0
@@ -624,6 +624,7 @@ config RTC_DRV_FM3130 config RTC_DRV_RX8010 tristate "Epson RX8010SJ" + select REGMAP_I2C help If you say yes here you get support for the Epson RX8010SJ RTC chip.
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -4271,7 +4271,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb, bpacket_match_bssid = (type !=IEEE80211_FTYPE_CTL ) && (ether_addr_equal (priv->ieee80211->current_network.bssid, (fc &IEEE80211_FCTL_TODS ) ? hdr->addr1 : (fc &IEEE80211_FCTL_FROMDS ) ? hdr->addr2 : hdr->addr3)) && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV); - bpacket_toself = bpacket_match_bssid & + bpacket_toself = bpacket_match_bssid && (ether_addr_equal (praddr, priv->ieee80211->dev->dev_addr));if (WLAN_FC_GET_FRAMETYPE (fc) ==IEEE80211_STYPE_BEACON )
drivers/thermal/samsung/exynos_tmu.c +1 -0
@@ -1073,6 +1073,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) data->sclk =devm_clk_get (&pdev->dev,"tmu_sclk" );if (IS_ERR (data->sclk)) {dev_err (&pdev->dev,"Failed to get sclk\n" ); + ret =PTR_ERR (data->sclk); goto err_clk; }else { ret =clk_prepare_enable (data->sclk);
drivers/tty/vt/vt.c +27 -4
@@ -2060,7 +2060,7 @@ static void restore_cur(struct vc_data *vc)enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey, EShash, ESsetG0, ESsetG1, ESpercent, EScsiignore, ESnonstd, - ESpalette, ESosc }; + ESpalette, ESosc, ESapc, ESpm, ESdcs };/* console_lock is held (except via vc_init()) */ static void reset_terminal (struct vc_data *vc,int do_clear)
@@ -2134,20 +2134,28 @@ static void vc_setGx(struct vc_data *vc, unsigned int which, int c) vc->vc_translate =set_translate (*charset, vc); } +/* is this state an ANSI control string? */ +static bool ansi_control_string (unsigned int state) +{ +if (state == ESosc || state == ESapc || state == ESpm || state == ESdcs) +return true; +return false; +} +/* console_lock is held */ static void do_con_trol (struct tty_struct *tty,struct vc_data *vc,int c) {/* * Control characters can be used in the _middle_ -* of an escape sequence. +* of an escape sequence, aside from ANSI control strings. */ -if (vc->vc_state == ESosc && c>=8 && c<=13 )/* ... except for OSC */ +if (ansi_control_string (vc->vc_state) && c >=8 && c <=13 )return ;switch (c) {case 0 :return ;case 7 : -if (vc->vc_state == ESosc) +if (ansi_control_string (vc->vc_state)) vc->vc_state = ESnormal;else if (vc->vc_bell_duration)kd_mksound (vc->vc_bell_pitch, vc->vc_bell_duration);
@@ -2208,6 +2216,12 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)case ']' : vc->vc_state = ESnonstd;return ; +case '_' : + vc->vc_state = ESapc; +return ; +case '^' : + vc->vc_state = ESpm; +return ;case '%' : vc->vc_state = ESpercent;return ;
@@ -2225,6 +2239,9 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)if (vc->state.x <VC_TABSTOPS_COUNT )set_bit (vc->state.x, vc->vc_tab_stop);return ; +case 'P' : + vc->vc_state = ESdcs; +return ;case 'Z' :respond_ID (tty);return ;
@@ -2521,8 +2538,14 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)vc_setGx (vc,1 , c); vc->vc_state = ESnormal;return ; +case ESapc: +return ;case ESosc:return ; +case ESpm: +return ; +case ESdcs: +return ;default : vc->vc_state = ESnormal; }
fs/btrfs/volumes.c +14 -11
@@ -568,6 +568,8 @@ static int btrfs_free_stale_devices(const char *path,struct btrfs_device *device, *tmp_device;int ret =0 ; +lockdep_assert_held (&uuid_mutex); +if (path) ret = -ENOENT ;
@@ -999,11 +1001,12 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig)struct btrfs_device *orig_dev;int ret =0 ; +lockdep_assert_held (&uuid_mutex); + fs_devices =alloc_fs_devices (orig->fsid,NULL );if (IS_ERR (fs_devices))return fs_devices; -mutex_lock (&orig->device_list_mutex); fs_devices->total_devices = orig->total_devices;list_for_each_entry (orig_dev, &orig->devices, dev_list) {
@@ -1035,10 +1038,8 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig) device->fs_devices = fs_devices; fs_devices->num_devices++; } -mutex_unlock (&orig->device_list_mutex);return fs_devices; error: -mutex_unlock (&orig->device_list_mutex);free_fs_devices (fs_devices);return ERR_PTR (ret); }
@@ -1855,15 +1856,17 @@ static int btrfs_add_dev_item(struct btrfs_trans_handle *trans,* Function to update ctime/mtime for a given device path. * Mainly used for ctime/mtime based probe like libblkid. */ -static void update_dev_time (const char *path_name) +static void update_dev_time (struct block_device *bdev) { -struct file *filp; +struct inode *inode = bdev->bd_inode; +struct timespec64 now; - filp =filp_open (path_name,O_RDWR ,0 ); -if (IS_ERR (filp)) +/* Shouldn't happen but just in case. */ +if (!inode)return ; -file_update_time (filp); -filp_close (filp,NULL ); + + now =current_time (inode); +generic_update_time (inode, &now,S_MTIME |S_CTIME ); }static int btrfs_rm_dev_item (struct btrfs_device *device)
@@ -2038,7 +2041,7 @@ void btrfs_scratch_superblocks(struct btrfs_fs_info *fs_info,btrfs_kobject_uevent (bdev,KOBJ_CHANGE );/* Update ctime/mtime for device path for libblkid */ -update_dev_time (device_path); +update_dev_time (bdev); } int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
@@ -2681,7 +2684,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_pathbtrfs_forget_devices (device_path);/* Update ctime/mtime for blkid or udev */ -update_dev_time (device_path); +update_dev_time (bdev);return ret;
fs/ceph/caps.c +53 -17
101 lines not on this page · raw message
fs/ceph/dir.c +1 -2
@@ -1797,8 +1797,7 @@ static void ceph_d_release(struct dentry *dentry) dentry->d_fsdata =NULL ;spin_unlock (&dentry->d_lock); -if (di->lease_session) -ceph_put_mds_session (di->lease_session); +ceph_put_mds_session (di->lease_session);kmem_cache_free (ceph_dentry_cachep, di); }
fs/ceph/file.c +17 -15
@@ -1723,32 +1723,26 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) goto out; } - err =file_remove_privs (file); -if (err) +down_read (&osdc->lock); + map_flags = osdc->osdmap->flags; + pool_flags =ceph_pg_pool_flags (osdc->osdmap, ci->i_layout.pool_id); +up_read (&osdc->lock); +if ((map_flags &CEPH_OSDMAP_FULL ) || + (pool_flags &CEPH_POOL_FLAG_FULL )) { + err = -ENOSPC ; goto out; + } - err =file_update_time (file); + err =file_remove_privs (file);if (err) goto out; -inode_inc_iversion_raw (inode); -if (ci->i_inline_version !=CEPH_INLINE_NONE ) { err =ceph_uninline_data (file,NULL );if (err <0 ) goto out; } -down_read (&osdc->lock); - map_flags = osdc->osdmap->flags; - pool_flags =ceph_pg_pool_flags (osdc->osdmap, ci->i_layout.pool_id); -up_read (&osdc->lock); -if ((map_flags &CEPH_OSDMAP_FULL ) || - (pool_flags &CEPH_POOL_FLAG_FULL )) { - err = -ENOSPC ; - goto out; - } -dout ("aio_write %p %llx.%llx %llu~%zd getting caps. i_size %llu\n" , inode,ceph_vinop (inode), pos, count,i_size_read (inode));if (fi->fmode &CEPH_FILE_MODE_LAZY )
@@ -1761,6 +1755,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)if (err <0 ) goto out; + err =file_update_time (file); +if (err) + goto out_caps; + +inode_inc_iversion_raw (inode); +dout ("aio_write %p %llx.%llx %llu~%zd got cap refs on %s\n" , inode,ceph_vinop (inode), pos, count,ceph_cap_string (got));
@@ -1844,6 +1844,8 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) } goto out_unlocked; +out_caps: +ceph_put_cap_refs (ci, got); out:if (direct_lock)ceph_end_io_direct (inode);
fs/ceph/inode.c +2 -4
@@ -1121,8 +1121,7 @@ static inline void update_dentry_lease(struct inode *dir, struct dentry *dentry,__update_dentry_lease (dir, dentry, lease, session, from_time, &old_lease_session);spin_unlock (&dentry->d_lock); -if (old_lease_session) -ceph_put_mds_session (old_lease_session); +ceph_put_mds_session (old_lease_session); }/*
@@ -1167,8 +1166,7 @@ static void update_dentry_lease_careful(struct dentry *dentry, from_time, &old_lease_session); out_unlock:spin_unlock (&dentry->d_lock); -if (old_lease_session) -ceph_put_mds_session (old_lease_session); +ceph_put_mds_session (old_lease_session); }/*
fs/ceph/mds_client.c +34 -4
@@ -661,6 +661,9 @@ struct ceph_mds_session *ceph_get_mds_session(struct ceph_mds_session *s)void ceph_put_mds_session (struct ceph_mds_session *s) { +if (IS_ERR_OR_NULL (s)) +return ; +dout ("mdsc put_session %p %d -> %d\n" , s,refcount_read (&s->s_ref),refcount_read (&s->s_ref)-1 );if (refcount_dec_and_test (&s->s_ref)) {
@@ -1435,8 +1438,7 @@ static void __open_export_target_sessions(struct ceph_mds_client *mdsc,for (i =0 ; i < mi->num_export_targets; i++) { ts =__open_export_target_session (mdsc, mi->export_targets[i]); -if (!IS_ERR (ts)) -ceph_put_mds_session (ts); +ceph_put_mds_session (ts); } }
@@ -1585,14 +1587,39 @@ int ceph_iterate_session_caps(struct ceph_mds_session *session,return ret; } +static int remove_capsnaps (struct ceph_mds_client *mdsc,struct inode *inode) +{ +struct ceph_inode_info *ci =ceph_inode (inode); +struct ceph_cap_snap *capsnap; +int capsnap_release =0 ; + +lockdep_assert_held (&ci->i_ceph_lock); + +dout ("removing capsnaps, ci is %p, inode is %p\n" , ci, inode); + +while (!list_empty (&ci->i_cap_snaps)) { + capsnap =list_first_entry (&ci->i_cap_snaps, + struct ceph_cap_snap, ci_item); +__ceph_remove_capsnap (inode, capsnap,NULL ,NULL ); +ceph_put_snap_context (capsnap->context); +ceph_put_cap_snap (capsnap); + capsnap_release++; + } +wake_up_all (&ci->i_cap_wq); +wake_up_all (&mdsc->cap_flushing_wq); +return capsnap_release; +} +static int remove_session_caps_cb (struct inode *inode,struct ceph_cap *cap,void *arg) {struct ceph_fs_client *fsc = (struct ceph_fs_client *)arg; +struct ceph_mds_client *mdsc = fsc->mdsc;struct ceph_inode_info *ci =ceph_inode (inode);LIST_HEAD (to_remove);bool dirty_dropped = false;bool invalidate = false; +int capsnap_release =0 ;dout ("removing cap %p, ci is %p, inode is %p\n" , cap, ci, &ci->vfs_inode);
@@ -1600,7 +1627,6 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap,__ceph_remove_cap (cap, false);if (!ci->i_auth_cap) {struct ceph_cap_flush *cf; -struct ceph_mds_client *mdsc = fsc->mdsc;if (READ_ONCE (fsc->mount_state) ==CEPH_MOUNT_SHUTDOWN ) {if (inode->i_data.nrpages >0 )
@@ -1664,6 +1690,9 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap,list_add (&ci->i_prealloc_cap_flush->i_list, &to_remove); ci->i_prealloc_cap_flush =NULL ; } + +if (!list_empty (&ci->i_cap_snaps)) + capsnap_release =remove_capsnaps (mdsc, inode); }spin_unlock (&ci->i_ceph_lock);while (!list_empty (&to_remove)) {
@@ -1680,6 +1709,8 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap,ceph_queue_invalidate (inode);if (dirty_dropped)iput (inode); +while (capsnap_release--) +iput (inode);return 0 ; }
@@ -4857,7 +4888,6 @@ void ceph_mdsc_destroy(struct ceph_fs_client *fsc)ceph_metric_destroy (&mdsc->metric); -flush_delayed_work (&mdsc->metric.delayed_work); fsc->mdsc =NULL ;kfree (mdsc);dout ("mdsc_destroy %p done\n" , mdsc);
fs/ceph/metric.c +3 -4
@@ -224,6 +224,8 @@ void ceph_metric_destroy(struct ceph_client_metric *m)if (!m)return ; +cancel_delayed_work_sync (&m->delayed_work); +percpu_counter_destroy (&m->total_inodes);percpu_counter_destroy (&m->opened_inodes);percpu_counter_destroy (&m->i_caps_mis);
@@ -231,10 +233,7 @@ void ceph_metric_destroy(struct ceph_client_metric *m)percpu_counter_destroy (&m->d_lease_mis);percpu_counter_destroy (&m->d_lease_hit); -cancel_delayed_work_sync (&m->delayed_work); - -if (m->session) -ceph_put_mds_session (m->session); +ceph_put_mds_session (m->session); } static inline void __update_latency(ktime_t *totalp, ktime_t *lsump,
fs/ceph/super.h +6 -0
@@ -1134,6 +1134,12 @@ extern void ceph_put_cap_refs_no_check_caps(struct ceph_inode_info *ci, int had);extern void ceph_put_wrbuffer_cap_refs (struct ceph_inode_info *ci,int nr,struct ceph_snap_context *snapc); +extern void __ceph_remove_capsnap (struct inode *inode, +struct ceph_cap_snap *capsnap, +bool *wake_ci,bool *wake_mdsc); +extern void ceph_remove_capsnap (struct inode *inode, +struct ceph_cap_snap *capsnap, +bool *wake_ci,bool *wake_mdsc);extern void ceph_flush_snaps (struct ceph_inode_info *ci,struct ceph_mds_session **psession);extern bool __ceph_should_report_size (struct ceph_inode_info *ci);
fs/coredump.c +3 -1
@@ -1111,8 +1111,10 @@ int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count,mmap_write_unlock (mm); -if (WARN_ON (i != *vma_count)) +if (WARN_ON (i != *vma_count)) { +kvfree (*vma_meta);return -EFAULT ; + } *vma_data_size_ptr = vma_data_size;return 0 ;
fs/nilfs2/sysfs.c +11 -15
@@ -64,11 +64,9 @@ static const struct sysfs_ops nilfs_##name##_attr_ops = { \#define NILFS_DEV_INT_GROUP_TYPE (name, parent_name) \ static void nilfs_##name##_attr_release(struct kobject *kobj) \ { \ - struct nilfs_sysfs_##parent_name##_subgroups *subgroups; \ - struct the_nilfs *nilfs = container_of(kobj->parent, \ - struct the_nilfs, \ - ns_##parent_name##_kobj); \ - subgroups = nilfs->ns_##parent_name##_subgroups; \ + struct nilfs_sysfs_##parent_name##_subgroups *subgroups = container_of(kobj, \ + struct nilfs_sysfs_##parent_name##_subgroups, \ + sg_##name##_kobj); \ complete(&subgroups->sg_##name##_kobj_unregister); \ } \ static struct kobj_type nilfs_##name##_ktype = { \
@@ -94,12 +92,12 @@ static int nilfs_sysfs_create_##name##_group(struct the_nilfs *nilfs) \ err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \ #name); \ if (err) \ - return err; \ - return 0; \ + kobject_put(kobj); \ + return err; \ } \ static void nilfs_sysfs_delete_##name##_group(struct the_nilfs *nilfs) \ { \ - kobject_del(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ + kobject_put(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ }/************************************************************************
@@ -210,14 +208,14 @@ int nilfs_sysfs_create_snapshot_group(struct nilfs_root *root) }if (err) -return err; +kobject_put (&root->snapshot_kobj); -return 0 ; +return err; }void nilfs_sysfs_delete_snapshot_group (struct nilfs_root *root) { -kobject_del (&root->snapshot_kobj); +kobject_put (&root->snapshot_kobj); }/************************************************************************
@@ -999,7 +997,7 @@ int nilfs_sysfs_create_device_group(struct super_block *sb) err =kobject_init_and_add (&nilfs->ns_dev_kobj, &nilfs_dev_ktype,NULL ,"%s" , sb->s_id);if (err) - goto free_dev_subgroups; + goto cleanup_dev_kobject; err =nilfs_sysfs_create_mounted_snapshots_group (nilfs);if (err)
@@ -1036,9 +1034,7 @@ int nilfs_sysfs_create_device_group(struct super_block *sb)nilfs_sysfs_delete_mounted_snapshots_group (nilfs); cleanup_dev_kobject: -kobject_del (&nilfs->ns_dev_kobj); - -free_dev_subgroups: +kobject_put (&nilfs->ns_dev_kobj);kfree (nilfs->ns_dev_subgroups); failed_create_device_group:
fs/nilfs2/the_nilfs.c +4 -5
@@ -792,14 +792,13 @@ nilfs_find_or_create_root(struct the_nilfs *nilfs, __u64 cno)void nilfs_put_root (struct nilfs_root *root) { -if (refcount_dec_and_test (&root->count)) { -struct the_nilfs *nilfs = root->nilfs; +struct the_nilfs *nilfs = root->nilfs; -nilfs_sysfs_delete_snapshot_group (root); - -spin_lock (&nilfs->ns_cptree_lock); +if (refcount_dec_and_lock (&root->count, &nilfs->ns_cptree_lock)) {rb_erase (&root->rb_node, &nilfs->ns_cptree);spin_unlock (&nilfs->ns_cptree_lock); + +nilfs_sysfs_delete_snapshot_group (root);iput (root->ifile);kfree (root);
include/linux/cacheinfo.h +0 -18
@@ -79,24 +79,6 @@ struct cpu_cacheinfo {bool cpu_map_populated; }; -/* -* Helpers to make sure "func" is executed on the cpu whose cache -* attributes are being detected -*/ -#define DEFINE_SMP_CALL_CACHE_FUNCTION (func) \ -static inline void _##func(void *ret) \ -{ \ - int cpu = smp_processor_id(); \ - *(int *)ret = __##func(cpu); \ -} \ - \ -int func(unsigned int cpu) \ -{ \ - int ret; \ - smp_call_function_single(cpu, _##func, &ret, true); \ - return ret; \ -} -struct cpu_cacheinfo *get_cpu_cacheinfo (unsigned int cpu);int init_cache_level (unsigned int cpu);int populate_cache_leaves (unsigned int cpu);
include/linux/thermal.h +3 -2
@@ -410,12 +410,13 @@ static inline void thermal_zone_device_unregister( struct thermal_zone_device *tz) { }static inline struct thermal_cooling_device * -thermal_cooling_device_register (char *type,void *devdata, +thermal_cooling_device_register (const char *type,void *devdata,const struct thermal_cooling_device_ops *ops) {return ERR_PTR (-ENODEV ); }static inline struct thermal_cooling_device *thermal_of_cooling_device_register (struct device_node *np, -char *type,void *devdata,const struct thermal_cooling_device_ops *ops) +const char *type,void *devdata, +const struct thermal_cooling_device_ops *ops) {return ERR_PTR (-ENODEV ); }static inline struct thermal_cooling_device * devm_thermal_of_cooling_device_register(struct device *dev,
kernel/profile.c +11 -10
@@ -41,7 +41,8 @@ struct profile_hit {#define NR_PROFILE_GRP (NR_PROFILE_HIT/PROFILE_GRPSZ)static atomic_t *prof_buffer; -static unsigned long prof_len, prof_shift; +static unsigned long prof_len; +static unsigned short int prof_shift;int prof_on__read_mostly ;EXPORT_SYMBOL_GPL (prof_on);
@@ -67,8 +68,8 @@ int profile_setup(char *str)if (str[strlen (sleepstr)] ==',' ) str +=strlen (sleepstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel sleep profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel sleep profiling enabled (shift: %u)\n" , prof_shift);#else pr_warn ("kernel sleep profiling requires CONFIG_SCHEDSTATS\n" );
@@ -78,21 +79,21 @@ int profile_setup(char *str)if (str[strlen (schedstr)] ==',' ) str +=strlen (schedstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel schedule profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel schedule profiling enabled (shift: %u)\n" , prof_shift); }else if (!strncmp (str, kvmstr,strlen (kvmstr))) { prof_on =KVM_PROFILING ;if (str[strlen (kvmstr)] ==',' ) str +=strlen (kvmstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel KVM profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel KVM profiling enabled (shift: %u)\n" , prof_shift); }else if (get_option (&str, &par)) { - prof_shift = par; + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); prof_on =CPU_PROFILING ; -pr_info ("kernel profiling enabled (shift: %ld)\n" , +pr_info ("kernel profiling enabled (shift: %u)\n" , prof_shift); }return 1 ;
@@ -468,7 +469,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)unsigned long p = *ppos;ssize_t read;char *pnt; -unsigned int sample_step =1 << prof_shift; +unsigned long sample_step =1UL << prof_shift;profile_flip_buffers ();if (p >= (prof_len+1 )*sizeof (unsigned int ))
kernel/sched/idle.c +2 -2
@@ -372,10 +372,10 @@ void play_idle_precise(u64 duration_ns, u64 latency_ns)cpuidle_use_deepest_state (latency_ns); it.done =0 ; -hrtimer_init_on_stack (&it.timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init_on_stack (&it.timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); it.timer.function = idle_inject_timer_fn;hrtimer_start (&it.timer,ns_to_ktime (duration_ns), -HRTIMER_MODE_REL_PINNED ); +HRTIMER_MODE_REL_PINNED_HARD );while (!READ_ONCE (it.done))do_idle ();
kernel/sys.c +0 -7
@@ -1941,13 +1941,6 @@ static int validate_prctl_map_addr(struct prctl_mm_map *prctl_map) error = -EINVAL ; -/* -* @brk should be after @end_data in traditional maps. -*/ -if (prctl_map->start_brk <= prctl_map->end_data || - prctl_map->brk <= prctl_map->end_data) - goto out; -/* * Neither we should allow to override limits if they set. */
lib/Kconfig.debug +0 -1
@@ -981,7 +981,6 @@ config HARDLOCKUP_DETECTOR depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH select LOCKUP_DETECTOR select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF - select HARDLOCKUP_DETECTOR_ARCH if HAVE_HARDLOCKUP_DETECTOR_ARCH help Say Y here to enable the kernel to act as a watchdog to detect hard lockups.
net/9p/trans_virtio.c +3 -1
@@ -605,7 +605,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) chan->vc_wq =kmalloc (sizeof (wait_queue_head_t),GFP_KERNEL );if (!chan->vc_wq) { err = -ENOMEM ; - goto out_free_tag; + goto out_remove_file; }init_waitqueue_head (chan->vc_wq); chan->ring_bufs_avail =1 ;
@@ -623,6 +623,8 @@ static int p9_virtio_probe(struct virtio_device *vdev)return 0 ; +out_remove_file: +sysfs_remove_file (&vdev->dev.kobj, &dev_attr_mount_tag.attr); out_free_tag:kfree (tag); out_free_vq:
net/sctp/input.c +3 -0
@@ -1168,6 +1168,9 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(union sctp_addr_param *param;union sctp_addr paddr; +if (ntohs (ch->length) <sizeof (*asconf) +sizeof (struct sctp_paramhdr )) +return NULL ; +/* Skip over the ADDIP header and find the Address parameter */ param = (union sctp_addr_param *)(asconf +1 );
net/sctp/sm_make_chunk.c +10 -3
@@ -2150,9 +2150,16 @@ static enum sctp_ierror sctp_verify_param(struct net *net,break ;case SCTP_PARAM_SET_PRIMARY : -if (ep->asconf_enable) -break ; - goto unhandled; +if (!ep->asconf_enable) + goto unhandled; + +if (ntohs (param.p->length) <sizeof (struct sctp_addip_param ) + +sizeof (struct sctp_paramhdr )) { +sctp_process_inv_paramlength (asoc, param.p, + chunk, err_chunk); + retval =SCTP_IERROR_ABORT ; + } +break ;case SCTP_PARAM_HOST_NAME_ADDRESS :/* Tell the peer, we won't support this param. */
tools/bootconfig/scripts/ftrace2bconf.sh +2 -2
@@ -222,8 +222,8 @@ instance_options() { # [instance-name] emit_kv $PREFIX.cpumask = $val fi val=`cat $INSTANCE/tracing_on` - if [ `echo $val | sed -e s/f//g`x != x ]; then - emit_kv $PREFIX.tracing_on = $val + if [ "$val" = "0" ]; then + emit_kv $PREFIX.tracing_on = 0 fi val=
tools/include/linux/string.h +1 -0
@@ -46,4 +46,5 @@ extern char * __must_check skip_spaces(const char *);extern char *strim (char *); +extern void *memchr_inv (const void *start,int c,size_t bytes);#endif /* _TOOLS_LINUX_STRING_H_ */
tools/lib/string.c +58 -0
61 lines not on this page · raw message
tools/perf/tests/bpf.c +1 -1
@@ -199,7 +199,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), }if (count != expect * evlist->core.nr_entries) { -pr_debug ("BPF filter result incorrect, expected %d, got %d samples\n" , expect, count); +pr_debug ("BPF filter result incorrect, expected %d, got %d samples\n" , expect * evlist->core.nr_entries, count); goto out_delete_evlist; }
tools/perf/util/dso.c +10 -0
@@ -1336,6 +1336,16 @@ void dso__set_build_id(struct dso *dso, struct build_id *bid)bool dso__build_id_equal (const struct dso *dso,struct build_id *bid) { +if (dso->bid.size > bid->size && dso->bid.size ==BUILD_ID_SIZE ) { +/* +* For the backward compatibility, it allows a build-id has +* trailing zeros. +*/ +return !memcmp (dso->bid.data, bid->data, bid->size) && + !memchr_inv (&dso->bid.data[bid->size],0 , + dso->bid.size - bid->size); + } +return dso->bid.size == bid->size &&memcmp (dso->bid.data, bid->data, dso->bid.size) ==0 ; }