mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 14 participants
  • 18887 discussions
[openeuler:OLK-5.10 2974/2974] drivers/irqchip/irq-gic-v3.c:782:23: error: implicit declaration of function 'PDE_DATA'; did you mean 'NODE_DATA'?
by kernel test robot 20 Jun '25

20 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: a05426a568e457640f58698c8ebd636fcde4d202 [2974/2974] arm64: Introduce Xint software solution config: arm64-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200917.vHKIjHAl-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200917.vHKIjHAl-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200917.vHKIjHAl-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/irqchip/irq-gic-v3.c: In function 'xint_proc_write': >> drivers/irqchip/irq-gic-v3.c:782:23: error: implicit declaration of function 'PDE_DATA'; did you mean 'NODE_DATA'? [-Werror=implicit-function-declaration] 782 | int irq = (int)(long)PDE_DATA(file_inode(file)); | ^~~~~~~~ | NODE_DATA drivers/irqchip/irq-gic-v3.c: In function 'xint_proc_show': >> drivers/irqchip/irq-gic-v3.c:820:2: error: implicit declaration of function 'seq_printf'; did you mean 'dev_printk'? [-Werror=implicit-function-declaration] 820 | seq_printf(m, "%d\n", xint_transform((long)m->private, XINT_SET_CHECK)); | ^~~~~~~~~~ | dev_printk >> drivers/irqchip/irq-gic-v3.c:820:46: error: dereferencing pointer to incomplete type 'struct seq_file' 820 | seq_printf(m, "%d\n", xint_transform((long)m->private, XINT_SET_CHECK)); | ^~ drivers/irqchip/irq-gic-v3.c: In function 'xint_proc_open': >> drivers/irqchip/irq-gic-v3.c:826:9: error: implicit declaration of function 'single_open'; did you mean 'simple_open'? [-Werror=implicit-function-declaration] 826 | return single_open(file, xint_proc_show, PDE_DATA(inode)); | ^~~~~~~~~~~ | simple_open drivers/irqchip/irq-gic-v3.c: At top level: drivers/irqchip/irq-gic-v3.c:829:21: error: variable 'xint_proc_ops' has initializer but incomplete type 829 | static const struct proc_ops xint_proc_ops = { | ^~~~~~~~ drivers/irqchip/irq-gic-v3.c:830:3: error: 'const struct proc_ops' has no member named 'proc_open' 830 | .proc_open = xint_proc_open, | ^~~~~~~~~ drivers/irqchip/irq-gic-v3.c:830:15: warning: excess elements in struct initializer 830 | .proc_open = xint_proc_open, | ^~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:830:15: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:831:3: error: 'const struct proc_ops' has no member named 'proc_read' 831 | .proc_read = seq_read, | ^~~~~~~~~ >> drivers/irqchip/irq-gic-v3.c:831:15: error: 'seq_read' undeclared here (not in a function) 831 | .proc_read = seq_read, | ^~~~~~~~ drivers/irqchip/irq-gic-v3.c:831:15: warning: excess elements in struct initializer drivers/irqchip/irq-gic-v3.c:831:15: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:832:3: error: 'const struct proc_ops' has no member named 'proc_lseek' 832 | .proc_lseek = seq_lseek, | ^~~~~~~~~~ >> drivers/irqchip/irq-gic-v3.c:832:16: error: 'seq_lseek' undeclared here (not in a function) 832 | .proc_lseek = seq_lseek, | ^~~~~~~~~ drivers/irqchip/irq-gic-v3.c:832:16: warning: excess elements in struct initializer drivers/irqchip/irq-gic-v3.c:832:16: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:833:3: error: 'const struct proc_ops' has no member named 'proc_release' 833 | .proc_release = single_release, | ^~~~~~~~~~~~ >> drivers/irqchip/irq-gic-v3.c:833:18: error: 'single_release' undeclared here (not in a function); did you mean 'spin_release'? 833 | .proc_release = single_release, | ^~~~~~~~~~~~~~ | spin_release drivers/irqchip/irq-gic-v3.c:833:18: warning: excess elements in struct initializer drivers/irqchip/irq-gic-v3.c:833:18: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c:834:3: error: 'const struct proc_ops' has no member named 'proc_write' 834 | .proc_write = xint_proc_write, | ^~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:834:16: warning: excess elements in struct initializer 834 | .proc_write = xint_proc_write, | ^~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c:834:16: note: (near initialization for 'xint_proc_ops') drivers/irqchip/irq-gic-v3.c: In function 'register_irqchip_proc': drivers/irqchip/irq-gic-v3.c:843:2: error: implicit declaration of function 'proc_create_data' [-Werror=implicit-function-declaration] 843 | proc_create_data("xint", 0644, desc->dir, &xint_proc_ops, irqp); | ^~~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c: In function 'unregister_irqchip_proc': drivers/irqchip/irq-gic-v3.c:851:2: error: implicit declaration of function 'remove_proc_entry' [-Werror=implicit-function-declaration] 851 | remove_proc_entry("xint", desc->dir); | ^~~~~~~~~~~~~~~~~ drivers/irqchip/irq-gic-v3.c: At top level: drivers/irqchip/irq-gic-v3.c:829:30: error: storage size of 'xint_proc_ops' isn't known 829 | static const struct proc_ops xint_proc_ops = { | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for CPPC_CPUFREQ_SYSFS_INTERFACE Depends on [n]: CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ACPI_CPPC_CPUFREQ [=n] Selected by [m]: - CPU_FREQ_GOV_SEEP [=m] && CPU_FREQ [=y] && (ACPI_CPPC_CPUFREQ [=n] || ARM64 [=y]) vim +782 drivers/irqchip/irq-gic-v3.c 778 779 static ssize_t xint_proc_write(struct file *file, 780 const char __user *buffer, size_t count, loff_t *pos) 781 { > 782 int irq = (int)(long)PDE_DATA(file_inode(file)); 783 bool xint_state = false; 784 unsigned long val; 785 char *buf = NULL; 786 787 if (!xint_transform(irq, XINT_RANGE_CHECK)) 788 return -EPERM; 789 790 buf = memdup_user_nul(buffer, count); 791 if (IS_ERR(buf)) 792 return PTR_ERR(buf); 793 794 if (kstrtoul(buf, 0, &val) || (val != 0 && val != 1)) { 795 kfree(buf); 796 return -EINVAL; 797 } 798 799 xint_state = xint_transform(irq, XINT_SET_CHECK); 800 if (xint_state == val) { 801 kfree(buf); 802 return -EBUSY; 803 } 804 805 local_irq_disable(); 806 disable_irq(irq); 807 808 xint_transform(irq, xint_state ? XINT_TO_IRQ : IRQ_TO_XINT); 809 810 enable_irq(irq); 811 local_irq_enable(); 812 813 kfree(buf); 814 815 return count; 816 } 817 818 static int xint_proc_show(struct seq_file *m, void *v) 819 { > 820 seq_printf(m, "%d\n", xint_transform((long)m->private, XINT_SET_CHECK)); 821 return 0; 822 } 823 824 static int xint_proc_open(struct inode *inode, struct file *file) 825 { > 826 return single_open(file, xint_proc_show, PDE_DATA(inode)); 827 } 828 829 static const struct proc_ops xint_proc_ops = { 830 .proc_open = xint_proc_open, > 831 .proc_read = seq_read, > 832 .proc_lseek = seq_lseek, > 833 .proc_release = single_release, 834 .proc_write = xint_proc_write, 835 }; 836 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2974/2974] include/acpi/processor.h:221:2: error: unknown type name 'phys_cpuid_t'
by kernel test robot 20 Jun '25

20 Jun '25
Hi heppen, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: c3fe0dc62217d6faa76128ed26d64e421767919e [2974/2974] cpufreq: Add SEEP governor for hardware-managed P-states config: arm64-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200807.gBMXP8Nw-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200807.gBMXP8Nw-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200807.gBMXP8Nw-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/acpi/cppc_acpi.h:17, from drivers/cpufreq/cpufreq_seep.c:13: >> include/acpi/processor.h:221:2: error: unknown type name 'phys_cpuid_t' 221 | phys_cpuid_t phys_id; /* CPU hardware ID such as APIC ID for x86 */ | ^~~~~~~~~~~~ include/acpi/processor.h:350:1: error: unknown type name 'phys_cpuid_t' 350 | phys_cpuid_t acpi_get_phys_id(acpi_handle, int type, u32 acpi_id); | ^~~~~~~~~~~~ include/acpi/processor.h:351:1: error: unknown type name 'phys_cpuid_t' 351 | phys_cpuid_t acpi_map_madt_entry(u32 acpi_id); | ^~~~~~~~~~~~ include/acpi/processor.h:352:20: error: unknown type name 'phys_cpuid_t' 352 | int acpi_map_cpuid(phys_cpuid_t phys_id, u32 acpi_id); | ^~~~~~~~~~~~ include/acpi/processor.h:354:1: error: unknown type name 'phys_cpuid_t' 354 | phys_cpuid_t acpi_id_to_phys_cpuid(u32 acpi_id); | ^~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for CPPC_CPUFREQ_SYSFS_INTERFACE Depends on [n]: CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ACPI_CPPC_CPUFREQ [=n] Selected by [m]: - CPU_FREQ_GOV_SEEP [=m] && CPU_FREQ [=y] && (ACPI_CPPC_CPUFREQ [=n] || ARM64 [=y]) vim +/phys_cpuid_t +221 include/acpi/processor.h ^1da177e4c3f41 Linus Torvalds 2005-04-16 217 ^1da177e4c3f41 Linus Torvalds 2005-04-16 218 struct acpi_processor { ^1da177e4c3f41 Linus Torvalds 2005-04-16 219 acpi_handle handle; ^1da177e4c3f41 Linus Torvalds 2005-04-16 220 u32 acpi_id; 828aef376d7a12 Catalin Marinas 2015-03-24 @221 phys_cpuid_t phys_id; /* CPU hardware ID such as APIC ID for x86 */ af8f3f514d193e Hanjun Guo 2015-01-04 222 u32 id; /* CPU logical ID allocated by OS */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 223 u32 pblk; ^1da177e4c3f41 Linus Torvalds 2005-04-16 224 int performance_platform_limit; 01854e697a77a4 Luming Yu 2007-05-26 225 int throttling_platform_limit; ff55a9cebab024 Len Brown 2007-06-02 226 /* 0 - states 0..n-th state available */ 01854e697a77a4 Luming Yu 2007-05-26 227 ^1da177e4c3f41 Linus Torvalds 2005-04-16 228 struct acpi_processor_flags flags; ^1da177e4c3f41 Linus Torvalds 2005-04-16 229 struct acpi_processor_power power; ^1da177e4c3f41 Linus Torvalds 2005-04-16 230 struct acpi_processor_performance *performance; ^1da177e4c3f41 Linus Torvalds 2005-04-16 231 struct acpi_processor_throttling throttling; ^1da177e4c3f41 Linus Torvalds 2005-04-16 232 struct acpi_processor_limit limit; d9460fd227ed2c Zhang Rui 2008-01-17 233 struct thermal_cooling_device *cdev; ac212b6980d8d5 Rafael J. Wysocki 2013-05-03 234 struct device *dev; /* Processor device. */ 3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16 235 struct freq_qos_request perflib_req; 3000ce3c52f8b8 Rafael J. Wysocki 2019-10-16 236 struct freq_qos_request thermal_req; ^1da177e4c3f41 Linus Torvalds 2005-04-16 237 }; ^1da177e4c3f41 Linus Torvalds 2005-04-16 238 :::::: The code at line 221 was first introduced by commit :::::: 828aef376d7a129547bc4ebb949965040177e3da ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID :::::: TO: Catalin Marinas <catalin.marinas(a)arm.com> :::::: CC: Will Deacon <will.deacon(a)arm.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2974/2974] kernel/softirq.c:352:6: warning: no previous prototype for 'xint_enter_rcu'
by kernel test robot 20 Jun '25

20 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: a05426a568e457640f58698c8ebd636fcde4d202 [2974/2974] arm64: Introduce Xint software solution config: arm64-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200615.qzMJJNny-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200615.qzMJJNny-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200615.qzMJJNny-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/softirq.c:352:6: warning: no previous prototype for 'xint_enter_rcu' [-Wmissing-prototypes] 352 | void xint_enter_rcu(void) | ^~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for CPPC_CPUFREQ_SYSFS_INTERFACE Depends on [n]: CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ACPI_CPPC_CPUFREQ [=n] Selected by [m]: - CPU_FREQ_GOV_SEEP [=m] && CPU_FREQ [=y] && (ACPI_CPPC_CPUFREQ [=n] || ARM64 [=y]) vim +/xint_enter_rcu +352 kernel/softirq.c 347 348 #ifdef CONFIG_FAST_IRQ 349 /** 350 * xint_enter_rcu - Copy from irq_enter_rcu 351 */ > 352 void xint_enter_rcu(void) 353 { 354 if (tick_nohz_full_cpu(smp_processor_id()) || 355 (is_idle_task(current) && !in_interrupt())) { 356 /* 357 * Prevent raise_softirq from needlessly waking up ksoftirqd 358 * here, as softirq will be serviced on return from interrupt. 359 */ 360 local_bh_disable(); 361 tick_irq_enter(); 362 _local_bh_enable(); 363 } 364 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2974/2974] fs/fuse/inode.c:131:21: warning: unused variable 'fc'
by kernel test robot 20 Jun '25

20 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: f16d89538c1c2988f355d33d15e4c639b0cf5207 [2974/2974] fuse: add fuse fastpath forget cmd support config: arm64-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200422.FFs2lebc-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200422.FFs2lebc-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200422.FFs2lebc-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from fs/fuse/fuse_i.h:23, from fs/fuse/inode.c:9: include/linux/backing-dev.h:430:49: warning: 'struct cgroup_subsys' declared inside parameter list will not be visible outside of this definition or declaration 430 | static inline void bind_memcg_blkcg_link(struct cgroup_subsys *ss, | ^~~~~~~~~~~~~ fs/fuse/inode.c: In function 'fuse_evict_inode': >> fs/fuse/inode.c:131:21: warning: unused variable 'fc' [-Wunused-variable] 131 | struct fuse_conn *fc = get_fuse_conn(inode); | ^~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for CPPC_CPUFREQ_SYSFS_INTERFACE Depends on [n]: CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ACPI_CPPC_CPUFREQ [=n] Selected by [m]: - CPU_FREQ_GOV_SEEP [=m] && CPU_FREQ [=y] && (ACPI_CPPC_CPUFREQ [=n] || ARM64 [=y]) vim +/fc +131 fs/fuse/inode.c d8a5ba45457e4a Miklos Szeredi 2005-09-09 8 d8a5ba45457e4a Miklos Szeredi 2005-09-09 @9 #include "fuse_i.h" d8a5ba45457e4a Miklos Szeredi 2005-09-09 10 d8a5ba45457e4a Miklos Szeredi 2005-09-09 11 #include <linux/pagemap.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 12 #include <linux/slab.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 13 #include <linux/file.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 14 #include <linux/seq_file.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 15 #include <linux/init.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 16 #include <linux/module.h> 487ea5af6358cb Csaba Henk 2009-08-26 17 #include <linux/moduleparam.h> c30da2e981a703 David Howells 2019-03-25 18 #include <linux/fs_context.h> c30da2e981a703 David Howells 2019-03-25 19 #include <linux/fs_parser.h> d8a5ba45457e4a Miklos Szeredi 2005-09-09 20 #include <linux/statfs.h> 9c8ef5614da226 Miklos Szeredi 2006-06-25 21 #include <linux/random.h> e8edc6e03a5c85 Alexey Dobriyan 2007-05-21 22 #include <linux/sched.h> dbd561d236ff16 Miklos Szeredi 2008-07-25 23 #include <linux/exportfs.h> 60bcc88ad185d5 Seth Forshee 2016-08-29 24 #include <linux/posix_acl.h> 0b6e9ea041e6c9 Seth Forshee 2014-07-02 25 #include <linux/pid_namespace.h> d738472f483478 chenrenhui 2025-05-13 26 #ifdef CONFIG_FUSE_FASTPATH d738472f483478 chenrenhui 2025-05-13 27 #include <linux/fast_ipc.h> d738472f483478 chenrenhui 2025-05-13 28 #endif d8a5ba45457e4a Miklos Szeredi 2005-09-09 29 d8a5ba45457e4a Miklos Szeredi 2005-09-09 30 MODULE_AUTHOR("Miklos Szeredi <miklos(a)szeredi.hu>"); d8a5ba45457e4a Miklos Szeredi 2005-09-09 31 MODULE_DESCRIPTION("Filesystem in Userspace"); d8a5ba45457e4a Miklos Szeredi 2005-09-09 32 MODULE_LICENSE("GPL"); d8a5ba45457e4a Miklos Szeredi 2005-09-09 33 e18b890bb0881b Christoph Lameter 2006-12-06 34 static struct kmem_cache *fuse_inode_cachep; bafa96541b250a Miklos Szeredi 2006-06-25 35 struct list_head fuse_conn_list; bafa96541b250a Miklos Szeredi 2006-06-25 36 DEFINE_MUTEX(fuse_mutex); d8a5ba45457e4a Miklos Szeredi 2005-09-09 37 e4dca7b7aa08b2 Kees Cook 2017-10-17 38 static int set_global_limit(const char *val, const struct kernel_param *kp); 487ea5af6358cb Csaba Henk 2009-08-26 39 79a9d99434b104 Csaba Henk 2009-08-26 40 unsigned max_user_bgreq; 487ea5af6358cb Csaba Henk 2009-08-26 41 module_param_call(max_user_bgreq, set_global_limit, param_get_uint, 487ea5af6358cb Csaba Henk 2009-08-26 42 &max_user_bgreq, 0644); 487ea5af6358cb Csaba Henk 2009-08-26 43 __MODULE_PARM_TYPE(max_user_bgreq, "uint"); 487ea5af6358cb Csaba Henk 2009-08-26 44 MODULE_PARM_DESC(max_user_bgreq, 487ea5af6358cb Csaba Henk 2009-08-26 45 "Global limit for the maximum number of backgrounded requests an " 487ea5af6358cb Csaba Henk 2009-08-26 46 "unprivileged user can set"); 487ea5af6358cb Csaba Henk 2009-08-26 47 79a9d99434b104 Csaba Henk 2009-08-26 48 unsigned max_user_congthresh; 487ea5af6358cb Csaba Henk 2009-08-26 49 module_param_call(max_user_congthresh, set_global_limit, param_get_uint, 487ea5af6358cb Csaba Henk 2009-08-26 50 &max_user_congthresh, 0644); 487ea5af6358cb Csaba Henk 2009-08-26 51 __MODULE_PARM_TYPE(max_user_congthresh, "uint"); 487ea5af6358cb Csaba Henk 2009-08-26 52 MODULE_PARM_DESC(max_user_congthresh, 487ea5af6358cb Csaba Henk 2009-08-26 53 "Global limit for the maximum congestion threshold an " 487ea5af6358cb Csaba Henk 2009-08-26 54 "unprivileged user can set"); 487ea5af6358cb Csaba Henk 2009-08-26 55 d8a5ba45457e4a Miklos Szeredi 2005-09-09 56 #define FUSE_SUPER_MAGIC 0x65735546 d8a5ba45457e4a Miklos Szeredi 2005-09-09 57 d1875dbaa58e48 Miklos Szeredi 2008-02-08 58 #define FUSE_DEFAULT_BLKSIZE 512 d1875dbaa58e48 Miklos Szeredi 2008-02-08 59 7a6d3c8b3049d0 Csaba Henk 2009-07-01 60 /** Maximum number of outstanding background requests */ 7a6d3c8b3049d0 Csaba Henk 2009-07-01 61 #define FUSE_DEFAULT_MAX_BACKGROUND 12 7a6d3c8b3049d0 Csaba Henk 2009-07-01 62 7a6d3c8b3049d0 Csaba Henk 2009-07-01 63 /** Congestion starts at 75% of maximum */ 7a6d3c8b3049d0 Csaba Henk 2009-07-01 64 #define FUSE_DEFAULT_CONGESTION_THRESHOLD (FUSE_DEFAULT_MAX_BACKGROUND * 3 / 4) 7a6d3c8b3049d0 Csaba Henk 2009-07-01 65 c30da2e981a703 David Howells 2019-03-25 66 #ifdef CONFIG_BLOCK c30da2e981a703 David Howells 2019-03-25 67 static struct file_system_type fuseblk_fs_type; c30da2e981a703 David Howells 2019-03-25 68 #endif c30da2e981a703 David Howells 2019-03-25 69 a2daff6803a384 Randy Dunlap 2011-05-31 70 struct fuse_forget_link *fuse_alloc_forget(void) 07e77dca8a1f17 Miklos Szeredi 2010-12-07 71 { dc69e98c241e14 Khazhismel Kumykov 2019-09-17 72 return kzalloc(sizeof(struct fuse_forget_link), GFP_KERNEL_ACCOUNT); 07e77dca8a1f17 Miklos Szeredi 2010-12-07 73 } 07e77dca8a1f17 Miklos Szeredi 2010-12-07 74 d8a5ba45457e4a Miklos Szeredi 2005-09-09 75 static struct inode *fuse_alloc_inode(struct super_block *sb) d8a5ba45457e4a Miklos Szeredi 2005-09-09 76 { d8a5ba45457e4a Miklos Szeredi 2005-09-09 77 struct fuse_inode *fi; d8a5ba45457e4a Miklos Szeredi 2005-09-09 78 9031a69cf9f024 zhangliguang 2019-05-06 79 fi = kmem_cache_alloc(fuse_inode_cachep, GFP_KERNEL); 9031a69cf9f024 zhangliguang 2019-05-06 80 if (!fi) d8a5ba45457e4a Miklos Szeredi 2005-09-09 81 return NULL; d8a5ba45457e4a Miklos Szeredi 2005-09-09 82 0a0898cf413876 Miklos Szeredi 2006-07-30 83 fi->i_time = 0; 2f1e81965fd0f6 Miklos Szeredi 2018-10-15 84 fi->inval_mask = 0; d8a5ba45457e4a Miklos Szeredi 2005-09-09 85 fi->nodeid = 0; 9e6268db496a25 Miklos Szeredi 2005-09-09 86 fi->nlookup = 0; fbee36b92abc96 John Muir 2007-11-28 87 fi->attr_version = 0; 45c72cd73c788d Pavel Shilovsky 2012-05-10 88 fi->orig_ino = 0; 4582a4ab2a0e72 Feng Shuo 2013-01-15 89 fi->state = 0; 5c672ab3f0ee0f Miklos Szeredi 2016-06-30 90 mutex_init(&fi->mutex); 6ae330cad6ef22 Vivek Goyal 2020-08-19 91 init_rwsem(&fi->i_mmap_sem); f15ecfef058d94 Kirill Tkhai 2018-11-09 92 spin_lock_init(&fi->lock); 07e77dca8a1f17 Miklos Szeredi 2010-12-07 93 fi->forget = fuse_alloc_forget(); c2d0ad00d948de Vivek Goyal 2020-08-19 94 if (!fi->forget) c2d0ad00d948de Vivek Goyal 2020-08-19 95 goto out_free; c2d0ad00d948de Vivek Goyal 2020-08-19 96 c2d0ad00d948de Vivek Goyal 2020-08-19 97 if (IS_ENABLED(CONFIG_FUSE_DAX) && !fuse_dax_inode_alloc(sb, fi)) c2d0ad00d948de Vivek Goyal 2020-08-19 98 goto out_free_forget; d8a5ba45457e4a Miklos Szeredi 2005-09-09 99 9031a69cf9f024 zhangliguang 2019-05-06 100 return &fi->inode; c2d0ad00d948de Vivek Goyal 2020-08-19 101 c2d0ad00d948de Vivek Goyal 2020-08-19 102 out_free_forget: c2d0ad00d948de Vivek Goyal 2020-08-19 103 kfree(fi->forget); c2d0ad00d948de Vivek Goyal 2020-08-19 104 out_free: c2d0ad00d948de Vivek Goyal 2020-08-19 105 kmem_cache_free(fuse_inode_cachep, fi); c2d0ad00d948de Vivek Goyal 2020-08-19 106 return NULL; d8a5ba45457e4a Miklos Szeredi 2005-09-09 107 } d8a5ba45457e4a Miklos Szeredi 2005-09-09 108 9baf28bbfea165 Al Viro 2019-04-15 109 static void fuse_free_inode(struct inode *inode) d8a5ba45457e4a Miklos Szeredi 2005-09-09 110 { e5e5558e923f35 Miklos Szeredi 2005-09-09 111 struct fuse_inode *fi = get_fuse_inode(inode); 9baf28bbfea165 Al Viro 2019-04-15 112 5c672ab3f0ee0f Miklos Szeredi 2016-06-30 113 mutex_destroy(&fi->mutex); 07e77dca8a1f17 Miklos Szeredi 2010-12-07 114 kfree(fi->forget); c2d0ad00d948de Vivek Goyal 2020-08-19 115 #ifdef CONFIG_FUSE_DAX c2d0ad00d948de Vivek Goyal 2020-08-19 116 kfree(fi->dax); c2d0ad00d948de Vivek Goyal 2020-08-19 117 #endif 9baf28bbfea165 Al Viro 2019-04-15 118 kmem_cache_free(fuse_inode_cachep, fi); d8a5ba45457e4a Miklos Szeredi 2005-09-09 119 } d8a5ba45457e4a Miklos Szeredi 2005-09-09 120 b57922d97fd6f7 Al Viro 2010-06-07 121 static void fuse_evict_inode(struct inode *inode) d8a5ba45457e4a Miklos Szeredi 2005-09-09 122 { 9baf28bbfea165 Al Viro 2019-04-15 123 struct fuse_inode *fi = get_fuse_inode(inode); 9baf28bbfea165 Al Viro 2019-04-15 124 f562783e91daf0 Miklos Szeredi 2022-01-14 125 /* Will write inode on close/munmap and in all other dirtiers */ f562783e91daf0 Miklos Szeredi 2022-01-14 126 WARN_ON(inode->i_state & I_DIRTY_INODE); f562783e91daf0 Miklos Szeredi 2022-01-14 127 91b0abe36a7b2b Johannes Weiner 2014-04-03 128 truncate_inode_pages_final(&inode->i_data); dbd5768f87ff6f Jan Kara 2012-05-03 129 clear_inode(inode); 1751e8a6cb935e Linus Torvalds 2017-11-27 130 if (inode->i_sb->s_flags & SB_ACTIVE) { e5e5558e923f35 Miklos Szeredi 2005-09-09 @131 struct fuse_conn *fc = get_fuse_conn(inode); c2d0ad00d948de Vivek Goyal 2020-08-19 132 c2d0ad00d948de Vivek Goyal 2020-08-19 133 if (FUSE_IS_DAX(inode)) c2d0ad00d948de Vivek Goyal 2020-08-19 134 fuse_dax_inode_cleanup(inode); 1866d779d5d2ab Max Reitz 2020-09-09 135 if (fi->nlookup) { f16d89538c1c29 wuyifeng10 2025-05-20 136 #ifdef CONFIG_FUSE_FASTPATH f16d89538c1c29 wuyifeng10 2025-05-20 137 fuse_fast_forget(get_fuse_mount(inode), fi->forget, f16d89538c1c29 wuyifeng10 2025-05-20 138 fi->nodeid, fi->nlookup); f16d89538c1c29 wuyifeng10 2025-05-20 139 #else 1866d779d5d2ab Max Reitz 2020-09-09 140 fuse_queue_forget(fc, fi->forget, fi->nodeid, 1866d779d5d2ab Max Reitz 2020-09-09 141 fi->nlookup); f16d89538c1c29 wuyifeng10 2025-05-20 142 #endif 07e77dca8a1f17 Miklos Szeredi 2010-12-07 143 fi->forget = NULL; e5e5558e923f35 Miklos Szeredi 2005-09-09 144 } 1866d779d5d2ab Max Reitz 2020-09-09 145 } ebbe4b9f88081d Miklos Szeredi 2021-01-18 146 if (S_ISREG(inode->i_mode) && !fuse_is_bad(inode)) { 9baf28bbfea165 Al Viro 2019-04-15 147 WARN_ON(!list_empty(&fi->write_files)); 9baf28bbfea165 Al Viro 2019-04-15 148 WARN_ON(!list_empty(&fi->queued_writes)); 9baf28bbfea165 Al Viro 2019-04-15 149 } d8a5ba45457e4a Miklos Szeredi 2005-09-09 150 } d8a5ba45457e4a Miklos Szeredi 2005-09-09 151 :::::: The code at line 131 was first introduced by commit :::::: e5e5558e923f35839108a12718494ecb73fb782f [PATCH] FUSE - read-only operations :::::: TO: Miklos Szeredi <miklos(a)szeredi.hu> :::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2974/2974] fs/fuse/dev.c:288:5: warning: no previous prototype for 'fuse_get_unique_from_fc'
by kernel test robot 20 Jun '25

20 Jun '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: d738472f4834780c8f85e0eb7c76562bf5484276 [2974/2974] fuse: support fastpath via fast_ipc config: arm64-randconfig-001-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200216.30IOXkDh-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200216.30IOXkDh-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200216.30IOXkDh-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from fs/fuse/fuse_i.h:23, from fs/fuse/dev.c:9: include/linux/backing-dev.h:430:49: warning: 'struct cgroup_subsys' declared inside parameter list will not be visible outside of this definition or declaration 430 | static inline void bind_memcg_blkcg_link(struct cgroup_subsys *ss, | ^~~~~~~~~~~~~ >> fs/fuse/dev.c:288:5: warning: no previous prototype for 'fuse_get_unique_from_fc' [-Wmissing-prototypes] 288 | u64 fuse_get_unique_from_fc(struct fuse_conn *fc) | ^~~~~~~~~~~~~~~~~~~~~~~ >> fs/fuse/dev.c:318:9: warning: no previous prototype for 'fuse_simple_request_fast' [-Wmissing-prototypes] 318 | ssize_t fuse_simple_request_fast(struct fuse_mount *fm, struct fuse_args *args) | ^~~~~~~~~~~~~~~~~~~~~~~~ fs/fuse/dev.c: In function 'fuse_read_copy': >> fs/fuse/dev.c:2627:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] 2627 | int err = 0; | ^~~ -- In file included from fs/fuse/fuse_i.h:23, from fs/fuse/file.c:9: include/linux/backing-dev.h:430:49: warning: 'struct cgroup_subsys' declared inside parameter list will not be visible outside of this definition or declaration 430 | static inline void bind_memcg_blkcg_link(struct cgroup_subsys *ss, | ^~~~~~~~~~~~~ >> fs/fuse/file.c:1542:9: warning: no previous prototype for 'fuse_direct_io_fast' [-Wmissing-prototypes] 1542 | ssize_t fuse_direct_io_fast(struct kiocb *iocb, struct iov_iter *iter, | ^~~~~~~~~~~~~~~~~~~ fs/fuse/file.c: In function 'fuse_direct_read_iter': >> fs/fuse/file.c:1797:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 1797 | struct fuse_io_priv io = FUSE_IO_PRIV_SYNC(iocb); | ^~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for CPPC_CPUFREQ_SYSFS_INTERFACE Depends on [n]: CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ACPI_CPPC_CPUFREQ [=n] Selected by [m]: - CPU_FREQ_GOV_SEEP [=m] && CPU_FREQ [=y] && (ACPI_CPPC_CPUFREQ [=n] || ARM64 [=y]) vim +/fuse_get_unique_from_fc +288 fs/fuse/dev.c 287 > 288 u64 fuse_get_unique_from_fc(struct fuse_conn *fc) 289 { 290 fc->reqctr += FUSE_REQ_ID_STEP; 291 return fc->reqctr; 292 } 293 294 static void __fuse_ipc_send(struct fuse_req *req, struct task_struct *tsk, 295 struct fuse_ipc_info *ipc_info) 296 { 297 ssize_t ret; 298 299 FUSE_DEBUG("[cpu/%d][%s/%d] fuse ipc send begin: unique: %d,opcode: %d\n", 300 smp_processor_id(), current->comm, current->pid, 301 req->in.h.unique, req->in.h.opcode); 302 ret = fast_ipc_do_call(ipc_info->bind_info, tsk); 303 304 FUSE_DEBUG("[cpu/%d][%s/%d] end\n", smp_processor_id(), current->comm, 305 current->pid); 306 307 if (ret) { 308 pr_warn("[cpu/%d][%s/%d] fuse_simple_request send failed: ", 309 smp_processor_id(), current->comm, current->pid); 310 pr_warn("unique: %lld, opcode: %d, return value: %ld\n", 311 req->in.h.unique, req->in.h.opcode, ret); 312 req->out.h.error = ret; 313 } 314 } 315 316 static void fuse_adjust_compat(struct fuse_conn *fc, struct fuse_args *args); 317 > 318 ssize_t fuse_simple_request_fast(struct fuse_mount *fm, struct fuse_args *args) 319 { 320 struct fuse_conn *fc = fm->fc; 321 struct fuse_req *req; 322 ssize_t ret; 323 struct fuse_ipc_info *ipc_info; 324 cpumask_t old_mask; 325 cpumask_t new_mask; 326 327 ipc_info = this_cpu_ptr(fc->percpu_ipc_info); 328 329 old_mask = current->cpus_mask; 330 cpumask_clear(&new_mask); 331 cpumask_set_cpu(raw_smp_processor_id(), &new_mask); 332 set_cpus_allowed_ptr(current, &new_mask); 333 334 mutex_lock(&ipc_info->mutex_lock); 335 336 req = fuse_get_req_sync(fm, ipc_info, args); 337 if (IS_ERR(req)) { 338 mutex_unlock(&ipc_info->mutex_lock); 339 return PTR_ERR(req); 340 } 341 342 /* Needs to be done after fuse_get_req() so that fc->minor is valid */ 343 fuse_adjust_compat(fc, args); 344 345 req->in.h.opcode = args->opcode; 346 req->in.h.nodeid = args->nodeid; 347 req->args = args; 348 req->in.h.unique = fuse_get_unique_from_fc(req->fm->fc); 349 req->in.h.len = sizeof(struct fuse_in_header) + 350 fuse_len_args(req->args->in_numargs, 351 (struct fuse_arg *) req->args->in_args); 352 353 if (!args->noreply) 354 __set_bit(FR_ISREPLY, &req->flags); 355 356 __fuse_ipc_send(req, current, ipc_info); 357 358 set_cpus_allowed_ptr(current, &old_mask); 359 ret = req->out.h.error; 360 if (!ret && args->out_argvar) { 361 WARN_ON(args->out_numargs == 0); 362 ret = args->out_args[args->out_numargs - 1].size; 363 } 364 fuse_drop_waiting(fc); 365 366 mutex_unlock(&ipc_info->mutex_lock); 367 368 return ret; 369 } 370 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2974/2974] mm/hugetlb.c:6315:14: warning: no previous prototype for 'hugetlb_alloc_hugepage_nodemask'
by kernel test robot 20 Jun '25

20 Jun '25
Hi Chen, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0bb9efd4883938dec34f710bce07ec3ecf5a04bd commit: 8deff3a60ce1a9dffb552210f065fc9ed6a55f84 [2974/2974] mm/sharepool: Add mg_sp_alloc_nodemask config: arm64-randconfig-003-20250620 (https://download.01.org/0day-ci/archive/20250620/202506200232.vO3LrsSJ-lkp@…) compiler: aarch64-linux-gcc (GCC) 11.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250620/202506200232.vO3LrsSJ-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506200232.vO3LrsSJ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/hugetlb.c:6315:14: warning: no previous prototype for 'hugetlb_alloc_hugepage_nodemask' [-Wmissing-prototypes] 6315 | struct page *hugetlb_alloc_hugepage_nodemask(int nid, int flag, nodemask_t *nodemask) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/hugetlb_alloc_hugepage_nodemask +6315 mm/hugetlb.c 6311 6312 /* 6313 * Allocate hugepage without reserve 6314 */ > 6315 struct page *hugetlb_alloc_hugepage_nodemask(int nid, int flag, nodemask_t *nodemask) 6316 { 6317 struct hstate *h = &default_hstate; 6318 gfp_t gfp_mask = htlb_alloc_mask(h); 6319 struct page *page = NULL; 6320 6321 if (nid == NUMA_NO_NODE) 6322 nid = numa_mem_id(); 6323 6324 if (nid < 0 || nid >= MAX_NUMNODES) 6325 return NULL; 6326 6327 if (flag & ~HUGETLB_ALLOC_MASK) 6328 return NULL; 6329 6330 if (enable_charge_mighp) 6331 gfp_mask |= __GFP_ACCOUNT; 6332 6333 if (flag & HUGETLB_ALLOC_NORECLAIM) 6334 gfp_mask &= ~__GFP_RECLAIM; 6335 6336 if (flag & HUGETLB_ALLOC_NORMAL) 6337 page = hugetlb_alloc_hugepage_normal(h, gfp_mask, nid); 6338 else if (flag & HUGETLB_ALLOC_BUDDY) 6339 page = alloc_migrate_huge_page(h, gfp_mask, nid, nodemask); 6340 else 6341 page = alloc_huge_page_nodemask(h, nid, nodemask, gfp_mask); 6342 6343 return page; 6344 } 6345 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] cifs: fix mount deadlock by avoiding super block iteration in DFS reconnect
by Wang Zhaolong 19 Jun '25

19 Jun '25
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICE4PV -------------------------------- A deadlock issue occurs when network interruption during mount triggers DFS reconnection logic that calls iterate_supers_type(). The detailed call process is as follows: mount.cifs cifsd path_mount do_new_mount vfs_get_tree legacy_get_tree cifs_smb3_do_mount sget alloc_super down_write_nested(&s->s_umount, ..); // hold lock cifs_read_super cifs_root_iget cifs_get_inode_info smb2_query_path_info smb2_compound_op compound_send_recv wait_for_response // wait for cifsd to wake it up cifs_demultiplex_thread cifs_read_from_socket cifs_readv_from_socket server_unresponsive cifs_reconnect cifs_get_tcp_super __cifs_get_super iterate_supers_type down_read(&sb->s_umount); // block mid->callback() cifs_wake_up_task wake_up_process // won't be executed do_new_mount_fc up_write(&sb->s_umount); // release lock here This patch fixes the problem by doing the following: - Add vfs_sb back-pointer to cifs_sb_info for direct access - Protect list traversal with existing tcon->sb_list_lock - Use atomic operations to safely manage super block references - Remove complex callback-based iteration in favor of simple loop Fixes: 93d5cb517db3 ("cifs: Add support for failover in cifs_reconnect()") Signed-off-by: Wang Zhaolong <wangzhaolong1(a)huawei.com> --- fs/cifs/cifs_fs_sb.h | 1 + fs/cifs/cifsfs.c | 1 + fs/cifs/connect.c | 10 ++-- fs/cifs/misc.c | 125 ++++++++++++++++++++++--------------------- 4 files changed, 71 insertions(+), 66 deletions(-) diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index d14002d67b6a..d180ef3f9d89 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h @@ -58,10 +58,11 @@ struct cifs_sb_info { struct rb_root tlink_tree; struct list_head tcon_sb_link; spinlock_t tlink_tree_lock; + struct super_block *vfs_sb; struct tcon_link *master_tlink; struct nls_table *local_nls; unsigned int bsize; unsigned int rsize; unsigned int wsize; diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index dac20bbc2786..a86a1fb34e59 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -778,10 +778,11 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) static int cifs_set_super(struct super_block *sb, void *data) { struct cifs_mnt_data *mnt_data = data; sb->s_fs_info = mnt_data->cifs_sb; + mnt_data->cifs_sb->vfs_sb = sb; return set_anon_super(sb, NULL); } static struct dentry * cifs_smb3_do_mount(struct file_system_type *fs_type, diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 56afed6d9ef8..23798ab5d5f1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -405,16 +405,11 @@ cifs_reconnect(struct TCP_Server_Info *server) spin_lock(&GlobalMid_Lock); server->nr_targets = 1; #ifdef CONFIG_CIFS_DFS_UPCALL spin_unlock(&GlobalMid_Lock); sb = cifs_get_tcp_super(server); - if (IS_ERR(sb)) { - rc = PTR_ERR(sb); - cifs_dbg(FYI, "%s: will not do DFS failover: rc = %d\n", - __func__, rc); - sb = NULL; - } else { + if (sb) { cifs_sb = CIFS_SB(sb); rc = reconn_setup_dfs_targets(cifs_sb, &tgt_list); if (rc) { cifs_sb = NULL; if (rc != -EOPNOTSUPP) { @@ -422,10 +417,13 @@ cifs_reconnect(struct TCP_Server_Info *server) __func__); } } else { server->nr_targets = dfs_cache_get_nr_tgts(&tgt_list); } + } else { + cifs_dbg(FYI, "%s: will not do DFS failover\n", __func__); + rc = -EINVAL; } cifs_dbg(FYI, "%s: will retry %d target(s)\n", __func__, server->nr_targets); spin_lock(&GlobalMid_Lock); #endif diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 12131a5d5073..802d792306a3 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -1034,66 +1034,55 @@ int copy_path_name(char *dst, const char *src) struct super_cb_data { void *data; struct super_block *sb; }; -static void tcp_super_cb(struct super_block *sb, void *arg) +struct super_block *cifs_get_tcp_super(struct TCP_Server_Info *server) { - struct super_cb_data *sd = arg; - struct TCP_Server_Info *server = sd->data; - struct cifs_sb_info *cifs_sb; + struct super_block *sb; + struct cifs_ses *ses; struct cifs_tcon *tcon; + struct cifs_sb_info *cifs_sb; - if (sd->sb) - return; + if (!server) + return NULL; - cifs_sb = CIFS_SB(sb); - tcon = cifs_sb_master_tcon(cifs_sb); - if (tcon->ses->server == server) - sd->sb = sb; -} + spin_lock(&cifs_tcp_ses_lock); + list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { + list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { + spin_lock(&tcon->sb_list_lock); + list_for_each_entry(cifs_sb, &tcon->cifs_sb_list, tcon_sb_link) { + if (!cifs_sb->vfs_sb) + continue; -static struct super_block *__cifs_get_super(void (*f)(struct super_block *, void *), - void *data) -{ - struct super_cb_data sd = { - .data = data, - .sb = NULL, - }; - struct file_system_type **fs_type = (struct file_system_type *[]) { - &cifs_fs_type, &smb3_fs_type, NULL, - }; - - for (; *fs_type; fs_type++) { - iterate_supers_type(*fs_type, f, &sd); - if (sd.sb) { - /* - * Grab an active reference in order to prevent automounts (DFS links) - * of expiring and then freeing up our cifs superblock pointer while - * we're doing failover. - */ - cifs_sb_active(sd.sb); - return sd.sb; + sb = cifs_sb->vfs_sb; + + /* Safely increment s_active only if it's not zero. + * + * When s_active == 0, the super block is being deactivated + * and should not be used. This prevents UAF scenarios + * where we might grab a reference to a super block that's + * in the middle of destruction. + */ + if (!atomic_add_unless(&sb->s_active, 1, 0)) + continue; + spin_unlock(&tcon->sb_list_lock); + spin_unlock(&cifs_tcp_ses_lock); + return sb; + } + spin_unlock(&tcon->sb_list_lock); } } - return ERR_PTR(-EINVAL); -} - -static void __cifs_put_super(struct super_block *sb) -{ - if (!IS_ERR_OR_NULL(sb)) - cifs_sb_deactive(sb); -} + spin_unlock(&cifs_tcp_ses_lock); -struct super_block *cifs_get_tcp_super(struct TCP_Server_Info *server) -{ - return __cifs_get_super(tcp_super_cb, server); + return NULL; } void cifs_put_tcp_super(struct super_block *sb) { - __cifs_put_super(sb); + if (!IS_ERR_OR_NULL(sb)) + deactivate_super(sb); } #ifdef CONFIG_CIFS_DFS_UPCALL int match_target_ip(struct TCP_Server_Info *server, const char *share, size_t share_len, @@ -1138,33 +1127,49 @@ int match_target_ip(struct TCP_Server_Info *server, kfree(tip); return rc; } -static void tcon_super_cb(struct super_block *sb, void *arg) +static inline struct super_block *cifs_get_tcon_super(struct cifs_tcon *tcon) { - struct super_cb_data *sd = arg; - struct cifs_tcon *tcon = sd->data; struct cifs_sb_info *cifs_sb; + struct super_block *sb = ERR_PTR(-EINVAL); + + if (!tcon && list_empty(&tcon->cifs_sb_list)) + return sb; + + spin_lock(&tcon->sb_list_lock); + list_for_each_entry(cifs_sb, &tcon->cifs_sb_list, tcon_sb_link) { + if (!cifs_sb->vfs_sb) + continue; + + sb = cifs_sb->vfs_sb; + + if (!tcon->dfs_path) + continue; + if (!cifs_sb->origin_fullpath) + continue; + if (strcasecmp(tcon->dfs_path, cifs_sb->origin_fullpath)) + continue; + /* + * Use atomic_add_unless to safely increment s_active. + * This ensures we don't add a reference to a super block + * that has s_active == 0 (being destroyed). + */ + if (!atomic_add_unless(&sb->s_active, 1, 0)) + continue; + break; + } + spin_unlock(&tcon->sb_list_lock); - if (sd->sb) - return; - - cifs_sb = CIFS_SB(sb); - if (tcon->dfs_path && cifs_sb->origin_fullpath && - !strcasecmp(tcon->dfs_path, cifs_sb->origin_fullpath)) - sd->sb = sb; -} - -static inline struct super_block *cifs_get_tcon_super(struct cifs_tcon *tcon) -{ - return __cifs_get_super(tcon_super_cb, tcon); + return sb; } static inline void cifs_put_tcon_super(struct super_block *sb) { - __cifs_put_super(sb); + if (!IS_ERR_OR_NULL(sb)) + deactivate_super(sb); } #else static inline struct super_block *cifs_get_tcon_super(struct cifs_tcon *tcon) { return ERR_PTR(-EOPNOTSUPP); -- 2.34.3
2 1
0 0
[PATCH] drm: phytium: fix NULL dereference issue in drm_gem_object_free
by Li Chen 19 Jun '25

19 Jun '25
From: Li Chen <chenl311(a)chinatelecom.cn> driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICGG2A ---------------------------------------------------------------------- Syzkaller crashed kernel in drm path. The root cause is that phytium_drm_gem_object_funcs is not assigned before phytium_gem_create_object enters the failed_dma_alloc label. Let's fix this issue by assigning the function earlier. Below is the crash log: ``` [ 9042.703078] [drm:phytium_gem_create_object [phytium_dc_drm]] *ERROR* fail to allocate vram buffer with size 3de4000 [ 9042.717862] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 9042.727173] fuse: Unknown parameter '0xffffffffffffffff<r00000000000000000000' [ 9042.730383] Mem abort info: [ 9042.745443] ESR = 0x0000000096000006 [ 9042.745446] EC = 0x25: DABT (current EL), IL = 32 bits [ 9042.745448] SET = 0, FnV = 0 [ 9042.745450] EA = 0, S1PTW = 0 [ 9042.745451] FSC = 0x06: level 2 translation fault [ 9042.745453] Data abort info: [ 9042.745455] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000 [ 9042.745457] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 9042.745459] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 9042.745462] user pgtable: 4k pages, 48-bit VAs, pgdp=00003000894ca000 [ 9042.745464] [0000000000000000] pgd=08003000894cb403, p4d=08003000894cb403, pud=0800300085320403, pmd=0000000000000000 [ 9042.830042] Internal error: Oops: 0000000096000006 [#1] SMP [ 9042.838310] Modules linked in: cramfs camellia_generic serpent_generic blowfish_generic blowfish_common cast5_generic cast_common des_generic libdes rmd160 tcp_bic unix_diag ansi_cprng tcp_dctcp ppp_synctty ip_set_hash_ip n_hdlc cmac pps_ldisc n_gsm nfnetlink_log slcan tcp_diag nfnetlink_cthelper atm nfsd auth_rpcgss nfs_acl twofish_generic twofish_common ccm md4 ppp_async msdos nfs lockd grace fscache crc32_generic netfs smc_diag tcp_westwood smc nfnetlink_osf vfio_iommu_type1 vfio vhost_vsock iommufd squashfs ib_core gfs2 snd_timer snd soundcore uhid nfnetlink_cttimeout pppoe ip_vs cuse can_bcm loop can_raw can vsock_loopback inet_diag vmw_vsock_virtio_transport_common vhost_net vhost ieee802154_socket vsock cfg80211 uinput ieee802154 vhost_iotlb pptp crypto_user l2tp_ppp pppox sctp ppp_generic slhc af_key ip6_vti ip_vti ipip sit geneve macvtap tap ipvlan macvlan hsr xfrm_interface xfrm6_tunnel tunnel4 wireguard libchacha20poly1305 chacha_neon poly1305_neon libcurve25519_generic libchacha nlmon team vcan can_dev tun [ 9042.838608] xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_addrtype nft_compat nf_tables overlay nfnetlink_queue authenc echainiv cls_matchall esp6 l2tp_ip6 l2tp_eth l2tp_ip l2tp_netlink l2tp_core br_netfilter sch_etf sch_fq dccp_ipv6 dccp_ipv4 dccp sch_ingress act_mirred cls_basic veth bonding tls esp4_offload esp4 psample macsec vxlan ip6_udp_tunnel udp_tunnel vrf 8021q garp mrp ip6_gre ip6_tunnel tunnel6 ip_gre ip_tunnel gre cls_u32 sch_htb dummy binfmt_misc bridge stp llc rfkill ip_set libcrc32c sunrpc vfat fat ipmi_si ipmi_devintf phytium_dc_drm ses enclosure ipmi_msghandler drm_display_helper scsi_transport_sas cec drm_kms_helper cppc_cpufreq sg drm fuse nfnetlink ext4 mbcache jbd2 sd_mod t10_pi crc64_rocksoft_generic crc64_rocksoft crc64 crct10dif_ce ghash_ce sm4_ce_gcm sm4_ce_ccm sm4_ce sm4_ce_cipher sm4 sm3_ce sha3_ce sha512_ce ahci sha512_arm64 sha2_ce libahci sha256_arm64 ice sha1_ce igb sbsa_gwdt libata megaraid_sas i2c_algo_bit i2c_core [ 9042.958095] dm_mirror dm_region_hash dm_log dm_multipath dm_mod aes_neon_bs aes_neon_blk aes_ce_blk aes_ce_cipher [last unloaded: nf_tables] [ 9043.094331] CPU: 39 PID: 127275 Comm: syz-executor.3 Kdump: loaded Not tainted 6.6.0-0001.rc3.ctl4.aarch64 #1 [ 9043.108430] Hardware name: vclusters VSFT5000 B/VSFT5000 B, BIOS KL4.2A.RC.D.170.240314.D.DX 03/14/2024 18:01:48 [ 9043.122832] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 9043.132983] pc : drm_gem_object_free+0xc/0x40 [drm] [ 9043.140480] lr : phytium_gem_create_object+0x2ac/0x338 [phytium_dc_drm] [ 9043.150238] sp : ffff80009cd83bd0 [ 9043.155639] x29: ffff80009cd83bd0 x28: 00000000000000b2 x27: ffff80009cd83ce8 [ 9043.166023] x26: 0000000000000020 x25: 0000000000000020 x24: ffff80007b4b2d78 [ 9043.176292] x23: ffff00ff8de5b000 x22: 0000000003de4000 x21: 0000000000000000 [ 9043.186548] x20: ffff00ff8df94c80 x19: fffffffffffffff4 x18: ffffffffffffffff [ 9043.196768] x17: 6f74206c69616620 x16: 2a524f5252452a20 x15: 5d5d6d72645f6364 [ 9043.207193] x14: 5f6d756974796870 x13: 205d353732373231 x12: 545b5d3837303330 [ 9043.217647] x11: 00000000ffff7fff x10: ffff80008223b900 x9 : ffff80007b5cdcb4 [ 9043.228070] x8 : 00000000000bffe8 x7 : c0000000ffff7fff x6 : 00000000002bffa8 [ 9043.238522] x5 : ffff80008345bd08 x4 : 0000000000000000 x3 : 0000000000000000 [ 9043.248718] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff200014f5b800 [ 9043.258874] Call trace: [ 9043.263132] drm_gem_object_free+0xc/0x40 [drm] [ 9043.270239] phytium_gem_dumb_create+0x60/0x160 [phytium_dc_drm] [ 9043.279194] drm_mode_create_dumb_ioctl+0x98/0xc0 [drm] [ 9043.287188] drm_ioctl_kernel+0xdc/0x188 [drm] [ 9043.294188] drm_ioctl+0x274/0x540 [drm] [ 9043.300456] __arm64_sys_ioctl+0xb4/0x100 [ 9043.306777] invoke_syscall+0x50/0x128 [ 9043.312774] el0_svc_common.constprop.0+0xc8/0xf0 [ 9043.319953] do_el0_svc+0x24/0x38 [ 9043.325324] el0_svc+0x44/0x1b8 [ 9043.330517] el0t_64_sync_handler+0x100/0x130 [ 9043.337369] el0t_64_sync+0x188/0x190 [ 9043.343315] Code: ffff00ff aa1e03e9 952fe875 f940a001 (f9400021) [ 9043.352351] SMP: stopping secondary CPUs [ 9043.412513] Starting crashdump kernel... [ 9044.001381] Bye! ``` Disassembler drm_gem_object_free: ``` 0xffff80007b437398 <drm_gem_object_free>: mov x9, x30 0xffff80007b43739c <drm_gem_object_free+4>: bl 0xffff800080031570 <ftrace_caller> 0xffff80007b4373a0 <drm_gem_object_free+8>: ldr x1, [x0, #320] 0xffff80007b4373a4 <drm_gem_object_free+12>: ldr x1, [x1] 0xffff80007b4373a8 <drm_gem_object_free+16>: cbz x1, 0xffff80007b4373c8 <drm_gem_object_free+48> 0xffff80007b4373ac <drm_gem_object_free+20>: paciasp 0xffff80007b4373b0 <drm_gem_object_free+24>: stp x29, x30, [sp, #-16]! 0xffff80007b4373b4 <drm_gem_object_free+28>: mov x29, sp 0xffff80007b4373b8 <drm_gem_object_free+32>: blr x1 0xffff80007b4373bc <drm_gem_object_free+36>: ldp x29, x30, [sp], #16 0xffff80007b4373c0 <drm_gem_object_free+40>: autiasp 0xffff80007b4373c4 <drm_gem_object_free+44>: ret 0xffff80007b4373c8 <drm_gem_object_free+48>: brk #0x800 0xffff80007b4373cc <drm_gem_object_free+52>: ret 0xffff80007b4373d0 <drm_gem_object_free+56>: .inst 0x865baea8 ; undefined 0xffff80007b4373d4 <drm_gem_object_free+60>: .inst 0xffff00ff ; undefined ``` ldr x1, [x1] <-- trapping instruction Signed-off-by: Li Chen <chenl311(a)chinatelecom.cn> Reviewed-by: Bin Lai <laib2(a)chinatelecom.cn> Reviewed-by: Shuo Li <lishuo(a)phytium.com.cn> --- drivers/gpu/drm/phytium/phytium_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/phytium/phytium_gem.c b/drivers/gpu/drm/phytium/phytium_gem.c index 2cbbcd9fbd112..95b6b0360c065 100644 --- a/drivers/gpu/drm/phytium/phytium_gem.c +++ b/drivers/gpu/drm/phytium/phytium_gem.c @@ -432,6 +432,8 @@ struct phytium_gem_object *phytium_gem_create_object(struct drm_device *dev, uns goto failed_object_init; } + phytium_gem_obj->base.funcs = &phytium_drm_gem_object_funcs; + if (priv->support_memory_type & (MEMORY_TYPE_VRAM_WC | MEMORY_TYPE_VRAM_DEVICE)) { ret = phytium_memory_pool_alloc(priv, &phytium_gem_obj->vaddr, &phytium_gem_obj->phys_addr, size); @@ -475,8 +477,6 @@ struct phytium_gem_object *phytium_gem_create_object(struct drm_device *dev, uns goto failed_dma_alloc; } - phytium_gem_obj->base.funcs = &phytium_drm_gem_object_funcs; - phytium_gem_obj->size = size; list_add_tail(&phytium_gem_obj->list, &priv->gem_list_head); DRM_DEBUG_KMS("phytium_gem_obj iova:0x%pa size:0x%lx\n", -- 2.49.0
1 0
0 0
[PATCH OLK-5.10] objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
by Liu Mingrui 19 Jun '25

19 Jun '25
From: Josh Poimboeuf <jpoimboe(a)kernel.org> stable inclusion from stable-v5.10.236 commit 976a85782246a29ba0f6d411a7a4f524cb9ea987 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC9910 CVE: CVE-2025-37937 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit e63d465f59011dede0a0f1d21718b59a64c3ff5c ] If dib8000_set_dds()'s call to dib8000_read32() returns zero, the result is a divide-by-zero. Prevent that from happening. Fixes the following warning with an UBSAN kernel: drivers/media/dvb-frontends/dib8000.o: warning: objtool: dib8000_tune() falls through to next function dib8096p_cfg_DibRx() Fixes: 173a64cb3fcf ("[media] dib8000: enhancement") Reported-by: kernel test robot <lkp(a)intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe(a)kernel.org> Signed-off-by: Ingo Molnar <mingo(a)kernel.org> Cc: Mauro Carvalho Chehab <mchehab(a)kernel.org> Cc: Linus Torvalds <torvalds(a)linux-foundation.org> Link: https://lore.kernel.org/r/bd1d504d930ae3f073b1e071bcf62cae7708773c.17428528… Closes: https://lore.kernel.org/r/202503210602.fvH5DO1i-lkp@intel.com/ Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Liu Mingrui <liumingrui(a)huawei.com> --- drivers/media/dvb-frontends/dib8000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index d67f2dd997d0..3cdf8de3f1c5 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -2701,8 +2701,11 @@ static void dib8000_set_dds(struct dib8000_state *state, s32 offset_khz) u8 ratio; if (state->revision == 0x8090) { + u32 internal = dib8000_read32(state, 23) / 1000; + ratio = 4; - unit_khz_dds_val = (1<<26) / (dib8000_read32(state, 23) / 1000); + + unit_khz_dds_val = (1<<26) / (internal ?: 1); if (offset_khz < 0) dds = (1 << 26) - (abs_offset_khz * unit_khz_dds_val); else -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
by Liu Mingrui 19 Jun '25

19 Jun '25
From: Josh Poimboeuf <jpoimboe(a)kernel.org> stable inclusion from stable-v6.6.87 commit 75b42dfe87657ede3da3f279bd6b1b16d69af954 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC8J7I CVE: CVE-2025-37937 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit e63d465f59011dede0a0f1d21718b59a64c3ff5c ] If dib8000_set_dds()'s call to dib8000_read32() returns zero, the result is a divide-by-zero. Prevent that from happening. Fixes the following warning with an UBSAN kernel: drivers/media/dvb-frontends/dib8000.o: warning: objtool: dib8000_tune() falls through to next function dib8096p_cfg_DibRx() Fixes: 173a64cb3fcf ("[media] dib8000: enhancement") Reported-by: kernel test robot <lkp(a)intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe(a)kernel.org> Signed-off-by: Ingo Molnar <mingo(a)kernel.org> Cc: Mauro Carvalho Chehab <mchehab(a)kernel.org> Cc: Linus Torvalds <torvalds(a)linux-foundation.org> Link: https://lore.kernel.org/r/bd1d504d930ae3f073b1e071bcf62cae7708773c.17428528… Closes: https://lore.kernel.org/r/202503210602.fvH5DO1i-lkp@intel.com/ Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> Signed-off-by: Liu Mingrui <liumingrui(a)huawei.com> --- drivers/media/dvb-frontends/dib8000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index 2f5165918163..cfe59c3255f7 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -2701,8 +2701,11 @@ static void dib8000_set_dds(struct dib8000_state *state, s32 offset_khz) u8 ratio; if (state->revision == 0x8090) { + u32 internal = dib8000_read32(state, 23) / 1000; + ratio = 4; - unit_khz_dds_val = (1<<26) / (dib8000_read32(state, 23) / 1000); + + unit_khz_dds_val = (1<<26) / (internal ?: 1); if (offset_khz < 0) dds = (1 << 26) - (abs_offset_khz * unit_khz_dds_val); else -- 2.25.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • ...
  • 1889
  • Older →

HyperKitty Powered by HyperKitty