6.13.2-rc1 review
Subsystems (6)
Greg Kroah-Hartman
maintainerPATCH 566/623 kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit a314f52a0210730d0d556de76bb7388e76d4597d ]
Most 'make *config' commands use .config as the base configuration file.
When .config does not exist, Kconfig tries to load a file listed in KCONFIG_DEFCONFIG_LIST instead.
However, since commit b75b0a819af9 ("kconfig: change defconfig_list option to environment variable"), warning messages have displayed an incorrect file name in such cases.
Below is a demonstration using Debian Trixie. While loading /boot/config-6.12.9-amd64, the warning messages incorrectly show .config as the file name.
With this commit, the correct file name is displayed in warnings.
[Before]
$ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # .config:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT .config:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC
[After]
$ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # /boot/config-6.12.9-amd64:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT /boot/config-6.12.9-amd64:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC
--- scripts/kconfig/confdata.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/kconfig/confdata.c +4 -2
@@ -360,10 +360,12 @@ int conf_read_simple(const char *name, int def) *p ='\0' ; - in =zconf_fopen (env); + name = env; + + in =zconf_fopen (name);if (in) {conf_message ("using defaults found in %s" , - env); + name); goto load; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 567/623 kconfig: fix memory leak in sym_warn_unmet_dep()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit a409fc1463d664002ea9bf700ae4674df03de111 ]
The string allocated in sym_warn_unmet_dep() is never freed, leading to a memory leak when an unmet dependency is detected.
--- scripts/kconfig/symbol.c | 1 + 1 file changed, 1 insertion(+)
scripts/kconfig/symbol.c +1 -0
@@ -388,6 +388,7 @@ static void sym_warn_unmet_dep(const struct symbol *sym) " Selected by [m]:\n");fputs (str_get (&gs), stderr); +str_free (&gs); sym_warnings++; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 568/623 hexagon: fix using plain integer as NULL pointer warning in cmpxchg
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willem de Bruijn <[email protected]>
[ Upstream commit 8a20030038742b9915c6d811a4e6c14b126cafb4 ]
Sparse reports
net/ipv4/inet_diag.c:1511:17: sparse: sparse: Using plain integer as NULL pointer
Due to this code calling cmpxchg on a non-integer type struct inet_diag_handler *
return !cmpxchg((const struct inet_diag_handler**)&inet_diag_table[type],
NULL, h) ? 0 : -EEXIST;
While hexagon's cmpxchg assigns an integer value to a variable of this type.
__typeof__(*(ptr)) __oldval = 0;
Update this assignment to cast 0 to the correct type.
The original issue is easily reproduced at head with the below block, and is absent after this change.
make LLVM=1 ARCH=hexagon defconfig
make C=1 LLVM=1 ARCH=hexagon net/ipv4/inet_diag.o
--- arch/hexagon/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/hexagon/include/asm/cmpxchg.h +1 -1
@@ -56,7 +56,7 @@ __arch_xchg(unsigned long x, volatile void *ptr, int size)__typeof__ (ptr) __ptr = (ptr); \ __typeof__(*(ptr)) __old = (old); \ __typeof__(*(ptr)) __new = (new); \ - __typeof__(*(ptr)) __oldval = 0; \ + __typeof__(*(ptr)) __oldval = (__typeof__(*(ptr))) 0; \ \ asmvolatile ( \ "1: %0 = memw_locked(%1);\n" \
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 569/623 hexagon: Fix unbalanced spinlock in die()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Yujun <[email protected]>
[ Upstream commit 03410e87563a122075c3721acc7d5510e41d8332 ]
die executes holding the spinlock of &die.lock and unlock it after printing the oops message.
However in the code if the notify_die() returns NOTIFY_STOP , die() exit with returning 1 but never unlocked the spinlock.
Fix this by adding spin_unlock_irq(&die.lock) before returning.
--- arch/hexagon/kernel/traps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/hexagon/kernel/traps.c +3 -1
@@ -195,8 +195,10 @@ int die(const char *str, struct pt_regs *regs, long err)printk (KERN_EMERG "Oops: %s[#%d]:\n" , str, ++die.counter);if (notify_die (DIE_OOPS , str, regs, err,pt_cause (regs),SIGSEGV ) == -NOTIFY_STOP ) +NOTIFY_STOP ) { +spin_unlock_irq (&die.lock);return 1 ; + }print_modules ();show_regs (regs);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 570/623 kbuild: fix Clang LTO with CONFIG_OBJTOOL=n
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit 695ed93bb30e03e9f826ee70abdd83f970741a37 ]
Since commit bede169618c6 ("kbuild: enable objtool for *.mod.o and additional kernel objects"), Clang LTO builds do not perform any optimizations when CONFIG_OBJTOOL is disabled (e.g., for ARCH=arm64). This is because every LLVM bitcode file is immediately converted to ELF format before the object files are linked together.
This commit fixes the breakage.
--- scripts/Makefile.build | 2 ++ scripts/Makefile.lib | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-)
scripts/Makefile.build +2 -0
@@ -183,7 +183,9 @@ endif # CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT is-standard-object = $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(target-stem).o)$(OBJECT_FILES_NON_STANDARD)n),$(is-kernel-object)) +ifdef CONFIG_OBJTOOL $(obj)/%.o: private objtool-enabled = $(if $(is-standard-object),$(if $(delay-objtool),$(is-single-obj-m),y)) +endif ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) cmd_warn_shared_object = $(if $(word 2, $(modname-multi)),$(warning $(kbuild-file): $*.o is added to multiple modules: $(modname-multi)))
scripts/Makefile.lib +6 -4
@@ -287,6 +287,8 @@ delay-objtool := $(or $(CONFIG_LTO_CLANG),$(CONFIG_X86_KERNEL_IBT)) cmd_objtool = $(if $(objtool-enabled), ; $(objtool) $(objtool-args) $@) cmd_gen_objtooldep = $(if $(objtool-enabled), { echo ; echo '$@: $$(wildcard $(objtool))' ; } >> $(dot-target).cmd) +objtool-enabled := y + endif # CONFIG_OBJTOOL # Useful for describing the dependency of composite objects
@@ -302,11 +304,11 @@ endef # =========================================================================== # These are shared by some Makefile.* files. -objtool-enabled := y - ifdef CONFIG_LTO_CLANG -# objtool cannot process LLVM IR. Make $(LD) covert LLVM IR to ELF here. -cmd_ld_single = $(if $(objtool-enabled), ; $(LD) $(ld_flags) -r -o $(tmp-target) $@; mv $(tmp-target) $@) +# Run $(LD) here to covert LLVM IR to ELF in the following cases: +# - when this object needs objtool processing, as objtool cannot process LLVM IR +# - when this is a single-object module, as modpost cannot process LLVM IR +cmd_ld_single = $(if $(objtool-enabled)$(is-single-obj-m), ; $(LD) $(ld_flags) -r -o $(tmp-target) $@; mv $(tmp-target) $@) endif quiet_cmd_cc_o_c = CC $(quiet_modtag) $@
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 571/623 kernel: be more careful about dup_mmap() failures and uprobe registering
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liam R. Howlett <[email protected]>
[ Upstream commit 64c37e134b120fb462fb4a80694bfb8e7be77b14 ]
If a memory allocation fails during dup_mmap(), the maple tree can be left in an unsafe state for other iterators besides the exit path. All the locks are dropped before the exit_mmap() call (in mm/mmap.c), but the incomplete mm_struct can be reached through (at least) the rmap finding the vmas which have a pointer back to the mm_struct.
Up to this point, there have been no issues with being able to find an mm_struct that was only partially initialised. Syzbot was able to make the incomplete mm_struct fail with recent forking changes, so it has been proven unsafe to use the mm_struct that hasn't been initialised, as referenced in the link below.
Although 8ac662f5da19f ("fork: avoid inappropriate uprobe access to invalid mm") fixed the uprobe access, it does not completely remove the race.
This patch sets the MMF_OOM_SKIP to avoid the iteration of the vmas on the oom side (even though this is extremely unlikely to be selected as an oom victim in the race window), and sets MMF_UNSTABLE to avoid other potential users from using a partially initialised mm_struct.
When registering vmas for uprobe, skip the vmas in an mm that is marked unstable. Modifying a vma in an unstable mm may cause issues if the mm isn't fully initialised.
--- kernel/events/uprobes.c | 4 ++++ kernel/fork.c | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-)
kernel/events/uprobes.c +4 -0
@@ -28,6 +28,7 @@#include <linux/rcupdate_trace.h> #include <linux/workqueue.h> #include <linux/srcu.h> +#include <linux/oom.h> /* check_stable_address_space */ #include <linux/uprobes.h>
@@ -1260,6 +1261,9 @@ register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new)* returns NULL in find_active_uprobe_rcu(). */ mmap_write_lock (mm); +if (check_stable_address_space (mm)) + goto unlock; + vma =find_vma (mm, info->vaddr);if (!vma || !valid_vma (vma, is_register) ||file_inode (vma->vm_file) != uprobe->inode)
kernel/fork.c +14 -3
@@ -760,7 +760,8 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,mt_set_in_rcu (vmi.mas.tree);ksm_fork (mm, oldmm);khugepaged_fork (mm, oldmm); - }else if (mpnt) { + }else { +/* * The entire maple tree has already been duplicated. If the * mmap duplication fails, mark the failure point with
@@ -768,8 +769,18 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,* stop releasing VMAs that have not been duplicated after this * point. */ -mas_set_range (&vmi.mas, mpnt->vm_start, mpnt->vm_end -1 ); -mas_store (&vmi.mas,XA_ZERO_ENTRY ); +if (mpnt) { +mas_set_range (&vmi.mas, mpnt->vm_start, mpnt->vm_end -1 ); +mas_store (&vmi.mas,XA_ZERO_ENTRY ); +/* Avoid OOM iterating a broken tree */ +set_bit (MMF_OOM_SKIP , &mm->flags); + } +/* +* The mm_struct is going to exit, but the locks will be dropped +* first. Set the mm_struct as unstable is advisable as it is +* not fully initialised. +*/ +set_bit (MMF_UNSTABLE , &mm->flags); } out:mmap_write_unlock (mm);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 572/623 f2fs: Introduce linear search for dentries
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Lee <[email protected]>
commit 91b587ba79e1b68bb718d12b0758dbcdab4e9cb7 upstream.
This patch addresses an issue where some files in case-insensitive directories become inaccessible due to changes in how the kernel function, utf8_casefold(), generates case-folded strings from the commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points").
F2FS uses these case-folded names to calculate hash values for locating dentries and stores them on disk. Since utf8_casefold() can produce different output across kernel versions, stored hash values and newly calculated hash values may differ. This results in affected files no longer being found via the hash-based lookup.
To resolve this, the patch introduces a linear search fallback. If the initial hash-based search fails, F2FS will sequentially scan the directory entries.
--- fs/f2fs/dir.c | 53 ++++++++++++++++++++++++++++++++++++++--------------- fs/f2fs/f2fs.h | 6 ++++-- fs/f2fs/inline.c | 5 +++-- 3 files changed, 45 insertions(+), 19 deletions(-)
fs/f2fs/dir.c +38 -15
@@ -175,7 +175,8 @@ static unsigned long dir_block_index(unsstatic struct f2fs_dir_entry *find_in_block (struct inode *dir,struct page *dentry_page,const struct f2fs_filename *fname, -int *max_slots) +int *max_slots, +bool use_hash) {struct f2fs_dentry_block *dentry_blk;struct f2fs_dentry_ptr d;
@@ -183,7 +184,7 @@ static struct f2fs_dir_entry *find_in_bl dentry_blk = (struct f2fs_dentry_block *)page_address (dentry_page);make_dentry_ptr_block (dir, &d, dentry_blk); -return f2fs_find_target_dentry (&d, fname, max_slots); +return f2fs_find_target_dentry (&d, fname, max_slots, use_hash); } static inline int f2fs_match_name(const struct inode *dir,
@@ -208,7 +209,8 @@ static inline int f2fs_match_name(const }struct f2fs_dir_entry *f2fs_find_target_dentry (const struct f2fs_dentry_ptr *d, -const struct f2fs_filename *fname,int *max_slots) +const struct f2fs_filename *fname,int *max_slots, +bool use_hash) {struct f2fs_dir_entry *de;unsigned long bit_pos =0 ;
@@ -231,7 +233,7 @@ struct f2fs_dir_entry *f2fs_find_target_continue ; } -if (de->hash_code == fname->hash) { +if (!use_hash || de->hash_code == fname->hash) { res =f2fs_match_name (d->inode, fname, d->filename[bit_pos],le16_to_cpu (de->name_len));
@@ -258,11 +260,12 @@ found:static struct f2fs_dir_entry *find_in_level (struct inode *dir,unsigned int level,const struct f2fs_filename *fname, -struct page **res_page) +struct page **res_page, +bool use_hash) {int s =GET_DENTRY_SLOTS (fname->disk_name.len);unsigned int nbucket, nblock; -unsigned int bidx, end_block; +unsigned int bidx, end_block, bucket_no;struct page *dentry_page;struct f2fs_dir_entry *de =NULL ;pgoff_t next_pgofs;
@@ -272,8 +275,11 @@ static struct f2fs_dir_entry *find_in_le nbucket =dir_buckets (level,F2FS_I (dir)->i_dir_level); nblock =bucket_blocks (level); + bucket_no = use_hash ?le32_to_cpu (fname->hash) % nbucket :0 ; + +start_find_bucket: bidx =dir_block_index (level,F2FS_I (dir)->i_dir_level, -le32_to_cpu (fname->hash) % nbucket); + bucket_no); end_block = bidx + nblock;while (bidx < end_block) {
@@ -290,7 +296,7 @@ static struct f2fs_dir_entry *find_in_le } } - de =find_in_block (dir, dentry_page, fname, &max_slots); + de =find_in_block (dir, dentry_page, fname, &max_slots, use_hash);if (IS_ERR (de)) { *res_page =ERR_CAST (de); de =NULL ;
@@ -307,12 +313,18 @@ static struct f2fs_dir_entry *find_in_le bidx++; } -if (!de && room &&F2FS_I (dir)->chash != fname->hash) { -F2FS_I (dir)->chash = fname->hash; -F2FS_I (dir)->clevel = level; - } +if (de) +return de; -return de; +if (likely (use_hash)) { +if (room &&F2FS_I (dir)->chash != fname->hash) { +F2FS_I (dir)->chash = fname->hash; +F2FS_I (dir)->clevel = level; + } + }else if (++bucket_no < nbucket) { + goto start_find_bucket; + } +return NULL ; } struct f2fs_dir_entry *__f2fs_find_entry(struct inode *dir,
@@ -323,11 +335,15 @@ struct f2fs_dir_entry *__f2fs_find_entrystruct f2fs_dir_entry *de =NULL ;unsigned int max_depth;unsigned int level; +bool use_hash = true; *res_page =NULL ; +#if IS_ENABLED (CONFIG_UNICODE ) +start_find_entry: +#endif if (f2fs_has_inline_dentry (dir)) { - de =f2fs_find_in_inline_dir (dir, fname, res_page); + de =f2fs_find_in_inline_dir (dir, fname, res_page, use_hash); goto out; }
@@ -343,11 +359,18 @@ struct f2fs_dir_entry *__f2fs_find_entry }for (level =0 ; level < max_depth; level++) { - de =find_in_level (dir, level, fname, res_page); + de =find_in_level (dir, level, fname, res_page, use_hash);if (de ||IS_ERR (*res_page))break ; } + out: +#if IS_ENABLED (CONFIG_UNICODE ) +if (IS_CASEFOLDED (dir) && !de && use_hash) { + use_hash = false; + goto start_find_entry; + } +#endif /* This is to increase the speed of f2fs_create */ if (!de)F2FS_I (dir)->task = current;
fs/f2fs/f2fs.h +4 -2
@@ -3583,7 +3583,8 @@ int f2fs_prepare_lookup(struct inode *di struct f2fs_filename *fname);void f2fs_free_filename (struct f2fs_filename *fname);struct f2fs_dir_entry *f2fs_find_target_dentry (const struct f2fs_dentry_ptr *d, -const struct f2fs_filename *fname,int *max_slots); +const struct f2fs_filename *fname,int *max_slots, +bool use_hash);int f2fs_fill_dentries (struct dir_context *ctx,struct f2fs_dentry_ptr *d,unsigned int start_pos,struct fscrypt_str *fstr); void f2fs_do_make_empty_dir(struct inode *inode, struct inode *parent,
@@ -4219,7 +4220,8 @@ int f2fs_write_inline_data(struct inodeint f2fs_recover_inline_data (struct inode *inode,struct page *npage);struct f2fs_dir_entry *f2fs_find_in_inline_dir (struct inode *dir,const struct f2fs_filename *fname, -struct page **res_page); +struct page **res_page, +bool use_hash);int f2fs_make_empty_inline_dir (struct inode *inode,struct inode *parent,struct page *ipage); int f2fs_add_inline_entry(struct inode *dir, const struct f2fs_filename *fname,
fs/f2fs/inline.c +3 -2
@@ -352,7 +352,8 @@ process_inline:struct f2fs_dir_entry *f2fs_find_in_inline_dir (struct inode *dir,const struct f2fs_filename *fname, -struct page **res_page) +struct page **res_page, +bool use_hash) {struct f2fs_sb_info *sbi =F2FS_SB (dir->i_sb);struct f2fs_dir_entry *de;
@@ -369,7 +370,7 @@ struct f2fs_dir_entry *f2fs_find_in_inli inline_dentry =inline_data_addr (dir, ipage);make_dentry_ptr_inline (dir, &d, inline_dentry); - de =f2fs_find_target_dentry (&d, fname,NULL ); + de =f2fs_find_target_dentry (&d, fname,NULL , use_hash);unlock_page (ipage);if (IS_ERR (de)) { *res_page =ERR_CAST (de);
Greg Kroah-Hartman
maintainerPATCH 573/623 md/md-bitmap: factor behind write counters out from bitmap_{start/end}write()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit 08c50142a128dcb2d7060aa3b4c5db8837f7a46a upstream.
behind_write is only used in raid1, prepare to refactor bitmap_{start/end}write(), there are no functional changes.
--- drivers/md/md-bitmap.c | 57 +++++++++++++++++++++++++++++------------------ drivers/md/md-bitmap.h | 7 ++++- drivers/md/raid1.c | 12 +++++---- drivers/md/raid10.c | 6 +--- drivers/md/raid5-cache.c | 3 -- drivers/md/raid5.c | 11 ++++----- 6 files changed, 56 insertions(+), 40 deletions(-)
drivers/md/md-bitmap.c +36 -21
@@ -1671,24 +1671,13 @@ __acquires(bitmap->lock) }static int bitmap_startwrite (struct mddev *mddev,sector_t offset, -unsigned long sectors,bool behind) +unsigned long sectors) {struct bitmap *bitmap = mddev->bitmap;if (!bitmap)return 0 ; -if (behind) { -int bw; -atomic_inc (&bitmap->behind_writes); - bw =atomic_read (&bitmap->behind_writes); -if (bw > bitmap->behind_writes_used) - bitmap->behind_writes_used = bw; - -pr_debug ("inc write-behind count %d/%lu\n" , - bw, bitmap->mddev->bitmap_info.max_write_behind); - } -while (sectors) {sector_t blocks;bitmap_counter_t *bmc;
@@ -1737,21 +1726,13 @@ static int bitmap_startwrite(struct mdde }static void bitmap_endwrite (struct mddev *mddev,sector_t offset, -unsigned long sectors,bool success,bool behind) +unsigned long sectors,bool success) {struct bitmap *bitmap = mddev->bitmap;if (!bitmap)return ; -if (behind) { -if (atomic_dec_and_test (&bitmap->behind_writes)) -wake_up (&bitmap->behind_wait); -pr_debug ("dec write-behind count %d/%lu\n" , -atomic_read (&bitmap->behind_writes), - bitmap->mddev->bitmap_info.max_write_behind); - } -while (sectors) {sector_t blocks;unsigned long flags;
@@ -2062,6 +2043,37 @@ static void md_bitmap_free(void *data)kfree (bitmap); } +static void bitmap_start_behind_write (struct mddev *mddev) +{ +struct bitmap *bitmap = mddev->bitmap; +int bw; + +if (!bitmap) +return ; + +atomic_inc (&bitmap->behind_writes); + bw =atomic_read (&bitmap->behind_writes); +if (bw > bitmap->behind_writes_used) + bitmap->behind_writes_used = bw; + +pr_debug ("inc write-behind count %d/%lu\n" , + bw, bitmap->mddev->bitmap_info.max_write_behind); +} + +static void bitmap_end_behind_write (struct mddev *mddev) +{ +struct bitmap *bitmap = mddev->bitmap; + +if (!bitmap) +return ; + +if (atomic_dec_and_test (&bitmap->behind_writes)) +wake_up (&bitmap->behind_wait); +pr_debug ("dec write-behind count %d/%lu\n" , +atomic_read (&bitmap->behind_writes), + bitmap->mddev->bitmap_info.max_write_behind); +} +static void bitmap_wait_behind_writes (struct mddev *mddev) {struct bitmap *bitmap = mddev->bitmap;
@@ -2981,6 +2993,9 @@ static struct bitmap_operations bitmap_o .dirty_bits = bitmap_dirty_bits, .unplug = bitmap_unplug, .daemon_work = bitmap_daemon_work, + + .start_behind_write = bitmap_start_behind_write, + .end_behind_write = bitmap_end_behind_write, .wait_behind_writes = bitmap_wait_behind_writes, .startwrite = bitmap_startwrite,
drivers/md/md-bitmap.h +5 -2
@@ -84,12 +84,15 @@ struct bitmap_operations { unsigned long e);void (*unplug)(struct mddev *mddev,bool sync);void (*daemon_work)(struct mddev *mddev); + +void (*start_behind_write)(struct mddev *mddev); +void (*end_behind_write)(struct mddev *mddev);void (*wait_behind_writes)(struct mddev *mddev);int (*startwrite)(struct mddev *mddev,sector_t offset, -unsigned long sectors,bool behind); +unsigned long sectors);void (*endwrite)(struct mddev *mddev,sector_t offset, -unsigned long sectors,bool success,bool behind); +unsigned long sectors,bool success);bool (*start_sync)(struct mddev *mddev,sector_t offset,sector_t *blocks,bool degraded);void (*end_sync)(struct mddev *mddev,sector_t offset,sector_t *blocks);
drivers/md/raid1.c +7 -5
@@ -420,10 +420,11 @@ static void close_write(struct r1bio *r1 r1_bio->behind_master_bio =NULL ; } +if (test_bit (R1BIO_BehindIO, &r1_bio->state)) + mddev->bitmap_ops->end_behind_write (mddev);/* clear the bitmap if all writes complete successfully */ mddev->bitmap_ops->endwrite (mddev, r1_bio->sector, r1_bio->sectors, - !test_bit (R1BIO_Degraded, &r1_bio->state), -test_bit (R1BIO_BehindIO, &r1_bio->state)); + !test_bit (R1BIO_Degraded, &r1_bio->state));md_write_end (mddev); }
@@ -1645,9 +1646,10 @@ static void raid1_write_request(struct m stats.behind_writes < max_write_behind)alloc_behind_master_bio (r1_bio, bio); - mddev->bitmap_ops->startwrite ( - mddev, r1_bio->sector, r1_bio->sectors, -test_bit (R1BIO_BehindIO, &r1_bio->state)); +if (test_bit (R1BIO_BehindIO, &r1_bio->state)) + mddev->bitmap_ops->start_behind_write (mddev); + mddev->bitmap_ops->startwrite (mddev, r1_bio->sector, + r1_bio->sectors); first_clone =0 ; }
drivers/md/raid10.c +2 -4
@@ -430,8 +430,7 @@ static void close_write(struct r10bio *r/* clear the bitmap if all writes complete successfully */ mddev->bitmap_ops->endwrite (mddev, r10_bio->sector, r10_bio->sectors, - !test_bit (R10BIO_Degraded, &r10_bio->state), - false); + !test_bit (R10BIO_Degraded, &r10_bio->state));md_write_end (mddev); }
@@ -1519,8 +1518,7 @@ static void raid10_write_request(structmd_account_bio (mddev, &bio); r10_bio->master_bio = bio;atomic_set (&r10_bio->remaining,1 ); - mddev->bitmap_ops->startwrite (mddev, r10_bio->sector, r10_bio->sectors, - false); + mddev->bitmap_ops->startwrite (mddev, r10_bio->sector, r10_bio->sectors);for (i =0 ; i < conf->copies; i++) {if (r10_bio->devs[i].bio)
drivers/md/raid5-cache.c +1 -2
@@ -315,8 +315,7 @@ void r5c_handle_cached_data_endio(structr5c_return_dev_pending_writes (conf, &sh->dev[i]); conf->mddev->bitmap_ops->endwrite (conf->mddev, sh->sector,RAID5_STRIPE_SECTORS (conf), - !test_bit (STRIPE_DEGRADED , &sh->state), - false); + !test_bit (STRIPE_DEGRADED , &sh->state)); } } }
drivers/md/raid5.c +5 -6
@@ -3564,7 +3564,7 @@ static void __add_stripe_bio(struct striset_bit (STRIPE_BITMAP_PENDING , &sh->state);spin_unlock_irq (&sh->stripe_lock); conf->mddev->bitmap_ops->startwrite (conf->mddev, sh->sector, -RAID5_STRIPE_SECTORS (conf), false); +RAID5_STRIPE_SECTORS (conf));spin_lock_irq (&sh->stripe_lock);clear_bit (STRIPE_BITMAP_PENDING , &sh->state);if (!sh->batch_head) {
@@ -3665,7 +3665,7 @@ handle_failed_stripe(struct r5conf *confif (bitmap_end) conf->mddev->bitmap_ops->endwrite (conf->mddev, sh->sector,RAID5_STRIPE_SECTORS (conf), - false, false); + false); bitmap_end =0 ;/* and fail all 'written' */ bi = sh->dev[i].written;
@@ -3712,7 +3712,7 @@ handle_failed_stripe(struct r5conf *confif (bitmap_end) conf->mddev->bitmap_ops->endwrite (conf->mddev, sh->sector,RAID5_STRIPE_SECTORS (conf), - false, false); + false);/* If we were in the middle of a write the parity block might * still be locked - so just clear all R5_LOCKED flags */
@@ -4063,8 +4063,7 @@ returnbi: } conf->mddev->bitmap_ops->endwrite (conf->mddev, sh->sector,RAID5_STRIPE_SECTORS (conf), - !test_bit (STRIPE_DEGRADED , &sh->state), - false); + !test_bit (STRIPE_DEGRADED , &sh->state));if (head_sh->batch_head) { sh = list_first_entry(&sh->batch_list, struct stripe_head,
@@ -5787,7 +5786,7 @@ static void make_discard_request(structfor (d =0 ; d < conf->raid_disks - conf->max_degraded; d++) mddev->bitmap_ops->startwrite (mddev, sh->sector, -RAID5_STRIPE_SECTORS (conf), false); +RAID5_STRIPE_SECTORS (conf)); sh->bm_seq = conf->seq_flush +1 ;set_bit (STRIPE_BIT_DELAY , &sh->state); }
Greg Kroah-Hartman
maintainerPATCH 574/623 md/md-bitmap: remove the last parameter for bimtap_ops->endwrite()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit 4f0e7d0e03b7b80af84759a9e7cfb0f81ac4adae upstream.
For the case that IO failed for one rdev, the bit will be mark as NEEDED in following cases:
1) If badblocks is set and rdev is not faulty;
2) If rdev is faulty;
Case 1) is useless because synchronize data to badblocks make no sense. Case 2) can be replaced with mddev->degraded.
Also remove R1BIO_Degraded, R10BIO_Degraded and STRIPE_DEGRADED since case 2) no longer use them.
--- drivers/md/md-bitmap.c | 19 ++++++++++--------- drivers/md/md-bitmap.h | 2 +- drivers/md/raid1.c | 26 +++----------------------- drivers/md/raid1.h | 1 - drivers/md/raid10.c | 23 +++-------------------- drivers/md/raid10.h | 1 - drivers/md/raid5-cache.c | 3 +-- drivers/md/raid5.c | 15 +++------------ drivers/md/raid5.h | 1 - 9 files changed, 21 insertions(+), 70 deletions(-)
drivers/md/md-bitmap.c +10 -9
@@ -1726,7 +1726,7 @@ static int bitmap_startwrite(struct mdde }static void bitmap_endwrite (struct mddev *mddev,sector_t offset, -unsigned long sectors,bool success) +unsigned long sectors) {struct bitmap *bitmap = mddev->bitmap;
@@ -1745,15 +1745,16 @@ static void bitmap_endwrite(struct mddevreturn ; } -if (success && !bitmap->mddev->degraded && - bitmap->events_cleared < bitmap->mddev->events) { - bitmap->events_cleared = bitmap->mddev->events; - bitmap->need_sync =1 ; -sysfs_notify_dirent_safe (bitmap->sysfs_can_clear); - } - -if (!success && !NEEDED (*bmc)) +if (!bitmap->mddev->degraded) { +if (bitmap->events_cleared < bitmap->mddev->events) { + bitmap->events_cleared = bitmap->mddev->events; + bitmap->need_sync =1 ; +sysfs_notify_dirent_safe ( + bitmap->sysfs_can_clear); + } + }else if (!NEEDED (*bmc)) { *bmc |=NEEDED_MASK ; + }if (COUNTER (*bmc) ==COUNTER_MAX )wake_up (&bitmap->overflow_wait);
drivers/md/md-bitmap.h +1 -1
@@ -92,7 +92,7 @@ struct bitmap_operations {int (*startwrite)(struct mddev *mddev,sector_t offset,unsigned long sectors);void (*endwrite)(struct mddev *mddev,sector_t offset, -unsigned long sectors,bool success); +unsigned long sectors);bool (*start_sync)(struct mddev *mddev,sector_t offset,sector_t *blocks,bool degraded);void (*end_sync)(struct mddev *mddev,sector_t offset,sector_t *blocks);
drivers/md/raid1.c +3 -23
@@ -423,8 +423,7 @@ static void close_write(struct r1bio *r1if (test_bit (R1BIO_BehindIO, &r1_bio->state)) mddev->bitmap_ops->end_behind_write (mddev);/* clear the bitmap if all writes complete successfully */ - mddev->bitmap_ops->endwrite (mddev, r1_bio->sector, r1_bio->sectors, - !test_bit (R1BIO_Degraded, &r1_bio->state)); + mddev->bitmap_ops->endwrite (mddev, r1_bio->sector, r1_bio->sectors);md_write_end (mddev); }
@@ -481,8 +480,6 @@ static void raid1_end_write_request(struif (!test_bit (Faulty, &rdev->flags))set_bit (R1BIO_WriteError, &r1_bio->state);else { -/* Fail the request */ -set_bit (R1BIO_Degraded, &r1_bio->state);/* Finished with this branch */ r1_bio->bios[mirror] =NULL ; to_put = bio;
@@ -1536,11 +1533,8 @@ static void raid1_write_request(struct m write_behind = true; r1_bio->bios[i] =NULL ; -if (!rdev ||test_bit (Faulty, &rdev->flags)) { -if (i < conf->raid_disks) -set_bit (R1BIO_Degraded, &r1_bio->state); +if (!rdev ||test_bit (Faulty, &rdev->flags))continue ; - }atomic_inc (&rdev->nr_pending);if (test_bit (WriteErrorSeen, &rdev->flags)) {
@@ -1559,16 +1553,6 @@ static void raid1_write_request(struct m*/ max_sectors = bad_sectors;rdev_dec_pending (rdev, mddev); -/* We don't set R1BIO_Degraded as that -* only applies if the disk is -* missing, so it might be re-added, -* and we want to know to recover this -* chunk. -* In this case the device is here, -* and the fact that this chunk is not -* in-sync is recorded in the bad -* block log -*/ continue ; }if (is_bad) {
@@ -2616,12 +2600,10 @@ static void handle_write_finished(struct* errors. */ fail = true; -if (!narrow_write_error (r1_bio, m)) { +if (!narrow_write_error (r1_bio, m))md_error (conf->mddev, conf->mirrors[m].rdev);/* an I/O failed, we can't clear the bitmap */ -set_bit (R1BIO_Degraded, &r1_bio->state); - }rdev_dec_pending (conf->mirrors[m].rdev, conf->mddev); }
@@ -2712,8 +2694,6 @@ static void raid1d(struct md_thread *thrlist_del (&r1_bio->retry_list); idx =sector_to_idx (r1_bio->sector);atomic_dec (&conf->nr_queued[idx]); -if (mddev->degraded) -set_bit (R1BIO_Degraded, &r1_bio->state);if (test_bit (R1BIO_WriteError, &r1_bio->state))close_write (r1_bio);raid_end_bio_io (r1_bio);
drivers/md/raid1.h +0 -1
@@ -188,7 +188,6 @@ struct r1bio {enum r1bio_state { R1BIO_Uptodate, R1BIO_IsSync, - R1BIO_Degraded, R1BIO_BehindIO,/* Set ReadError on bios that experience a readerror so that * raid1d knows what to do with them.
drivers/md/raid10.c +3 -20
@@ -429,8 +429,7 @@ static void close_write(struct r10bio *rstruct mddev *mddev = r10_bio->mddev;/* clear the bitmap if all writes complete successfully */ - mddev->bitmap_ops->endwrite (mddev, r10_bio->sector, r10_bio->sectors, - !test_bit (R10BIO_Degraded, &r10_bio->state)); + mddev->bitmap_ops->endwrite (mddev, r10_bio->sector, r10_bio->sectors);md_write_end (mddev); }
@@ -500,7 +499,6 @@ static void raid10_end_write_request(strset_bit (R10BIO_WriteError, &r10_bio->state); else {/* Fail the request */ -set_bit (R10BIO_Degraded, &r10_bio->state); r10_bio->devs[slot].bio =NULL ; to_put = bio; dec_rdev =1 ;
@@ -1437,10 +1435,8 @@ static void raid10_write_request(struct r10_bio->devs[i].bio =NULL ; r10_bio->devs[i].repl_bio =NULL ; -if (!rdev && !rrdev) { -set_bit (R10BIO_Degraded, &r10_bio->state); +if (!rdev && !rrdev)continue ; - }if (rdev &&test_bit (WriteErrorSeen, &rdev->flags)) {sector_t first_bad;sector_t dev_sector = r10_bio->devs[i].addr;
@@ -1457,14 +1453,6 @@ static void raid10_write_request(struct* to other devices yet */ max_sectors = bad_sectors; -/* We don't set R10BIO_Degraded as that -* only applies if the disk is missing, -* so it might be re-added, and we want to -* know to recover this chunk. -* In this case the device is here, and the -* fact that this chunk is not in-sync is -* recorded in the bad block log. -*/ continue ; }if (is_bad) {
@@ -2964,11 +2952,8 @@ static void handle_write_completed(strucrdev_dec_pending (rdev, conf->mddev); }else if (bio !=NULL && bio->bi_status) { fail = true; -if (!narrow_write_error (r10_bio, m)) { +if (!narrow_write_error (r10_bio, m))md_error (conf->mddev, rdev); -set_bit (R10BIO_Degraded, - &r10_bio->state); - }rdev_dec_pending (rdev, conf->mddev); } bio = r10_bio->devs[m].repl_bio;
@@ -3027,8 +3012,6 @@ static void raid10d(struct md_thread *th r10_bio = list_first_entry(&tmp, struct r10bio, retry_list);list_del (&r10_bio->retry_list); -if (mddev->degraded) -set_bit (R10BIO_Degraded, &r10_bio->state);if (test_bit (R10BIO_WriteError, &r10_bio->state))
drivers/md/raid10.h +0 -1
@@ -161,7 +161,6 @@ enum r10bio_state { R10BIO_IsSync, R10BIO_IsRecover, R10BIO_IsReshape, - R10BIO_Degraded,/* Set ReadError on bios that experience a read error * so that raid10d knows what to do with them. */
drivers/md/raid5-cache.c +1 -2
@@ -314,8 +314,7 @@ void r5c_handle_cached_data_endio(structset_bit (R5_UPTODATE , &sh->dev[i].flags);r5c_return_dev_pending_writes (conf, &sh->dev[i]); conf->mddev->bitmap_ops->endwrite (conf->mddev, - sh->sector,RAID5_STRIPE_SECTORS (conf), - !test_bit (STRIPE_DEGRADED , &sh->state)); + sh->sector,RAID5_STRIPE_SECTORS (conf)); } } }
drivers/md/raid5.c +3 -12
@@ -1345,8 +1345,6 @@ again:submit_bio_noacct (rbi); }if (!rdev && !rrdev) { -if (op_is_write (op)) -set_bit (STRIPE_DEGRADED , &sh->state);pr_debug ("skip op %d on disc %d for sector %llu\n" , bi->bi_opf, i, (unsigned long long )sh->sector);clear_bit (R5_LOCKED , &sh->dev[i].flags);
@@ -2884,7 +2882,6 @@ static void raid5_end_write_request(struset_bit (R5_MadeGoodRepl, &sh->dev[i].flags); }else {if (bi->bi_status) { -set_bit (STRIPE_DEGRADED , &sh->state);set_bit (WriteErrorSeen, &rdev->flags);set_bit (R5_WriteError, &sh->dev[i].flags);if (!test_and_set_bit (WantReplacement, &rdev->flags))
@@ -3664,8 +3661,7 @@ handle_failed_stripe(struct r5conf *conf }if (bitmap_end) conf->mddev->bitmap_ops->endwrite (conf->mddev, - sh->sector,RAID5_STRIPE_SECTORS (conf), - false); + sh->sector,RAID5_STRIPE_SECTORS (conf)); bitmap_end =0 ;/* and fail all 'written' */ bi = sh->dev[i].written;
@@ -3711,8 +3707,7 @@ handle_failed_stripe(struct r5conf *conf }if (bitmap_end) conf->mddev->bitmap_ops->endwrite (conf->mddev, - sh->sector,RAID5_STRIPE_SECTORS (conf), - false); + sh->sector,RAID5_STRIPE_SECTORS (conf));/* If we were in the middle of a write the parity block might * still be locked - so just clear all R5_LOCKED flags */
@@ -4062,8 +4057,7 @@ returnbi: wbi = wbi2; } conf->mddev->bitmap_ops->endwrite (conf->mddev, - sh->sector,RAID5_STRIPE_SECTORS (conf), - !test_bit (STRIPE_DEGRADED , &sh->state)); + sh->sector,RAID5_STRIPE_SECTORS (conf));if (head_sh->batch_head) { sh = list_first_entry(&sh->batch_list, struct stripe_head,
@@ -4340,7 +4334,6 @@ static void handle_parity_checks5(struct s->locked++;set_bit (R5_Wantwrite, &dev->flags); -clear_bit (STRIPE_DEGRADED , &sh->state);set_bit (STRIPE_INSYNC , &sh->state);break ;case check_state_run:
@@ -4497,7 +4490,6 @@ static void handle_parity_checks6(structclear_bit (R5_Wantwrite, &dev->flags); s->locked--; } -clear_bit (STRIPE_DEGRADED , &sh->state);set_bit (STRIPE_INSYNC , &sh->state);break ;
@@ -4899,7 +4891,6 @@ static void break_stripe_batch_list(struset_mask_bits (&sh->state, ~(STRIPE_EXPAND_SYNC_FLAGS | (1 <<STRIPE_PREREAD_ACTIVE ) | - (1 <<STRIPE_DEGRADED ) | (1 <<STRIPE_ON_UNPLUG_LIST )), head_sh->state & (1 <<STRIPE_INSYNC ));
drivers/md/raid5.h +0 -1
@@ -358,7 +358,6 @@ enum {STRIPE_REPLACED ,STRIPE_PREREAD_ACTIVE ,STRIPE_DELAYED , -STRIPE_DEGRADED ,STRIPE_BIT_DELAY ,STRIPE_EXPANDING , STRIPE_EXPAND_SOURCE,
Greg Kroah-Hartman
maintainerPATCH 575/623 md: add a new callback pers->bitmap_sector()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit 0c984a283a3ea3f10bebecd6c57c1d41b2e4f518 upstream.
This callback will be used in raid5 to convert io ranges from array to bitmap.
--- drivers/md/md.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/md/md.h +3 -0
@@ -746,6 +746,9 @@ struct md_personalityvoid *(*takeover) (struct mddev *mddev);/* Changes the consistency policy of an active array. */ int (*change_consistency_policy)(struct mddev *mddev,const char *buf); +/* convert io ranges from array to bitmap */ +void (*bitmap_sector)(struct mddev *mddev,sector_t *offset, +unsigned long *sectors); };struct md_sysfs_entry {
Greg Kroah-Hartman
maintainerPATCH 576/623 md/raid5: implement pers->bitmap_sector()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit 9c89f604476cf15c31fbbdb043cff7fbf1dbe0cb upstream.
Bitmap is used for the whole array for raid1/raid10, hence IO for the array can be used directly for bitmap. However, bitmap is used for underlying disks for raid5, hence IO for the array can't be used directly for bitmap.
Implement pers->bitmap_sector() for raid5 to convert IO ranges from the array to the underlying disks.
--- drivers/md/raid5.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
drivers/md/raid5.c +51 -0
@@ -5918,6 +5918,54 @@ static enum reshape_loc get_reshape_loc(return LOC_BEHIND_RESHAPE ; } +static void raid5_bitmap_sector (struct mddev *mddev,sector_t *offset, +unsigned long *sectors) +{ +struct r5conf *conf = mddev->private; +sector_t start = *offset; +sector_t end = start + *sectors; +sector_t prev_start = start; +sector_t prev_end = end; +int sectors_per_chunk; +enum reshape_loc loc; +int dd_idx; + + sectors_per_chunk = conf->chunk_sectors * + (conf->raid_disks - conf->max_degraded); + start =round_down (start, sectors_per_chunk); + end =round_up (end, sectors_per_chunk); + + start =raid5_compute_sector (conf, start,0 , &dd_idx,NULL ); + end =raid5_compute_sector (conf, end,0 , &dd_idx,NULL ); + +/* +* For LOC_INSIDE_RESHAPE, this IO will wait for reshape to make +* progress, hence it's the same as LOC_BEHIND_RESHAPE. +*/ + loc =get_reshape_loc (mddev, conf, prev_start); +if (likely (loc !=LOC_AHEAD_OF_RESHAPE )) { + *offset = start; + *sectors = end - start; +return ; + } + + sectors_per_chunk = conf->prev_chunk_sectors * + (conf->previous_raid_disks - conf->max_degraded); + prev_start =round_down (prev_start, sectors_per_chunk); + prev_end =round_down (prev_end, sectors_per_chunk); + + prev_start =raid5_compute_sector (conf, prev_start,1 , &dd_idx,NULL ); + prev_end =raid5_compute_sector (conf, prev_end,1 , &dd_idx,NULL ); + +/* +* for LOC_AHEAD_OF_RESHAPE, reshape can make progress before this IO +* is handled in make_stripe_request(), we can't know this here hence +* we set bits for both. +*/ + *offset =min (start, prev_start); + *sectors =max (end, prev_end) - *offset; +} +static enum stripe_result make_stripe_request (struct mddev *mddev,struct r5conf *conf,struct stripe_request_ctx *ctx,sector_t logical_sector,struct bio *bi)
@@ -8966,6 +9014,7 @@ static struct md_personality raid6_perso .takeover = raid6_takeover, .change_consistency_policy = raid5_change_consistency_policy, .prepare_suspend = raid5_prepare_suspend, + .bitmap_sector = raid5_bitmap_sector, };static struct md_personality raid5_personality = {
@@ -8991,6 +9040,7 @@ static struct md_personality raid5_perso .takeover = raid5_takeover, .change_consistency_policy = raid5_change_consistency_policy, .prepare_suspend = raid5_prepare_suspend, + .bitmap_sector = raid5_bitmap_sector, }; static struct md_personality raid4_personality =
@@ -9017,6 +9067,7 @@ static struct md_personality raid4_perso .takeover = raid4_takeover, .change_consistency_policy = raid5_change_consistency_policy, .prepare_suspend = raid5_prepare_suspend, + .bitmap_sector = raid5_bitmap_sector, };static int __init raid5_init (void )
Greg Kroah-Hartman
maintainerPATCH 577/623 md/md-bitmap: move bitmap_{start, end}write to md upper layer
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit cd5fc653381811f1e0ba65f5d169918cab61476f upstream.
There are two BUG reports that raid5 will hang at bitmap_startwrite([1],[2]), root cause is that bitmap start write and end write is unbalanced, it's not quite clear where, and while reviewing raid5 code, it's found that bitmap operations can be optimized. For example, for a 4 disks raid5, with chunksize=8k, if user issue a IO (0 + 48k) to the array:
┌────────────────────────────────────────────────────────────┐ │chunk 0 │ │ ┌────────────┬─────────────┬─────────────┬────────────┼ │ sh0 │A0: 0 + 4k │A1: 8k + 4k │A2: 16k + 4k │A3: P │ │ ┼────────────┼─────────────┼─────────────┼────────────┼ │ sh1 │B0: 4k + 4k │B1: 12k + 4k │B2: 20k + 4k │B3: P │ ┼──────┴────────────┴─────────────┴─────────────┴────────────┼ │chunk 1 │ │ ┌────────────┬─────────────┬─────────────┬────────────┤ │ sh2 │C0: 24k + 4k│C1: 32k + 4k │C2: P │C3: 40k + 4k│ │ ┼────────────┼─────────────┼─────────────┼────────────┼ │ sh3 │D0: 28k + 4k│D1: 36k + 4k │D2: P │D3: 44k + 4k│ └──────┴────────────┴─────────────┴─────────────┴────────────┘
Before this patch, 4 stripe head will be used, and each sh will attach bio for 3 disks, and each attached bio will trigger bitmap_startwrite() once, which means total 12 times.
- 3 times (0 + 4k), for (A0, A1 and A2)
- 3 times (4 + 4k), for (B0, B1 and B2)
- 3 times (8 + 4k), for (C0, C1 and C3)
- 3 times (12 + 4k), for (D0, D1 and D3)
After this patch, md upper layer will calculate that IO range (0 + 48k) is corresponding to the bitmap (0 + 16k), and call bitmap_startwrite() just once.
Noted that this patch will align bitmap ranges to the chunks, for example, if user issue a IO (0 + 4k) to array:
- Before this patch, 1 time (0 + 4k), for A0;
- After this patch, 1 time (0 + 8k) for chunk 0;
Usually, one bitmap bit will represent more than one disk chunk, and this doesn't have any difference. And even if user really created a array that one chunk contain multiple bits, the overhead is that more data will be recovered after power failure.
Also remove STRIPE_BITMAP_PENDING since it's not used anymore.
[1] https://lore.kernel.org/all/CAJpMwyjmHQLvm6zg1cmQErttNNQPDAAXPKM3xgTjMhbfts986Q@mail.gmail.com/
[2] https://lore.kernel.org/all/[email protected]/
--- drivers/md/md.c | 29 +++++++++++++++++++++++++++ drivers/md/md.h | 2 + drivers/md/raid1.c | 4 --- drivers/md/raid10.c | 3 -- drivers/md/raid5-cache.c | 2 - drivers/md/raid5.c | 50 +++++------------------------------------------ drivers/md/raid5.h | 3 -- 7 files changed, 37 insertions(+), 56 deletions(-)
drivers/md/md.c +29 -0
@@ -8745,12 +8745,32 @@ void md_submit_discard_bio(struct mddev }EXPORT_SYMBOL_GPL (md_submit_discard_bio); +static void md_bitmap_start (struct mddev *mddev, +struct md_io_clone *md_io_clone) +{ +if (mddev->pers->bitmap_sector) + mddev->pers->bitmap_sector (mddev, &md_io_clone->offset, + &md_io_clone->sectors); + + mddev->bitmap_ops->startwrite (mddev, md_io_clone->offset, + md_io_clone->sectors); +} + +static void md_bitmap_end (struct mddev *mddev,struct md_io_clone *md_io_clone) +{ + mddev->bitmap_ops->endwrite (mddev, md_io_clone->offset, + md_io_clone->sectors); +} +static void md_end_clone_io (struct bio *bio) {struct md_io_clone *md_io_clone = bio->bi_private;struct bio *orig_bio = md_io_clone->orig_bio;struct mddev *mddev = md_io_clone->mddev; +if (bio_data_dir (orig_bio) ==WRITE && mddev->bitmap) +md_bitmap_end (mddev, md_io_clone); +if (bio->bi_status && !orig_bio->bi_status) orig_bio->bi_status = bio->bi_status;
@@ -8775,6 +8795,12 @@ static void md_clone_bio(struct mddev *mif (blk_queue_io_stat (bdev->bd_disk->queue)) md_io_clone->start_time =bio_start_io_acct (*bio); +if (bio_data_dir (*bio) ==WRITE && mddev->bitmap) { + md_io_clone->offset = (*bio)->bi_iter.bi_sector; + md_io_clone->sectors =bio_sectors (*bio); +md_bitmap_start (mddev, md_io_clone); + } + clone->bi_end_io = md_end_clone_io; clone->bi_private = md_io_clone; *bio = clone;
@@ -8793,6 +8819,9 @@ void md_free_cloned_bio(struct bio *bio)struct bio *orig_bio = md_io_clone->orig_bio;struct mddev *mddev = md_io_clone->mddev; +if (bio_data_dir (orig_bio) ==WRITE && mddev->bitmap) +md_bitmap_end (mddev, md_io_clone); +if (bio->bi_status && !orig_bio->bi_status) orig_bio->bi_status = bio->bi_status;
drivers/md/md.h +2 -0
@@ -831,6 +831,8 @@ struct md_io_clone {struct mddev *mddev;struct bio *orig_bio;unsigned long start_time; +sector_t offset; +unsigned long sectors;struct bio bio_clone; };
drivers/md/raid1.c +0 -4
@@ -422,8 +422,6 @@ static void close_write(struct r1bio *r1if (test_bit (R1BIO_BehindIO, &r1_bio->state)) mddev->bitmap_ops->end_behind_write (mddev); -/* clear the bitmap if all writes complete successfully */ - mddev->bitmap_ops->endwrite (mddev, r1_bio->sector, r1_bio->sectors);md_write_end (mddev); }
@@ -1632,8 +1630,6 @@ static void raid1_write_request(struct mif (test_bit (R1BIO_BehindIO, &r1_bio->state)) mddev->bitmap_ops->start_behind_write (mddev); - mddev->bitmap_ops->startwrite (mddev, r1_bio->sector, - r1_bio->sectors); first_clone =0 ; }
drivers/md/raid10.c +0 -3
@@ -428,8 +428,6 @@ static void close_write(struct r10bio *r {struct mddev *mddev = r10_bio->mddev; -/* clear the bitmap if all writes complete successfully */ - mddev->bitmap_ops->endwrite (mddev, r10_bio->sector, r10_bio->sectors);md_write_end (mddev); }
@@ -1506,7 +1504,6 @@ static void raid10_write_request(structmd_account_bio (mddev, &bio); r10_bio->master_bio = bio;atomic_set (&r10_bio->remaining,1 ); - mddev->bitmap_ops->startwrite (mddev, r10_bio->sector, r10_bio->sectors);for (i =0 ; i < conf->copies; i++) {if (r10_bio->devs[i].bio)
drivers/md/raid5-cache.c +0 -2
@@ -313,8 +313,6 @@ void r5c_handle_cached_data_endio(structif (sh->dev[i].written) {set_bit (R5_UPTODATE , &sh->dev[i].flags);r5c_return_dev_pending_writes (conf, &sh->dev[i]); - conf->mddev->bitmap_ops->endwrite (conf->mddev, - sh->sector,RAID5_STRIPE_SECTORS (conf)); } } }
drivers/md/raid5.c +6 -44
110 lines not on this page · raw message
drivers/md/raid5.h +0 -3
@@ -371,9 +371,6 @@ enum {STRIPE_ON_RELEASE_LIST ,STRIPE_BATCH_READY ,STRIPE_BATCH_ERR , -STRIPE_BITMAP_PENDING ,/* Being added to bitmap, don't add -* to batch yet. -*/ STRIPE_LOG_TRAPPED, /* trapped into log (see raid5-cache.c)* this bit is used in two scenarios: *
Greg Kroah-Hartman
maintainerPATCH 578/623 Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages"
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 966a675da844f1a764bb44557c21561cc3d09840 upstream.
I noticed that a handful of NFSv3 fstests were taking an unexpectedly long time to run. Troubleshooting showed that the server's TCP window closed and never re-opened, which caused the client to trigger an RPC retransmit timeout after 180 seconds.
The client's recovery action was to establish a fresh connection and retransmit the timed-out requests. This worked, but it adds a long delay.
I tracked the problem to the commit that attempted to reduce the rate at which the network layer delivers TCP socket data_ready callbacks. Under most circumstances this change worked as expected, but for NFSv3, which has no session or other type of throttling, it can overwhelm the receiver on occasion.
I'm sure I could tweak the lowat settings, but the small benefit doesn't seem worth the bother. Just revert it.
--- net/sunrpc/svcsock.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
net/sunrpc/svcsock.c +1 -11
@@ -1083,9 +1083,6 @@ static void svc_tcp_fragment_received(st/* If we have more data, signal svc_xprt_enqueue() to try again */ svsk->sk_tcplen =0 ; svsk->sk_marker = xdr_zero; - -smp_wmb (); -tcp_set_rcvlowat (svsk->sk_sk,1 ); }/**
@@ -1175,17 +1172,10 @@ err_incomplete: goto err_delete;if (len == want)svc_tcp_fragment_received (svsk); -else { -/* Avoid more ->sk_data_ready() calls until the rest -* of the message has arrived. This reduces service -* thread wake-ups on large incoming messages. */ -tcp_set_rcvlowat (svsk->sk_sk, -svc_sock_reclen (svsk) - svsk->sk_tcplen); - +else trace_svcsock_tcp_recv_short (&svsk->sk_xprt,svc_sock_reclen (svsk), svsk->sk_tcplen -sizeof (rpc_fraghdr)); - } goto err_noclose; error:if (len != -EAGAIN )
Greg Kroah-Hartman
maintainerPATCH 579/623 netfilter: nf_tables: reject mismatching sum of field_len with set key length
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
commit 1b9335a8000fb70742f7db10af314104b6ace220 upstream.
The field length description provides the length of each separated key field in the concatenation, each field gets rounded up to 32-bits to calculate the pipapo rule width from pipapo_init(). The set key length provides the total size of the key aligned to 32-bits.
Register-based arithmetics still allows for combining mismatching set key length and field length description, eg. set key length 10 and field description [ 5, 4 ] leading to pipapo width of 12.
--- net/netfilter/nf_tables_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/netfilter/nf_tables_api.c +4 -4
@@ -5074,7 +5074,7 @@ static int nft_set_desc_concat_parse(constatic int nft_set_desc_concat (struct nft_set_desc *desc,const struct nlattr *nla) { -u32 num_regs =0 , key_num_regs =0 ; +u32 len =0 , num_regs;struct nlattr *attr;int rem, err, i;
@@ -5088,12 +5088,12 @@ static int nft_set_desc_concat(struct nf }for (i =0 ; i < desc->field_count; i++) - num_regs +=DIV_ROUND_UP (desc->field_len[i],sizeof (u32)); + len +=round_up (desc->field_len[i],sizeof (u32)); - key_num_regs =DIV_ROUND_UP (desc->klen,sizeof (u32)); -if (key_num_regs != num_regs) +if (len != desc->klen)return -EINVAL ; + num_regs =DIV_ROUND_UP (desc->klen,sizeof (u32));if (num_regs >NFT_REG32_COUNT )return -E2BIG ;
Greg Kroah-Hartman
maintainerPATCH 580/623 selftests/rseq: Fix handling of glibc without rseq support
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathieu Desnoyers <[email protected]>
commit 336d02bc4c6bec5c3d933e5d470a94970f830957 upstream.
When porting librseq commit:
commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection")
from librseq to the kernel selftests, the following line was missed at the end of rseq_init():
rseq_size = get_rseq_kernel_feature_size();
which effectively leaves rseq_size initialized to -1U when glibc does not have rseq support. glibc supports rseq from version 2.35 onwards.
In a following librseq commit
commit c67d198627c2 ("Only set 'rseq_size' on first thread registration")
to mimic the libc behavior, a new approach is taken: don't set the feature size in 'rseq_size' until at least one thread has successfully registered. This allows using 'rseq_size' in fast-paths to test for both registration status and available features. The caveat is that on libc either all threads are registered or none are, while with bare librseq it is the responsability of the user to register all threads using rseq.
This combines the changes from the following librseq git commits:
commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection") commit c67d198627c2 ("Only set 'rseq_size' on first thread registration")
--- tools/testing/selftests/rseq/rseq.c | 32 +++++++++++++++++++++++++------- tools/testing/selftests/rseq/rseq.h | 9 ++++++++- 2 files changed, 33 insertions(+), 8 deletions(-)
tools/testing/selftests/rseq/rseq.c +25 -7
@@ -61,7 +61,6 @@ unsigned int rseq_size = -1U;unsigned int rseq_flags;static int rseq_ownership; -static int rseq_reg_success;/* At least one rseq registration has succeded. */ /* Allocate a large area for the TLS. */ #define RSEQ_THREAD_AREA_ALLOC_SIZE 1024
@@ -152,14 +151,27 @@ int rseq_register_current_thread(void) } rc =sys_rseq (&__rseq_abi,get_rseq_min_alloc_size (),0 ,RSEQ_SIG );if (rc) { -if (RSEQ_READ_ONCE (rseq_reg_success)) { +/* +* After at least one thread has registered successfully +* (rseq_size > 0), the registration of other threads should +* never fail. +*/ +if (RSEQ_READ_ONCE (rseq_size) >0 ) {/* Incoherent success/failure within process. */ abort (); }return -1 ; }assert (rseq_current_cpu_raw () >=0 ); -RSEQ_WRITE_ONCE (rseq_reg_success,1 ); + +/* +* The first thread to register sets the rseq_size to mimic the libc +* behavior. +*/ +if (RSEQ_READ_ONCE (rseq_size) ==0 ) { +RSEQ_WRITE_ONCE (rseq_size,get_rseq_kernel_feature_size ()); + } +return 0 ; }
@@ -235,12 +247,18 @@ void rseq_init(void)return ; } rseq_ownership =1 ; -if (!rseq_available ()) { - rseq_size =0 ; -return ; - } + +/* Calculate the offset of the rseq area from the thread pointer. */ rseq_offset = (void *)&__rseq_abi -rseq_thread_pointer (); + +/* rseq flags are deprecated, always set to 0. */ rseq_flags =0 ; + +/* +* Set the size to 0 until at least one thread registers to mimic the +* libc behavior. +*/ + rseq_size =0 ; } static __attribute__((destructor))
tools/testing/selftests/rseq/rseq.h +8 -1
@@ -60,7 +60,14 @@extern ptrdiff_t rseq_offset;/* -* Size of the registered rseq area. 0 if the registration was +* The rseq ABI is composed of extensible feature fields. The extensions +* are done by appending additional fields at the end of the structure. +* The rseq_size defines the size of the active feature set which can be +* used by the application for the current rseq registration. Features +* starting at offset >= rseq_size are inactive and should not be used. +* +* The rseq_size is the intersection between the available allocation +* size for the rseq area and the feature size supported by the kernel. * unsuccessful. */ extern unsigned int rseq_size;
Greg Kroah-Hartman
maintainerPATCH 581/623 selftests/ftrace: Fix to use remount when testing mount GID option
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu (Google) <[email protected]>
commit 159ca65c42d90d5ab98fc31b708b12c0be2c26e0 upstream.
Fix mount_options.tc to use remount option to mount the tracefs. Since the current implementation does not umount the tracefs, this test always fails because of -EBUSY error.
Using remount option will allow us to change the mount option.
--- tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc +4 -4
@@ -15,11 +15,11 @@ find_alternate_gid() { tac /etc/group | grep -v ":$original_gid:" | head -1 | cut -d: -f3 } -mount_tracefs_with_options() { +remount_tracefs_with_options() { local mount_point="$1" local options="$2" - mount -t tracefs -o "$options" nodev "$mount_point" + mount -t tracefs -o "remount,$options" nodev "$mount_point" setup }
@@ -81,7 +81,7 @@ test_gid_mount_option() { # Unmount existing tracefs instance and mount with new GID unmount_tracefs "$mount_point" - mount_tracefs_with_options "$mount_point" "$new_options" + remount_tracefs_with_options "$mount_point" "$new_options" check_gid "$mount_point" "$other_group"
@@ -92,7 +92,7 @@ test_gid_mount_option() { # Unmount and remount with the original GID unmount_tracefs "$mount_point" - mount_tracefs_with_options "$mount_point" "$mount_options" + remount_tracefs_with_options "$mount_point" "$mount_options" check_gid "$mount_point" "$original_group" }
Greg Kroah-Hartman
maintainerPATCH 582/623 ktest.pl: Check kernelrelease return in get_version
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo B. Marliere <[email protected]>
commit a4e17a8f239a545c463f8ec27db4ed6e74b31841 upstream.
In the case of a test that uses the special option ${KERNEL_VERSION} in one of its settings but has no configuration available in ${OUTPUT_DIR}, for example if it's a new empty directory, then the make kernelrelease call will fail and the subroutine will chomp an empty string, silently. Fix that by adding an empty configuration and retrying.
--- tools/testing/ktest/ktest.pl | 5 +++++ 1 file changed, 5 insertions(+)
tools/testing/ktest/ktest.pl +5 -0
@@ -2419,6 +2419,11 @@ sub get_version { return if ($have_version); doprint "$make kernelrelease ... "; $version = `$make -s kernelrelease | tail -1`; + if (!length($version)) { + run_command "$make allnoconfig" or return 0; + doprint "$make kernelrelease ... "; + $version = `$make -s kernelrelease | tail -1`; + } chomp($version); doprint "$version\n"; $have_version = 1;
Greg Kroah-Hartman
maintainerPATCH 583/623 xfs: check for dead buffers in xfs_buf_find_insert
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
commit 07eae0fa67ca4bbb199ad85645e0f9dfaef931cd upstream.
Commit 32dd4f9c506b ("xfs: remove a superflous hash lookup when inserting new buffers") converted xfs_buf_find_insert to use rhashtable_lookup_get_insert_fast and thus an operation that returns the existing buffer when an insert would duplicate the hash key. But this code path misses the check for a buffer with a reference count of zero, which could lead to reusing an about to be freed buffer. Fix this by using the same atomic_inc_not_zero pattern as xfs_buf_insert.
--- fs/xfs/xfs_buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/xfs/xfs_buf.c +1 -2
@@ -663,9 +663,8 @@ xfs_buf_find_insert(spin_unlock (&bch->bc_lock); goto out_free_buf; } -if (bp) { +if (bp &&atomic_inc_not_zero (&bp->b_hold)) {/* found an existing buffer */ -atomic_inc (&bp->b_hold);spin_unlock (&bch->bc_lock); error =xfs_buf_find_lock (bp, flags);if (error)
Greg Kroah-Hartman
maintainerPATCH 584/623 xfs: fix mount hang during primary superblock recovery failure
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Long Li <[email protected]>
commit efebe42d95fbba91dca6e3e32cb9e0612eb56de5 upstream.
When mounting an image containing a log with sb modifications that require log replay, the mount process hang all the time and stack as follows:
[root@localhost ~]# cat /proc/557/stack
[<0>] xfs_buftarg_wait+0x31/0x70 [<0>] xfs_buftarg_drain+0x54/0x350 [<0>] xfs_mountfs+0x66e/0xe80 [<0>] xfs_fs_fill_super+0x7f1/0xec0 [<0>] get_tree_bdev_flags+0x186/0x280 [<0>] get_tree_bdev+0x18/0x30 [<0>] xfs_fs_get_tree+0x1d/0x30 [<0>] vfs_get_tree+0x2d/0x110 [<0>] path_mount+0xb59/0xfc0 [<0>] do_mount+0x92/0xc0 [<0>] __x64_sys_mount+0xc2/0x160 [<0>] x64_sys_call+0x2de4/0x45c0 [<0>] do_syscall_64+0xa7/0x240 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
During log recovery, while updating the in-memory superblock from the primary SB buffer, if an error is encountered, such as superblock corruption occurs or some other reasons, we will proceed to out_release and release the xfs_buf. However, this is insufficient because the xfs_buf's log item has already been initialized and the xfs_buf is held by the buffer log item as follows, the xfs_buf will not be released, causing the mount thread to hang.
xlog_recover_do_primary_sb_buffer
xlog_recover_do_reg_buffer
xlog_recover_validate_buf_type
xfs_buf_item_init(bp, mp)
The solution is straightforward, we simply need to allow it to be handled by the normal buffer write process. The filesystem will be shutdown before the submission of buffer_list in xlog_do_recovery_pass(), ensuring the correct release of the xfs_buf as follows:
xlog_do_recovery_pass
error = xlog_recover_process
xlog_recover_process_data
xlog_recover_process_ophdr
xlog_recovery_process_trans
...
xlog_recover_buf_commit_pass2
error = xlog_recover_do_primary_sb_buffer
//Encounter error and return
if (error)
goto out_writebuf
...
out_writebuf:
xfs_buf_delwri_queue(bp, buffer_list) //add bp to list
return error
...
if (!list_empty(&buffer_list))
if (error)
xlog_force_shutdown(log, SHUTDOWN_LOG_IO_ERROR); //shutdown first
xfs_buf_delwri_submit(&buffer_list); //submit buffers in list
__xfs_buf_submit
if (bp->b_mount->m_log && xlog_is_shutdown(bp->b_mount->m_log))
xfs_buf_ioend_fail(bp) //release bp correctly--- fs/xfs/xfs_buf_item_recover.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
fs/xfs/xfs_buf_item_recover.c +10 -1
@@ -1079,7 +1079,7 @@ xlog_recover_buf_commit_pass2( error =xlog_recover_do_primary_sb_buffer (mp, item, bp, buf_f, current_lsn);if (error) - goto out_release; + goto out_writebuf;/* Update the rt superblock if we have one. */ if (xfs_has_rtsb (mp) && mp->m_rtsb_bp) {
@@ -1097,6 +1097,15 @@ xlog_recover_buf_commit_pass2( }/* +* Buffer held by buf log item during 'normal' buffer recovery must +* be committed through buffer I/O submission path to ensure proper +* release. When error occurs during sb buffer recovery, log shutdown +* will be done before submitting buffer list so that buffers can be +* released correctly through ioend failure path. +*/ +out_writebuf: + +/* * Perform delayed write on the buffer. Asynchronous writes will be * slower when taking into account all the buffers to be flushed. *
Greg Kroah-Hartman
maintainerPATCH 585/623 xfs: dont over-report free space or inodes in statvfs
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darrick J. Wong <[email protected]>
commit 4b8d867ca6e2fc6d152f629fdaf027053b81765a upstream.
Emmanual Florac reports a strange occurrence when project quota limits are enabled, free space is lower than the remaining quota, and someone runs statvfs:
# mkfs.xfs -f /dev/sda # mount /dev/sda /mnt -o prjquota # xfs_quota -x -c 'limit -p bhard=2G 55' /mnt # mkdir /mnt/dir # xfs_io -c 'chproj 55' -c 'chattr +P' -c 'stat -vvvv' /mnt/dir # fallocate -l 19g /mnt/a # df /mnt /mnt/dir Filesystem Size Used Avail Use% Mounted on /dev/sda 20G 20G 345M 99% /mnt /dev/sda 2.0G 0 2.0G 0% /mnt
I think the bug here is that xfs_fill_statvfs_from_dquot unconditionally assigns to f_bfree without checking that the filesystem has enough free space to fill the remaining project quota. However, this is a longstanding behavior of xfs so it's unclear what to do here.
--- fs/xfs/xfs_qm_bhv.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-)
fs/xfs/xfs_qm_bhv.c +17 -10
@@ -32,21 +32,28 @@ xfs_fill_statvfs_from_dquot( limit = blkres->softlimit ? blkres->softlimit : blkres->hardlimit; -if (limit && statp->f_blocks > limit) { - statp->f_blocks = limit; - statp->f_bfree = statp->f_bavail = - (statp->f_blocks > blkres->reserved) ? - (statp->f_blocks - blkres->reserved) :0 ; +if (limit) { +uint64_t remaining =0 ; + +if (limit > blkres->reserved) + remaining = limit - blkres->reserved; + + statp->f_blocks =min (statp->f_blocks, limit); + statp->f_bfree =min (statp->f_bfree, remaining); + statp->f_bavail =min (statp->f_bavail, remaining); } limit = dqp->q_ino.softlimit ? dqp->q_ino.softlimit : dqp->q_ino.hardlimit; -if (limit && statp->f_files > limit) { - statp->f_files = limit; - statp->f_ffree = - (statp->f_files > dqp->q_ino.reserved) ? - (statp->f_files - dqp->q_ino.reserved) :0 ; +if (limit) { +uint64_t remaining =0 ; + +if (limit > dqp->q_ino.reserved) + remaining = limit - dqp->q_ino.reserved; + + statp->f_files =min (statp->f_files, limit); + statp->f_ffree =min (statp->f_ffree, remaining); } }
Greg Kroah-Hartman
maintainerPATCH 586/623 xfs: release the dquot buf outside of qli_lock
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darrick J. Wong <[email protected]>
commit 1aacd3fac248902ea1f7607f2d12b93929a4833b upstream.
Lai Yi reported a lockdep complaint about circular locking:
Chain exists of: &lp->qli_lock --> &bch->bc_lock --> &l->lock Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&l->lock);
lock(&bch->bc_lock);
lock(&l->lock); lock(&lp->qli_lock);
I /think/ the problem here is that xfs_dquot_attach_buf during quotacheck will release the buffer while it's holding the qli_lock. Because this is a cached buffer, xfs_buf_rele_cached takes b_lock before decrementing b_hold. Other threads have taught lockdep that a locking dependency chain is bp->b_lock -> bch->bc_lock -> l(ru)->lock; and that another chain is l(ru)->lock -> lp->qli_lock. Hence we do not want to take b_lock while holding qli_lock.
--- fs/xfs/xfs_dquot.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
fs/xfs/xfs_dquot.c +8 -4
@@ -1316,7 +1316,8 @@ out_abort:/* * Attach a dquot buffer to this dquot to avoid allocating a buffer during a -* dqflush, since dqflush can be called from reclaim context. +* dqflush, since dqflush can be called from reclaim context. Caller must hold +* the dqlock. */ int xfs_dquot_attach_buf(
@@ -1337,13 +1338,16 @@ xfs_dquot_attach_buf(return error;/* -* Attach the dquot to the buffer so that the AIL does not have -* to read the dquot buffer to push this item. +* Hold the dquot buffer so that we retain our ref to it after +* detaching it from the transaction, then give that ref to the +* dquot log item so that the AIL does not have to read the +* dquot buffer to push this item. */ xfs_buf_hold (bp); +xfs_trans_brelse (tp, bp); +spin_lock (&qlip->qli_lock); lip->li_buf = bp; -xfs_trans_brelse (tp, bp); } qlip->qli_dirty = true;spin_unlock (&qlip->qli_lock);
Greg Kroah-Hartman
maintainerPATCH 587/623 xfs: dont shut down the filesystem for media failures beyond end of log
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darrick J. Wong <[email protected]>
commit f4ed93037966aea07ae6b10ab208976783d24e2e upstream.
If the filesystem has an external log device on pmem and the pmem reports a media error beyond the end of the log area, don't shut down the filesystem because we don't use that space.
--- fs/xfs/xfs_notify_failure.c | 121 +++++++++++++++++++++++++++++--------------- 1 file changed, 82 insertions(+), 39 deletions(-)
fs/xfs/xfs_notify_failure.c +82 -39
@@ -154,6 +154,79 @@ xfs_dax_notify_failure_thaw( }static int +xfs_dax_translate_range ( +struct xfs_buftarg *btp, +u64 offset, +u64 len, +xfs_daddr_t *daddr, +uint64_t *bblen) +{ +u64 dev_start = btp->bt_dax_part_off; +u64 dev_len =bdev_nr_bytes (btp->bt_bdev); +u64 dev_end = dev_start + dev_len -1 ; + +/* Notify failure on the whole device. */ +if (offset ==0 && len ==U64_MAX ) { + offset = dev_start; + len = dev_len; + } + +/* Ignore the range out of filesystem area */ +if (offset + len -1 < dev_start) +return -ENXIO ; +if (offset > dev_end) +return -ENXIO ; + +/* Calculate the real range when it touches the boundary */ +if (offset > dev_start) + offset -= dev_start; +else { + len -= dev_start - offset; + offset =0 ; + } +if (offset + len -1 > dev_end) + len = dev_end - offset +1 ; + + *daddr =BTOBB (offset); + *bblen =BTOBB (len); +return 0 ; +} + +static int +xfs_dax_notify_logdev_failure ( +struct xfs_mount *mp, +u64 offset, +u64 len, +int mf_flags) +{ +xfs_daddr_t daddr; +uint64_t bblen; +int error; + +/* +* Return ENXIO instead of shutting down the filesystem if the failed +* region is beyond the end of the log. +*/ + error =xfs_dax_translate_range (mp->m_logdev_targp, + offset, len, &daddr, &bblen); +if (error) +return error; + +/* +* In the pre-remove case the failure notification is attempting to +* trigger a force unmount. The expectation is that the device is +* still present, but its removal is in progress and can not be +* cancelled, proceed with accessing the log device. +*/ +if (mf_flags &MF_MEM_PRE_REMOVE ) +return 0 ; + +xfs_err (mp,"ondisk log corrupt, shutting down fs!" ); +xfs_force_shutdown (mp,SHUTDOWN_CORRUPT_ONDISK ); +return -EFSCORRUPTED ; +} + +static int xfs_dax_notify_ddev_failure( struct xfs_mount *mp, xfs_daddr_t daddr,
@@ -263,8 +336,9 @@ xfs_dax_notify_failure( int mf_flags) {struct xfs_mount *mp =dax_holder (dax_dev); -u64 ddev_start; -u64 ddev_end; +xfs_daddr_t daddr; +uint64_t bblen; +int error;if (!(mp->m_super->s_flags &SB_BORN )) {xfs_warn (mp,"filesystem is not ready for notify_failure()!" );
@@ -279,17 +353,7 @@ xfs_dax_notify_failure(if (mp->m_logdev_targp && mp->m_logdev_targp->bt_daxdev == dax_dev && mp->m_logdev_targp != mp->m_ddev_targp) { -/* -* In the pre-remove case the failure notification is attempting -* to trigger a force unmount. The expectation is that the -* device is still present, but its removal is in progress and -* can not be cancelled, proceed with accessing the log device. -*/ -if (mf_flags &MF_MEM_PRE_REMOVE ) -return 0 ; -xfs_err (mp,"ondisk log corrupt, shutting down fs!" ); -xfs_force_shutdown (mp,SHUTDOWN_CORRUPT_ONDISK ); -return -EFSCORRUPTED ; +return xfs_dax_notify_logdev_failure (mp, offset, len, mf_flags); }if (!xfs_has_rmapbt (mp)) {
@@ -297,33 +361,12 @@ xfs_dax_notify_failure(return -EOPNOTSUPP ; } - ddev_start = mp->m_ddev_targp->bt_dax_part_off; - ddev_end = ddev_start +bdev_nr_bytes (mp->m_ddev_targp->bt_bdev) -1 ; - -/* Notify failure on the whole device. */ -if (offset ==0 && len ==U64_MAX ) { - offset = ddev_start; - len =bdev_nr_bytes (mp->m_ddev_targp->bt_bdev); - } - -/* Ignore the range out of filesystem area */ -if (offset + len -1 < ddev_start) -return -ENXIO ; -if (offset > ddev_end) -return -ENXIO ; - -/* Calculate the real range when it touches the boundary */ -if (offset > ddev_start) - offset -= ddev_start; -else { - len -= ddev_start - offset; - offset =0 ; - } -if (offset + len -1 > ddev_end) - len = ddev_end - offset +1 ; + error =xfs_dax_translate_range (mp->m_ddev_targp, offset, len, &daddr, + &bblen); +if (error) +return error; -return xfs_dax_notify_ddev_failure (mp,BTOBB (offset),BTOBB (len), - mf_flags); +return xfs_dax_notify_ddev_failure (mp, daddr, bblen, mf_flags); }const struct dax_holder_operations xfs_dax_holder_operations = {
Greg Kroah-Hartman
maintainerPATCH 588/623 ALSA: usb-audio: Add delay quirk for iBasso DC07 Pro
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lianqin Hu <[email protected]>
commit d85fc52cbb9a719c8335d93a28d6a79d7acd419f upstream.
Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem.
usb 1-1: New USB device found, idVendor=2fc6, idProduct=f0b7 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: iBasso DC07 Pro
usb 1-1: Manufacturer: iBasso
usb 1-1: SerialNumber: CTUA171130B
--- sound/usb/quirks.c | 2 ++ 1 file changed, 2 insertions(+)
sound/usb/quirks.c +2 -0
@@ -2343,6 +2343,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_CTL_MSG_DELAY_1M),DEVICE_FLG (0x2d95 ,0x8021 ,/* VIVO USB-C-XE710 HEADSET */ QUIRK_FLAG_CTL_MSG_DELAY_1M ), +DEVICE_FLG (0x2fc6 ,0xf0b7 ,/* iBasso DC07 Pro */ +QUIRK_FLAG_CTL_MSG_DELAY_1M ),DEVICE_FLG (0x30be ,0x0101 ,/* Schiit Hel */ QUIRK_FLAG_IGNORE_CTL_ERROR ), DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */
Greg Kroah-Hartman
maintainerPATCH 589/623 net: usb: rtl8150: enable basic endpoint checking
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Zhandarovich <[email protected]>
commit 90b7f2961798793275b4844348619b622f983907 upstream.
Syzkaller reports [1] encountering a common issue of utilizing a wrong usb endpoint type during URB submitting stage. This, in turn, triggers a warning shown below.
For now, enable simple endpoint checking (specifically, bulk and interrupt eps, testing control one is not essential) to mitigate the issue with a view to do other related cosmetic changes later, if they are necessary.
[1] Syzkaller report:
usb 1-1: BOGUS urb xfer, pipe 3 != type 1
WARNING: CPU: 1 PID: 2586 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 driv> Modules linked in: CPU: 1 UID: 0 PID: 2586 Comm: dhcpcd Not tainted 6.11.0-rc4-syzkaller-00069-gfc88bb11617> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Code: 84 3c 02 00 00 e8 05 e4 fc fc 4c 89 ef e8 fd 25 d7 fe 45 89 e0 89 e9 4c 89 f2 48 8> RSP: 0018:ffffc9000441f740 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888112487a00 RCX: ffffffff811a99a9 RDX: ffff88810df6ba80 RSI: ffffffff811a99b6 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffff8881023bf0a8 R14: ffff888112452a20 R15: ffff888112487a7c FS: 00007fc04eea5740(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0a1de9f870 CR3: 000000010dbd0000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rtl8150_open+0x300/0xe30 drivers/net/usb/rtl8150.c:733 __dev_open+0x2d4/0x4e0 net/core/dev.c:1474 __dev_change_flags+0x561/0x720 net/core/dev.c:8838 dev_change_flags+0x8f/0x160 net/core/dev.c:8910 devinet_ioctl+0x127a/0x1f10 net/ipv4/devinet.c:1177 inet_ioctl+0x3aa/0x3f0 net/ipv4/af_inet.c:1003 sock_do_ioctl+0x116/0x280 net/socket.c:1222 sock_ioctl+0x22e/0x6c0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc04ef73d49
...
This change has not been tested on real hardware.
--- drivers/net/usb/rtl8150.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/net/usb/rtl8150.c +22 -0
@@ -71,6 +71,14 @@#define MSR_SPEED (1<<3)#define MSR_LINK (1<<2) +/* USB endpoints */ +enum rtl8150_usb_ep { +RTL8150_USB_EP_CONTROL =0 , +RTL8150_USB_EP_BULK_IN =1 , +RTL8150_USB_EP_BULK_OUT =2 , +RTL8150_USB_EP_INT_IN =3 , +}; +/* Interrupt pipe data */ #define INT_TSR 0x00#define INT_RSR 0x01
@@ -867,6 +875,13 @@ static int rtl8150_probe(struct usb_intestruct usb_device *udev =interface_to_usbdev (intf);rtl8150_t *dev;struct net_device *netdev; +static const u8 bulk_ep_addr[] = { +RTL8150_USB_EP_BULK_IN |USB_DIR_IN , +RTL8150_USB_EP_BULK_OUT |USB_DIR_OUT , +0 }; +static const u8 int_ep_addr[] = { +RTL8150_USB_EP_INT_IN |USB_DIR_IN , +0 }; netdev =alloc_etherdev (sizeof (rtl8150_t));if (!netdev)
@@ -880,6 +895,13 @@ static int rtl8150_probe(struct usb_intereturn -ENOMEM ; } +/* Verify that all required endpoints are present */ +if (!usb_check_bulk_endpoints (intf, bulk_ep_addr) || + !usb_check_int_endpoints (intf, int_ep_addr)) { +dev_err (&intf->dev,"couldn't find required endpoints\n" ); + goto out; + } +tasklet_setup (&dev->tl, rx_fixup);spin_lock_init (&dev->rx_pool_lock);
Greg Kroah-Hartman
maintainerPATCH 590/623 usb: xhci: Fix NULL pointer dereference on certain command aborts
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Pecio <[email protected]>
commit 1e0a19912adb68a4b2b74fd77001c96cd83eb073 upstream.
If a command is queued to the final usable TRB of a ring segment, the enqueue pointer is advanced to the subsequent link TRB and no further. If the command is later aborted, when the abort completion is handled the dequeue pointer is advanced to the first TRB of the next segment.
If no further commands are queued, xhci_handle_stopped_cmd_ring() sees the ring pointers unequal and assumes that there is a pending command, so it calls xhci_mod_cmd_timer() which crashes if cur_cmd was NULL.
Don't attempt timer setup if cur_cmd is NULL. The subsequent doorbell ring likely is unnecessary too, but it's harmless. Leave it alone.
This is probably Bug 219532, but no confirmation has been received.
The issue has been independently reproduced and confirmed fixed using a USB MCU programmed to NAK the Status stage of SET_ADDRESS forever. Everything continued working normally after several prevented crashes.
--- drivers/usb/host/xhci-ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-ring.c +2 -1
@@ -422,7 +422,8 @@ static void xhci_handle_stopped_cmd_ringif ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) && !(xhci->xhc_state &XHCI_STATE_DYING )) { xhci->current_cmd = cur_cmd; -xhci_mod_cmd_timer (xhci); +if (cur_cmd) +xhci_mod_cmd_timer (xhci);xhci_ring_cmd_db (xhci); } }
Greg Kroah-Hartman
maintainerPATCH 591/623 drivers/card_reader/rtsx_usb: Restore interrupt based detection
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Rhodes <[email protected]>
commit 235b630eda072d7e7b102ab346d6b8a2c028a772 upstream.
This commit reintroduces interrupt-based card detection previously used in the rts5139 driver. This functionality was removed in commit 00d8521dcd23 ("staging: remove rts5139 driver code").
Reintroducing this mechanism fixes presence detection for certain card readers, which with the current driver, will taken approximately 20 seconds to enter S3 as mmc_rescan has to be frozen.
--- drivers/misc/cardreader/rtsx_usb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/misc/cardreader/rtsx_usb.c +15 -0
@@ -286,6 +286,7 @@ static int rtsx_usb_get_status_with_bulkint rtsx_usb_get_card_status (struct rtsx_ucr *ucr,u16 *status) {int ret; +u8 interrupt_val =0 ;u16 *buf;if (!status)
@@ -308,6 +309,20 @@ int rtsx_usb_get_card_status(struct rtsx ret =rtsx_usb_get_status_with_bulk (ucr, status); } +rtsx_usb_read_register (ucr,CARD_INT_PEND , &interrupt_val); +/* Cross check presence with interrupts */ +if (*status &XD_CD ) +if (!(interrupt_val &XD_INT )) + *status &= ~XD_CD ; + +if (*status &SD_CD ) +if (!(interrupt_val &SD_INT )) + *status &= ~SD_CD ; + +if (*status &MS_CD ) +if (!(interrupt_val &MS_INT )) + *status &= ~MS_CD ; +/* usb_control_msg may return positive when success */ if (ret <0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 592/623 usb: gadget: f_tcm: Fix Get/SetInterface return value
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thinh Nguyen <[email protected]>
commit 3b997089903b909684114aca6f79d683e5c64a0e upstream.
Check to make sure that the GetInterface and SetInterface are for valid interface. Return proper alternate setting number on GetInterface.
--- drivers/usb/gadget/function/f_tcm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/usb/gadget/function/f_tcm.c +10 -2
@@ -2051,9 +2051,14 @@ static void tcm_delayed_set_alt(struct wstatic int tcm_get_alt (struct usb_function *f,unsigned intf) { -if (intf == bot_intf_desc.bInterfaceNumber) +struct f_uas *fu =to_f_uas (f); + +if (fu->iface != intf) +return -EOPNOTSUPP ; + +if (fu->flags &USBG_IS_BOT )return USB_G_ALT_INT_BBB ; -if (intf == uasp_intf_desc.bInterfaceNumber) +else if (fu->flags &USBG_IS_UAS )return USB_G_ALT_INT_UAS ;return -EOPNOTSUPP ;
@@ -2063,6 +2068,9 @@ static int tcm_set_alt(struct usb_functi {struct f_uas *fu =to_f_uas (f); +if (fu->iface != intf) +return -EOPNOTSUPP ; +if ((alt ==USB_G_ALT_INT_BBB ) || (alt ==USB_G_ALT_INT_UAS )) {struct guas_setup_wq *work;
Greg Kroah-Hartman
maintainerPATCH 593/623 usb: dwc3-am62: Fix an OF node leak in phy_syscon_pll_refclk()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joe Hattori <[email protected]>
commit a266462b937beba065e934a563efe13dd246a164 upstream.
phy_syscon_pll_refclk() leaks an OF node obtained by of_parse_phandle_with_fixed_args(), thus add an of_node_put() call.
--- drivers/usb/dwc3/dwc3-am62.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/dwc3/dwc3-am62.c +1 -0
@@ -166,6 +166,7 @@ static int phy_syscon_pll_refclk(structif (ret)return ret; +of_node_put (args.np); am62->offset = args.args[0 ];/* Core voltage. PHY_CORE_VOLTAGE bit Recommended to be 0 always */
Greg Kroah-Hartman
maintainerPATCH 594/623 usb: dwc3: core: Defer the probe until USB power supply ready
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kyle Tso <[email protected]>
commit 66e0ea341a2a78d14336117f19763bd9be26d45d upstream.
Currently, DWC3 driver attempts to acquire the USB power supply only once during the probe. If the USB power supply is not ready at that time, the driver simply ignores the failure and continues the probe, leading to permanent non-functioning of the gadget vbus_draw callback.
Address this problem by delaying the dwc3 driver initialization until the USB power supply is registered.
--- drivers/usb/dwc3/core.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-)
drivers/usb/dwc3/core.c +21 -9
@@ -1664,8 +1664,6 @@ static void dwc3_get_properties(struct du8 tx_thr_num_pkt_prd =0 ;u8 tx_max_burst_prd =0 ;u8 tx_fifo_resize_max_num; -const char *usb_psy_name; -int ret;/* default to highest possible threshold */ lpm_nyet_threshold =0xf ;
@@ -1700,13 +1698,6 @@ static void dwc3_get_properties(struct d dwc->sys_wakeup =device_may_wakeup (dwc->sysdev); - ret =device_property_read_string (dev,"usb-psy-name" , &usb_psy_name); -if (ret >=0 ) { - dwc->usb_psy =power_supply_get_by_name (usb_psy_name); -if (!dwc->usb_psy) -dev_err (dev,"couldn't get usb power supply\n" ); - } - dwc->has_lpm_erratum =device_property_read_bool (dev,"snps,has-lpm-erratum" ); device_property_read_u8(dev, "snps,lpm-nyet-threshold",
@@ -2109,6 +2100,23 @@ static int dwc3_get_num_ports(struct dwcreturn 0 ; } +static struct power_supply *dwc3_get_usb_power_supply (struct dwc3 *dwc) +{ +struct power_supply *usb_psy; +const char *usb_psy_name; +int ret; + + ret =device_property_read_string (dwc->dev,"usb-psy-name" , &usb_psy_name); +if (ret <0 ) +return NULL ; + + usb_psy =power_supply_get_by_name (usb_psy_name); +if (!usb_psy) +return ERR_PTR (-EPROBE_DEFER ); + +return usb_psy; +} +static int dwc3_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -2165,6 +2173,10 @@ static int dwc3_probe(struct platform_dedwc3_get_software_properties (dwc); + dwc->usb_psy =dwc3_get_usb_power_supply (dwc); +if (IS_ERR (dwc->usb_psy)) +return dev_err_probe (dev,PTR_ERR (dwc->usb_psy),"couldn't get usb power supply\n" ); + dwc->reset =devm_reset_control_array_get_optional_shared (dev);if (IS_ERR (dwc->reset)) { ret =PTR_ERR (dwc->reset);
Greg Kroah-Hartman
maintainerPATCH 595/623 usb: dwc3: Skip resume if pm_runtime_set_active() fails
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ray Chi <[email protected]>
commit e3a9bd247cddfb6fa0c29c2361f70b76c359eaa0 upstream.
When the system begins to enter suspend mode, dwc3_suspend() is called by PM suspend. There is a problem that if someone interrupt the system suspend process between dwc3_suspend() and pm_suspend() of its parent device, PM suspend will be canceled and attempt to resume suspended devices so that dwc3_resume() will be called. However, dwc3 and its parent device (like the power domain or glue driver) may already be suspended by runtime PM in fact. If this sutiation happened, the pm_runtime_set_active() in dwc3_resume() will return an error since parent device was suspended. This can lead to unexpected behavior if DWC3 proceeds to execute dwc3_resume_common().
EX.
RPM suspend: ... -> dwc3_runtime_suspend()
-> rpm_suspend() of parent device
...
PM suspend: ... -> dwc3_suspend() -> pm_suspend of parent device
^ interrupt, so resume suspended device
... <- dwc3_resume() <-/
^ pm_runtime_set_active() returns error
To prevent the problem, this commit will skip dwc3_resume_common() and return the error if pm_runtime_set_active() fails.
--- drivers/usb/dwc3/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/dwc3/core.c +4 -1
@@ -2601,12 +2601,15 @@ static int dwc3_resume(struct device *depinctrl_pm_select_default_state (dev);pm_runtime_disable (dev); -pm_runtime_set_active (dev); + ret =pm_runtime_set_active (dev); +if (ret) + goto out; ret =dwc3_resume_common (dwc,PMSG_RESUME );if (ret)pm_runtime_set_suspended (dev); +out:pm_runtime_enable (dev);return ret;
Greg Kroah-Hartman
maintainerPATCH 596/623 usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jos Wang <[email protected]>
commit 2eb3da037c2c20fa30bc502bc092479b2a1aaae2 upstream.
As PD2.0 spec ("8.3.3.2.3 PE_SRC_Send_Capabilities state"), after the Source receives the GoodCRC Message from the Sink in response to the Source_Capabilities message, it should start the SenderResponseTimer, after the timer times out, the state machine transitions to the HARD_RESET state.
--- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tcpm/tcpm.c +1 -1
@@ -4772,7 +4772,7 @@ static void run_state_machine(struct tcp port->caps_count =0 ; port->pd_capable = true;tcpm_set_state_cond (port,SRC_SEND_CAPABILITIES_TIMEOUT , -PD_T_SEND_SOURCE_CAP ); +PD_T_SENDER_RESPONSE ); }break ;case SRC_SEND_CAPABILITIES_TIMEOUT :
Greg Kroah-Hartman
maintainerPATCH 597/623 usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kyle Tso <[email protected]>
commit 4d27afbf256028a1f54363367f30efc8854433c3 upstream.
The Source can drop its output voltage to the minimum of the requested PPS APDO voltage range when it is in Current Limit Mode. If this voltage falls within the range of vPpsShutdown, the Source initiates a Hard Reset and discharges Vbus. However, currently the Sink may disconnect before the voltage reaches vPpsShutdown, leading to unexpected behavior.
Prevent premature disconnection by setting the Sink's disconnect threshold to the minimum vPpsShutdown value. Additionally, consider the voltage drop due to IR drop when calculating the appropriate threshold. This ensures a robust and reliable interaction between the Source and Sink during SPR PPS Current Limit Mode operation.
--- drivers/usb/typec/tcpm/tcpci.c | 13 +++++++++---- drivers/usb/typec/tcpm/tcpm.c | 8 +++++--- include/linux/usb/tcpm.h | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-)
drivers/usb/typec/tcpm/tcpci.c +9 -4
@@ -27,6 +27,7 @@#define VPPS_NEW_MIN_PERCENT 95#define VPPS_VALID_MIN_MV 100#define VSINKDISCONNECT_PD_MIN_PERCENT 90 +#define VPPS_SHUTDOWN_MIN_PERCENT 85struct tcpci {struct device *dev;
@@ -366,7 +367,8 @@ static int tcpci_enable_auto_vbus_discha }static int tcpci_set_auto_vbus_discharge_threshold (struct tcpc_dev *dev,enum typec_pwr_opmode mode, -bool pps_active,u32 requested_vbus_voltage_mv) +bool pps_active,u32 requested_vbus_voltage_mv, +u32 apdo_min_voltage_mv) {struct tcpci *tcpci =tcpc_to_tcpci (dev);unsigned int pwr_ctrl, threshold =0 ;
@@ -388,9 +390,12 @@ static int tcpci_set_auto_vbus_discharge threshold =AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV ; }else if (mode ==TYPEC_PWR_MODE_PD ) {if (pps_active) - threshold = ((VPPS_NEW_MIN_PERCENT * requested_vbus_voltage_mv /100 ) - -VSINKPD_MIN_IR_DROP_MV -VPPS_VALID_MIN_MV ) * -VSINKDISCONNECT_PD_MIN_PERCENT /100 ; +/* +* To prevent disconnect when the source is in Current Limit Mode. +* Set the threshold to the lowest possible voltage vPpsShutdown (min) +*/ + threshold =VPPS_SHUTDOWN_MIN_PERCENT * apdo_min_voltage_mv /100 - +VSINKPD_MIN_IR_DROP_MV ;else threshold = ((VSRC_NEW_MIN_PERCENT * requested_vbus_voltage_mv /100 ) - VSINKPD_MIN_IR_DROP_MV - VSRC_VALID_MIN_MV) *
drivers/usb/typec/tcpm/tcpm.c +5 -3
@@ -2943,10 +2943,12 @@ static int tcpm_set_auto_vbus_discharge_return 0 ; ret = port->tcpc->set_auto_vbus_discharge_threshold (port->tcpc, mode, pps_active, - requested_vbus_voltage); + requested_vbus_voltage, + port->pps_data.min_volt);tcpm_log_force (port, -"set_auto_vbus_discharge_threshold mode:%d pps_active:%c vbus:%u ret:%d" , - mode, pps_active ?'y' :'n' , requested_vbus_voltage, ret); +"set_auto_vbus_discharge_threshold mode:%d pps_active:%c vbus:%u pps_apdo_min_volt:%u ret:%d" , + mode, pps_active ?'y' :'n' , requested_vbus_voltage, + port->pps_data.min_volt, ret);return ret; }
include/linux/usb/tcpm.h +2 -1
@@ -163,7 +163,8 @@ struct tcpc_dev {void (*frs_sourcing_vbus)(struct tcpc_dev *dev);int (*enable_auto_vbus_discharge)(struct tcpc_dev *dev,bool enable);int (*set_auto_vbus_discharge_threshold)(struct tcpc_dev *dev,enum typec_pwr_opmode mode, -bool pps_active,u32 requested_vbus_voltage); +bool pps_active,u32 requested_vbus_voltage, +u32 pps_apdo_min_voltage);bool (*is_vbus_vsafe0v)(struct tcpc_dev *dev);void (*set_partner_usb_comm_capable)(struct tcpc_dev *dev,bool enable);void (*check_contaminant)(struct tcpc_dev *dev);
Greg Kroah-Hartman
maintainerPATCH 598/623 clk: qcom: gcc-x1e80100: Do not turn off usb_2 controller GDSC
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <[email protected]>
commit d26c4ad3fa53e76a602a9974ade171c8399f2a29 upstream.
Allowing the usb_2 controller GDSC to be turned off during system suspend renders the controller unable to resume.
So use PWRSTS_RET_ON instead in order to make sure this the GDSC doesn't go down.
--- drivers/clk/qcom/gcc-x1e80100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/gcc-x1e80100.c +1 -1
@@ -6083,7 +6083,7 @@ static struct gdsc gcc_usb20_prim_gdsc = .pd = { .name = "gcc_usb20_prim_gdsc", }, - .pwrsts = PWRSTS_OFF_ON, + .pwrsts = PWRSTS_RET_ON, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
Greg Kroah-Hartman
maintainerPATCH 599/623 mptcp: consolidate suboption status
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Abeni <[email protected]>
commit c86b000782daba926c627d2fa00c3f60a75e7472 upstream.
MPTCP maintains the received sub-options status is the bitmask carrying the received suboptions and in several bitfields carrying per suboption additional info.
Zeroing the bitmask before parsing is not enough to ensure a consistent status, and the MPTCP code has to additionally clear some bitfiled depending on the actually parsed suboption.
The above schema is fragile, and syzbot managed to trigger a path where a relevant bitfield is not cleared/initialized:
BUG: KMSAN: uninit-value in __mptcp_expand_seq net/mptcp/options.c:1030 [inline] BUG: KMSAN: uninit-value in mptcp_expand_seq net/mptcp/protocol.h:864 [inline] BUG: KMSAN: uninit-value in ack_update_msk net/mptcp/options.c:1060 [inline] BUG: KMSAN: uninit-value in mptcp_incoming_options+0x2036/0x3d30 net/mptcp/options.c:1209 __mptcp_expand_seq net/mptcp/options.c:1030 [inline] mptcp_expand_seq net/mptcp/protocol.h:864 [inline] ack_update_msk net/mptcp/options.c:1060 [inline] mptcp_incoming_options+0x2036/0x3d30 net/mptcp/options.c:1209 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_established+0x1061/0x2510 net/ipv4/tcp_input.c:6264 tcp_v4_do_rcv+0x7f3/0x11a0 net/ipv4/tcp_ipv4.c:1916 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595 do_softirq+0x9a/0x100 kernel/softirq.c:462 __local_bh_enable_ip+0x9f/0xb0 kernel/softirq.c:389 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x2758/0x57d0 net/core/dev.c:4493 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip_finish_output2+0x187c/0x1b70 net/ipv4/ip_output.c:236 __ip_finish_output+0x287/0x810 ip_finish_output+0x4b/0x600 net/ipv4/ip_output.c:324 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x15f/0x3f0 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:450 [inline] ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x1f2a/0x20d0 net/ipv4/ip_output.c:536 ip_queue_xmit+0x60/0x80 net/ipv4/ip_output.c:550 __tcp_transmit_skb+0x3cea/0x4900 net/ipv4/tcp_output.c:1468 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
mptcp_get_options+0x2c0f/0x2f20 net/mptcp/options.c:397 mptcp_incoming_options+0x19a/0x3d30 net/mptcp/options.c:1150 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_established+0x1061/0x2510 net/ipv4/tcp_input.c:6264 tcp_v4_do_rcv+0x7f3/0x11a0 net/ipv4/tcp_ipv4.c:1916 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595
Uninit was stored to memory at:
put_unaligned_be32 include/linux/unaligned.h:68 [inline] mptcp_write_options+0x17f9/0x3100 net/mptcp/options.c:1417 mptcp_options_write net/ipv4/tcp_output.c:465 [inline] tcp_options_write+0x6d9/0xe90 net/ipv4/tcp_output.c:759 __tcp_transmit_skb+0x294b/0x4900 net/ipv4/tcp_output.c:1414 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
mptcp_pm_add_addr_signal+0x3d7/0x4c0 mptcp_established_options_add_addr net/mptcp/options.c:666 [inline] mptcp_established_options+0x1b9b/0x3a00 net/mptcp/options.c:884 tcp_established_options+0x2c4/0x7d0 net/ipv4/tcp_output.c:1012 __tcp_transmit_skb+0x5b7/0x4900 net/ipv4/tcp_output.c:1333 tcp_transmit_skb net/ipv4/tcp_output.c:1486 [inline] tcp_write_xmit+0x3b90/0x9070 net/ipv4/tcp_output.c:2829 __tcp_push_pending_frames+0xc4/0x380 net/ipv4/tcp_output.c:3012 tcp_send_fin+0x9f6/0xf50 net/ipv4/tcp_output.c:3618 __tcp_close+0x140c/0x1550 net/ipv4/tcp.c:3130 __mptcp_close_ssk+0x74e/0x16f0 net/mptcp/protocol.c:2496 mptcp_close_ssk+0x26b/0x2c0 net/mptcp/protocol.c:2550 mptcp_pm_nl_rm_addr_or_subflow+0x635/0xd10 net/mptcp/pm_netlink.c:889 mptcp_pm_nl_rm_subflow_received net/mptcp/pm_netlink.c:924 [inline] mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_netlink.c:1688 [inline] mptcp_nl_flush_addrs_list net/mptcp/pm_netlink.c:1709 [inline] mptcp_pm_nl_flush_addrs_doit+0xe10/0x1630 net/mptcp/pm_netlink.c:1750 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x1214/0x12c0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2542 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:726 ____sys_sendmsg+0x877/0xb60 net/socket.c:2583 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2637 __sys_sendmsg net/socket.c:2669 [inline] __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x212/0x3c0 net/socket.c:2672 x64_sys_call+0x2ed6/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was stored to memory at:
mptcp_pm_add_addr_received+0x95f/0xdd0 net/mptcp/pm.c:235 mptcp_incoming_options+0x2983/0x3d30 net/mptcp/options.c:1169 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233 tcp_rcv_state_process+0x2a38/0x49d0 net/ipv4/tcp_input.c:6972 tcp_v4_do_rcv+0xbf9/0x11a0 net/ipv4/tcp_ipv4.c:1939 tcp_v4_rcv+0x51df/0x5750 net/ipv4/tcp_ipv4.c:2351 ip_protocol_deliver_rcu+0x2a3/0x13d0 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x4a2/0x520 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0xcd/0x380 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core net/core/dev.c:5704 [inline] __netif_receive_skb+0x319/0xa00 net/core/dev.c:5817 process_backlog+0x4ad/0xa50 net/core/dev.c:6149 __napi_poll+0xe7/0x980 net/core/dev.c:6902 napi_poll net/core/dev.c:6971 [inline] net_rx_action+0xa5a/0x19b0 net/core/dev.c:7093 handle_softirqs+0x1a0/0x7c0 kernel/softirq.c:561 __do_softirq+0x14/0x1a kernel/softirq.c:595
Local variable mp_opt created at:
mptcp_incoming_options+0x119/0x3d30 net/mptcp/options.c:1127 tcp_data_queue+0xb4/0x7be0 net/ipv4/tcp_input.c:5233
The current schema is too fragile; address the issue grouping all the state-related data together and clearing the whole group instead of just the bitmask. This also cleans-up the code a bit, as there is no need to individually clear "random" bitfield in a couple of places any more.
--- net/mptcp/options.c | 13 +++++-------- net/mptcp/protocol.h | 30 ++++++++++++++++-------------- 2 files changed, 21 insertions(+), 22 deletions(-)
net/mptcp/options.c +5 -8
@@ -108,7 +108,6 @@ static void mptcp_parse_option(const str mp_opt->suboptions |=OPTION_MPTCP_DSS ; mp_opt->use_map =1 ; mp_opt->mpc_map =1 ; - mp_opt->use_ack =0 ; mp_opt->data_len =get_unaligned_be16 (ptr); ptr +=2 ; }
@@ -157,11 +156,6 @@ static void mptcp_parse_option(const strpr_debug ("DSS\n" ); ptr++; -/* we must clear 'mpc_map' be able to detect MP_CAPABLE -* map vs DSS map in mptcp_incoming_options(), and reconstruct -* map info accordingly -*/ - mp_opt->mpc_map =0 ; flags = (*ptr++) &MPTCP_DSS_FLAG_MASK ; mp_opt->data_fin = (flags &MPTCP_DSS_DATA_FIN ) !=0 ; mp_opt->dsn64 = (flags &MPTCP_DSS_DSN64 ) !=0 ;
@@ -369,8 +363,11 @@ void mptcp_get_options(const struct sk_bconst unsigned char *ptr;int length; -/* initialize option status */ - mp_opt->suboptions =0 ; +/* Ensure that casting the whole status to u32 is efficient and safe */ + BUILD_BUG_ON(sizeof_field(struct mptcp_options_received, status) != sizeof(u32)); +BUILD_BUG_ON (!IS_ALIGNED (offsetof(struct mptcp_options_received , status), +sizeof (u32))); + *(u32 *)&mp_opt->status =0 ; length = (th->doff *4 ) -sizeof (struct tcphdr ); ptr = (const unsigned char *)(th +1 );
net/mptcp/protocol.h +16 -14
@@ -149,22 +149,24 @@ struct mptcp_options_received {u32 subflow_seq;u16 data_len;__sum16 csum; -u16 suboptions; +struct_group (status, + u16 suboptions; + u16 use_map:1, + dsn64:1, + data_fin:1, + use_ack:1, + ack64:1, + mpc_map:1, + reset_reason:4, + reset_transient:1, + echo:1, + backup:1, + deny_join_id0:1, + __unused:2; + ); +u8 join_id;u32 token;u32 nonce; - u16 use_map:1, - dsn64:1, - data_fin:1, - use_ack:1, - ack64:1, - mpc_map:1, - reset_reason:4, - reset_transient:1, - echo:1, - backup:1, - deny_join_id0:1, - __unused:2; -u8 join_id;u64 thmac;u8 hmac[MPTCPOPT_HMAC_LEN ];struct mptcp_addr_info addr;
Greg Kroah-Hartman
maintainerPATCH 600/623 mptcp: pm: only set fullmesh for subflow endp
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthieu Baerts (NGI0) <[email protected]>
commit 1bb0d1348546ad059f55c93def34e67cb2a034a6 upstream.
With the in-kernel path-manager, it is possible to change the 'fullmesh' flag. The code in mptcp_pm_nl_fullmesh() expects to change it only on 'subflow' endpoints, to recreate more or less subflows using the linked address.
Unfortunately, the set_flags() hook was a bit more permissive, and allowed 'implicit' endpoints to get the 'fullmesh' flag while it is not allowed before.
That's what syzbot found, triggering the following warning:
WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 __mark_subflow_endp_available net/mptcp/pm_netlink.c:1496 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_pm_nl_fullmesh net/mptcp/pm_netlink.c:1980 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_nl_set_flags net/mptcp/pm_netlink.c:2003 [inline] WARNING: CPU: 0 PID: 6499 at net/mptcp/pm_netlink.c:1496 mptcp_pm_nl_set_flags+0x974/0xdc0 net/mptcp/pm_netlink.c:2064 Modules linked in: CPU: 0 UID: 0 PID: 6499 Comm: syz.1.413 Not tainted 6.13.0-rc5-syzkaller-00172-gd1bf27c4e176 #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:__mark_subflow_endp_available net/mptcp/pm_netlink.c:1496 [inline] RIP: 0010:mptcp_pm_nl_fullmesh net/mptcp/pm_netlink.c:1980 [inline] RIP: 0010:mptcp_nl_set_flags net/mptcp/pm_netlink.c:2003 [inline] RIP: 0010:mptcp_pm_nl_set_flags+0x974/0xdc0 net/mptcp/pm_netlink.c:2064 Code: 01 00 00 49 89 c5 e8 fb 45 e8 f5 e9 b8 fc ff ff e8 f1 45 e8 f5 4c 89 f7 be 03 00 00 00 e8 44 1d 0b f9 eb a0 e8 dd 45 e8 f5 90 <0f> 0b 90 e9 17 ff ff ff 89 d9 80 e1 07 38 c1 0f 8c c9 fc ff ff 48 RSP: 0018:ffffc9000d307240 EFLAGS: 00010293 RAX: ffffffff8bb72e03 RBX: 0000000000000000 RCX: ffff88807da88000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000d307430 R08: ffffffff8bb72cf0 R09: 1ffff1100b842a5e R10: dffffc0000000000 R11: ffffed100b842a5f R12: ffff88801e2e5ac0 R13: ffff88805c214800 R14: ffff88805c2152e8 R15: 1ffff1100b842a5d FS: 00005555619f6500(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020002840 CR3: 00000000247e6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2542 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:726 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2669 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5fe8785d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff571f5558 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f5fe8975fa0 RCX: 00007f5fe8785d29 RDX: 0000000000000000 RSI: 0000000020000480 RDI: 0000000000000007 RBP: 00007f5fe8801b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5fe8975fa0 R14: 00007f5fe8975fa0 R15: 00000000000011f4 </TASK>
Here, syzbot managed to set the 'fullmesh' flag on an 'implicit' and used -- according to 'id_avail_bitmap' -- endpoint, causing the PM to try decrement the local_addr_used counter which is only incremented for the 'subflow' endpoint.
Note that 'no type' endpoints -- not 'subflow', 'signal', 'implicit' -- are fine, because their ID will not be marked as used in the 'id_avail' bitmap, and setting 'fullmesh' can help forcing the creation of subflow when receiving an ADD_ADDR.
--- net/mptcp/pm_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/mptcp/pm_netlink.c +2 -1
@@ -2050,7 +2050,8 @@ int mptcp_pm_nl_set_flags(struct sk_buffreturn -EINVAL ; }if ((addr.flags &MPTCP_PM_ADDR_FLAG_FULLMESH ) && - (entry->flags &MPTCP_PM_ADDR_FLAG_SIGNAL )) { + (entry->flags & (MPTCP_PM_ADDR_FLAG_SIGNAL | +MPTCP_PM_ADDR_FLAG_IMPLICIT ))) {spin_unlock_bh (&pernet->lock);GENL_SET_ERR_MSG (info,"invalid addr flags" );return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 601/623 mptcp: handle fastopen disconnect correctly
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Abeni <[email protected]>
commit 619af16b3b57a3a4ee50b9a30add9ff155541e71 upstream.
Syzbot was able to trigger a data stream corruption:
WARNING: CPU: 0 PID: 9846 at net/mptcp/protocol.c:1024 __mptcp_clean_una+0xddb/0xff0 net/mptcp/protocol.c:1024 Modules linked in: CPU: 0 UID: 0 PID: 9846 Comm: syz-executor351 Not tainted 6.13.0-rc2-syzkaller-00059-g00a5acdbf398 #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 RIP: 0010:__mptcp_clean_una+0xddb/0xff0 net/mptcp/protocol.c:1024 Code: fa ff ff 48 8b 4c 24 18 80 e1 07 fe c1 38 c1 0f 8c 8e fa ff ff 48 8b 7c 24 18 e8 e0 db 54 f6 e9 7f fa ff ff e8 e6 80 ee f5 90 <0f> 0b 90 4c 8b 6c 24 40 4d 89 f4 e9 04 f5 ff ff 44 89 f1 80 e1 07 RSP: 0018:ffffc9000c0cf400 EFLAGS: 00010293 RAX: ffffffff8bb0dd5a RBX: ffff888033f5d230 RCX: ffff888059ce8000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000c0cf518 R08: ffffffff8bb0d1dd R09: 1ffff110170c8928 R10: dffffc0000000000 R11: ffffed10170c8929 R12: 0000000000000000 R13: ffff888033f5d220 R14: dffffc0000000000 R15: ffff8880592b8000 FS: 00007f6e866496c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6e86f491a0 CR3: 00000000310e6000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> __mptcp_clean_una_wakeup+0x7f/0x2d0 net/mptcp/protocol.c:1074 mptcp_release_cb+0x7cb/0xb30 net/mptcp/protocol.c:3493 release_sock+0x1aa/0x1f0 net/core/sock.c:3640 inet_wait_for_connect net/ipv4/af_inet.c:609 [inline] __inet_stream_connect+0x8bd/0xf30 net/ipv4/af_inet.c:703 mptcp_sendmsg_fastopen+0x2a2/0x530 net/mptcp/protocol.c:1755 mptcp_sendmsg+0x1884/0x1b10 net/mptcp/protocol.c:1830 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:726 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x269/0x350 net/socket.c:2669 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e86ebfe69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 1f 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6e86649168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f6e86f491b8 RCX: 00007f6e86ebfe69 RDX: 0000000030004001 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00007f6e86f491b0 R08: 00007f6e866496c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6e86f491bc R13: 000000000000006e R14: 00007ffe445d9420 R15: 00007ffe445d9508 </TASK>
The root cause is the bad handling of disconnect() generated internally by the MPTCP protocol in case of connect FASTOPEN errors.
Address the issue increasing the socket disconnect counter even on such a case, to allow other threads waiting on the same socket lock to properly error out.
--- net/mptcp/protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/mptcp/protocol.c +3 -1
@@ -1767,8 +1767,10 @@ static int mptcp_sendmsg_fastopen(struct* see mptcp_disconnect(). * Attempt it again outside the problematic scope. */ -if (!mptcp_disconnect (sk,0 )) +if (!mptcp_disconnect (sk,0 )) { + sk->sk_disconnects++; sk->sk_socket->state =SS_UNCONNECTED ; + } }inet_clear_bit (DEFER_CONNECT , sk);
Greg Kroah-Hartman
maintainerPATCH 602/623 mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthieu Baerts (NGI0) <[email protected]>
commit e598d8981fd34470b78a1ae777dbf131b15d5bf2 upstream.
The Fixes commit mentioned this:
Quoted 2 lines
An MPTCP firewall blackhole can be detected if the following SYN retransmission after a fallback to "plain" TCP is accepted.
But in fact, this blackhole was detected if any following SYN retransmissions after a fallback to TCP was accepted.
That's because 'mptcp_subflow_early_fallback()' will set 'request_mptcp' to 0, and 'mpc_drop' will never be reset to 0 after.
This is an issue, because some not so unusual situations might cause the kernel to detect a false-positive blackhole, e.g. a client trying to connect to a server while the network is not ready yet, causing a few SYN retransmissions, before reaching the end server.
--- net/mptcp/ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mptcp/ctrl.c +2 -2
@@ -405,9 +405,9 @@ void mptcp_active_detect_blackhole(strucMPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_MPCAPABLEACTIVEDROP ); subflow->mpc_drop =1 ;mptcp_subflow_early_fallback (mptcp_sk (subflow->conn), subflow); - }else { - subflow->mpc_drop =0 ; } + }else if (ssk->sk_state ==TCP_SYN_SENT ) { + subflow->mpc_drop =0 ; } }
Greg Kroah-Hartman
maintainerPATCH 603/623 RDMA/mlx5: Fix implicit ODP use after free
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Patrisious Haddad <[email protected]>
commit d3d930411ce390e532470194296658a960887773 upstream.
Prevent double queueing of implicit ODP mr destroy work by using __xa_cmpxchg() to make sure this is the only time we are destroying this specific mr.
Without this change, we could try to invalidate this mr twice, which in turn could result in queuing a MR work destroy twice, and eventually the second work could execute after the MR was freed due to the first work, causing a user after free and trace below.
refcount_t: underflow; use-after-free.
WARNING: CPU: 2 PID: 12178 at lib/refcount.c:28 refcount_warn_saturate+0x12b/0x130
Modules linked in: bonding ib_ipoib vfio_pci ip_gre geneve nf_tables ip6_gre gre ip6_tunnel tunnel6 ipip tunnel4 ib_umad rdma_ucm mlx5_vfio_pci vfio_pci_core vfio_iommu_type1 mlx5_ib vfio ib_uverbs mlx5_core iptable_raw openvswitch nsh rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay zram zsmalloc fuse [last unloaded: ib_uverbs]
CPU: 2 PID: 12178 Comm: kworker/u20:5 Not tainted 6.5.0-rc1_net_next_mlx5_58c644e #1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
Workqueue: events_unbound free_implicit_child_mr_work [mlx5_ib]
RIP: 0010:refcount_warn_saturate+0x12b/0x130
Code: 48 c7 c7 38 95 2a 82 c6 05 bc c6 fe 00 01 e8 0c 66 aa ff 0f 0b 5b c3 48 c7 c7 e0 94 2a 82 c6 05 a7 c6 fe 00 01 e8 f5 65 aa ff <0f> 0b 5b c3 90 8b 07 3d 00 00 00 c0 74 12 83 f8 01 74 13 8d 50 ff
RSP: 0018:ffff8881008e3e40 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
RDX: ffff88852c91b5c8 RSI: 0000000000000001 RDI: ffff88852c91b5c0
RBP: ffff8881dacd4e00 R08: 00000000ffffffff R09: 0000000000000019
R10: 000000000000072e R11: 0000000063666572 R12: ffff88812bfd9e00
R13: ffff8881c792d200 R14: ffff88810011c005 R15: ffff8881002099c0
FS: 0000000000000000(0000) GS:ffff88852c900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5694b5e000 CR3: 00000001153f6003 CR4: 0000000000370ea0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
? refcount_warn_saturate+0x12b/0x130
free_implicit_child_mr_work+0x180/0x1b0 [mlx5_ib]
process_one_work+0x1cc/0x3c0
worker_thread+0x218/0x3c0
kthread+0xc6/0xf0
ret_from_fork+0x1f/0x30
</TASK>--- drivers/infiniband/hw/mlx5/odp.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
drivers/infiniband/hw/mlx5/odp.c +22 -8
@@ -228,13 +228,27 @@ static void destroy_unused_implicit_chilunsigned long idx =ib_umem_start (odp) >>MLX5_IMR_MTT_SHIFT ;struct mlx5_ib_mr *imr = mr->parent; +/* +* If userspace is racing freeing the parent implicit ODP MR then we can +* loose the race with parent destruction. In this case +* mlx5_ib_free_odp_mr() will free everything in the implicit_children +* xarray so NOP is fine. This child MR cannot be destroyed here because +* we are under its umem_mutex. +*/ if (!refcount_inc_not_zero (&imr->mmkey.usecount))return ; -xa_erase (&imr->implicit_children, idx); +xa_lock (&imr->implicit_children); +if (__xa_cmpxchg (&imr->implicit_children, idx, mr,NULL ,GFP_KERNEL ) != + mr) { +xa_unlock (&imr->implicit_children); +return ; + } +if (MLX5_CAP_ODP (mr_to_mdev (mr)->mdev, mem_page_fault)) -xa_erase (&mr_to_mdev (mr)->odp_mkeys, -mlx5_base_mkey (mr->mmkey.key)); +__xa_erase (&mr_to_mdev (mr)->odp_mkeys, +mlx5_base_mkey (mr->mmkey.key)); +xa_unlock (&imr->implicit_children);/* Freeing a MR is a sleeping operation, so bounce to a work queue */ INIT_WORK (&mr->odp_destroy.work, free_implicit_child_mr_work);
@@ -500,18 +514,18 @@ static struct mlx5_ib_mr *implicit_get_crefcount_inc (&ret->mmkey.usecount); goto out_lock; } -xa_unlock (&imr->implicit_children);if (MLX5_CAP_ODP (dev->mdev, mem_page_fault)) { - ret =xa_store (&dev->odp_mkeys,mlx5_base_mkey (mr->mmkey.key), - &mr->mmkey,GFP_KERNEL ); + ret =__xa_store (&dev->odp_mkeys,mlx5_base_mkey (mr->mmkey.key), + &mr->mmkey,GFP_KERNEL );if (xa_is_err (ret)) { ret =ERR_PTR (xa_err (ret)); -xa_erase (&imr->implicit_children, idx); - goto out_mr; +__xa_erase (&imr->implicit_children, idx); + goto out_lock; } mr->mmkey.type =MLX5_MKEY_IMPLICIT_CHILD ; } +xa_unlock (&imr->implicit_children);mlx5_ib_dbg (mr_to_mdev (imr),"key %x mr %p\n" , mr->mmkey.key, mr);return mr;
Greg Kroah-Hartman
maintainerPATCH 604/623 remoteproc: core: Fix ida_free call while not allocated
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaud Pouliquen <[email protected]>
commit 7378aeb664e5ebc396950b36a1f2dedf5aabec20 upstream.
In the rproc_alloc() function, on error, put_device(&rproc->dev) is called, leading to the call of the rproc_type_release() function. An error can occurs before ida_alloc is called.
In such case in rproc_type_release(), the condition (rproc->index >= 0) is true as rproc->index has been initialized to 0.ida_free() is called reporting a warning:
[ 4.181906] WARNING: CPU: 1 PID: 24 at lib/idr.c:525 ida_free+0x100/0x164 [ 4.186378] stm32-display-dsi 5a000000.dsi: Fixed dependency cycle(s) with /soc/dsi@5a000000/panel@0 [ 4.188854] ida_free called for id=0 which is not allocated. [ 4.198256] mipi-dsi 5a000000.dsi.0: Fixed dependency cycle(s) with /soc/dsi@5a000000 [ 4.203556] Modules linked in: panel_orisetech_otm8009a dw_mipi_dsi_stm(+) gpu_sched dw_mipi_dsi stm32_rproc stm32_crc32 stm32_ipcc(+) optee(+) [ 4.224307] CPU: 1 UID: 0 PID: 24 Comm: kworker/u10:0 Not tainted 6.12.0 #442 [ 4.231481] Hardware name: STM32 (Device Tree Support) [ 4.236627] Workqueue: events_unbound deferred_probe_work_func [ 4.242504] Call trace: [ 4.242522] unwind_backtrace from show_stack+0x10/0x14 [ 4.250218] show_stack from dump_stack_lvl+0x50/0x64 [ 4.255274] dump_stack_lvl from __warn+0x80/0x12c [ 4.260134] __warn from warn_slowpath_fmt+0x114/0x188 [ 4.265199] warn_slowpath_fmt from ida_free+0x100/0x164 [ 4.270565] ida_free from rproc_type_release+0x38/0x60 [ 4.275832] rproc_type_release from device_release+0x30/0xa0 [ 4.281601] device_release from kobject_put+0xc4/0x294 [ 4.286762] kobject_put from rproc_alloc.part.0+0x208/0x28c [ 4.292430] rproc_alloc.part.0 from devm_rproc_alloc+0x80/0xc4 [ 4.298393] devm_rproc_alloc from stm32_rproc_probe+0xd0/0x844 [stm32_rproc] [ 4.305575] stm32_rproc_probe [stm32_rproc] from platform_probe+0x5c/0xbc
Calling ida_alloc earlier in rproc_alloc ensures that the rproc->index is properly set.
--- drivers/remoteproc/remoteproc_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/remoteproc/remoteproc_core.c +7 -7
@@ -2486,6 +2486,13 @@ struct rproc *rproc_alloc(struct device rproc->dev.driver_data = rproc;idr_init (&rproc->notifyids); +/* Assign a unique device index and name */ + rproc->index =ida_alloc (&rproc_dev_index,GFP_KERNEL ); +if (rproc->index <0 ) { +dev_err (dev,"ida_alloc failed: %d\n" , rproc->index); + goto put_device; + } + rproc->name =kstrdup_const (name,GFP_KERNEL );if (!rproc->name) goto put_device;
@@ -2496,13 +2503,6 @@ struct rproc *rproc_alloc(struct deviceif (rproc_alloc_ops (rproc, ops)) goto put_device; -/* Assign a unique device index and name */ - rproc->index =ida_alloc (&rproc_dev_index,GFP_KERNEL ); -if (rproc->index <0 ) { -dev_err (dev,"ida_alloc failed: %d\n" , rproc->index); - goto put_device; - } -dev_set_name (&rproc->dev,"remoteproc%d" , rproc->index);atomic_set (&rproc->power,0 );
Greg Kroah-Hartman
maintainerPATCH 605/623 media: uvcvideo: Fix double free in error path
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Pinchart <[email protected]>
commit c6ef3a7fa97ec823a1e1af9085cf13db9f7b3bac upstream.
If the uvc_status_init() function fails to allocate the int_urb, it will free the dev->status pointer but doesn't reset the pointer to NULL. This results in the kfree() call in uvc_status_cleanup() trying to double-free the memory. Fix it by resetting the dev->status pointer to NULL after freeing it.
Reviewed by: Ricardo Ribalda <[email protected]>
--- drivers/media/usb/uvc/uvc_status.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/usb/uvc/uvc_status.c +1 -0
@@ -271,6 +271,7 @@ int uvc_status_init(struct uvc_device *d dev->int_urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!dev->int_urb) {kfree (dev->status); + dev->status =NULL ;return -ENOMEM ; }
Greg Kroah-Hartman
maintainerPATCH 606/623 pps: Fix a use-after-free
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Calvin Owens <[email protected]>
commit c79a39dc8d060b9e64e8b0fa9d245d44befeefbe upstream.
On a board running ntpd and gpsd, I'm seeing a consistent use-after-free in sys_exit() from gpsd when rebooting:
pps pps1: removed
------------[ cut here ]------------
kobject: '(null)' (00000000db4bec24): is not initialized, yet kobject_put() is being called.
WARNING: CPU: 2 PID: 440 at lib/kobject.c:734 kobject_put+0x120/0x150
CPU: 2 UID: 299 PID: 440 Comm: gpsd Not tainted 6.11.0-rc6-00308-gb31c44928842 #1
Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : kobject_put+0x120/0x150
lr : kobject_put+0x120/0x150
sp : ffffffc0803d3ae0
x29: ffffffc0803d3ae0 x28: ffffff8042dc9738 x27: 0000000000000001
x26: 0000000000000000 x25: ffffff8042dc9040 x24: ffffff8042dc9440
x23: ffffff80402a4620 x22: ffffff8042ef4bd0 x21: ffffff80405cb600
x20: 000000000008001b x19: ffffff8040b3b6e0 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 696e6920746f6e20
x14: 7369203a29343263 x13: 205d303434542020 x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
kobject_put+0x120/0x150
cdev_put+0x20/0x3c
__fput+0x2c4/0x2d8
____fput+0x1c/0x38
task_work_run+0x70/0xfc
do_exit+0x2a0/0x924
do_group_exit+0x34/0x90
get_signal+0x7fc/0x8c0
do_signal+0x128/0x13b4
do_notify_resume+0xdc/0x160
el0_svc+0xd4/0xf8
el0t_64_sync_handler+0x140/0x14c
el0t_64_sync+0x190/0x194
---[ end trace 0000000000000000 ]---...followed by more symptoms of corruption, with similar stacks:
refcount_t: underflow; use-after-free.
kernel BUG at lib/list_debug.c:62!
Kernel panic - not syncing: Oops - BUG: Fatal exception
This happens because pps_device_destruct() frees the pps_device with the embedded cdev immediately after calling cdev_del(), but, as the comment above cdev_del() notes, fops for previously opened cdevs are still callable even after cdev_del() returns. I think this bug has always been there: I can't explain why it suddenly started happening every time I reboot this particular board.
In commit d953e0e837e6 ("pps: Fix a use-after free bug when unregistering a source."), George Spelvin suggested removing the embedded cdev. That seems like the simplest way to fix this, so I've implemented his suggestion, using __register_chrdev() with pps_idr becoming the source of truth for which minor corresponds to which device.
But now that pps_idr defines userspace visibility instead of cdev_add(), we need to be sure the pps->dev refcount can't reach zero while userspace can still find it again. So, the idr_remove() call moves to pps_unregister_cdev(), and pps_idr now holds a reference to pps->dev.
pps_core: source serial1 got cdev (251:1)
<...>
pps pps1: removed
pps_core: unregistering pps1
pps_core: deallocating pps1
--- drivers/pps/clients/pps-gpio.c | 4 - drivers/pps/clients/pps-ktimer.c | 4 - drivers/pps/clients/pps-ldisc.c | 6 - drivers/pps/clients/pps_parport.c | 4 - drivers/pps/kapi.c | 10 +- drivers/pps/kc.c | 10 +- drivers/pps/pps.c | 127 +++++++++++++++++++------------------- drivers/ptp/ptp_ocp.c | 2 include/linux/pps_kernel.h | 3 9 files changed, 87 insertions(+), 83 deletions(-)
drivers/pps/clients/pps-gpio.c +2 -2
@@ -214,8 +214,8 @@ static int pps_gpio_probe(struct platforreturn -EINVAL ; } -dev_info (data->pps->dev,"Registered IRQ %d as PPS source\n" , - data->irq); +dev_dbg (&data->pps->dev,"Registered IRQ %d as PPS source\n" , + data->irq);return 0 ; }
drivers/pps/clients/pps-ktimer.c +2 -2
@@ -56,7 +56,7 @@ static struct pps_source_info pps_ktimer static void __exit pps_ktimer_exit(void) { -dev_info (pps->dev,"ktimer PPS source unregistered\n" ); +dev_dbg (&pps->dev,"ktimer PPS source unregistered\n" );del_timer_sync (&ktimer);pps_unregister_source (pps);
@@ -74,7 +74,7 @@ static int __init pps_ktimer_init(void)timer_setup (&ktimer, pps_ktimer_event,0 );mod_timer (&ktimer, jiffies +HZ ); -dev_info (pps->dev,"ktimer PPS source registered\n" ); +dev_dbg (&pps->dev,"ktimer PPS source registered\n" );return 0 ; }
drivers/pps/clients/pps-ldisc.c +3 -3
@@ -32,7 +32,7 @@ static void pps_tty_dcd_change(struct ttpps_event (pps, &ts, active ?PPS_CAPTUREASSERT :PPS_CAPTURECLEAR ,NULL ); -dev_dbg (pps->dev,"PPS %s at %lu\n" , +dev_dbg (&pps->dev,"PPS %s at %lu\n" , active ?"assert" :"clear" , jiffies); }
@@ -69,7 +69,7 @@ static int pps_tty_open(struct tty_struc goto err_unregister; } -dev_info (pps->dev,"source \"%s\" added\n" , info.path); +dev_dbg (&pps->dev,"source \"%s\" added\n" , info.path);return 0 ;
@@ -89,7 +89,7 @@ static void pps_tty_close(struct tty_strif (WARN_ON (!pps))return ; -dev_info (pps->dev,"removed\n" ); +dev_info (&pps->dev,"removed\n" );pps_unregister_source (pps); }
drivers/pps/clients/pps_parport.c +2 -2
@@ -81,7 +81,7 @@ static void parport_irq(void *handle)/* check the signal (no signal means the pulse is lost this time) */ if (!signal_is_set (port)) {local_irq_restore (flags); -dev_err (dev->pps->dev,"lost the signal\n" ); +dev_err (&dev->pps->dev,"lost the signal\n" ); goto out_assert; }
@@ -98,7 +98,7 @@ static void parport_irq(void *handle)/* timeout */ dev->cw_err++;if (dev->cw_err >=CLEAR_WAIT_MAX_ERRORS ) { -dev_err (dev->pps->dev,"disabled clear edge capture after %d" +dev_err (&dev->pps->dev,"disabled clear edge capture after %d" " timeouts\n" , dev->cw_err); dev->cw =0 ; dev->cw_err =0 ;
drivers/pps/kapi.c +5 -5
@@ -41,7 +41,7 @@ static void pps_add_offset(struct pps_ktstatic void pps_echo_client_default (struct pps_device *pps,int event,void *data) { -dev_info (pps->dev,"echo %s %s\n" , +dev_info (&pps->dev,"echo %s %s\n" , event &PPS_CAPTUREASSERT ?"assert" :"" , event &PPS_CAPTURECLEAR ?"clear" :"" ); }
@@ -112,7 +112,7 @@ struct pps_device *pps_register_source(s goto kfree_pps; } -dev_info (pps->dev,"new PPS source %s\n" , info->name); +dev_dbg (&pps->dev,"new PPS source %s\n" , info->name);return pps;
@@ -166,7 +166,7 @@ void pps_event(struct pps_device *pps, s/* check event type */ BUG_ON ((event & (PPS_CAPTUREASSERT |PPS_CAPTURECLEAR )) ==0 ); -dev_dbg (pps->dev,"PPS event at %lld.%09ld\n" , +dev_dbg (&pps->dev,"PPS event at %lld.%09ld\n" , (s64 )ts->ts_real.tv_sec, ts->ts_real.tv_nsec);timespec_to_pps_ktime (&ts_real, ts->ts_real);
@@ -188,7 +188,7 @@ void pps_event(struct pps_device *pps, s/* Save the time stamp */ pps->assert_tu = ts_real; pps->assert_sequence++; -dev_dbg (pps->dev,"capture assert seq #%u\n" , +dev_dbg (&pps->dev,"capture assert seq #%u\n" , pps->assert_sequence); captured = ~0 ;
@@ -202,7 +202,7 @@ void pps_event(struct pps_device *pps, s/* Save the time stamp */ pps->clear_tu = ts_real; pps->clear_sequence++; -dev_dbg (pps->dev,"capture clear seq #%u\n" , +dev_dbg (&pps->dev,"capture clear seq #%u\n" , pps->clear_sequence); captured = ~0 ;
drivers/pps/kc.c +5 -5
@@ -43,11 +43,11 @@ int pps_kc_bind(struct pps_device *pps, pps_kc_hardpps_mode =0 ; pps_kc_hardpps_dev =NULL ;spin_unlock_irq (&pps_kc_hardpps_lock); -dev_info (pps->dev,"unbound kernel" +dev_info (&pps->dev,"unbound kernel" " consumer\n" ); }else {spin_unlock_irq (&pps_kc_hardpps_lock); -dev_err (pps->dev,"selected kernel consumer" +dev_err (&pps->dev,"selected kernel consumer" " is not bound\n" );return -EINVAL ; }
@@ -57,11 +57,11 @@ int pps_kc_bind(struct pps_device *pps, pps_kc_hardpps_mode = bind_args->edge; pps_kc_hardpps_dev = pps;spin_unlock_irq (&pps_kc_hardpps_lock); -dev_info (pps->dev,"bound kernel consumer: " +dev_info (&pps->dev,"bound kernel consumer: " "edge=0x%x\n" , bind_args->edge); }else {spin_unlock_irq (&pps_kc_hardpps_lock); -dev_err (pps->dev,"another kernel consumer" +dev_err (&pps->dev,"another kernel consumer" " is already bound\n" );return -EINVAL ; }
@@ -83,7 +83,7 @@ void pps_kc_remove(struct pps_device *pp pps_kc_hardpps_mode =0 ; pps_kc_hardpps_dev =NULL ;spin_unlock_irq (&pps_kc_hardpps_lock); -dev_info (pps->dev,"unbound kernel consumer" +dev_info (&pps->dev,"unbound kernel consumer" " on device removal\n" ); }else spin_unlock_irq (&pps_kc_hardpps_lock);
drivers/pps/pps.c +66 -61
288 lines not on this page · raw message
drivers/ptp/ptp_ocp.c +1 -1
@@ -4420,7 +4420,7 @@ ptp_ocp_complete(struct ptp_ocp *bp) pps =pps_lookup_dev (bp->ptp);if (pps) -ptp_ocp_symlink (bp, pps->dev,"pps" ); +ptp_ocp_symlink (bp, &pps->dev,"pps" );ptp_ocp_debugfs_add_device (bp);
include/linux/pps_kernel.h +1 -2
@@ -56,8 +56,7 @@ struct pps_device {unsigned int id;/* PPS source unique ID */ void const *lookup_cookie;/* For pps_lookup_dev() only */ -struct cdev cdev; -struct device *dev; +struct device dev;struct fasync_struct *async_queue;/* fasync method */ spinlock_t lock; };
Greg Kroah-Hartman
maintainerPATCH 607/623 usb: gadget: f_tcm: Dont free command immediately
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thinh Nguyen <[email protected]>
commit c225d006a31949d673e646d585d9569bc28feeb9 upstream.
Don't prematurely free the command. Wait for the status completion of the sense status. It can be freed then. Otherwise we will double-free the command.
--- drivers/usb/gadget/function/f_tcm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/gadget/function/f_tcm.c +0 -2
@@ -1066,7 +1066,6 @@ static void usbg_cmd_work(struct work_st out:transport_send_check_condition_and_sense (se_cmd,TCM_UNSUPPORTED_SCSI_OPCODE ,1 ); -transport_generic_free_cmd (&cmd->se_cmd,0 ); } static struct usbg_cmd *usbg_get_cmd(struct f_uas *fu,
@@ -1195,7 +1194,6 @@ static void bot_cmd_work(struct work_str out:transport_send_check_condition_and_sense (se_cmd,TCM_UNSUPPORTED_SCSI_OPCODE ,1 ); -transport_generic_free_cmd (&cmd->se_cmd,0 ); } static int bot_submit_command(struct f_uas *fu,
Greg Kroah-Hartman
maintainerPATCH 608/623 drm/amd/display: restore invalid MSA timing check for freesync
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Melissa Wen <[email protected]>
commit 7f2b5237e313e39008a85b33ca94ab503a8fdff9 upstream.
This restores the original behavior that gets min/max freq from EDID and only set DP/eDP connector as freesync capable if "sink device is capable of rendering incoming video stream without MSA timing parameters", i.e., allow_invalid_MSA_timing_params is true. The condition was mistakenly removed by 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP").
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -4
@@ -12227,10 +12227,14 @@ void amdgpu_dm_update_freesync_caps(struif (edid && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) { - amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; - amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (amdgpu_dm_connector->dc_link && + amdgpu_dm_connector->dc_link->dpcd_caps.allow_invalid_MSA_timing_param) { + amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; + amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + } +parse_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info);if (vsdb_info.replay_mode) {
Greg Kroah-Hartman
maintainerPATCH 609/623 staging: media: max96712: fix kernel oops when removing module
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurentiu Palcu <[email protected]>
commit ee1b5046d5cd892a0754ab982aeaaad3702083a5 upstream.
The following kernel oops is thrown when trying to remove the max96712 module:
Unable to handle kernel paging request at virtual address 00007375746174db
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000010af89000 [00007375746174db] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in: crct10dif_ce polyval_ce mxc_jpeg_encdec flexcan
snd_soc_fsl_sai snd_soc_fsl_asoc_card snd_soc_fsl_micfil dwc_mipi_csi2
imx_csi_formatter polyval_generic v4l2_jpeg imx_pcm_dma can_dev
snd_soc_imx_audmux snd_soc_wm8962 snd_soc_imx_card snd_soc_fsl_utils
max96712(C-) rpmsg_ctrl rpmsg_char pwm_fan fuse
[last unloaded: imx8_isi]
CPU: 0 UID: 0 PID: 754 Comm: rmmod
Tainted: G C 6.12.0-rc6-06364-g327fec852c31 #17
Tainted: [C]=CRAP
Hardware name: NXP i.MX95 19X19 board (DT)
pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : led_put+0x1c/0x40
lr : v4l2_subdev_put_privacy_led+0x48/0x58sp : ffff80008699bbb0
x29: ffff80008699bbb0 x28: ffff00008ac233c0 x27: 0000000000000000
x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
x23: ffff000080cf1170 x22: ffff00008b53bd00 x21: ffff8000822ad1c8
x20: ffff000080ff5c00 x19: ffff00008b53be40 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000004 x13: ffff0000800f8010 x12: 0000000000000000
x11: ffff000082acf5c0 x10: ffff000082acf478 x9 : ffff0000800f8010 x8 : 0101010101010101 x7 : 7f7f7f7f7f7f7f7f x6 : fefefeff6364626d x5 : 8080808000000000 x4 : 0000000000000020 x3 : 00000000553a3dc1 x2 : ffff00008ac233c0 x1 : ffff00008ac233c0 x0 : ff00737574617473
Call trace: led_put+0x1c/0x40 v4l2_subdev_put_privacy_led+0x48/0x58 v4l2_async_unregister_subdev+0x2c/0x1a4 max96712_remove+0x1c/0x38 [max96712] i2c_device_remove+0x2c/0x9c device_remove+0x4c/0x80 device_release_driver_internal+0x1cc/0x228 driver_detach+0x4c/0x98 bus_remove_driver+0x6c/0xbc driver_unregister+0x30/0x60 i2c_del_driver+0x54/0x64 max96712_i2c_driver_exit+0x18/0x1d0 [max96712] __arm64_sys_delete_module+0x1a4/0x290 invoke_syscall+0x48/0x10c el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x34/0xd8 el0t_64_sync_handler+0x120/0x12c el0t_64_sync+0x190/0x194 Code: f9000bf3 aa0003f3 f9402800 f9402000 (f9403400) ---[ end trace 0000000000000000 ]---
This happens because in v4l2_i2c_subdev_init(), the i2c_set_cliendata() is called again and the data is overwritten to point to sd, instead of priv. So, in remove(), the wrong pointer is passed to v4l2_async_unregister_subdev(), leading to a crash.
--- drivers/staging/media/max96712/max96712.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/max96712/max96712.c +2 -2
@@ -418,7 +418,6 @@ static int max96712_probe(struct i2c_cli priv->info =of_device_get_match_data (&client->dev); priv->client = client; -i2c_set_clientdata (client, priv); priv->regmap =devm_regmap_init_i2c (client, &max96712_i2c_regmap);if (IS_ERR (priv->regmap))
@@ -448,7 +447,8 @@ static int max96712_probe(struct i2c_clistatic void max96712_remove (struct i2c_client *client) { -struct max96712_priv *priv =i2c_get_clientdata (client); +struct v4l2_subdev *sd =i2c_get_clientdata (client); + struct max96712_priv *priv = container_of(sd, struct max96712_priv, sd);v4l2_async_unregister_subdev (&priv->sd);
Greg Kroah-Hartman
maintainerPATCH 610/623 media: imx-jpeg: Fix potential error pointer dereference in detach_pm()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 1378ffec30367233152b7dbf4fa6a25ee98585d1 upstream.
The proble is on the first line:
if (jpeg->pd_dev[i] && !pm_runtime_suspended(jpeg->pd_dev[i]))
If jpeg->pd_dev[i] is an error pointer, then passing it to pm_runtime_suspended() will lead to an Oops. The other conditions check for both error pointers and NULL, but it would be more clear to use the IS_ERR_OR_NULL() check for that.
--- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +4 -3
@@ -2677,11 +2677,12 @@ static void mxc_jpeg_detach_pm_domains(sint i;for (i =0 ; i < jpeg->num_domains; i++) { -if (jpeg->pd_dev[i] && !pm_runtime_suspended (jpeg->pd_dev[i])) +if (!IS_ERR_OR_NULL (jpeg->pd_dev[i]) && + !pm_runtime_suspended (jpeg->pd_dev[i]))pm_runtime_force_suspend (jpeg->pd_dev[i]); -if (jpeg->pd_link[i] && !IS_ERR (jpeg->pd_link[i])) +if (!IS_ERR_OR_NULL (jpeg->pd_link[i]))device_link_del (jpeg->pd_link[i]); -if (jpeg->pd_dev[i] && !IS_ERR (jpeg->pd_dev[i])) +if (!IS_ERR_OR_NULL (jpeg->pd_dev[i]))dev_pm_domain_detach (jpeg->pd_dev[i], true); jpeg->pd_dev[i] =NULL ; jpeg->pd_link[i] =NULL ;
Greg Kroah-Hartman
maintainerPATCH 611/623 powerpc/pseries/iommu: Dont unset window if it was never set
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shivaprasad G Bhat <[email protected]>
commit 17391cb2613b82f8c405570fea605af3255ff8d2 upstream.
On pSeries, when user attempts to use the same vfio container used by different iommu group, the spapr_tce_set_window() returns -EPERM and the subsequent cleanup leads to the below crash.
Kernel attempted to read user page (308) - exploit attempt?
BUG: Kernel NULL pointer dereference on read at 0x00000308
Faulting instruction address: 0xc0000000001ce358
Oops: Kernel access of bad area, sig: 11 [#1]
NIP: c0000000001ce358 LR: c0000000001ce05c CTR: c00000000005add0
<snip>
NIP [c0000000001ce358] spapr_tce_unset_window+0x3b8/0x510
LR [c0000000001ce05c] spapr_tce_unset_window+0xbc/0x510
Call Trace:
spapr_tce_unset_window+0xbc/0x510 (unreliable)
tce_iommu_attach_group+0x24c/0x340 [vfio_iommu_spapr_tce]
vfio_container_attach_group+0xec/0x240 [vfio]
vfio_group_fops_unl_ioctl+0x548/0xb00 [vfio]
sys_ioctl+0x754/0x1580
system_call_exception+0x13c/0x330
system_call_vectored_common+0x15c/0x2ec
<snip>
--- interrupt: 3000Fix this by having null check for the tbl passed to the spapr_tce_unset_window().
--- arch/powerpc/platforms/pseries/iommu.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/platforms/pseries/iommu.c +3 -0
@@ -2208,6 +2208,9 @@ static long spapr_tce_unset_window(strucconst char *win_name;int ret = -ENODEV ; +if (!tbl)/* The table was never created OR window was never opened */ +return 0 ; +mutex_lock (&dma_win_init_mutex);if ((num ==0 ) &&is_default_window_table (table_group, tbl))
Greg Kroah-Hartman
maintainerPATCH 612/623 md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
commit 8d28d0ddb986f56920ac97ae704cc3340a699a30 upstream.
After commit ec6bb299c7c3 ("md/md-bitmap: add 'sync_size' into struct md_bitmap_stats"), following panic is reported:
Oops: general protection fault, probably for non-canonical address RIP: 0010:bitmap_get_stats+0x2b/0xa0 Call Trace: <TASK> md_seq_show+0x2d2/0x5b0 seq_read_iter+0x2b9/0x470 seq_read+0x12f/0x180 proc_reg_read+0x57/0xb0 vfs_read+0xf6/0x380 ksys_read+0x6c/0xf0 do_syscall_64+0x82/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e
Root cause is that bitmap_get_stats() can be called at anytime if mddev is still there, even if bitmap is destroyed, or not fully initialized. Deferenceing bitmap in this case can crash the kernel. Meanwhile, the above commit start to deferencing bitmap->storage, make the problem easier to trigger.
Fix the problem by protecting bitmap_get_stats() with bitmap_info.mutex.
--- drivers/md/md-bitmap.c | 5 ++++- drivers/md/md.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/md/md-bitmap.c +4 -1
@@ -2355,7 +2355,10 @@ static int bitmap_get_stats(void *data,if (!bitmap)return -ENOENT ; - +if (bitmap->mddev->bitmap_info.external) +return -ENOENT ; +if (!bitmap->storage.sb_page)/* no superblock */ +return -EINVAL ; sb =kmap_local_page (bitmap->storage.sb_page); stats->sync_size =le64_to_cpu (sb->sync_size);kunmap_local (sb);
drivers/md/md.c +5 -0
@@ -8376,6 +8376,10 @@ static int md_seq_show(struct seq_file *return 0 ;spin_unlock (&all_mddevs_lock); + +/* prevent bitmap to be freed after checking */ +mutex_lock (&mddev->bitmap_info.mutex); +spin_lock (&mddev->lock);if (mddev->pers || mddev->raid_disks || !list_empty (&mddev->disks)) {seq_printf (seq,"%s : " ,mdname (mddev));
@@ -8451,6 +8455,7 @@ static int md_seq_show(struct seq_file *seq_printf (seq,"\n" ); }spin_unlock (&mddev->lock); +mutex_unlock (&mddev->bitmap_info.mutex);spin_lock (&all_mddevs_lock); if (mddev == list_last_entry(&all_mddevs, struct mddev, all_mddevs))
Greg Kroah-Hartman
maintainerPATCH 613/623 btrfs: output the reason for open_ctree() failure
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <[email protected]>
commit d0f038104fa37380e2a725e669508e43d0c503e9 upstream.
There is a recent ML report that mounting a large fs backed by hardware RAID56 controller (with one device missing) took too much time, and systemd seems to kill the mount attempt.
In that case, the only error message is:
BTRFS error (device sdj): open_ctree failed
There is no reason on why the failure happened, making it very hard to understand the reason.
At least output the error number (in the particular case it should be -EINTR) to provide some clue.
--- fs/btrfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/super.c +1 -1
@@ -971,7 +971,7 @@ static int btrfs_fill_super(struct super err =open_ctree (sb, fs_devices);if (err) { -btrfs_err (fs_info,"open_ctree failed" ); +btrfs_err (fs_info,"open_ctree failed: %d" , err);return err; }
Greg Kroah-Hartman
maintainerPATCH 614/623 selftests/mm: build with -O2
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kevin Brodsky <[email protected]>
commit 46036188ea1f5266df23a6149dea0df1c77cd1c7 upstream.
The mm kselftests are currently built with no optimisation (-O0). It's unclear why, and besides being obviously suboptimal, this also prevents the pkeys tests from working as intended. Let's build all the tests with -O2.
--- tools/testing/selftests/mm/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
tools/testing/selftests/mm/Makefile +8 -1
@@ -33,9 +33,16 @@ endif # LDLIBS. MAKEFLAGS += --no-builtin-rules -CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) +CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) LDLIBS = -lrt -lpthread -lm +# Some distributions (such as Ubuntu) configure GCC so that _FORTIFY_SOURCE is +# automatically enabled at -O1 or above. This triggers various unused-result +# warnings where functions such as read() or write() are called and their +# return value is not checked. Disable _FORTIFY_SOURCE to silence those +# warnings. +CFLAGS += -U_FORTIFY_SOURCE + KDIR ?= /lib/modules/$(shell uname -r)/build ifneq (,$(wildcard $(KDIR)/Module.symvers)) ifneq (,$(wildcard $(KDIR)/include/linux/page_frag_cache.h))
Greg Kroah-Hartman
maintainerPATCH 615/623 ASoC: da7213: Initialize the mutex
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
commit 4a32a38cb68f55ff9e100df348ddb3d4b3e50643 upstream.
Initialize the struct da7213_priv::ctrl_lock mutex. Without it the following stack trace is displayed when rebooting and lockdep is enabled:
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 0 PID: 180 at kernel/locking/mutex.c:564 __mutex_lock+0x254/0x4e4 CPU: 0 UID: 0 PID: 180 Comm: alsactl Not tainted 6.13.0-next-20250123-arm64-renesas-00002-g132083a22d3d #30 Hardware name: Renesas SMARC EVK version 2 based on r9a08g045s33 (DT) pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __mutex_lock+0x254/0x4e4 lr : __mutex_lock+0x254/0x4e4
sp : ffff800082c13c00
x29: ffff800082c13c00 x28: ffff00001002b500 x27: 0000000000000000
x26: 0000000000000000 x25: ffff800080b30db4 x24: 0000000000000002
x23: ffff800082c13c70 x22: 0000ffffc2a68a70 x21: ffff000010348000
x20: 0000000000000000 x19: ffff00000be2e488 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 00000000000003c1 x13: 00000000000003c1 x12: 0000000000000000
x11: 0000000000000011 x10: 0000000000001420 x9 : ffff800082c13a70 x8 : 0000000000000001 x7 : ffff800082c13a50 x6 : ffff800082c139e0 x5 : ffff800082c14000 x4 : ffff800082c13a50 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00001002b500
Call trace: __mutex_lock+0x254/0x4e4 (P) mutex_lock_nested+0x20/0x28 da7213_volsw_locked_get+0x34/0x60 snd_ctl_elem_read+0xbc/0x114 snd_ctl_ioctl+0x878/0xa70 __arm64_sys_ioctl+0x94/0xc8 invoke_syscall+0x44/0x104 el0_svc_common.constprop.0+0xb4/0xd4 do_el0_svc+0x18/0x20 el0_svc+0x3c/0xf0 el0t_64_sync_handler+0xc0/0xc4 el0t_64_sync+0x154/0x158 irq event stamp: 7713 hardirqs last enabled at (7713): [<ffff800080170d94>] ktime_get_coarse_real_ts64+0xf0/0x10c hardirqs last disabled at (7712): [<ffff800080170d58>] ktime_get_coarse_real_ts64+0xb4/0x10c softirqs last enabled at (7550): [<ffff8000800179d4>] fpsimd_restore_current_state+0x30/0xb8 softirqs last disabled at (7548): [<ffff8000800179a8>] fpsimd_restore_current_state+0x4/0xb8 ---[ end trace 0000000000000000 ]---
--- sound/soc/codecs/da7213.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/da7213.c +2 -0
@@ -2203,6 +2203,8 @@ static int da7213_i2c_probe(struct i2c_creturn ret; } +mutex_init (&da7213->ctrl_lock); +pm_runtime_set_autosuspend_delay (&i2c->dev,100 );pm_runtime_use_autosuspend (&i2c->dev);pm_runtime_set_active (&i2c->dev);
Greg Kroah-Hartman
maintainerPATCH 616/623 s390: Add -std=gnu11 to decompressor and purgatory CFLAGS
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
commit 3b8b80e993766dc96d1a1c01c62f5d15fafc79b9 upstream.
GCC changed the default C standard dialect from gnu17 to gnu23, which should not have impacted the kernel because it explicitly requests the gnu11 standard in the main Makefile. However, there are certain places in the s390 code that use their own CFLAGS without a '-std=' value, which break with this dialect change because of the kernel's own definitions of bool, false, and true conflicting with the C23 reserved keywords.
include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
11 | false = 0,
| ^~~~~
include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
include/linux/types.h:35:33: error: 'bool' cannot be defined via 'typedef'
35 | typedef _Bool bool;
| ^~~~ include/linux/types.h:35:33: note: 'bool' is a keyword with '-std=c23' onwards
Add '-std=gnu11' to the decompressor and purgatory CFLAGS to eliminate these errors and make the C standard version of these areas match the rest of the kernel.
--- arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/s390/Makefile +1 -1
@@ -22,7 +22,7 @@ KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FL ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) endif -KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack +KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -D__DECOMPRESSOR KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float -mbackchain
arch/s390/purgatory/Makefile +1 -1
@@ -13,7 +13,7 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS - $(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE $(call if_changed_rule,as_o_S) -KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes +KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
Greg Kroah-Hartman
maintainerPATCH 617/623 drm/amd/display: Add hubp cache reset when powergating
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aric Cyr <[email protected]>
commit 01130f5260e5868fb6b15ab8c00dbc894139f48e upstream.
[Why]
When HUBP is power gated, the SW state can get out of sync with the hardware state causing cursor to not be programmed correctly.
[How]
Similar to DPP, add a HUBP reset function which is called wherever HUBP is initialized or powergated. This function will clear the cursor position and attribute cache allowing for proper programming when the HUBP is brought back up.
--- drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 3 +++ drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 1 + drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 3 ++- drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 ++ drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 ++ 14 files changed, 33 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +3 -0
@@ -194,6 +194,9 @@ void dpp_reset(struct dpp *dpp_base) dpp->filter_h =NULL ; dpp->filter_v =NULL ; +memset (&dpp_base->pos,0 ,sizeof (dpp_base->pos)); +memset (&dpp_base->att,0 ,sizeof (dpp_base->att)); +memset (&dpp->scl_data,0 ,sizeof (dpp->scl_data));memset (&dpp->pwl_data,0 ,sizeof (dpp->pwl_data)); }
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c +9 -1
@@ -532,6 +532,12 @@ void hubp1_dcc_control(struct hubp *hubp SECONDARY_SURFACE_DCC_IND_64B_BLK, dcc_ind_64b_blk); } +void hubp_reset (struct hubp *hubp) +{ +memset (&hubp->pos,0 ,sizeof (hubp->pos)); +memset (&hubp->att,0 ,sizeof (hubp->att)); +} + void hubp1_program_surface_config( struct hubp *hubp, enum surface_pixel_format format,
@@ -1337,8 +1343,9 @@ static void hubp1_wait_pipe_read_start(svoid hubp1_init (struct hubp *hubp) { -//do nothing +hubp_reset (hubp); } +static const struct hubp_funcs dcn10_hubp_funcs = { .hubp_program_surface_flip_and_addr = hubp1_program_surface_flip_and_addr,
@@ -1351,6 +1358,7 @@ static const struct hubp_funcs dcn10_hub .hubp_set_vm_context0_settings = hubp1_set_vm_context0_settings, .set_blank = hubp1_set_blank, .dcc_control = hubp1_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_hubp_blank_en = hubp1_set_hubp_blank_en, .set_cursor_attributes = hubp1_cursor_set_attributes,
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h +2 -0
@@ -746,6 +746,8 @@ void hubp1_dcc_control(struct hubp *hubpbool enable, enum hubp_ind_block_size independent_64b_blks); +void hubp_reset (struct hubp *hubp); + bool hubp1_program_surface_flip_and_addr( struct hubp *hubp, const struct dc_plane_address *address,
drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c +1 -0
@@ -1660,6 +1660,7 @@ static struct hubp_funcs dcn20_hubp_func .set_blank = hubp2_set_blank, .set_blank_regs = hubp2_set_blank_regs, .dcc_control = hubp2_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_cursor_attributes = hubp2_cursor_set_attributes, .set_cursor_position = hubp2_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c +1 -0
@@ -121,6 +121,7 @@ static struct hubp_funcs dcn201_hubp_fun .set_cursor_position = hubp1_cursor_set_position, .set_blank = hubp1_set_blank, .dcc_control = hubp1_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .hubp_clk_cntl = hubp1_clk_cntl, .hubp_vtg_sel = hubp1_vtg_sel,
drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c +3 -0
@@ -811,6 +811,8 @@ static void hubp21_init(struct hubp *hubstruct dcn21_hubp *hubp21 =TO_DCN21_HUBP (hubp);//hubp[i].HUBPREQ_DEBUG.HUBPREQ_DEBUG[26] = 1; REG_WRITE (HUBPREQ_DEBUG ,1 <<26 ); + +hubp_reset (hubp); }static struct hubp_funcs dcn21_hubp_funcs = { .hubp_enable_tripleBuffer = hubp2_enable_triplebuffer,
@@ -823,6 +825,7 @@ static struct hubp_funcs dcn21_hubp_func .hubp_set_vm_system_aperture_settings = hubp21_set_vm_system_aperture_settings, .set_blank = hubp1_set_blank, .dcc_control = hubp1_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = hubp21_set_viewport, .set_cursor_attributes = hubp2_cursor_set_attributes, .set_cursor_position = hubp1_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c +3 -0
@@ -483,6 +483,8 @@ void hubp3_init(struct hubp *hubp)struct dcn20_hubp *hubp2 =TO_DCN20_HUBP (hubp);//hubp[i].HUBPREQ_DEBUG.HUBPREQ_DEBUG[26] = 1; REG_WRITE (HUBPREQ_DEBUG ,1 <<26 ); + +hubp_reset (hubp); }static struct hubp_funcs dcn30_hubp_funcs = {
@@ -497,6 +499,7 @@ static struct hubp_funcs dcn30_hubp_func .set_blank = hubp2_set_blank, .set_blank_regs = hubp2_set_blank_regs, .dcc_control = hubp3_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_cursor_attributes = hubp2_cursor_set_attributes, .set_cursor_position = hubp2_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c +1 -0
@@ -79,6 +79,7 @@ static struct hubp_funcs dcn31_hubp_func .hubp_set_vm_system_aperture_settings = hubp3_set_vm_system_aperture_settings, .set_blank = hubp2_set_blank, .dcc_control = hubp3_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_cursor_attributes = hubp2_cursor_set_attributes, .set_cursor_position = hubp2_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c +1 -0
@@ -181,6 +181,7 @@ static struct hubp_funcs dcn32_hubp_func .set_blank = hubp2_set_blank, .set_blank_regs = hubp2_set_blank_regs, .dcc_control = hubp3_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_cursor_attributes = hubp32_cursor_set_attributes, .set_cursor_position = hubp2_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c +1 -0
@@ -199,6 +199,7 @@ static struct hubp_funcs dcn35_hubp_func .hubp_set_vm_system_aperture_settings = hubp3_set_vm_system_aperture_settings, .set_blank = hubp2_set_blank, .dcc_control = hubp3_dcc_control, + .hubp_reset = hubp_reset, .mem_program_viewport = min_set_viewport, .set_cursor_attributes = hubp2_cursor_set_attributes, .set_cursor_position = hubp2_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +2 -1
@@ -141,7 +141,7 @@ void hubp401_update_mall_sel(struct hubpvoid hubp401_init (struct hubp *hubp) { -//For now nothing to do, HUBPREQ_DEBUG_DB register is removed on DCN4x. +hubp_reset (hubp); } void hubp401_vready_at_or_After_vsync(struct hubp *hubp,
@@ -974,6 +974,7 @@ static struct hubp_funcs dcn401_hubp_fun .hubp_set_vm_system_aperture_settings = hubp3_set_vm_system_aperture_settings, .set_blank = hubp2_set_blank, .set_blank_regs = hubp2_set_blank_regs, + .hubp_reset = hubp_reset, .mem_program_viewport = hubp401_set_viewport, .set_cursor_attributes = hubp32_cursor_set_attributes, .set_cursor_position = hubp401_cursor_set_position,
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +2 -0
@@ -1286,6 +1286,7 @@ void dcn10_plane_atomic_power_down(strucif (hws->funcs.hubp_pg_control) hws->funcs.hubp_pg_control (hws, hubp->inst, false); + hubp->funcs->hubp_reset (hubp); dpp->funcs->dpp_reset (dpp); REG_SET(DC_IP_REQUEST_CNTL, 0,
@@ -1447,6 +1448,7 @@ void dcn10_init_pipes(struct dc *dc, str/* Disable on the current state so the new one isn't cleared. */ pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i]; + hubp->funcs->hubp_reset (hubp); dpp->funcs->dpp_reset (dpp); pipe_ctx->stream_res.tg = tg;
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +2 -0
@@ -788,6 +788,7 @@ void dcn35_init_pipes(struct dc *dc, str/* Disable on the current state so the new one isn't cleared. */ pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i]; + hubp->funcs->hubp_reset (hubp); dpp->funcs->dpp_reset (dpp); pipe_ctx->stream_res.tg = tg;
@@ -944,6 +945,7 @@ void dcn35_plane_atomic_disable(struct d/*to do, need to support both case*/ hubp->power_gated = true; + hubp->funcs->hubp_reset (hubp); dpp->funcs->dpp_reset (dpp); pipe_ctx->stream =NULL ;
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +2 -0
@@ -152,6 +152,8 @@ struct hubp_funcs {void (*dcc_control)(struct hubp *hubp,bool enable,enum hubp_ind_block_size blk_size); +void (*hubp_reset)(struct hubp *hubp); + void (*mem_program_viewport)( struct hubp *hubp, const struct rect *viewport,
Greg Kroah-Hartman
maintainerPATCH 618/623 KVM: x86: Plumb in the vCPU to kvm_x86_ops.hwapic_isr_update()
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <[email protected]>
commit 76bce9f10162cd4b36ac0b7889649b22baf70ebd upstream.
Pass the target vCPU to the hwapic_isr_update() vendor hook so that VMX can defer the update until after nested VM-Exit if an EOI for L1's vAPIC occurs while L2 is active.
Note, commit d39850f57d21 ("KVM: x86: Drop @vcpu parameter from kvm_x86_ops.hwapic_isr_update()") removed the parameter with the justification that doing so "allows for a decent amount of (future) cleanup in the APIC code", but it's not at all clear what cleanup was intended, or if it was ever realized.
No functional change intended.
--- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/lapic.c | 11 +++++------ arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/vmx/x86_ops.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-)
arch/x86/include/asm/kvm_host.h +1 -1
@@ -1735,7 +1735,7 @@ struct kvm_x86_ops {bool allow_apicv_in_x2apic_without_x2apic_virtualization;void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);void (*hwapic_irr_update)(struct kvm_vcpu *vcpu,int max_irr); -void (*hwapic_isr_update)(int isr); +void (*hwapic_isr_update)(struct kvm_vcpu *vcpu,int isr);void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu,u64 *eoi_exit_bitmap);void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu);void (*set_apic_access_page_addr)(struct kvm_vcpu *vcpu);
arch/x86/kvm/lapic.c +5 -6
@@ -763,7 +763,7 @@ static inline void apic_set_isr(int vec,* just set SVI. */ if (unlikely (apic->apicv_active)) -kvm_x86_call (hwapic_isr_update)(vec); +kvm_x86_call (hwapic_isr_update)(apic->vcpu, vec);else { ++apic->isr_count;BUG_ON (apic->isr_count >MAX_APIC_VECTOR );
@@ -808,7 +808,7 @@ static inline void apic_clear_isr(int ve* and must be left alone. */ if (unlikely (apic->apicv_active)) -kvm_x86_call (hwapic_isr_update)(apic_find_highest_isr (apic)); +kvm_x86_call (hwapic_isr_update)(apic->vcpu,apic_find_highest_isr (apic));else { --apic->isr_count;BUG_ON (apic->isr_count <0 );
@@ -2806,7 +2806,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcif (apic->apicv_active) {kvm_x86_call (apicv_post_state_restore)(vcpu);kvm_x86_call (hwapic_irr_update)(vcpu,-1 ); -kvm_x86_call (hwapic_isr_update)(-1 ); +kvm_x86_call (hwapic_isr_update)(vcpu,-1 ); } vcpu->arch.apic_arb_prio =0 ;
@@ -3121,9 +3121,8 @@ int kvm_apic_set_state(struct kvm_vcpu *kvm_apic_update_apicv (vcpu);if (apic->apicv_active) {kvm_x86_call (apicv_post_state_restore)(vcpu); -kvm_x86_call (hwapic_irr_update)(vcpu, -apic_find_highest_irr (apic)); -kvm_x86_call (hwapic_isr_update)(apic_find_highest_isr (apic)); +kvm_x86_call (hwapic_irr_update)(vcpu,apic_find_highest_irr (apic)); +kvm_x86_call (hwapic_isr_update)(vcpu,apic_find_highest_isr (apic)); }kvm_make_request (KVM_REQ_EVENT , vcpu);if (ioapic_in_kernel (vcpu->kvm))
arch/x86/kvm/vmx/vmx.c +1 -1
@@ -6862,7 +6862,7 @@ void vmx_set_apic_access_page_addr(strucread_unlock (&vcpu->kvm->mmu_lock); } -void vmx_hwapic_isr_update (int max_isr) +void vmx_hwapic_isr_update (struct kvm_vcpu *vcpu,int max_isr) {u16 status;u8 old;
arch/x86/kvm/vmx/x86_ops.h +1 -1
@@ -48,7 +48,7 @@ void vmx_migrate_timers(struct kvm_vcpuvoid vmx_set_virtual_apic_mode (struct kvm_vcpu *vcpu);void vmx_apicv_pre_state_restore (struct kvm_vcpu *vcpu);void vmx_hwapic_irr_update (struct kvm_vcpu *vcpu,int max_irr); -void vmx_hwapic_isr_update (int max_isr); +void vmx_hwapic_isr_update (struct kvm_vcpu *vcpu,int max_isr);int vmx_sync_pir_to_irr (struct kvm_vcpu *vcpu);void vmx_deliver_interrupt (struct kvm_lapic *apic,int delivery_mode,int trig_mode,int vector);
Greg Kroah-Hartman
maintainerPATCH 619/623 memcg: fix soft lockup in the OOM process
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
commit ade81479c7dda1ce3eedb215c78bc615bbd04f06 upstream.
A soft lockup issue was found in the product with about 56,000 tasks were in the OOM cgroup, it was traversing them when the soft lockup was triggered.
watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [VM Thread:1503066] CPU: 2 PID: 1503066 Comm: VM Thread Kdump: loaded Tainted: G Hardware name: Huawei Cloud OpenStack Nova, BIOS RIP: 0010:console_unlock+0x343/0x540 RSP: 0000:ffffb751447db9a0 EFLAGS: 00000247 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00000000ffffffff RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000247 RBP: ffffffffafc71f90 R08: 0000000000000000 R09: 0000000000000040 R10: 0000000000000080 R11: 0000000000000000 R12: ffffffffafc74bd0 R13: ffffffffaf60a220 R14: 0000000000000247 R15: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2fe6ad91f0 CR3: 00000004b2076003 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vprintk_emit+0x193/0x280 printk+0x52/0x6e dump_task+0x114/0x130 mem_cgroup_scan_tasks+0x76/0x100 dump_header+0x1fe/0x210 oom_kill_process+0xd1/0x100 out_of_memory+0x125/0x570 mem_cgroup_out_of_memory+0xb5/0xd0 try_charge+0x720/0x770 mem_cgroup_try_charge+0x86/0x180 mem_cgroup_try_charge_delay+0x1c/0x40 do_anonymous_page+0xb5/0x390 handle_mm_fault+0xc4/0x1f0
This is because thousands of processes are in the OOM cgroup, it takes a long time to traverse all of them. As a result, this lead to soft lockup in the OOM process.
To fix this issue, call 'cond_resched' in the 'mem_cgroup_scan_tasks' function per 1000 iterations. For global OOM, call 'touch_softlockup_watchdog' per 1000 iterations to avoid this issue.
--- mm/memcontrol.c | 7 ++++++- mm/oom_kill.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-)
mm/memcontrol.c +6 -1
@@ -1161,6 +1161,7 @@ void mem_cgroup_scan_tasks(struct mem_cg {struct mem_cgroup *iter;int ret =0 ; +int i =0 ;BUG_ON (mem_cgroup_is_root (memcg));
@@ -1169,8 +1170,12 @@ void mem_cgroup_scan_tasks(struct mem_cgstruct task_struct *task;css_task_iter_start (&iter->css,CSS_TASK_ITER_PROCS , &it); -while (!ret && (task =css_task_iter_next (&it))) +while (!ret && (task =css_task_iter_next (&it))) { +/* Avoid potential softlockup warning */ +if ((++i &1023 ) ==0 ) +cond_resched (); ret =fn (task, arg); + }css_task_iter_end (&it);if (ret) {mem_cgroup_iter_break (memcg, iter);
mm/oom_kill.c +7 -1
@@ -44,6 +44,7 @@#include <linux/init.h> #include <linux/mmu_notifier.h> #include <linux/cred.h> +#include <linux/nmi.h> #include <asm/tlb.h> #include "internal.h"
@@ -430,10 +431,15 @@ static void dump_tasks(struct oom_contromem_cgroup_scan_tasks (oc->memcg, dump_task, oc); else {struct task_struct *p; +int i =0 ;rcu_read_lock (); -for_each_process (p) +for_each_process (p) { +/* Avoid potential softlockup warning */ +if ((++i &1023 ) ==0 ) +touch_softlockup_watchdog ();dump_task (p, oc); + }rcu_read_unlock (); } }
Greg Kroah-Hartman
maintainerPATCH 620/623 pwm: Ensure callbacks exist before calling them
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
commit da6b353786997c0ffa67127355ad1d54ed3324c2 upstream.
If one of the waveform functions is called for a chip that only supports .apply(), we want that an error code is returned and not a NULL pointer exception.
--- drivers/pwm/core.c | 13 +++++++++++-- include/linux/pwm.h | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-)
drivers/pwm/core.c +11 -2
@@ -242,6 +242,9 @@ int pwm_round_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform *BUG_ON (WFHWSIZE < ops->sizeof_wfhw); +if (!pwmchip_supports_waveform (chip)) +return -EOPNOTSUPP ; +if (!pwm_wf_valid (wf))return -EINVAL ;
@@ -294,6 +297,9 @@ int pwm_get_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform *wfBUG_ON (WFHWSIZE < ops->sizeof_wfhw); +if (!pwmchip_supports_waveform (chip) || !ops->read_waveform) +return -EOPNOTSUPP ; +guard (pwmchip)(chip);if (!chip->operational)
@@ -320,6 +326,9 @@ static int __pwm_set_waveform(struct pwm_device *pwm,BUG_ON (WFHWSIZE < ops->sizeof_wfhw); +if (!pwmchip_supports_waveform (chip)) +return -EOPNOTSUPP ; +if (!pwm_wf_valid (wf))return -EINVAL ;
@@ -592,7 +601,7 @@ static int __pwm_apply(struct pwm_device *pwm, const struct pwm_state *state) state->usage_power == pwm->state.usage_power)return 0 ; -if (ops->write_waveform) { +if (pwmchip_supports_waveform (chip)) {struct pwm_waveform wf;char wfhw[WFHWSIZE ];
@@ -746,7 +755,7 @@ int pwm_get_state_hw(struct pwm_device *pwm, struct pwm_state *state)if (!chip->operational)return -ENODEV ; -if (ops->read_waveform) { +if (pwmchip_supports_waveform (chip) && ops->read_waveform) {char wfhw[WFHWSIZE ];struct pwm_waveform wf;
include/linux/pwm.h +17 -0
@@ -347,6 +347,23 @@ struct pwm_chip { struct pwm_device pwms[] __counted_by(npwm); }; +/** +* pwmchip_supports_waveform() - checks if the given chip supports waveform callbacks +* @chip: The pwm_chip to test +* +* Returns true iff the pwm chip support the waveform functions like +* pwm_set_waveform_might_sleep() and pwm_round_waveform_might_sleep() +*/ +static inline bool pwmchip_supports_waveform (struct pwm_chip *chip) +{ +/* +* only check for .write_waveform(). If that is available, +* .round_waveform_tohw() and .round_waveform_fromhw() asserted to be +* available, too, in pwmchip_add(). +*/ +return chip->ops->write_waveform !=NULL ; +} +static inline struct device *pwmchip_parent (const struct pwm_chip *chip) {return chip->dev.parent;
Signature · 1 line
2.48.1
Greg Kroah-Hartman
maintainerPATCH 621/623 LoongArch: Change 8 to 14 for LOONGARCH_MAX_{BRP,WRP}
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tiezhu Yang <[email protected]>
commit f502ea618bf16d615d7dc6138c8988d3118fe750 upstream.
The maximum number of load/store watchpoints and fetch instruction watchpoints is 14 each according to LoongArch Reference Manual, so change 8 to 14 for the related code.
--- arch/loongarch/include/asm/hw_breakpoint.h | 4 - arch/loongarch/include/asm/loongarch.h | 60 +++++++++++++++++++++++++++++ arch/loongarch/kernel/hw_breakpoint.c | 16 ++++++- 3 files changed, 76 insertions(+), 4 deletions(-)
arch/loongarch/include/asm/hw_breakpoint.h +2 -2
@@ -38,8 +38,8 @@ struct arch_hw_breakpoint {* Limits. * Changing these will require modifications to the register accessors. */ -#define LOONGARCH_MAX_BRP 8 -#define LOONGARCH_MAX_WRP 8 +#define LOONGARCH_MAX_BRP 14 +#define LOONGARCH_MAX_WRP 14/* Virtual debug register bases. */ #define CSR_CFG_ADDR 0
arch/loongarch/include/asm/loongarch.h +60 -0
72 lines not on this page · raw message
arch/loongarch/kernel/hw_breakpoint.c +14 -2
@@ -51,7 +51,13 @@ int hw_breakpoint_slots(int type)READ_WB_REG_CASE (OFF ,4 ,REG ,T ,VAL ); \READ_WB_REG_CASE (OFF ,5 ,REG ,T ,VAL ); \READ_WB_REG_CASE (OFF ,6 ,REG ,T ,VAL ); \ -READ_WB_REG_CASE (OFF ,7 ,REG ,T ,VAL ); +READ_WB_REG_CASE (OFF ,7 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,8 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,9 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,10 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,11 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,12 ,REG ,T ,VAL ); \ +READ_WB_REG_CASE (OFF ,13 ,REG ,T ,VAL );#define GEN_WRITE_WB_REG_CASES (OFF ,REG ,T ,VAL ) \ WRITE_WB_REG_CASE(OFF, 0, REG, T, VAL); \
@@ -61,7 +67,13 @@ int hw_breakpoint_slots(int type)WRITE_WB_REG_CASE (OFF ,4 ,REG ,T ,VAL ); \WRITE_WB_REG_CASE (OFF ,5 ,REG ,T ,VAL ); \WRITE_WB_REG_CASE (OFF ,6 ,REG ,T ,VAL ); \ -WRITE_WB_REG_CASE (OFF ,7 ,REG ,T ,VAL ); +WRITE_WB_REG_CASE (OFF ,7 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,8 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,9 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,10 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,11 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,12 ,REG ,T ,VAL ); \ +WRITE_WB_REG_CASE (OFF ,13 ,REG ,T ,VAL );static u64 read_wb_reg (int reg,int n,int t) {
Greg Kroah-Hartman
maintainerPATCH 622/623 btrfs: do proper folio cleanup when cow_file_range() failed
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <[email protected]>
commit 06f364284794f149d2abc167c11d556cf20c954b upstream.
[BUG]
When testing with COW fixup marked as BUG_ON() (this is involved with the new pin_user_pages*() change, which should not result new out-of-band dirty pages), I hit a crash triggered by the BUG_ON() from hitting COW fixup path.
This BUG_ON() happens just after a failed btrfs_run_delalloc_range():
BTRFS error (device dm-2): failed to run delalloc range, root 348 ino 405 folio 65536 submit_bitmap 6-15 start 90112 len 106496: -28
------------[ cut here ]------------ kernel BUG at fs/btrfs/extent_io.c:1444! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP CPU: 0 UID: 0 PID: 434621 Comm: kworker/u24:8 Tainted: G OE 6.12.0-rc7-custom+ #86 Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] pc : extent_writepage_io+0x2d4/0x308 [btrfs] lr : extent_writepage_io+0x2d4/0x308 [btrfs] Call trace: extent_writepage_io+0x2d4/0x308 [btrfs] extent_writepage+0x218/0x330 [btrfs] extent_write_cache_pages+0x1d4/0x4b0 [btrfs] btrfs_writepages+0x94/0x150 [btrfs] do_writepages+0x74/0x190 filemap_fdatawrite_wbc+0x88/0xc8 start_delalloc_inodes+0x180/0x3b0 [btrfs] btrfs_start_delalloc_roots+0x174/0x280 [btrfs] shrink_delalloc+0x114/0x280 [btrfs] flush_space+0x250/0x2f8 [btrfs] btrfs_async_reclaim_data_space+0x180/0x228 [btrfs] process_one_work+0x164/0x408 worker_thread+0x25c/0x388 kthread+0x100/0x118 ret_from_fork+0x10/0x20 Code: aa1403e1 9402f3ef aa1403e0 9402f36f (d4210000) ---[ end trace 0000000000000000 ]---
[CAUSE]
That failure is mostly from cow_file_range(), where we can hit -ENOSPC.
Although the -ENOSPC is already a bug related to our space reservation code, let's just focus on the error handling.
For example, we have the following dirty range [0, 64K) of an inode, with 4K sector size and 4K page size:
0 16K 32K 48K 64K |///////////////////////////////////////| |#######################################|
Where |///| means page are still dirty, and |###| means the extent io tree has EXTENT_DELALLOC flag.
- Enter extent_writepage() for page 0
- Enter btrfs_run_delalloc_range() for range [0, 64K)
- Enter cow_file_range() for range [0, 64K)
- Function btrfs_reserve_extent() only reserved one 16K extent So we created extent map and ordered extent for range [0, 16K)
0 16K 32K 48K 64K |////////|//////////////////////////////| |<- OE ->|##############################|
And range [0, 16K) has its delalloc flag cleared.
But since we haven't yet submit any bio, involved 4 pages are still dirty.
- Function btrfs_reserve_extent() returns with -ENOSPC Now we have to run error cleanup, which will clear all EXTENT_DELALLOC* flags and clear the dirty flags for the remaining ranges:
0 16K 32K 48K 64K |////////| | | | |
Note that range [0, 16K) still has its pages dirty.
- Some time later, writeback is triggered again for the range [0, 16K) since the page range still has dirty flags.
- btrfs_run_delalloc_range() will do nothing because there is no EXTENT_DELALLOC flag.
- extent_writepage_io() finds page 0 has no ordered flag Which falls into the COW fixup path, triggering the BUG_ON().
Unfortunately this error handling bug dates back to the introduction of btrfs. Thankfully with the abuse of COW fixup, at least it won't crash the kernel.
[FIX]
Instead of immediately unlocking the extent and folios, we keep the extent and folios locked until either erroring out or the whole delalloc range finished.
When the whole delalloc range finished without error, we just unlock the whole range with PAGE_SET_ORDERED (and PAGE_UNLOCK for !keep_locked cases), with EXTENT_DELALLOC and EXTENT_LOCKED cleared.
And the involved folios will be properly submitted, with their dirty flags cleared during submission.
For the error path, it will be a little more complex:
- The range with ordered extent allocated (range (1))
We only clear the EXTENT_DELALLOC and EXTENT_LOCKED, as the remaining flags are cleaned up by btrfs_mark_ordered_io_finished()->btrfs_finish_one_ordered().
For folios we finish the IO (clear dirty, start writeback and immediately finish the writeback) and unlock the folios.
- The range with reserved extent but no ordered extent (range(2))
- The range we never touched (range(3))
For both range (2) and range(3) the behavior is not changed.
Now even if cow_file_range() failed halfway with some successfully reserved extents/ordered extents, we will keep all folios clean, so there will be no future writeback triggered on them.
--- fs/btrfs/inode.c | 63 ++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 33 deletions(-)
fs/btrfs/inode.c +30 -33
@@ -1373,6 +1373,17 @@ static noinline int cow_file_range(struc alloc_hint =btrfs_get_extent_allocation_hint (inode, start, num_bytes);/* +* We're not doing compressed IO, don't unlock the first page (which +* the caller expects to stay locked), don't clear any dirty bits and +* don't set any writeback bits. +* +* Do set the Ordered (Private2) bit so we know this page was properly +* setup for writepage. +*/ + page_ops = (keep_locked ?0 :PAGE_UNLOCK ); + page_ops |=PAGE_SET_ORDERED ; + +/* * Relocation relies on the relocated extents to have exactly the same * size as the original extents. Normally writeback for relocation data * extents follows a NOCOW path because relocation preallocates the
@@ -1431,6 +1442,10 @@ static noinline int cow_file_range(struc file_extent.offset =0 ; file_extent.compression =BTRFS_COMPRESS_NONE ; +/* +* Locked range will be released either during error clean up or +* after the whole range is finished. +*/ lock_extent (&inode->io_tree, start, start + cur_alloc_size -1 , &cached);
@@ -1476,21 +1491,6 @@ static noinline int cow_file_range(strucbtrfs_dec_block_group_reservations (fs_info, ins.objectid); -/* -* We're not doing compressed IO, don't unlock the first page -* (which the caller expects to stay locked), don't clear any -* dirty bits and don't set any writeback bits -* -* Do set the Ordered flag so we know this page was -* properly setup for writepage. -*/ - page_ops = (keep_locked ?0 :PAGE_UNLOCK ); - page_ops |=PAGE_SET_ORDERED ; - -extent_clear_unlock_delalloc (inode, start, start + cur_alloc_size -1 , - locked_folio, &cached, -EXTENT_LOCKED |EXTENT_DELALLOC , - page_ops);if (num_bytes < cur_alloc_size) num_bytes =0 ;else
@@ -1507,6 +1507,8 @@ static noinline int cow_file_range(strucif (ret) goto out_unlock; } +extent_clear_unlock_delalloc (inode, orig_start, end, locked_folio, &cached, +EXTENT_LOCKED |EXTENT_DELALLOC , page_ops); done:if (done_offset) *done_offset = end;
@@ -1527,35 +1529,30 @@ out_unlock:* We process each region below. */ - clear_bits =EXTENT_LOCKED |EXTENT_DELALLOC |EXTENT_DELALLOC_NEW | -EXTENT_DEFRAG |EXTENT_CLEAR_META_RESV ; - page_ops =PAGE_UNLOCK |PAGE_START_WRITEBACK |PAGE_END_WRITEBACK ; -/* * For the range (1). We have already instantiated the ordered extents * for this region. They are cleaned up by * btrfs_cleanup_ordered_extents() in e.g, -* btrfs_run_delalloc_range(). EXTENT_LOCKED | EXTENT_DELALLOC are -* already cleared in the above loop. And, EXTENT_DELALLOC_NEW | -* EXTENT_DEFRAG | EXTENT_CLEAR_META_RESV are handled by the cleanup -* function. +* btrfs_run_delalloc_range(). +* EXTENT_DELALLOC_NEW | EXTENT_DEFRAG | EXTENT_CLEAR_META_RESV +* are also handled by the cleanup function. * -* However, in case of @keep_locked, we still need to unlock the pages -* (except @locked_folio) to ensure all the pages are unlocked. +* So here we only clear EXTENT_LOCKED and EXTENT_DELALLOC flag, and +* finish the writeback of the involved folios, which will be never submitted. */ -if (keep_locked && orig_start < start) { +if (orig_start < start) { + clear_bits =EXTENT_LOCKED |EXTENT_DELALLOC ; + page_ops =PAGE_UNLOCK |PAGE_START_WRITEBACK |PAGE_END_WRITEBACK ; +if (!locked_folio)mapping_set_error (inode->vfs_inode.i_mapping, ret);extent_clear_unlock_delalloc (inode, orig_start, start -1 , - locked_folio,NULL ,0 , page_ops); + locked_folio,NULL , clear_bits, page_ops); } -/* -* At this point we're unlocked, we want to make sure we're only -* clearing these flags under the extent lock, so lock the rest of the -* range and clear everything up. -*/ -lock_extent (&inode->io_tree, start, end,NULL ); + clear_bits =EXTENT_LOCKED |EXTENT_DELALLOC |EXTENT_DELALLOC_NEW | +EXTENT_DEFRAG |EXTENT_CLEAR_META_RESV ; + page_ops =PAGE_UNLOCK |PAGE_START_WRITEBACK |PAGE_END_WRITEBACK ;/* * For the range (2). If we reserved an extent for our delalloc range
Greg Kroah-Hartman
maintainerPATCH 623/623 btrfs: do proper folio cleanup when run_delalloc_nocow() failed
In reply to Greg Kroah-Hartman6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <[email protected]>
commit c2b47df81c8e20a8e8cd94f0d7df211137ae94ed upstream.
[BUG]
With CONFIG_DEBUG_VM set, test case generic/476 has some chance to crash with the following VM_BUG_ON_FOLIO():
BTRFS error (device dm-3): cow_file_range failed, start 1146880 end 1253375 len 106496 ret -28 BTRFS error (device dm-3): run_delalloc_nocow failed, start 1146880 end 1253375 len 106496 ret -28
page: refcount:4 mapcount:0 mapping:00000000592787cc index:0x12 pfn:0x10664 aops:btrfs_aops [btrfs] ino:101 dentry name(?):"f1774" flags: 0x2fffff80004028(uptodate|lru|private|node=0|zone=2|lastcpupid=0xfffff) page dumped because: VM_BUG_ON_FOLIO(!folio_test_locked(folio)) ------------[ cut here ]------------ kernel BUG at mm/page-writeback.c:2992! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP CPU: 2 UID: 0 PID: 3943513 Comm: kworker/u24:15 Tainted: G OE 6.12.0-rc7-custom+ #87 Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 Workqueue: events_unbound btrfs_async_reclaim_data_space [btrfs] pc : folio_clear_dirty_for_io+0x128/0x258 lr : folio_clear_dirty_for_io+0x128/0x258 Call trace: folio_clear_dirty_for_io+0x128/0x258 btrfs_folio_clamp_clear_dirty+0x80/0xd0 [btrfs] __process_folios_contig+0x154/0x268 [btrfs] extent_clear_unlock_delalloc+0x5c/0x80 [btrfs] run_delalloc_nocow+0x5f8/0x760 [btrfs] btrfs_run_delalloc_range+0xa8/0x220 [btrfs] writepage_delalloc+0x230/0x4c8 [btrfs] extent_writepage+0xb8/0x358 [btrfs] extent_write_cache_pages+0x21c/0x4e8 [btrfs] btrfs_writepages+0x94/0x150 [btrfs] do_writepages+0x74/0x190 filemap_fdatawrite_wbc+0x88/0xc8 start_delalloc_inodes+0x178/0x3a8 [btrfs] btrfs_start_delalloc_roots+0x174/0x280 [btrfs] shrink_delalloc+0x114/0x280 [btrfs] flush_space+0x250/0x2f8 [btrfs] btrfs_async_reclaim_data_space+0x180/0x228 [btrfs] process_one_work+0x164/0x408 worker_thread+0x25c/0x388 kthread+0x100/0x118 ret_from_fork+0x10/0x20 Code: 910a8021 a90363f7 a9046bf9 94012379 (d4210000) ---[ end trace 0000000000000000 ]---
[CAUSE]
The first two lines of extra debug messages show the problem is caused by the error handling of run_delalloc_nocow().
E.g. we have the following dirtied range (4K blocksize 4K page size):
0 16K 32K
|//////////////////////////////////////|
| Pre-allocated |
And the range [0, 16K) has a preallocated extent.
- Enter run_delalloc_nocow() for range [0, 16K)
Which found range [0, 16K) is preallocated, can do the proper NOCOW write.
- Enter fallback_to_fow() for range [16K, 32K)
Since the range [16K, 32K) is not backed by preallocated extent, we have to go COW.
- cow_file_range() failed for range [16K, 32K)
So cow_file_range() will do the clean up by clearing folio dirty, unlock the folios.
Now the folios in range [16K, 32K) is unlocked.
- Enter extent_clear_unlock_delalloc() from run_delalloc_nocow() Which is called with PAGE_START_WRITEBACK to start page writeback. But folios can only be marked writeback when it's properly locked, thus this triggered the VM_BUG_ON_FOLIO().
Furthermore there is another hidden but common bug that run_delalloc_nocow() is not clearing the folio dirty flags in its error handling path.
This is the common bug shared between run_delalloc_nocow() and cow_file_range().
[FIX]
- Clear folio dirty for range [@start, @cur_offset) Introduce a helper, cleanup_dirty_folios(), which
will find and lock the folio in the range, clear the dirty flag and start/end the writeback, with the extra handling for the @locked_folio.
- Introduce a helper to clear folio dirty, start and end writeback
- Introduce a helper to record the last failed COW range end This is to trace which range we should skip, to avoid double unlocking.
- Skip the failed COW range for the error handling
--- fs/btrfs/inode.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++++---- fs/btrfs/subpage.h | 13 +++++++ 2 files changed, 102 insertions(+), 6 deletions(-)
fs/btrfs/inode.c +89 -6
@@ -1968,6 +1968,53 @@ static int can_nocow_file_extent(struct }/* +* Cleanup the dirty folios which will never be submitted due to error. +* +* When running a delalloc range, we may need to split the ranges (due to +* fragmentation or NOCOW). If we hit an error in the later part, we will error +* out and previously successfully executed range will never be submitted, thus +* we have to cleanup those folios by clearing their dirty flag, starting and +* finishing the writeback. +*/ +static void cleanup_dirty_folios (struct btrfs_inode *inode, +struct folio *locked_folio, +u64 start,u64 end,int error) +{ +struct btrfs_fs_info *fs_info = inode->root->fs_info; +struct address_space *mapping = inode->vfs_inode.i_mapping; +pgoff_t start_index = start >>PAGE_SHIFT ; +pgoff_t end_index = end >>PAGE_SHIFT ; +u32 len; + +ASSERT (end +1 - start <U32_MAX ); +ASSERT (IS_ALIGNED (start, fs_info->sectorsize) && +IS_ALIGNED (end +1 , fs_info->sectorsize)); + len = end +1 - start; + +/* +* Handle the locked folio first. +* The btrfs_folio_clamp_*() helpers can handle range out of the folio case. +*/ +btrfs_folio_clamp_finish_io (fs_info, locked_folio, start, len); + +for (pgoff_t index = start_index; index <= end_index; index++) { +struct folio *folio; + +/* Already handled at the beginning. */ +if (index == locked_folio->index) +continue ; + folio =__filemap_get_folio (mapping, index,FGP_LOCK ,GFP_NOFS ); +/* Cache already dropped, no need to do any cleanup. */ +if (IS_ERR (folio)) +continue ; +btrfs_folio_clamp_finish_io (fs_info, locked_folio, start, len); +folio_unlock (folio); +folio_put (folio); + } +mapping_set_error (mapping, error); +} + +/* * when nowcow writeback call back. This checks for snapshots or COW copies * of the extents that exist in the file, and COWs the file as required. *
@@ -1982,6 +2029,11 @@ static noinline int run_delalloc_nocow(sstruct btrfs_root *root = inode->root;struct btrfs_path *path;u64 cow_start = (u64)-1 ; +/* +* If not 0, represents the inclusive end of the last fallback_to_cow() +* range. Only for error handling. +*/ +u64 cow_end =0 ;u64 cur_offset = start;int ret;bool check_prev = true;
@@ -2142,6 +2194,7 @@ must_cow: found_key.offset - 1); cow_start = (u64)-1 ;if (ret) { + cow_end = found_key.offset -1 ;btrfs_dec_nocow_writers (nocow_bg); goto error; }
@@ -2215,11 +2268,12 @@ must_cow: cow_start = cur_offset;if (cow_start != (u64)-1 ) { - cur_offset = end; ret =fallback_to_cow (inode, locked_folio, cow_start, end); cow_start = (u64)-1 ; -if (ret) +if (ret) { + cow_end = end; goto error; + } }btrfs_free_path (path);
@@ -2227,12 +2281,41 @@ must_cow: error:/* +* There are several error cases: +* +* 1) Failed without falling back to COW +* start cur_offset end +* |/////////////| | +* +* For range [start, cur_offset) the folios are already unlocked (except +* @locked_folio), EXTENT_DELALLOC already removed. +* Only need to clear the dirty flag as they will never be submitted. +* Ordered extent and extent maps are handled by +* btrfs_mark_ordered_io_finished() inside run_delalloc_range(). +* +* 2) Failed with error from fallback_to_cow() +* start cur_offset cow_end end +* |/////////////|-----------| | +* +* For range [start, cur_offset) it's the same as case 1). +* But for range [cur_offset, cow_end), the folios have dirty flag +* cleared and unlocked, EXTENT_DEALLLOC cleared by cow_file_range(). +* +* Thus we should not call extent_clear_unlock_delalloc() on range +* [cur_offset, cow_end), as the folios are already unlocked. +* +* So clear the folio dirty flags for [start, cur_offset) first. +*/ +if (cur_offset > start) +cleanup_dirty_folios (inode, locked_folio, start, cur_offset -1 , ret); + +/* * If an error happened while a COW region is outstanding, cur_offset -* needs to be reset to cow_start to ensure the COW region is unlocked -* as well. +* needs to be reset to @cow_end + 1 to skip the COW range, as +* cow_file_range() will do the proper cleanup at error. */ -if (cow_start != (u64)-1 ) - cur_offset = cow_start; +if (cow_end) + cur_offset = cow_end +1 ;/* * We need to lock the extent here because we're clearing DELALLOC and
fs/btrfs/subpage.h +13 -0
@@ -137,6 +137,19 @@ DECLARE_BTRFS_SUBPAGE_OPS(writeback);DECLARE_BTRFS_SUBPAGE_OPS (ordered);DECLARE_BTRFS_SUBPAGE_OPS (checked); +/* +* Helper for error cleanup, where a folio will have its dirty flag cleared, +* with writeback started and finished. +*/ +static inline void btrfs_folio_clamp_finish_io (struct btrfs_fs_info *fs_info, +struct folio *locked_folio, +u64 start,u32 len) +{ +btrfs_folio_clamp_clear_dirty (fs_info, locked_folio, start, len); +btrfs_folio_clamp_set_writeback (fs_info, locked_folio, start, len); +btrfs_folio_clamp_clear_writeback (fs_info, locked_folio, start, len); +} +bool btrfs_subpage_clear_and_test_dirty (const struct btrfs_fs_info *fs_info,struct folio *folio,u64 start,u32 len);
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here: (obsvx2 target is down)
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.13.y
6.12 passes our testing, too:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.12.y
6.6 had some failures, I'm retrying.
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.6.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.13.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.13.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Am 05.02.2025 um 14:35 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.13.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.13.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Re: [PATCH 6.13] v6.13.2-rc1 review
In reply to Greg Kroah-HartmanThe kernel, bpf tool, perf tool, and kselftest builds fine for v6.13.2-rc1 on x86 and arm64 Azure VM.
Kernel binary size for x86 build:
text data bss dec hex filename 29934632 17832666 6320128 54087426 3394f02 vmlinux
Kernel binary size for arm64 build:
text data bss dec hex filename 36664336 15075873 1054416 52794625 3259501 vmlinux
Thanks,
Hardik
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.13.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.13.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
AMD Ryzen 5 5600 6-Core Processor:
https://www.inet.se/produkt/5304697/amd-ryzen-5-5600-3-5-ghz-35mb on a
https://www.gigabyte.com/Motherboard/B550-AORUS-ELITE-V2-rev-12
https://www.inet.se/produkt/1903406/gigabyte-b550-aorus-elite-v2
motherboard :)
running Arch Linux with the testing repos enabled:
https://archlinux.org/ https://archboot.com/
https://wiki.archlinux.org/title/Arch_Testing_Team
Den ons 5 feb. 2025 kl 14:46 skrev Greg Kroah-Hartman <[email protected]>:
Quoted 2,606 lines
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.13.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.13.y
and the diffstat can be found below.thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:Greg Kroah-Hartman <[email protected]>
Linux 6.13.2-rc1Qu Wenruo <[email protected]>
btrfs: do proper folio cleanup whenrun_delalloc_nocow()failedQu Wenruo <[email protected]>
btrfs: do proper folio cleanup whencow_file_range()failedTiezhu Yang <[email protected]>
LoongArch: Change 8 to 14 for LOONGARCH_MAX_{BRP,WRP}Uwe Kleine-König <[email protected]>
pwm: Ensure callbacks exist before calling themChen Ridong <[email protected]>
memcg: fix soft lockup in the OOM processSean Christopherson <[email protected]>
KVM: x86: Plumb in the vCPU tokvm_x86_ops.hwapic_isr_update()Aric Cyr <[email protected]>
drm/amd/display: Add hubp cache reset when powergatingNathan Chancellor <[email protected]>
s390: Add '-std=gnu11' to decompressor and purgatory CFLAGSClaudiu Beznea <[email protected]>
ASoC: da7213: Initialize the mutexKevin Brodsky <[email protected]>
selftests/mm: build with -O2Qu Wenruo <[email protected]>
btrfs: output the reason foropen_ctree()failureYu Kuai <[email protected]>
md/md-bitmap: Synchronizebitmap_get_stats()with bitmap lifetimeShivaprasad G Bhat <[email protected]>
powerpc/pseries/iommu: Don't unset window if it was never setDan Carpenter <[email protected]>
media: imx-jpeg: Fix potential error pointer dereference indetach_pm()Laurentiu Palcu <[email protected]>
staging: media: max96712: fix kernel oops when removing moduleMelissa Wen <[email protected]>
drm/amd/display: restore invalid MSA timing check for freesyncThinh Nguyen <[email protected]>
usb: gadget:f_tcm: Don't free command immediatelyCalvin Owens <[email protected]>
pps: Fix a use-after-freeLaurent Pinchart <[email protected]>
media: uvcvideo: Fix double free in error pathArnaud Pouliquen <[email protected]>
remoteproc: core: Fixida_freecall while not allocatedPatrisious Haddad <[email protected]>
RDMA/mlx5: Fix implicit ODP use after freeMatthieu Baerts (NGI0) <[email protected]>
mptcp: blackhole only if 1st SYN retrans w/o MPC is acceptedPaolo Abeni <[email protected]>
mptcp: handle fastopen disconnect correctlyMatthieu Baerts (NGI0) <[email protected]>
mptcp: pm: only set fullmesh for subflow endpPaolo Abeni <[email protected]>
mptcp: consolidate suboption statusAbel Vesa <[email protected]>
clk: qcom: gcc-x1e80100: Do not turn offusb_2controller GDSCKyle Tso <[email protected]>
usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPSJos Wang <[email protected]>
usb: typec: tcpm: setSRC_SEND_CAPABILITIEStimeout toPD_T_SENDER_RESPONSERay Chi <[email protected]>
usb: dwc3: Skip resume ifpm_runtime_set_active()failsKyle Tso <[email protected]>
usb: dwc3: core: Defer the probe until USB power supply readyJoe Hattori <[email protected]>
usb: dwc3-am62: Fix an OF node leak inphy_syscon_pll_refclk()Thinh Nguyen <[email protected]>
usb: gadget:f_tcm: Fix Get/SetInterface return valueSean Rhodes <[email protected]>
drivers/card_reader/rtsx_usb: Restore interrupt based detectionMichal Pecio <[email protected]>
usb: xhci: Fix NULL pointer dereference on certain command abortsNikita Zhandarovich <[email protected]>
net: usb: rtl8150: enable basic endpoint checkingLianqin Hu <[email protected]>
ALSA: usb-audio: Add delay quirk for iBasso DC07 ProDarrick J. Wong <[email protected]>
xfs: don't shut down the filesystem for media failures beyond end of logDarrick J. Wong <[email protected]>
xfs: release the dquot buf outside ofqli_lockDarrick J. Wong <[email protected]>
xfs: don't over-report free space or inodes in statvfsLong Li <[email protected]>
xfs: fix mount hang during primary superblock recovery failureChristoph Hellwig <[email protected]>
xfs: check for dead buffers inxfs_buf_find_insertRicardo B. Marliere <[email protected]>
ktest.pl: Check kernelrelease return inget_versionMasami Hiramatsu (Google) <[email protected]>
selftests/ftrace: Fix to use remount when testing mount GID optionMathieu Desnoyers <[email protected]>
selftests/rseq: Fix handling of glibc without rseq supportPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: reject mismatching sum offield_lenwith set key lengthChuck Lever <[email protected]>
Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages"Yu Kuai <[email protected]>
md/md-bitmap: move bitmap_{start, end}write to md upper layerYu Kuai <[email protected]>
md/raid5: implement pers->bitmap_sector()Yu Kuai <[email protected]>
md: add a new callback pers->bitmap_sector()Yu Kuai <[email protected]>
md/md-bitmap: remove the last parameter for bimtap_ops->endwrite()Yu Kuai <[email protected]>
md/md-bitmap: factor behind write counters out from bitmap_{start/end}write()Daniel Lee <[email protected]>
f2fs: Introduce linear search for dentriesLiam R. Howlett <[email protected]>
kernel: be more careful aboutdup_mmap()failures and uprobe registeringMasahiro Yamada <[email protected]>
kbuild: fix Clang LTO withCONFIG_OBJTOOL=nLin Yujun <[email protected]>
hexagon: Fix unbalanced spinlock indie()Willem de Bruijn <[email protected]>
hexagon: fix using plain integer as NULL pointer warning in cmpxchgMasahiro Yamada <[email protected]>
kconfig: fix memory leak insym_warn_unmet_dep()Masahiro Yamada <[email protected]>
kconfig: fix file name in warnings when loadingKCONFIG_DEFCONFIG_LISTPali Rohár <[email protected]>
cifs: Fix getting and setting SACLs over SMB1Pali Rohár <[email protected]>
cifs: Validate EAs for WSL reparse pointsLen Brown <[email protected]>
tools/powerturbostat: Fix forked child affinity regressionDaniel Baluta <[email protected]>
ASoC: amd: acp: Fix possible deadlockJens Axboe <[email protected]>
io_uring/register: use atomic_read/write forsq_flagsmigrationJens Axboe <[email protected]>
io_uring/uring_cmd: use cachedcmd_opinio_uring_cmd_sock()Jens Axboe <[email protected]>
io_uring/msg_ring: don't leave potentially dangling ->tctx pointerDetlev Casanova <[email protected]>
ASoC: rockchip:i2s_tdm: Re-add theset_sysclkcallbackPalmer Dabbelt <[email protected]>
RISC-V: Markriscv_v_init()as__initTorsten Hilbrich <[email protected]>
kbuild: Fix signing issue for external modulesPatryk Wlazlyn <[email protected]>
tools/powerturbostat: Fix PMT mmaped file size roundingAl Viro <[email protected]>
hostfs: fix string handling in__dentry_name()Masahiro Yamada <[email protected]>
genksyms: fix memory leak when the same symbol is read from *.symref fileMasahiro Yamada <[email protected]>
genksyms: fix memory leak when the same symbol is added from sourceEric Dumazet <[email protected]>
net: hsr: fixfill_frame_info()regression vs VLAN packetsKory Maincent <[email protected]>
net:sh_eth: Fix missing rtnl lock in suspend/resume pathKory Maincent <[email protected]>
net: ravb: Fix missing rtnl lock in suspend/resume pathToke Høiland-Jørgensen <[email protected]>
net: xdp: Disallow attaching device-bound programs in generic modeJon Maloy <[email protected]>
tcp: correct handling of extreme memory squeezeRafał Miłecki <[email protected]>
bgmac: reduce max frame size to support just MTU 1500Michal Luczaj <[email protected]>
vsock: Allow retrying onconnect()failureMichal Luczaj <[email protected]>
vsock: Keep the binding until socket destructionNeeraj Sanjay Kale <[email protected]>
Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streamingDouglas Anderson <[email protected]>
Bluetooth: btusb: mediatek: Add locks forusb_driver_claim_interface()Rafael J. Wysocki <[email protected]>
PM: sleep: core: Synchronize runtime PM status of parents and childrenNamhyung Kim <[email protected]>
perf test: Skip syscall enum test if no landlock syscallHoward Chu <[email protected]>
perf trace: Fix runtime error of index out of boundsHeiko Carstens <[email protected]>
s390/sclp: Initialize sclp subsystem viaarch_cpu_finalize_init()Cosmin Ratiu <[email protected]>
bonding: Correctly support GSO ESP offloadKunihiko Hayashi <[email protected]>
net: stmmac: Limit FIFO size by hardware capabilityKunihiko Hayashi <[email protected]>
net: stmmac: Limit the number of MTL queues to hardware capabilityGal Pressman <[email protected]>
ethtool: Fix set RXNFC command with symmetric RSS hashThomas Weißschuh <[email protected]>
ptp: Properly handle compat ioctlsIan Rogers <[email protected]>
perf annotate: Use an array for the disassembler preferenceChenyuan Yang <[email protected]>
net: davicom: fix UAF indm9000_drv_removeShigeru Yoshida <[email protected]>
vxlan: Fix uninit-value invxlan_vnifilter_dump()David Howells <[email protected]>
rxrpc, afs: Fix peer hash locking vs RCU callbackJan Stancek <[email protected]>
selftests: net/{lib,openvswitch}: extend CFLAGS to keep options from environmentJan Stancek <[email protected]>
selftests: mptcp: extend CFLAGS to keep options from environmentJakub Kicinski <[email protected]>
net:page_pool: don't try to stash the napi idJakub Kicinski <[email protected]>
tools: ynl: c: correct reverse decode of empty attrsStanislav Fomichev <[email protected]>
net/mlx5e: add missingcpu_to_nodetokvzalloc_nodeinmlx5e_open_xdpredirect_sqJakub Kicinski <[email protected]>
net: netdevsim: try to close UDP port harness racesEric Dumazet <[email protected]>
net: rose: fix timer races against user threadsPaul Fertser <[email protected]>
net/ncsi: usedev_set_mac_address()for Get MC MAC Address handlingVasily Gorbik <[email protected]>
s390/mm: Allow large pages for KASAN shadow mappingMichal Swiatkowski <[email protected]>
iavf: allow changing VLAN state without calling PFMateusz Polchlopek <[email protected]>
ice: remove invalid parameter of equalizerPrzemek Kitszel <[email protected]>
ice: fixice_parser_rt::bst_keyarray sizeMarco Leogrande <[email protected]>
idpf: convert workqueues to unboundManoj Vishwanathan <[email protected]>
idpf: Acquire the lock before accessing the xn->saltEmil Tantilov <[email protected]>
idpf: fix transaction timeouts on resetEmil Tantilov <[email protected]>
idpf: add read memory barrier when checking descriptor done bitSebastian Sewior <[email protected]>
xfrm: Don't disable preemption while looking up cache state.Howard Chu <[email protected]>
perf trace: Fix BPF loading failure (-E2BIG)Wentao Liang <[email protected]>
PM: hibernate: Add error handling forsyscore_suspend()Eric Dumazet <[email protected]>
ipmr: do not callmr_mfc_uses_dev()for unres entriesDheeraj Reddy Jonnalagadda <[email protected]>
net: fec: implement TSO descriptor cleanupDimitri Fedrau <[email protected]>
net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpiosAhmad Fatoum <[email protected]>
gpio: mxc: remove dead code after switch to DT-onlyJian Shen <[email protected]>
net: hns3: fix oops when unload drivers parallelingChristian Marangi <[email protected]>
net: airoha: Fix wrong GDM4 register definitionAlexander Stein <[email protected]>
regulator: core: Add missing newline characterpangliyuan <[email protected]>
ubifs: skip dumping tnc tree when zroot is nullZhihao Cheng <[email protected]>
ubi: Revert "ubi: wl: Close down wear-leveling before nand is suspended"Ming Wang <[email protected]>
rtc: loongson: clearTOY_MATCH0_REGinloongson_rtc_isr()Oleksij Rempel <[email protected]>
rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM readDan Carpenter <[email protected]>
rtc: tps6594: Fix integer overflow on 32bit systemsAlexandre Cassen <[email protected]>
xfrm: delete intermediate secpath entry in packet offload modeJoe Hattori <[email protected]>
dmaengine: ti: edma: fix OF node reference leaks inedma_driverAdam Ford <[email protected]>
phy: freescale: fsl-samsung-hdmi: Clean upfld_tg_codecalculationFlorian Westphal <[email protected]>
xfrm: state: fix out-of-bounds read during lookupJianbo Liu <[email protected]>
xfrm: replay: Fix the update of replay_esn->oseq_hi for GSOLuo Yifan <[email protected]>
tools/bootconfig: Fix the wrong format specifierHuacai Chen <[email protected]>
LoongArch: Fix warnings during S3 suspendOlga Kornievskaia <[email protected]>
NFSv4.2: markOFFLOAD_CANCELMOVEABLEOlga Kornievskaia <[email protected]>
NFSv4.2: fixCOPY_NOTIFYxdr buf size calculationMike Snitzer <[email protected]>
nfs: fix incorrect error handling in LOCALIOJohn Ogness <[email protected]>
serial: 8250: Adjust the timeout for FIFO modeJiri Slaby (SUSE) <[email protected]>
tty:mips_ejtag_fdc: fix one more u8 warningZijun Hu <[email protected]>
driver core: class: Fix wild pointer dereferences in APIclass_dev_iter_next()Christophe Leroy <[email protected]>
module: Don't fail module loading when settingro_after_initsection RO failedSebastian Andrzej Siewior <[email protected]>
module: Extend the preempt disabled section indereference_symbol_descriptor().Suren Baghdasaryan <[email protected]>
alloc_tag: avoid current->alloc_tag manipulations when profiling is disabledRyusuke Konishi <[email protected]>
nilfs2: handle errors thatnilfs_prepare_chunk()may returnRyusuke Konishi <[email protected]>
nilfs2: protect access to buffers with no active referencesRyusuke Konishi <[email protected]>
nilfs2: do not force clear folio if buffer is referencedSu Yue <[email protected]>
ocfs2: mark dquot as inactive if failed to start trans while releasing dquotGao Xiang <[email protected]>
erofs: fix potential return value overflow ofz_erofs_shrink_scan()Charles Han <[email protected]>
firewire: test: Fix potential null dereference in firewire kunit testGuixin Liu <[email protected]>
scsi: mpi3mr: Fix possible crash when setting up bsg failsGuixin Liu <[email protected]>
scsi: ufs: bsg: Deletebsg_devwhen setting up bsg failsPaul Menzel <[email protected]>
scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1Daire McNamara <[email protected]>
PCI: microchip: Set inbound address translation for coherent or non-coherent modeManivannan Sadhasivam <[email protected]>
PCI: endpoint: pci-epf-test: Fix check for DMA MEMCPY testMohamed Khalfella <[email protected]>
PCI: endpoint: pci-epf-test: Setdma_chan_rxpointer to NULL on errorRichard Zhu <[email protected]>
PCI: dwc: Always stop link in thedw_pcie_suspend_noirqKrishna chaitanya chundru <[email protected]>
PCI: qcom: Update ICC and OPP values after Link Up eventRichard Zhu <[email protected]>
PCI: imx6: Add missing reference clock disable logicRichard Zhu <[email protected]>
PCI: imx6: Deassertapps_resetinimx_pcie_deassert_core_reset()Richard Zhu <[email protected]>
PCI: imx6: Skipcontroller_idgeneration logic for i.MX7DFrank Li <[email protected]>
PCI: imx6: Configure PHY based on Root Complex or Endpoint modeDan Carpenter <[email protected]>
PCI: rockchip-ep: Fix error code inrockchip_pcie_ep_init_ob_mem()Damien Le Moal <[email protected]>
PCI: rockchip: Add missing fields descriptions for structrockchip_pcie_epKing Dix <[email protected]>
PCI: rcar-ep: Fix incorrect variable used when callingdevm_request_mem_region()Desnes Nunes <[email protected]>
media: dvb-usb-v2: af9035: fix ISO C90 compilation error onaf9035_i2c_master_xferJoe Hattori <[email protected]>
staging: media: imx: fix OF node leak inimx_media_add_of_subdevs()Joe Hattori <[email protected]>
watchdog:rti_wdt: Fix an OF node leak inrti_wdt_probe()Laurentiu Palcu <[email protected]>
media: nxp: imx8-isi: fix v4l2-compliance test errorsJoe Hattori <[email protected]>
mtd: hyperbus: hbmc-am654: fix an OF node reference leakdavid regan <[email protected]>
mtd: rawnand: brcmnand: fix status read ofbrcmnand_waitfuncRicardo Ribalda <[email protected]>
media: uvcvideo: Propagate buf->error to userspaceRicardo Ribalda <[email protected]>
media: uvcvideo: Fix deadlock duringuvc_probeJiasheng Jiang <[email protected]>
media: camif-core: Add check forclk_enable()Jiasheng Jiang <[email protected]>
media: mipi-csis: Add check forclk_enable()Dave Stevenson <[email protected]>
media: i2c: ov9282: Correct the exposure offsetLuca Weiss <[email protected]>
media: i2c: imx412: Add missing newline to printsDave Stevenson <[email protected]>
media: i2c: imx290: Register 0x3011 varies between imx327 and imx290Jiasheng Jiang <[email protected]>
media: marvell: Add check forclk_enable()Chen-Yu Tsai <[email protected]>
remoteproc:mtk_scp: Only populate devices for SCP coresJian-Hong Pan <[email protected]>
PCI/ASPM: Save parent L1SS config inpci_save_aspm_l1ss_state()Zijun Hu <[email protected]>
PCI: endpoint: Destroy the EPC device indevm_pci_epc_destroy()Chen Ni <[email protected]>
media: lmedm04: Handle errors forlme2510_int_readOliver Neukum <[email protected]>
media: rc: iguanair: handle timeoutsDmytro Maluka <[email protected]>
of/fdt: Restore possibility to use both ACPI and FDT from bootloaderMark Brown <[email protected]>
spi: omap2-mcspi: Correctly handledevm_clk_get_optional()errorsMichal Wilczynski <[email protected]>
mailbox: th1520: Fix memory corruption due to incorrect array sizeDan Carpenter <[email protected]>
mailbox: mpfs: fix copy and paste bug in probeDan Carpenter <[email protected]>
mailbox: th1520: Fix a NULL vsIS_ERR()bugQasim Ijaz <[email protected]>
iommufd/iova_bitmap: Fix shift-out-of-bounds iniova_bitmap_offset_to_index()Suraj Sonawane <[email protected]>
iommu: iommufd: fix WARNING iniommufd_device_unbindZhu Yanjun <[email protected]>
RDMA/rxe: Fix the warning "__rxe_cleanup+0x12c/0x170 [rdma_rxe]"Anumula Murali Mohan Reddy <[email protected]>
RDMA/cxgb4: Notify rdma stack forIB_EVENT_QP_LAST_WQE_REACHEDeventRandy Dunlap <[email protected]>
efi:sysfb_efi: fix W=1 warnings when EFI is not setZijun Hu <[email protected]>
of: reserved-memory: Do not make kmemleak ignore freed addressZijun Hu <[email protected]>
of: property: Avoiding using uninitialized variable @imaplen inparse_interrupt_map()Michael Guralnik <[email protected]>
RDMA/mlx5: Fix indirect mkey ODP page countPei Xiao <[email protected]>
i3c: dw: Fix use-after-free indw_i3c_masterdriver due to race conditionJoel Stanley <[email protected]>
arm64: dts: qcom: x1e80100-romulus: Update firmware nodesAkhil R <[email protected]>
arm64: tegra: Fix DMA ID for SPI2Joe Hattori <[email protected]>
fbdev: omapfb: Fix an OF node leak indss_of_port_get_parent_device()Josua Mayer <[email protected]>
arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dtsSiddharth Vadapalli <[email protected]>
arm64: dts: ti: Makefile: Fix typo "k3-j7200-evm-pcie1-ep.dtbo"Michael Riesch <[email protected]>
arm64: dts: rockchip: fix num-channels property of wolfvision pf5 micJagan Teki <[email protected]>
arm64: dts: rockchip: Fix PCIe3 handling for Edgeble-6TOPS ModulesRafał Miłecki <[email protected]>
ARM: dts: mediatek: mt7623: fix IR nodenameJosua Mayer <[email protected]>
arm64: dts: marvell: cn9131-cf-solidwan: fix cp1 comphy linksVladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sm8250: Fix interrupt types of camss interruptsVladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sdm845: Fix interrupt types of camss interruptsVladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sc8280xp: Fix interrupt type of camss interruptsVal Packett <[email protected]>
arm64: dts: mediatek: add per-SoC compatibles for keypad nodesJason-JH.Lin <[email protected]>
dts: arm64: mediatek: mt8195: Remove MT8183 compatible for OVLJason-JH.Lin <[email protected]>
dts: arm64: mediatek: mt8188: Update OVL compatible from MT8183 to MT8195Frank Wunderlich <[email protected]>
arm64: dts: mediatek: mt7988: Add missing clock-div property for i2cKrzysztof Kozlowski <[email protected]>
firmware: qcom: scm: Cleanup global '__scm' on probe failuresKonrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp: Fix up remoteproc register space sizesNeil Armstrong <[email protected]>
arm64: dts: qcom: sm8150-microsoft-surface-duo: fix typos in da7280 propertiesNeil Armstrong <[email protected]>
arm64: dts: qcom: sc7180: fix psci power domain node namesAlan Stern <[email protected]>
HID: core: Fix assumption that Resolution Multipliers must be in Logical CollectionsNeil Armstrong <[email protected]>
arm64: dts: qcom: sc7180-trogdor-pompom: rename 5v-choke thermal zoneNeil Armstrong <[email protected]>
arm64: dts: qcom: sc7180-trogdor-quackingstick: add missing avee-supplyNeil Armstrong <[email protected]>
arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: remove disabled ov7251 cameraNeil Armstrong <[email protected]>
arm64: dts: qcom: qcm6490-shift-otter: remove invalid orientation-switchAaro Koskinen <[email protected]>
ARM: omap1: Fix up the Retu IRQ on Nokia 770Junxian Huang <[email protected]>
RDMA/hns: Clean up the legacyCONFIG_INFINIBAND_HNSLi Zhijian <[email protected]>
RDMA/rtrs: Add missingdeinit()callKalesh AP <[email protected]>
RDMA/bnxt_re: Fix to drop reference to the mmap entry in case of errorJonas Karlman <[email protected]>
arm64: dts: rockchip: Fix sdmmc access on rk3308-rock-s0 v1.1 boardsBryan Brattlof <[email protected]>
arm64: dts: ti: k3-am62a: Remove duplicate GICR regBryan Brattlof <[email protected]>
arm64: dts: ti: k3-am62: Remove duplicate GICR regCristian Birsan <[email protected]>
ARM: dts: microchip:sama5d27_wlsom1_ek: Add no-1-8-v property to sdmmc0 nodeCristian Birsan <[email protected]>
ARM: dts: microchip:sama5d29_curiosity: Add no-1-8-v property to sdmmc0 nodeKrzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8650: Fix CDSP context banks unit addressesDmitry Baryshkov <[email protected]>
arm64: dts: qcom: x1e80100: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8650: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8550: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8450: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8350: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm6375: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm6125: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm4450: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sdx75: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: sc7280: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: qrb4210-rb2: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: q[dr]u1000: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: qcs404: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8994: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8939: correct sleep clock frequencyDmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8916: correct sleep clock frequencyLuca Weiss <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Drop extra qcom,msm-id valueKonrad Dybcio <[email protected]>
arm64: dts: qcom: msm8994: Describe USB interruptsKonrad Dybcio <[email protected]>
arm64: dts: qcom: msm8996: Fix up USB3 interruptsRoss Burton <[email protected]>
arm64: defconfig: remove obsoleteCONFIG_SM_DISPCC_8650Konrad Dybcio <[email protected]>
arm64: dts: qcom: sa8775p: Use valid node names for GPI DMAsMaulik Shah <[email protected]>
arm64: dts: qcom: sa8775p: Add CPUs to psci power domainKonrad Dybcio <[email protected]>
arm64: dts: qcom: sa8775p: Use a SoC-specific compatible for GPI DMATaniya Das <[email protected]>
arm64: dts: qcom: sa8775p: Updatesleep_clkfrequencyMarek Vasut <[email protected]>
arm64: dts: qcom: msm8996-xiaomi-gemini: Fix LP5562 LED1 reg propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui-jacuzzi: Droppp3300_panelvoltage settingsJoe Hattori <[email protected]>
memory: tegra20-emc: fix an OF node reference bug integra_emc_find_node_by_ram_code()Marek Vasut <[email protected]>
ARM: dts: stm32: Swap USART3 and UART8 alias on STM32MP15xx DHCOM SoMMarek Vasut <[email protected]>
ARM: dts: stm32: Deduplicate serial aliases and chosen node for STM32MP15xx DHCOM SoMNícolas F. R. A. Prado <[email protected]>
arm64: dts: mediatek: mt8195: Remove suspend-breaking reset from pcie1Ma Ke <[email protected]>
RDMA/srp: Fix error handling insrp_add_portHsin-Te Yuan <[email protected]>
arm64: dts: mediatek: mt8183: willow: Support second source touchscreenHsin-Te Yuan <[email protected]>
arm64: dts: mediatek: mt8183: kenzo: Support second source touchscreenzhenwei pi <[email protected]>
RDMA/rxe: Fix mismatchedmax_msg_szMamta Shukla <[email protected]>
arm: dts: socfpga: use reset-name "stmmaceth-ocp" instead of "ahb"Ricky CX Wu <[email protected]>
ARM: dts: aspeed: yosemite4: correct the compatible string for max31790Ricky CX Wu <[email protected]>
ARM: dts: aspeed: yosemite4: Add required properties for IOE on fan boardsRicky CX Wu <[email protected]>
ARM: dts: aspeed: yosemite4: correct the compatible string of adm1272Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node namesChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-elm: Fix MT6397 PMIC sub-node namesChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8395-genio-1200-evk: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: medaitek: mt8395-nio-12l: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8195-demo: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8195-cherry: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8192-asurada: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-elm: Drop regulator-compatible propertyChen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible propertyDan Carpenter <[email protected]>
rdma/cxgb4: Prevent potential integer overflow on 32bitClaudiu Beznea <[email protected]>
arm64: dts: renesas: rzg3s-smarc: Fix the debug serial aliasLeon Romanovsky <[email protected]>
RDMA/mlx4: Avoid false error about access to uninitialized gids arrayArnaud Pouliquen <[email protected]>
ARM: dts: stm32: Fix IPCC EXTI declaration on stm32mp151Marek Vasut <[email protected]>
ARM: dts: stm32: Sort M24256E write-lockable page in DH STM32MP13xx DHCOR SoM DTMarek Vasut <[email protected]>
ARM: dts: stm32: Increase CPU core voltage on STM32MP13xx DHCOR SoMVal Packett <[email protected]>
arm64: dts: mediatek: mt8516: reserve 192 KiB for TF-AVal Packett <[email protected]>
arm64: dts: mediatek: mt8516: add i2c clock-div propertyVal Packett <[email protected]>
arm64: dts: mediatek: mt8516: fix wdt irq typeVal Packett <[email protected]>
arm64: dts: mediatek: mt8516: fix GICv2 rangeHsin-Yi Wang <[email protected]>
arm64: dts: mt8183: set DMIC one-wire mode on DamuNícolas F. R. A. Prado <[email protected]>
arm64: dts: mediatek: mt8186: Move wakeup to MTU3 to get working suspendAlexander Stein <[email protected]>
ARM: dts: imx7-tqma7: add missing vs-supply for LM75A (rev. 01xxx)Nicolas Ferre <[email protected]>
ARM: at91: pm: change BU Power Switch to automatic modeJavier Carrasco <[email protected]>
soc: atmel: fixdevice_noderelease inatmel_soc_device_init()Hou Tao <[email protected]>
bpf: Cancel the runningbpf_timerthrough kworker forPREEMPT_RTPali Rohár <[email protected]>
cifs: Usecifs_autodisable_serverino()for disablingCIFS_MOUNT_SERVER_INUMinreaddir.cPaulo Alcantara <[email protected]>
smb: client: fix oops due to unset link speedHerbert Xu <[email protected]>
rhashtable: Fixrhashtable_try_inserttestChen Ridong <[email protected]>
padata: avoid UAF forreorder_workChen Ridong <[email protected]>
padata: add pd get/put refcnt helperChen Ridong <[email protected]>
padata: fix UAF inpadata_reorderChun-Tse Shao <[email protected]>
perf lock: Fixparse_lock_typewhich only retrieve one lock flagVishal Chourasia <[email protected]>
tools: Syncif_xdp.huapi tooling headerKailang Yang <[email protected]>
ALSA: hda/realtek - Fixed headphone distorted sound on Acer Aspire A115-31 laptopJason Gunthorpe <[email protected]>
iommu/amd: Fully decode all combinations ofalloc_paging_flagsJason Gunthorpe <[email protected]>
iommu/amd: Changeamd_iommu_pgtableto use enumprotection_domain_modeJason Gunthorpe <[email protected]>
iommu/amd: Remove type argument fromdo_iommu_domain_alloc()and relatedJason Gunthorpe <[email protected]>
iommu/amd: Remove dev == NULL checksJason Gunthorpe <[email protected]>
iommu/amd: Removedomain_alloc()Alejandro Jimenez <[email protected]>
iommu/amd: Remove unusedamd_iommu_domain_update()Guo Ren <[email protected]>
iommu/riscv: Fixup compile warningDaniel Xu <[email protected]>
bpf: tcp: Markbpf_load_hdr_opt()arg2 as read-writePu Lehui <[email protected]>
libbpf: Fix incorrect traversal end type ID when markingBTF_IS_EMBEDDEDPu Lehui <[email protected]>
libbpf: Fix return zero whenelf_beginfailedPu Lehui <[email protected]>
selftests/bpf: Fix btf leak on new btf alloc failure inbtf_distilltestTony Ambardar <[email protected]>
selftests/bpf: Fix undefinedUINT_MAXinveristat.cPuranjay Mohan <[email protected]>
bpf: Send signals asynchronously if !preemptibleSimon Trimmer <[email protected]>
ASoC: Intel:sof_sdw: Fix DMI match for Lenovo 83JX, 83MC and 83NMSimon Trimmer <[email protected]>
ASoC: Intel:sof_sdw: Fix DMI match for Lenovo 83LCIan Rogers <[email protected]>
perf inject: Fix use without initialization of local variablesIan Rogers <[email protected]>
perf test stat: Avoid hybrid assumption when virtualizedMaciej S. Szmigiero <[email protected]>
pinctrl: amd: Take suspend type into consideration which pins are non-wakeMingwei Zheng <[email protected]>
pinctrl: stm32: Add check forclk_enable()Jiachen Zhang <[email protected]>
perf report: Fix misleading help message about --demangleCezary Rojewski <[email protected]>
ALSA: hda: Fix compilation ofsnd_hdac_adsp_xxx()helpersArnaldo Carvalho de Melo <[email protected]>
perf MANIFEST: Addarch/*/include/uapi/asm/bpf_perf_event.hto the perf tarballNamhyung Kim <[email protected]>
perf symbol: Prefer non-label symbols with same addressAmadeusz Sławiński <[email protected]>
ASoC: Intel: avs: Fix init-config parsingCezary Rojewski <[email protected]>
ASoC: Intel: avs: Fix theoretical infinite loopCezary Rojewski <[email protected]>
ASoC: Intel: avs: Fix the minimum firmware version numbersCezary Rojewski <[email protected]>
ASoC: Intel: avs: Do notreadq()u32 registersArnaldo Carvalho de Melo <[email protected]>
perf namespaces: Fixup thensinfo__in_pidns()return type, its boolArnaldo Carvalho de Melo <[email protected]>
perf namespaces: Introducensinfo__set_in_pidns()Christophe Leroy <[email protected]>
perf machine: Don't ignore_etextwhen not a text symbolChristophe Leroy <[email protected]>
perf maps: Fix display of kernel symbolsArnaldo Carvalho de Melo <[email protected]>
perf top: Don't complain about lack of vmlinux when not resolving some kernel samplesLu Baolu <[email protected]>
iommu/vt-d: Draining PRQ in sva unbind path when FPD bit setJiayuan Chen <[email protected]>
selftests/bpf: Avoid generating untracked files when running bpf selftestsThomas Weißschuh <[email protected]>
padata: fix sysfs store callback checkMartin KaFai Lau <[email protected]>
bpf: Rejectstruct_opsregistration that uses module ptr and the modulebtf_idis missingTakashi Iwai <[email protected]>
ALSA: seq: Make dependency on UMP clearerPei Xiao <[email protected]>
bpf: Userefcount_tinstead ofatomic_tformmap_countKanchana P Sridhar <[email protected]>
crypto: iaa - Fix IAA disabling that occurs whensync_modeis set to 'async'James Clark <[email protected]>
perf stat: Fix trailing comma when there is no metric unitJoe Hattori <[email protected]>
crypto: ixp4xx - fix OF node reference leaks ininit_ixp_crypto()Wenkai Lin <[email protected]>
crypto: hisilicon/sec2 - fix for aead invalid authsizeWenkai Lin <[email protected]>
crypto: hisilicon/sec2 - fix for aead icv errorBreno Leitao <[email protected]>
rhashtable: Fix potential deadlock by movingschedule_workoutside lockMartin KaFai Lau <[email protected]>
bpf:bpf_local_storage: Always usebpf_mem_allocinPREEMPT_RTBa Jing <[email protected]>
ktest.pl: Remove unused declarations inrun_bisect_testfunctionMingwei Zheng <[email protected]>
pinctrl: nomadik: Add check forclk_enable()Levi Yun <[email protected]>
perf expr: Initializeis_testvalue inexpr__ctx_new()Arnaldo Carvalho de Melo <[email protected]>
tools build: Remove the libunwind feature tests from the ones detected when test-all.o buildsClaudiu Beznea <[email protected]>
ASoC: renesas: rz-ssi: Use only the proper amount of dividersZhongqiu Han <[email protected]>
perf bpf: Fix two memory leakages when callingperf_env__insert_bpf_prog_info()Zhongqiu Han <[email protected]>
perf header: Fix one memory leakage inprocess_bpf_prog_info()Zhongqiu Han <[email protected]>
perf header: Fix one memory leakage inprocess_bpf_btf()Hans de Goede <[email protected]>
platform/x86: x86-android-tablets: Make variables only used locally staticHans de Goede <[email protected]>
platform/x86: x86-android-tablets: Add missing__initto get_i2c_adap_by_*()Gaurav Jain <[email protected]>
crypto: caam - use JobR's space to access page 0 regsHerbert Xu <[email protected]>
crypto: api - Fix boot-up self-test raceChen Ridong <[email protected]>
crypto: tegra - do not transfer req when tegra init failsJason Gunthorpe <[email protected]>
iommu/arm-smmuv3: Update comments about ATS and bypassSaket Kumar Bhaskar <[email protected]>
selftests/bpf: Fixfill_link_infoselftest on powerpcArnaldo Carvalho de Melo <[email protected]>
tools features: Don't check for libunwind devel files by defaultGeorge Lander <[email protected]>
ASoC: sun4i-spdif: Add clock multiplier settingsBard Liao <[email protected]>
ASoC: Intel: sof_sdw: correct mach_params->dmic_numQuentin Monnet <[email protected]>
libbpf: Fix segfault due to libelf functions not setting errnoAndrea Righi <[email protected]>
sched_ext: Use the NUMA scheduling domain for NUMA optimizationsMarco Leogrande <[email protected]>
tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bindTakashi Iwai <[email protected]>
ASoC: wcd937x: Use *-y forMakefileTakashi Iwai <[email protected]>
ASoC: cs42l84: Use *-y forMakefileTakashi Iwai <[email protected]>
ASoC: SDCA: Use *-y forMakefileTakashi Iwai <[email protected]>
ASoC: mediatek: mt8365: Use *-y forMakefileTakashi Iwai <[email protected]>
ASoC: cs40l50: Use *-y forMakefileAndrii Nakryiko <[email protected]>
libbpf: don't adjust USDT semaphore address if .stapsdt.base addr is missingChristophe JAILLET <[email protected]>
pinctrl: samsung: Fix irq handling if an error occurs inexynos_irq_demux_eint16_31()Pei Xiao <[email protected]>
platform/x86: x86-android-tablets: make platform data be staticPei Xiao <[email protected]>
platform/mellanox: mlxbf-pmc: incorrect type in assignmentNikita Zhandarovich <[email protected]>
net/rose: prevent integer overflows inrose_setsockopt()Mahdi Arghavani <[email protected]>
tcp_cubic: fix incorrect HyStart round start detectionRoger Quadros <[email protected]>
net: ethernet: ti: am65-cpsw: fix freeing IRQ inam65_cpsw_nuss_remove_tx_chns()Xin Long <[email protected]>
net: sched: refine software bypass handling intc_runFlorian Westphal <[email protected]>
netfilter:nft_flow_offload: update tcp state flags under lockPablo Neira Ayuso <[email protected]>
netfilter:nf_tables: fix set size with rbtree backendJamal Hadi Salim <[email protected]>
net: sched: Disallow replacing of child qdisc from one parent to anotherAntoine Tenart <[email protected]>
net: avoid race between device unregistration and ethnl opsShinas Rasheed <[email protected]>
octeon_ep_vf: remove firmware stats fetch inndo_get_stats64Shinas Rasheed <[email protected]>
octeon_ep: remove firmware stats fetch inndo_get_stats64Maher Sanalla <[email protected]>
net/mlxfw: Drop hard coded max FW flash image sizeLiu Jian <[email protected]>
net: let net.core.dev_weight always be non-zeroMickaël Salaün <[email protected]>
selftests/landlock: Fix error messageMickaël Salaün <[email protected]>
selftests/landlock: Fix build with non-default pthread linkingDaniel Golle <[email protected]>
net: phy: realtek: always clear NBase-T lpaDaniel Golle <[email protected]>
net: phy: realtek: clearmaster_slave_stateif link is downDaniel Golle <[email protected]>
net: phy: realtek: clear 1000Base-T lpa if link is downMingwei Zheng <[email protected]>
pwm: stm32: Add check forclk_enable()Kuniyuki Iwashima <[email protected]>
dev: Acquire netdev_rename_lock before restoring dev->name in dev_change_name().Bo Gan <[email protected]>
clk: analogbits: Fix incorrect calculation of vco rate deltaEric Dumazet <[email protected]>
inet: ipmr: fix data-racesAlexis Lothoré <[email protected]>
wifi: wilc1000: unregister wiphy only after netdev registrationMax Chou <[email protected]>
Bluetooth: btrtl: check for NULL inbtrtl_setup_realtek()Charles Han <[email protected]>
Bluetooth: btbcm: Fix NULL deref inbtbcm_get_board_name()Dmitry Antipov <[email protected]>
wifi: cfg80211: adjust allocation of colocated AP dataDmitry V. Levin <[email protected]>
selftests: harness: fix printing of mismatch values in__EXPECT()Geert Uytterhoeven <[email protected]>
selftests: timers: clocksource-switch: Adapt progress to kselftest frameworkAditya Kumar Singh <[email protected]>
wifi: ath12k: fix key cache handlingGautham R. Shenoy <[email protected]>
cpufreq: ACPI: Fix max-frequency computationUwe Kleine-König <[email protected]>
i2c: designware: Actually make use of theI2C_DW_COMMONandI2C_DWsymbol namespacesPeter Chiu <[email protected]>
wifi: mt76: mt7996: fix ldpc settingBenjamin Lin <[email protected]>
wifi: mt76: mt7996: fix definition of tx descriptorBenjamin Lin <[email protected]>
wifi: mt76: mt7996: fix incorrect indexing of MIB FW eventHoward Hsu <[email protected]>
wifi: mt76: mt7996: fix HE Phy capabilityHoward Hsu <[email protected]>
wifi: mt76: mt7996: fix the capability of reception of EHT MU PPDUPeter Chiu <[email protected]>
wifi: mt76: mt7996: add max mpdu len capabilityPeter Chiu <[email protected]>
wifi: mt76: mt7996: fix register mappingPeter Chiu <[email protected]>
wifi: mt76: mt7915: fix register mappingFelix Fietkau <[email protected]>
wifi: mt76: mt7915: fix omac index assignment after hardware resetFelix Fietkau <[email protected]>
wifi: mt76: mt7915: firmware restart on devices with a second pcie linkFelix Fietkau <[email protected]>
wifi: mt76: only enable tx worker after setting the channelFelix Fietkau <[email protected]>
wifi: mt76: mt7996: fix rx filter setting for bfee functionalityMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Properly handle responses for commands with eventsMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Cleanup MLO settings post-disconnectionMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLOMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Init secondary link PM stateMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Update secondary link PS flowMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Updatemt7925_unassign_vif_chanctxfor per-link BSSMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Update mt792x_rx_get_wcid for per-link STAMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Updatemt7925_mcu_sta_updatefor BC in ASSOC stateMing Yen Hsieh <[email protected]>
wifi: mt76: Enhancemt7925_mac_link_sta_addto support MLOMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Enhance mt7925_mac_link_bss_add to support MLOLeon Yen <[email protected]>
wifi: mt76: mt7925: Fix CNM Timeout with Single Active Link in MLOMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: fix wrong parameter for related cmd of chan infoallan.wang <[email protected]>
wifi: mt76: mt7925: Fix incorrect WCIDphy_idxassignmentMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Fix incorrect WCID assignment for MLOMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: Fix incorrect MLD address inbss_mld_tlvfor MLO supportSean Wang <[email protected]>
wifi: mt76: connac: Extendmt76_connac_mcu_uni_add_devfor MLOxueqin Luo <[email protected]>
wifi: mt76: mt7915: fix overflows seen when writing limit attributesxueqin Luo <[email protected]>
wifi: mt76: mt7996: fix overflows seen when writing limit attributesMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: fix the invalid ip address for arp offloadMing Yen Hsieh <[email protected]>
wifi: mt76: mt7925: fix get wrong chip cap from incorrect pointerEric-SY Chang <[email protected]>
wifi: mt76: mt7925: fix wrongband_idxsetting when enable sniffer modeCharles Han <[email protected]>
wifi: mt76: mt7925: fix NULL deref check inmt7925_change_vif_linksChristophe JAILLET <[email protected]>
wifi: mt76: mt7915: Fix an error handling path inmt7915_add_interface()Michael Lo <[email protected]>
wifi: mt76: mt7921: fix using incorrect group cipher after disconnection.WangYuli <[email protected]>
wifi: mt76:mt76u_vendor_request: Do not print error messages when-EPROTOMickaël Salaün <[email protected]>
landlock: Handle weird filesGuangguan Wang <[email protected]>
net/smc: fix data error when recvmsg withMSG_PEEKflagDrew Fustini <[email protected]>
clk: thead: Fixcpu2vp_clkfor TH1520AP_SUBSYSclocksDrew Fustini <[email protected]>
clk: thead: AddCLK_IGNORE_UNUSEDto fix TH1520 bootDrew Fustini <[email protected]>
clk: thead: Fix clk gate registration to pass flagsSergio Paracuellos <[email protected]>
clk: ralink: mtmips: remove duplicated 'xtal' clock for Ralink SoC RT3883Johannes Berg <[email protected]>
wifi: mac80211: don't flush non-uploaded STAsIlan Peer <[email protected]>
wifi: mac80211: Fix common size calculation for ML elementAndy Strohman <[email protected]>
wifi: mac80211: fix tid removal during mesh forwardingKees Cook <[email protected]>
wifi: cfg80211: Movecfg80211_scan_req_add_chan()n_channelsincrement earlierJohannes Berg <[email protected]>
wifi: mac80211: prohibit deactivating all linksEmmanuel Grumbach <[email protected]>
wifi: iwlwifi: mvm: remove unneeded NULL pointer checksDaniel Gabay <[email protected]>
wifi: iwlwifi: mvm: don't count mgmt frames as MPDUMiri Korenblit <[email protected]>
wifi: iwlwifi: mvm: avoid NULL pointer dereferenceJohannes Berg <[email protected]>
wifi: iwlwifi: fw: read STEP table from correct UEFI varNicolas Cavallari <[email protected]>
wifi: mt76: mt7915: Fix mesh scan on MT7916 DBDCDan Carpenter <[email protected]>
wifi: mt76: mt7925: fix off by one in mt7925_load_clc()Joel Stanley <[email protected]>
hwmon: Fix help text for aspeed-g6-pwm-tachPing-Ke Shih <[email protected]>
wifi: rtw89: fix race betweencancel_hw_scanandhw_scancompletionZong-Zhe Yang <[email protected]>
wifi: rtw89: mcc: consider time limits not divisible by 1024Chih-Kang Chang <[email protected]>
wifi: rtw89: avoid to initmgnt_entrylist twice when WoWLAN failedPo-Hao Huang <[email protected]>
wifi: rtw89: correct header conversion rule for MLO onlyZong-Zhe Yang <[email protected]>
wifi: rtw89: chan: fix soft lockup inrtw89_entity_recalc_mgnt_roles()Zong-Zhe Yang <[email protected]>
wifi: rtw89: fix proceeding MCC with wrong scanning state after sequence changesAndreas Kemnade <[email protected]>
wifi: wlcore: fix unbalancedpm_runtimecallsAlexis Lothoré <[email protected]>
wifi: wilc1000: unregister wiphy only if it has been registeredShayne Chen <[email protected]>
wifi: mt76: mt7996: fix invalid interface combinationsZichen Xie <[email protected]>
samples/landlock: Fix possible NULL dereference inparse_path()Rob Herring (Arm) <[email protected]>
mfd: syscon: Fix race indevice_node_get_regmap()Joe Hattori <[email protected]>
leds: cht-wcove: Usedevm_led_classdev_register()to avoid memory leakTerry Tritton <[email protected]>
HID: fix generic desktop D-Pad controlsKarol Przybylski <[email protected]>
HID: hid-thrustmaster: Fix warning inthrustmaster_probeby adding endpoint checkAmit Pundir <[email protected]>
clk: qcom: gcc-sdm845: Do not use sharedclk_opsfor QUPsSathishkumar Muruganandam <[email protected]>
wifi: ath12k: fix tx power, max reg power update to firmwareQuan Nguyen <[email protected]>
ipmi:ssif_bmc: Fix new request loss when bmc ready for a responseJoe Hattori <[email protected]>
OPP: OF: Fix an OF node leak in_opp_add_static_v2()Yevgeny Kliteynik <[email protected]>
net/mlx5: HWS, fix definer'sHWS_SET32macro for negative offsetEric Dumazet <[email protected]>
ax25: rcu protect dev->ax25_ptrJoe Hattori <[email protected]>
regulator: of: Implement the unwind path ofof_regulator_match()Vasily Khoruzhick <[email protected]>
clk: sunxi-ng: a64: stop force-selecting PLL-MIPI as TCON0 parentMario Limonciello <[email protected]>
cpufreq/amd-pstate: Fix prefcore rankingsOctavian Purdila <[email protected]>
team: prevent adding a device which is already a team device lowerBryan O'Donoghue <[email protected]>
clk: qcom: camcc-x1e80100: Settitan_top_gdscas the parent GDSC of subordinate GDSCsPeng Fan <[email protected]>
clk: imx: Apply some clks only for i.MX93Shengjiu Wang <[email protected]>
arm64: dts: imx93: UseIMX93_CLK_SPDIF_IPGas SPDIF IPG clockShengjiu Wang <[email protected]>
clk: imx93: AddIMX93_CLK_SPDIF_IPGclockShengjiu Wang <[email protected]>
dt-bindings: clock: imx93: Add SPDIF IPG clkMarek Vasut <[email protected]>
clk: imx8mp: Fix clkout1/2 supportStefano Brivio <[email protected]>
udp: Deal with race between UDP socket address change and rehashManivannan Sadhasivam <[email protected]>
cpufreq: qcom: Implementclk_ops::determine_rate()for qcom_cpufreq* clocksManivannan Sadhasivam <[email protected]>
cpufreq: qcom: Fixqcom_cpufreq_hw_recalc_rate()to query LUT if LMh IRQ is not availableLuca Ceresoli <[email protected]>
gpio: pca953x: log an error when failing to get the reset GPIOLorenzo Bianconi <[email protected]>
net: airoha: Fix error path inairoha_probe()Eric Dumazet <[email protected]>
ptr_ring: do not block hard interrupts inptr_ring_resize_multiple()Mickaël Salaün <[email protected]>
selftests:ktap_helpers: Fix uninitialized variableSultan Alsawaf (unemployed) <[email protected]>
cpufreq: schedutil: Fix superfluous updates caused byneed_freq_updateMingwei Zheng <[email protected]>
pwm: stm32-lp: Add check forclk_enable()Eric Dumazet <[email protected]>
inetpeer: do not get a refcount ininet_getpeer()Eric Dumazet <[email protected]>
inetpeer: update inetpeer timestamp ininet_getpeer()Eric Dumazet <[email protected]>
inetpeer: remove create argument ofinet_getpeer()Eric Dumazet <[email protected]>
inetpeer: remove create argument of inet_getpeer_v[46]()Joe Hattori <[email protected]>
leds: netxbig: Fix an OF node reference leak innetxbig_leds_get_of_pdata()Matti Vaittinen <[email protected]>
dt-bindings: mfd: bd71815: Fix rsense and typosHe Rongguang <[email protected]>
cpupower: fix TSC MHz calculationJoe Hattori <[email protected]>
ACPI: fan: cleanup resources in the error path of .probe()Uwe Kleine-König <[email protected]>
hwmon: (nct6775): Actually make use of theHWMON_NCT6775symbol namespaceMarcel Hamer <[email protected]>
wifi: brcmfmac: add missing header include forbrcmf_dbgAditya Kumar Singh <[email protected]>
wifi: ath12k: fix read pointer after free inath12k_mac_assign_vif_to_vdev()Chen-Yu Tsai <[email protected]>
regulator: dt-bindings: mt6315: Drop regulator-compatible propertyJiri Kosina <[email protected]>
HID: multitouch: fix support for Goodix PID 0x01e9Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: pci: wait for firmware loading before releasing memoryThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: fix memory leaks and invalid access at probe error pathThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: destroy workqueue atrtl_deinit_coreThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: remove unusedcheck_buddy_privGeert Uytterhoeven <[email protected]>
dt-bindings: leds: class-multicolor: Fix path to color definitionsJoe Hattori <[email protected]>
clk: fix an OF node reference leak inof_clk_get_parent_name()Neil Armstrong <[email protected]>
dt-bindings: mmc: controller: clarify the address-cells descriptionDavid Howells <[email protected]>
rxrpc: Fix handling of received connection abortMingwei Zheng <[email protected]>
spi: zynq-qspi: Add check forclk_enable()Octavian Purdila <[email protected]>
net_sched:sch_sfq: don't allow 1 packet limitSong Yoong Siang <[email protected]>
selftests/bpf: Actuatetx_metadata_leninxdp_hw_metadataZichen Xie <[email protected]>
wifi: cfg80211: tests: Fix potential NULL dereference intest_cfg80211_parse_colocated_ap()Dan Carpenter <[email protected]>
clk: mmp: pxa1908-apbc: Fix NULL vsIS_ERR()checkDan Carpenter <[email protected]>
clk: mmp: pxa1908-apbcp: Fix a NULL vsIS_ERR()checkDan Carpenter <[email protected]>
clk: mmp: pxa1908-mpmu: Fix a NULL vsIS_ERR()checkJavier Carrasco <[email protected]>
clk: renesas: cpg-mssr: Fix 'soc' node handling incpg_mssr_reserved_init()Barnabás Czémán <[email protected]>
wifi: wcn36xx: fix channel survey memory allocation sizeThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: usb: fix workqueue leak when probe failsThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: fixinit_sw_varsleak when probe failsThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: wait for firmware loading before releasing memoryThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last stepThadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: do not complete firmware loading needlesslyColin Ian King <[email protected]>
wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loopBalaji Pothunoori <[email protected]>
wifi: ath11k: Fix unexpected return buffer manager error for WCN6750/WCN6855Charles Han <[email protected]>
ipmi: ipmb: Add checkdevm_kasprintf()returned valueThomas Gleixner <[email protected]>
genirq: Makehandle_enforce_irqctx()unconditionally availableJonathan Kim <[email protected]>
drm/amdgpu: fix gpu recovery disable with per queue resetJiang Liu <[email protected]>
drm/amdgpu: tear down ttm range manager for doorbell inamdgpu_ttm_fini()Dan Carpenter <[email protected]>
drm/amdgpu: Fix shift type inamdgpu_debugfs_sdma_sched_mask_set()Hermes Wu <[email protected]>
drm/bridge: it6505: Change definition ofAUX_FIFO_MAX_SIZEDmitry Baryshkov <[email protected]>
drm/msm/mdp4: correct LCDC regulator nameDmitry Baryshkov <[email protected]>
drm/msm: don't clean up priv->kms prematurelySui Jingfeng <[email protected]>
drm/msm: Check return value ofof_dma_configure()Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on X1E80100Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SM8650Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SM8550Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SM8350Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SM8250Dmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SC8180XDmitry Baryshkov <[email protected]>
drm/msm/dpu: link DSPP_2/_3 blocks on SM8150Dmitry Baryshkov <[email protected]>
drm/msm/dpu: provide DSPP and correct LM config for SDM670Neil Armstrong <[email protected]>
OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initializedNeil Armstrong <[email protected]>
OPP: add index check to assert to avoid buffer overflow in_read_freq()Karol Przybylski <[email protected]>
drm/amdgpu: Fix potential integer overflow in scheduler mask calculationsBokun Zhang <[email protected]>
drm/amdgpu/vcn: resetfw_sharedunder SRIOVMin-Hua Chen <[email protected]>
drm/rockchip: vop2: includerockchip_drm_drv.hAndy Yan <[email protected]>
drm/rockchip: vop2: Add check for 32 bpp format for rk3588Andy Yan <[email protected]>
drm/rockchip: vop2: Check linear format for Cluster windows on rk3566/8Andy Yan <[email protected]>
drm/rockchip: vop2: Setup delay cycle for Esmart2/3Andy Yan <[email protected]>
drm/rockchip: vop2: Set AXI id for rk3588Derek Foreman <[email protected]>
drm/connector: Allow clearing HDMI infoframesJohn Ogness <[email protected]>
printk: Defer legacy printing when holdingprintk_cpu_syncAndy Yan <[email protected]>
drm/rockchip: vop2: Fix the windows switch between different layersAbhinav Kumar <[email protected]>
drm/msm/dpu: checkdpu_plane_atomic_print_state()for valid ssppAbhinav Kumar <[email protected]>
drm/msm/dp: disable the opp table request even fordp_ctrl_off_link()Abhinav Kumar <[email protected]>
drm/msm/dp: dont calldp_catalog_ctrl_mainlink_ctrlindp_ctrl_configure_source_params()Abhinav Kumar <[email protected]>
drm/msm/dp: do not touch theMMSS_DP_INTF_CONFIGfor tpgBoris Brezillon <[email protected]>
drm/panthor: Preserve the result returned bypanthor_fw_resume()Andy Yan <[email protected]>
drm/rockchip: vop2: Fix the mixer alpha setup for layer 0Andy Yan <[email protected]>
drm/rockchip: vop2: Fix cluster windows alpha ctrl regsiters offsetIvan Stepchenko <[email protected]>
drm/amdgpu: Fix potential NULL pointer dereference inatomctrl_get_smc_sclk_range_tableChristophe JAILLET <[email protected]>
drm/amd/pm: Fix an error handling path invega10_enable_se_edc_force_stall_config()Sui Jingfeng <[email protected]>
drm/etnaviv: Fix page property being used for non writecombine buffersRex Nie <[email protected]>
drm/msm/hdmi: simplify code inpll_get_integloop_gainDmitry Baryshkov <[email protected]>
dt-bindings: display/msm: qcom,sa8775p-mdss: fix the exampleDmitry Baryshkov <[email protected]>
drm/msm/dp: fixmsm_dp_utils_pack_sdp_headerinterfaceDmitry Baryshkov <[email protected]>
drm/msm/dp: setsafe_to_exit_levelbefore printing itHeiko Stuebner <[email protected]>
drm/rockchip: vop2: fix rk3588 dp+dsi maxclk verificationVille Syrjälä <[email protected]>
drm/i915: Grabintel_displayfrom the encoder to avoid potential oopsiesMaíra Canal <[email protected]>
drm/v3d: Fix performance counter source settings on V3D 7.xChengming Zhou <[email protected]>
psi: Fix race when task wakes up beforepsi_sched_switch()adjusts flagsK Prateek Nayak <[email protected]>
x86/topology: Usex86_sched_itmt_flagsfor PKG domain unconditionallyTianchen Ding <[email protected]>
sched: Fix race betweenyield_to()andtry_to_wake_up()Peter Zijlstra <[email protected]>
sched/fair: Fix value reported by hot tasks pulled in/proc/schedstatPeter Zijlstra <[email protected]>
sched/fair: UntangleNEXT_BUDDYandpick_next_task()Yabin Cui <[email protected]>
perf/core: Save raw sample data conditionally based on sample typeJohn Garry <[email protected]>
block: Ensure start sector is aligned for stacking atomic writesDavid Howells <[email protected]>
afs: Fix the fallback handling for the YFS.RemoveFile2 RPC callJens Axboe <[email protected]>
nvme: fix boguskzalloc()return check innvme_init_effects_log()Christophe Leroy <[email protected]>
select: Fix unbalanceduser_access_end()Qu Wenruo <[email protected]>
btrfs: subpage: fix the bitmap dump of the locked flagsRandy Dunlap <[email protected]>
partitions: ldm: remove the initial kernel-doc notationQu Wenruo <[email protected]>
btrfs: improve the warning and error message forbtrfs_remove_qgroup()Keisuke Nishimura <[email protected]>
nvme: Add error path forxa_storeinnvme_init_effectsMichael Ellerman <[email protected]>
selftests/powerpc: Fix argument order totimer_sub()Gaurav Batra <[email protected]>
powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDWKeisuke Nishimura <[email protected]>
nvme: Add error check forxa_storeinnvme_get_effects_logSagi Grimberg <[email protected]>
nvme-tcp: Fix I/O queue cpu spreading for multiple controllersChristoph Hellwig <[email protected]>
block: fix queue freeze vs limits lock order in sysfs store methodsChristoph Hellwig <[email protected]>
block: add astore_limitoperations for sysfs entriesChristoph Hellwig <[email protected]>
block: add aqueue_limits_commit_update_frozenhelperChristoph Hellwig <[email protected]>
block: don't updateBLK_FEAT_POLLin__blk_mq_update_nr_hw_queuesChristoph Hellwig <[email protected]>
block: checkBLK_FEAT_POLLunderq_usage_countEugen Hristev <[email protected]>
pstore/blk: trivial typo fixesYu Kuai <[email protected]>
nbd: don't allow reconnect after disconnectGeert Uytterhoeven <[email protected]>
ps3disk: Do not use dev->bounce_size before it is setYang Erkun <[email protected]>
block: retry call probe afterrequest_moduleinblk_request_modulePavel Begunkov <[email protected]>
io_uring: prevent reg-wait speculationsChristoph Hellwig <[email protected]>
block: copy back bounce buffer to user-space correctly in case of splitJinliang Zheng <[email protected]>
fs: fixproc_handlerforsysctl_nr_openDavid Howells <[email protected]>
afs: Fix cleanup of immediately failed async callsDavid Howells <[email protected]>
afs: Fix directory format encoding structDavid Howells <[email protected]>
afs: Fix EEXIST error returned fromafs_rmdir()to be ENOTEMPTYAlexander Aring <[email protected]>
dlm: fixsrcu_read_lock()return type to intAlexander Aring <[email protected]>
dlm: fix removal of rsb struct that is master and dir recordSourabh Jain <[email protected]>
powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is activeKees Cook <[email protected]>
coredump: Do not lock during 'comm' reporting-------------
Diffstat:
.../bindings/display/msm/qcom,sa8775p-mdss.yaml | 3 +- .../bindings/leds/leds-class-multicolor.yaml | 2 +- .../devicetree/bindings/mfd/rohm,bd71815-pmic.yaml | 20 +-- .../devicetree/bindings/mmc/mmc-controller.yaml | 2 +- .../bindings/regulator/mt6315-regulator.yaml | 6 - Documentation/driver-api/crypto/iaa/iaa-crypto.rst | 9 +- Makefile | 4 +- .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 24 ++- .../boot/dts/intel/socfpga/socfpga_arria10.dtsi | 6 +- arch/arm/boot/dts/mediatek/mt7623.dtsi | 2 +- .../boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts | 1 + .../boot/dts/microchip/at91-sama5d29_curiosity.dts | 1 + arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 1 + arch/arm/boot/dts/st/stm32mp13xx-dhcor-som.dtsi | 16 +- arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +- arch/arm/boot/dts/st/stm32mp15xx-dhcom-drc02.dtsi | 12 -- arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi | 10 -- .../arm/boot/dts/st/stm32mp15xx-dhcom-picoitx.dtsi | 10 -- arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 7 + arch/arm/mach-at91/pm.c | 31 ++-- arch/arm/mach-omap1/board-nokia770.c | 2 +- arch/arm64/boot/dts/freescale/imx93.dtsi | 2 +- arch/arm64/boot/dts/marvell/cn9131-cf-solidwan.dts | 4 +- arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 3 + arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 29 +--- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 25 +-- .../dts/mediatek/mt8183-kukui-jacuzzi-damu.dts | 4 + .../dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts | 15 ++ .../dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi | 15 ++ .../boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 2 - arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 8 +- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 3 - arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 2 - arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 9 -- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 5 +- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 3 +- .../boot/dts/mediatek/mt8395-genio-1200-evk.dts | 2 - .../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 2 - arch/arm64/boot/dts/mediatek/mt8516.dtsi | 11 +- arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 - arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994.dtsi | 11 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 9 +- arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 2 - arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 2 +- arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 2 +- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 2 +- arch/arm64/boot/dts/qcom/qru1000-idp.dts | 2 +- arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 2 +- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 32 +++- .../arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 4 +- .../dts/qcom/sc7180-trogdor-quackingstick.dtsi | 1 + arch/arm64/boot/dts/qcom/sc7180.dtsi | 18 +-- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 46 +++--- .../qcom/sdm845-db845c-navigation-mezzanine.dtso | 42 ----- arch/arm64/boot/dts/qcom/sdm845.dtsi | 20 +-- arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm4450.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- .../boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 4 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 30 ++-- arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 2 +- .../dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 2 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 +- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 4 +- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 +- arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi | 5 - arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 7 +- arch/arm64/boot/dts/rockchip/rk3308-rock-s0.dts | 25 ++- .../boot/dts/rockchip/rk3568-wolfvision-pf5.dts | 2 +- .../boot/dts/rockchip/rk3588-edgeble-neu6a-io.dtsi | 95 +++++++---- arch/arm64/boot/dts/ti/Makefile | 6 +- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 - arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 1 - ...-pcie.dtso => k3-am642-hummingboard-t-pcie.dts} | 14 +- ...-usb3.dtso => k3-am642-hummingboard-t-usb3.dts} | 13 +- arch/arm64/configs/defconfig | 1 - arch/hexagon/include/asm/cmpxchg.h | 2 +- arch/hexagon/kernel/traps.c | 4 +- arch/loongarch/include/asm/hw_breakpoint.h | 4 +- arch/loongarch/include/asm/loongarch.h | 60 +++++++ arch/loongarch/kernel/hw_breakpoint.c | 16 +- arch/loongarch/power/platform.c | 2 +- arch/powerpc/include/asm/hugetlb.h | 9 ++ arch/powerpc/kernel/iommu.c | 2 +- arch/powerpc/platforms/pseries/iommu.c | 12 +- arch/riscv/kernel/vector.c | 2 +- arch/s390/Kconfig | 1 + arch/s390/Makefile | 2 +- arch/s390/boot/vmem.c | 74 ++++++--- arch/s390/include/asm/sclp.h | 1 + arch/s390/kernel/perf_cpum_cf.c | 2 +- arch/s390/kernel/perf_pai_crypto.c | 2 +- arch/s390/kernel/perf_pai_ext.c | 2 +- arch/s390/kernel/setup.c | 5 + arch/s390/purgatory/Makefile | 2 +- arch/x86/events/amd/ibs.c | 2 +- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kernel/smpboot.c | 11 +- arch/x86/kvm/lapic.c | 11 +- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/vmx/x86_ops.h | 2 +- block/bio-integrity.c | 15 +- block/blk-core.c | 21 +-- block/blk-integrity.c | 4 +- block/blk-mq.c | 34 ++-- block/blk-mq.h | 6 + block/blk-settings.c | 31 +++- block/blk-sysfs.c | 137 ++++++++-------- block/blk-zoned.c | 7 +- block/genhd.c | 22 ++- block/partitions/ldm.h | 2 +- crypto/algapi.c | 4 +- drivers/acpi/acpica/achware.h | 2 - drivers/acpi/fan_core.c | 10 +- drivers/base/class.c | 9 +- drivers/base/power/main.c | 29 ++-- drivers/block/nbd.c | 1 + drivers/block/ps3disk.c | 4 +- drivers/block/virtio_blk.c | 4 +- drivers/bluetooth/btbcm.c | 3 + drivers/bluetooth/btnxpuart.c | 3 +- drivers/bluetooth/btrtl.c | 4 +- drivers/bluetooth/btusb.c | 7 + drivers/char/ipmi/ipmb_dev_int.c | 3 + drivers/char/ipmi/ssif_bmc.c | 5 +- drivers/clk/analogbits/wrpll-cln28hpc.c | 2 +- drivers/clk/clk.c | 4 +- drivers/clk/imx/clk-imx8mp.c | 5 +- drivers/clk/imx/clk-imx93.c | 32 ++-- drivers/clk/mmp/clk-pxa1908-apbc.c | 4 +- drivers/clk/mmp/clk-pxa1908-apbcp.c | 4 +- drivers/clk/mmp/clk-pxa1908-mpmu.c | 4 +- drivers/clk/qcom/camcc-x1e80100.c | 7 + drivers/clk/qcom/gcc-sdm845.c | 32 ++-- drivers/clk/qcom/gcc-x1e80100.c | 2 +- drivers/clk/ralink/clk-mtmips.c | 1 - drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 13 +- drivers/clk/thead/clk-th1520-ap.c | 13 +- drivers/cpufreq/acpi-cpufreq.c | 36 +++-- drivers/cpufreq/amd-pstate.c | 2 +- drivers/cpufreq/qcom-cpufreq-hw.c | 34 ++-- drivers/crypto/caam/blob_gen.c | 3 +- drivers/crypto/hisilicon/sec2/sec.h | 3 +- drivers/crypto/hisilicon/sec2/sec_crypto.c | 157 +++++++++--------- drivers/crypto/hisilicon/sec2/sec_crypto.h | 11 -- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | 3 + drivers/crypto/tegra/tegra-se-aes.c | 7 +- drivers/crypto/tegra/tegra-se-hash.c | 7 +- drivers/dma/ti/edma.c | 3 +- drivers/firewire/device-attribute-test.c | 2 + drivers/firmware/efi/sysfb_efi.c | 2 +- drivers/firmware/qcom/qcom_scm.c | 42 +++-- drivers/gpio/gpio-mxc.c | 3 +- drivers/gpio/gpio-pca953x.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +- .../gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 3 + .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 10 +- .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h | 2 + .../gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 1 + .../drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c | 1 + .../gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c | 3 + .../gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c | 3 + .../gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c | 1 + .../gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c | 1 + .../gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c | 1 + .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 3 +- .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 + .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 + .../gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 2 + .../drm/amd/pm/powerplay/hwmgr/vega10_powertune.c | 5 +- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 8 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 +- drivers/gpu/drm/i915/display/intel_crt.c | 10 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 +- .../drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 2 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_1_sdm670.h | 54 ++++++- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 2 + .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 2 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 2 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 2 + .../drm/msm/disp/dpu1/catalog/dpu_9_2_x1e80100.h | 2 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 15 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 2 +- drivers/gpu/drm/msm/dp/dp_audio.c | 2 +- drivers/gpu/drm/msm/dp/dp_catalog.c | 1 - drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- drivers/gpu/drm/msm/dp/dp_utils.c | 10 +- drivers/gpu/drm/msm/dp/dp_utils.h | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 2 +- drivers/gpu/drm/msm/msm_kms.c | 1 - drivers/gpu/drm/panthor/panthor_device.c | 4 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 115 ++++++++++--- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 10 ++ drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 26 ++- drivers/gpu/drm/v3d/v3d_debugfs.c | 4 +- drivers/gpu/drm/v3d/v3d_perfmon.c | 15 +- drivers/gpu/drm/v3d/v3d_regs.h | 29 ++-- drivers/hid/hid-core.c | 2 + drivers/hid/hid-input.c | 37 ++--- drivers/hid/hid-multitouch.c | 2 +- drivers/hid/hid-thrustmaster.c | 8 + drivers/hwmon/Kconfig | 4 +- drivers/hwmon/nct6775-core.c | 6 +- drivers/i2c/busses/i2c-designware-common.c | 5 +- drivers/i2c/busses/i2c-designware-master.c | 5 +- drivers/i2c/busses/i2c-designware-slave.c | 5 +- drivers/i3c/master/dw-i3c-master.c | 1 + drivers/infiniband/hw/Makefile | 2 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 +- drivers/infiniband/hw/cxgb4/device.c | 6 +- drivers/infiniband/hw/cxgb4/qp.c | 8 + drivers/infiniband/hw/hns/Kconfig | 20 +-- drivers/infiniband/hw/hns/Makefile | 9 +- drivers/infiniband/hw/mlx4/main.c | 8 +- drivers/infiniband/hw/mlx5/odp.c | 62 +++++--- drivers/infiniband/sw/rxe/rxe_param.h | 2 +- drivers/infiniband/sw/rxe/rxe_pool.c | 11 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 5 +- drivers/infiniband/ulp/rtrs/rtrs.c | 3 + drivers/infiniband/ulp/srp/ib_srp.c | 1 - drivers/iommu/amd/amd_iommu.h | 5 +- drivers/iommu/amd/init.c | 14 +- drivers/iommu/amd/iommu.c | 132 +++++---------- drivers/iommu/amd/pasid.c | 3 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 +- drivers/iommu/intel/pasid.c | 22 ++- drivers/iommu/intel/pasid.h | 6 + drivers/iommu/iommufd/iova_bitmap.c | 2 +- drivers/iommu/iommufd/main.c | 2 +- drivers/iommu/riscv/iommu.c | 2 +- drivers/leds/leds-cht-wcove.c | 6 +- drivers/leds/leds-netxbig.c | 1 + drivers/mailbox/mailbox-mpfs.c | 2 +- drivers/mailbox/mailbox-th1520.c | 6 +- drivers/md/md-bitmap.c | 79 +++++---- drivers/md/md-bitmap.h | 7 +- drivers/md/md.c | 34 ++++ drivers/md/md.h | 5 + drivers/md/raid1.c | 34 +--- drivers/md/raid1.h | 1 - drivers/md/raid10.c | 26 +-- drivers/md/raid10.h | 1 - drivers/md/raid5-cache.c | 4 - drivers/md/raid5.c | 111 ++++++------- drivers/md/raid5.h | 4 - drivers/media/i2c/imx290.c | 3 +- drivers/media/i2c/imx412.c | 42 ++--- drivers/media/i2c/ov9282.c | 2 +- drivers/media/platform/marvell/mcam-core.c | 7 +- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 7 +- .../media/platform/nxp/imx8-isi/imx8-isi-video.c | 3 + .../media/platform/samsung/exynos4-is/mipi-csis.c | 10 +- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +- drivers/media/rc/iguanair.c | 4 +- drivers/media/usb/dvb-usb-v2/af9035.c | 18 ++- drivers/media/usb/dvb-usb-v2/lmedm04.c | 12 +- drivers/media/usb/uvc/uvc_queue.c | 3 +- drivers/media/usb/uvc/uvc_status.c | 4 + drivers/memory/tegra/tegra20-emc.c | 8 +- drivers/mfd/syscon.c | 19 +-- drivers/misc/cardreader/rtsx_usb.c | 15 ++ drivers/mtd/hyperbus/hbmc-am654.c | 19 ++- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 + drivers/mtd/ubi/ubi.h | 2 - drivers/mtd/ubi/wl.c | 21 --- drivers/net/bonding/bond_main.c | 19 +-- drivers/net/ethernet/broadcom/bgmac.h | 3 +- drivers/net/ethernet/davicom/dm9000.c | 3 +- drivers/net/ethernet/freescale/fec_main.c | 31 +++- drivers/net/ethernet/hisilicon/hns3/hnae3.c | 15 ++ drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 + .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 + drivers/net/ethernet/intel/iavf/iavf_main.c | 19 ++- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 - drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 - drivers/net/ethernet/intel/ice/ice_ethtool.h | 1 - drivers/net/ethernet/intel/ice/ice_parser.h | 6 +- drivers/net/ethernet/intel/ice/ice_parser_rt.c | 12 +- drivers/net/ethernet/intel/idpf/idpf_controlq.c | 6 + drivers/net/ethernet/intel/idpf/idpf_main.c | 15 +- drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 14 +- .../net/ethernet/marvell/octeon_ep/octep_main.c | 10 -- .../ethernet/marvell/octeon_ep_vf/octep_vf_main.c | 8 - drivers/net/ethernet/mediatek/airoha_eth.c | 37 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- .../mellanox/mlx5/core/steering/hws/definer.c | 2 +- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 - drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 8 +- drivers/net/ethernet/renesas/ravb_main.c | 22 ++- drivers/net/ethernet/renesas/sh_eth.c | 4 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 30 ++++ drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- drivers/net/netdevsim/netdevsim.h | 1 + drivers/net/netdevsim/udp_tunnels.c | 23 +-- drivers/net/phy/marvell-88q2xxx.c | 33 +++- drivers/net/phy/realtek.c | 29 ++-- drivers/net/tap.c | 6 +- drivers/net/team/team_core.c | 7 + drivers/net/tun.c | 6 +- drivers/net/usb/rtl8150.c | 22 +++ drivers/net/vxlan/vxlan_vnifilter.c | 5 + drivers/net/wireless/ath/ath11k/dp_rx.c | 1 + drivers/net/wireless/ath/ath11k/hal_rx.c | 3 +- drivers/net/wireless/ath/ath12k/mac.c | 42 ++--- drivers/net/wireless/ath/wcn36xx/main.c | 5 +- .../wireless/broadcom/brcm80211/brcmfmac/fwil.h | 2 + drivers/net/wireless/intel/iwlwifi/fw/uefi.c | 44 +++-- drivers/net/wireless/intel/iwlwifi/mvm/coex.c | 9 +- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 18 --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- .../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 7 + drivers/net/wireless/mediatek/mt76/mt7915/main.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 1 + drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 1 + drivers/net/wireless/mediatek/mt76/mt7921/main.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 109 +++++++++---- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 142 +++++++++++------ drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 5 +- drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 2 + drivers/net/wireless/mediatek/mt76/mt792x.h | 7 +- drivers/net/wireless/mediatek/mt76/mt792x_core.c | 3 +- drivers/net/wireless/mediatek/mt76/mt792x_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 20 +-- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 47 ++++-- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/usb.c | 4 +- drivers/net/wireless/microchip/wilc1000/netdev.c | 2 - drivers/net/wireless/microchip/wilc1000/sdio.c | 9 +- drivers/net/wireless/microchip/wilc1000/spi.c | 9 +- drivers/net/wireless/realtek/rtlwifi/base.c | 13 +- drivers/net/wireless/realtek/rtlwifi/base.h | 1 - drivers/net/wireless/realtek/rtlwifi/pci.c | 61 ++----- .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 7 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +- drivers/net/wireless/realtek/rtlwifi/usb.c | 12 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 12 -- drivers/net/wireless/realtek/rtw89/chan.c | 31 +++- drivers/net/wireless/realtek/rtw89/chan.h | 9 +- drivers/net/wireless/realtek/rtw89/core.c | 11 +- drivers/net/wireless/realtek/rtw89/core.h | 3 + drivers/net/wireless/realtek/rtw89/fw.c | 40 ++++- drivers/net/wireless/realtek/rtw89/mac80211.c | 12 +- drivers/net/wireless/ti/wlcore/main.c | 10 +- drivers/nvme/host/core.c | 34 +++- drivers/nvme/host/tcp.c | 70 ++++++-- drivers/of/fdt.c | 10 +- drivers/of/of_reserved_mem.c | 3 +- drivers/of/property.c | 2 +- drivers/opp/core.c | 57 +++++-- drivers/opp/of.c | 4 +- drivers/pci/controller/dwc/pci-imx6.c | 30 ++-- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + drivers/pci/controller/dwc/pcie-qcom.c | 2 + drivers/pci/controller/pcie-rcar-ep.c | 2 +- drivers/pci/controller/pcie-rockchip-ep.c | 5 + drivers/pci/controller/plda/pcie-microchip-host.c | 96 +++++++++++ drivers/pci/controller/plda/pcie-plda-host.c | 17 +- drivers/pci/controller/plda/pcie-plda.h | 6 +- drivers/pci/endpoint/functions/pci-epf-test.c | 6 +- drivers/pci/endpoint/pci-epc-core.c | 2 +- drivers/pci/pcie/aspm.c | 35 +++- drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 30 ++-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 35 +++- drivers/pinctrl/pinctrl-amd.c | 27 +++- drivers/pinctrl/pinctrl-amd.h | 7 +- drivers/pinctrl/samsung/pinctrl-exynos.c | 3 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 76 ++++----- drivers/platform/mellanox/mlxbf-pmc.c | 6 +- drivers/platform/x86/x86-android-tablets/core.c | 4 +- drivers/platform/x86/x86-android-tablets/lenovo.c | 4 +- drivers/platform/x86/x86-android-tablets/other.c | 4 +- drivers/pps/clients/pps-gpio.c | 4 +- drivers/pps/clients/pps-ktimer.c | 4 +- drivers/pps/clients/pps-ldisc.c | 6 +- drivers/pps/clients/pps_parport.c | 4 +- drivers/pps/kapi.c | 10 +- drivers/pps/kc.c | 10 +- drivers/pps/pps.c | 127 ++++++++------- drivers/ptp/ptp_chardev.c | 4 + drivers/ptp/ptp_ocp.c | 2 +- drivers/pwm/core.c | 13 +- drivers/pwm/pwm-stm32-lp.c | 8 +- drivers/pwm/pwm-stm32.c | 7 +- drivers/regulator/core.c | 2 +- drivers/regulator/of_regulator.c | 14 +- drivers/remoteproc/mtk_scp.c | 12 +- drivers/remoteproc/remoteproc_core.c | 14 +- drivers/rtc/rtc-loongson.c | 13 +- drivers/rtc/rtc-pcf85063.c | 11 +- drivers/rtc/rtc-tps6594.c | 2 +- drivers/s390/char/sclp.c | 12 +- drivers/scsi/mpi3mr/mpi3mr_app.c | 8 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +- drivers/scsi/sd.c | 17 +- drivers/scsi/sr.c | 5 +- drivers/soc/atmel/soc.c | 2 +- drivers/spi/spi-omap2-mcspi.c | 11 +- drivers/spi/spi-zynq-qspi.c | 13 +- drivers/staging/media/imx/imx-media-of.c | 8 +- drivers/staging/media/max96712/max96712.c | 4 +- drivers/tty/mips_ejtag_fdc.c | 4 +- drivers/tty/serial/8250/8250_port.c | 32 +++- drivers/ufs/core/ufs_bsg.c | 1 + drivers/usb/dwc3/core.c | 35 ++-- drivers/usb/dwc3/dwc3-am62.c | 1 + drivers/usb/gadget/function/f_tcm.c | 14 +- drivers/usb/host/xhci-ring.c | 3 +- drivers/usb/typec/tcpm/tcpci.c | 13 +- drivers/usb/typec/tcpm/tcpm.c | 10 +- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 1 + drivers/watchdog/rti_wdt.c | 1 + fs/afs/dir.c | 7 +- fs/afs/internal.h | 9 ++ fs/afs/rxrpc.c | 12 +- fs/afs/xdr_fs.h | 2 +- fs/afs/yfsclient.c | 5 +- fs/btrfs/inode.c | 160 ++++++++++++++----- fs/btrfs/qgroup.c | 21 ++- fs/btrfs/subpage.c | 6 +- fs/btrfs/subpage.h | 13 ++ fs/btrfs/super.c | 2 +- fs/dlm/lock.c | 46 ++++-- fs/dlm/lowcomms.c | 3 +- fs/erofs/zdata.c | 3 +- fs/f2fs/dir.c | 53 ++++-- fs/f2fs/f2fs.h | 6 +- fs/f2fs/inline.c | 5 +- fs/file_table.c | 2 +- fs/hostfs/hostfs_kern.c | 27 +--- fs/nfs/localio.c | 4 +- fs/nfs/nfs42proc.c | 2 +- fs/nfs/nfs42xdr.c | 2 + fs/nfs_common/common.c | 89 +++++++++-- fs/nilfs2/dir.c | 13 +- fs/nilfs2/namei.c | 29 ++-- fs/nilfs2/nilfs.h | 4 +- fs/nilfs2/page.c | 31 +++- fs/nilfs2/segment.c | 4 +- fs/ocfs2/quota_global.c | 5 + fs/pstore/blk.c | 4 +- fs/select.c | 4 +- fs/smb/client/cifsacl.c | 25 +-- fs/smb/client/cifsproto.h | 2 +- fs/smb/client/cifssmb.c | 4 +- fs/smb/client/readdir.c | 2 +- fs/smb/client/reparse.c | 22 ++- fs/smb/client/smb2ops.c | 3 +- fs/ubifs/debug.c | 22 +-- fs/xfs/xfs_buf.c | 3 +- fs/xfs/xfs_buf_item_recover.c | 11 +- fs/xfs/xfs_dquot.c | 12 +- fs/xfs/xfs_notify_failure.c | 121 +++++++++----- fs/xfs/xfs_qm_bhv.c | 27 ++-- include/acpi/acpixf.h | 1 + include/dt-bindings/clock/imx93-clock.h | 1 + include/linux/alloc_tag.h | 11 +- include/linux/blkdev.h | 23 +-- include/linux/btf.h | 5 + include/linux/coredump.h | 4 +- include/linux/hid.h | 1 + include/linux/ieee80211.h | 11 +- include/linux/kallsyms.h | 2 +- include/linux/mroute_base.h | 6 +- include/linux/netdevice.h | 2 +- include/linux/nfs_common.h | 3 +- include/linux/perf_event.h | 6 + include/linux/pm.h | 1 + include/linux/pps_kernel.h | 3 +- include/linux/ptr_ring.h | 21 ++- include/linux/pwm.h | 17 ++ include/linux/sched.h | 1 + include/linux/skb_array.h | 17 +- include/linux/usb/tcpm.h | 3 +- include/net/ax25.h | 10 +- include/net/inetpeer.h | 12 +- include/net/netfilter/nf_tables.h | 6 + include/net/page_pool/types.h | 1 - include/net/pkt_cls.h | 13 +- include/net/sch_generic.h | 5 +- include/net/xfrm.h | 16 +- include/sound/hdaudio_ext.h | 45 ------ include/trace/events/afs.h | 2 + include/trace/events/rxrpc.h | 25 +++ io_uring/io_uring.c | 1 + io_uring/msg_ring.c | 4 +- io_uring/register.c | 2 +- io_uring/uring_cmd.c | 2 +- kernel/bpf/arena.c | 8 +- kernel/bpf/bpf_local_storage.c | 8 +- kernel/bpf/bpf_struct_ops.c | 21 +++ kernel/bpf/btf.c | 5 - kernel/bpf/helpers.c | 18 ++- kernel/events/core.c | 35 ++-- kernel/events/uprobes.c | 4 + kernel/fork.c | 17 +- kernel/irq/internals.h | 9 +- kernel/module/main.c | 7 +- kernel/padata.c | 45 ++++-- kernel/power/hibernate.c | 7 +- kernel/printk/internal.h | 6 + kernel/printk/printk.c | 5 + kernel/printk/printk_safe.c | 7 +- kernel/sched/core.c | 6 +- kernel/sched/cpufreq_schedutil.c | 4 +- kernel/sched/ext.c | 114 +++++++++---- kernel/sched/fair.c | 21 ++- kernel/sched/features.h | 9 ++ kernel/sched/stats.h | 4 + kernel/sched/syscalls.c | 2 +- kernel/trace/bpf_trace.c | 13 +- lib/alloc_tag.c | 2 + lib/rhashtable.c | 12 +- mm/memcontrol.c | 7 +- mm/oom_kill.c | 8 +- net/ax25/af_ax25.c | 12 +- net/ax25/ax25_dev.c | 4 +- net/ax25/ax25_ip.c | 3 +- net/ax25/ax25_out.c | 22 ++- net/ax25/ax25_route.c | 2 + net/core/dev.c | 23 ++- net/core/filter.c | 2 +- net/core/page_pool.c | 2 + net/core/page_pool_priv.h | 2 + net/core/page_pool_user.c | 15 +- net/core/sysctl_net_core.c | 5 +- net/ethtool/ioctl.c | 2 +- net/ethtool/netlink.c | 2 +- net/hsr/hsr_forward.c | 7 +- net/ipv4/icmp.c | 9 +- net/ipv4/inetpeer.c | 31 +--- net/ipv4/ip_fragment.c | 15 +- net/ipv4/ipmr.c | 28 ++-- net/ipv4/ipmr_base.c | 9 +- net/ipv4/route.c | 17 +- net/ipv4/tcp_cubic.c | 8 +- net/ipv4/tcp_output.c | 9 +- net/ipv4/udp.c | 56 +++++++ net/ipv6/icmp.c | 6 +- net/ipv6/ip6_output.c | 6 +- net/ipv6/ip6mr.c | 28 ++-- net/ipv6/ndisc.c | 8 +- net/ipv6/udp.c | 50 ++++++ net/mac80211/debugfs_netdev.c | 2 +- net/mac80211/driver-ops.h | 3 + net/mac80211/rx.c | 1 + net/mptcp/ctrl.c | 4 +- net/mptcp/options.c | 13 +- net/mptcp/pm_netlink.c | 3 +- net/mptcp/protocol.c | 4 +- net/mptcp/protocol.h | 30 ++-- net/ncsi/ncsi-rsp.c | 18 +-- net/netfilter/nf_tables_api.c | 57 ++++++- net/netfilter/nft_flow_offload.c | 16 +- net/netfilter/nft_set_rbtree.c | 43 +++++ net/rose/af_rose.c | 16 +- net/rose/rose_timer.c | 15 ++ net/rxrpc/conn_event.c | 12 +- net/rxrpc/peer_event.c | 16 +- net/rxrpc/peer_object.c | 12 +- net/sched/cls_api.c | 57 +++---- net/sched/cls_bpf.c | 2 + net/sched/cls_flower.c | 2 + net/sched/cls_matchall.c | 2 + net/sched/cls_u32.c | 4 + net/sched/sch_api.c | 4 + net/sched/sch_generic.c | 4 +- net/sched/sch_sfq.c | 4 + net/smc/af_smc.c | 2 +- net/smc/smc_rx.c | 37 +++-- net/smc/smc_rx.h | 8 +- net/sunrpc/svcsock.c | 12 +- net/vmw_vsock/af_vsock.c | 13 +- net/wireless/scan.c | 7 +- net/wireless/tests/scan.c | 2 + net/xfrm/xfrm_replay.c | 10 +- net/xfrm/xfrm_state.c | 93 ++++++++--- samples/landlock/sandboxer.c | 7 + scripts/Makefile.build | 2 + scripts/Makefile.lib | 10 +- scripts/Makefile.modinst | 2 +- scripts/genksyms/genksyms.c | 11 +- scripts/genksyms/genksyms.h | 2 +- scripts/genksyms/parse.y | 18 ++- scripts/kconfig/confdata.c | 6 +- scripts/kconfig/symbol.c | 1 + security/landlock/fs.c | 11 +- sound/core/seq/Kconfig | 4 +- sound/pci/hda/patch_realtek.c | 1 + sound/soc/amd/acp/acp-i2s.c | 1 + sound/soc/codecs/Makefile | 8 +- sound/soc/codecs/da7213.c | 2 + sound/soc/intel/avs/apl.c | 3 +- sound/soc/intel/avs/cnl.c | 1 + sound/soc/intel/avs/core.c | 14 +- sound/soc/intel/avs/loader.c | 2 +- sound/soc/intel/avs/registers.h | 45 ++++++ sound/soc/intel/avs/skl.c | 1 + sound/soc/intel/avs/topology.c | 4 +- sound/soc/intel/boards/sof_sdw.c | 47 ++++-- sound/soc/mediatek/mt8365/Makefile | 2 +- sound/soc/renesas/rz-ssi.c | 3 +- sound/soc/rockchip/rockchip_i2s_tdm.c | 31 +++- sound/soc/sdca/Makefile | 2 +- sound/soc/sunxi/sun4i-spdif.c | 7 + sound/usb/quirks.c | 2 + tools/bootconfig/main.c | 4 +- tools/build/Makefile.feature | 7 - tools/build/feature/test-all.c | 5 - tools/include/uapi/linux/if_xdp.h | 4 +- tools/lib/bpf/btf.c | 1 + tools/lib/bpf/btf_relocate.c | 2 +- tools/lib/bpf/linker.c | 22 +-- tools/lib/bpf/usdt.c | 2 +- tools/net/ynl/lib/ynl.c | 2 +- tools/perf/MANIFEST | 1 + tools/perf/Makefile.config | 83 ++++++---- tools/perf/builtin-inject.c | 8 +- tools/perf/builtin-lock.c | 66 +++++--- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 6 +- .../perf/tests/shell/lib/perf_json_output_lint.py | 14 +- tools/perf/tests/shell/stat.sh | 6 +- tools/perf/tests/shell/trace_btf_enum.sh | 8 +- tools/perf/util/annotate.c | 76 ++++++++- tools/perf/util/annotate.h | 15 +- tools/perf/util/bpf-event.c | 10 +- .../util/bpf_skel/augmented_raw_syscalls.bpf.c | 11 +- tools/perf/util/disasm.c | 83 ++-------- tools/perf/util/env.c | 13 +- tools/perf/util/env.h | 4 +- tools/perf/util/expr.c | 5 +- tools/perf/util/header.c | 8 +- tools/perf/util/machine.c | 2 +- tools/perf/util/maps.c | 7 +- tools/perf/util/namespaces.c | 7 +- tools/perf/util/namespaces.h | 3 +- tools/perf/util/stat-display.c | 177 +++++++++++---------- tools/perf/util/symbol.c | 9 +- .../cpupower/utils/idle_monitor/mperf_monitor.c | 15 +- tools/power/x86/turbostat/turbostat.c | 58 ++++++- tools/testing/ktest/ktest.pl | 7 +- tools/testing/selftests/bpf/Makefile | 4 +- .../testing/selftests/bpf/prog_tests/btf_distill.c | 4 +- .../selftests/bpf/prog_tests/fill_link_info.c | 4 + .../selftests/bpf/progs/test_fill_link_info.c | 13 +- tools/testing/selftests/bpf/test_tc_tunnel.sh | 1 + tools/testing/selftests/bpf/veristat.c | 1 + tools/testing/selftests/bpf/xdp_hw_metadata.c | 2 +- .../drivers/net/netdevsim/udp_tunnel_nic.sh | 16 +- .../ftrace/test.d/00basic/mount_options.tc | 8 +- tools/testing/selftests/kselftest/ktap_helpers.sh | 2 +- tools/testing/selftests/kselftest_harness.h | 24 +-- tools/testing/selftests/landlock/Makefile | 4 +- tools/testing/selftests/landlock/fs_test.c | 3 +- tools/testing/selftests/mm/Makefile | 9 +- tools/testing/selftests/net/lib/Makefile | 2 +- tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/openvswitch/Makefile | 2 +- .../selftests/powerpc/benchmarks/gettimeofday.c | 2 +- tools/testing/selftests/rseq/rseq.c | 32 +++- tools/testing/selftests/rseq/rseq.h | 9 +- .../testing/selftests/timers/clocksource-switch.c | 6 +- 703 files changed, 5738 insertions(+), 3278 deletions(-)
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
cover 6.13.2-rc1 review
In reply to Greg Kroah-HartmanRegressions on the arm64, builds failed with gcc-8 on Linux stable-rc 6.13.2-rc1 But the gcc-13 and clang builds pass.
This was also reported on Linus tree a few weeks back [1] and also seen on the stable-rc 6.12.13-rc1.
Build regression: arm64, gcc-8 phy-fsl-samsung-hdmi.c __compiletime_assert_537
Good: v6.13 (v6.13-26-g65a3016a79e2) Bad: 6.13.2-rc1 (v6.13-652-g32cbb2e169ed)
* arm64:
build:
* gcc-8-defconfig
* gcc-8-defconfig-40bc7ee5
* gcc-8-lkftconfig-hardening
## Build log
In function 'fsl_samsung_hdmi_phy_configure_pll_lock_det.isra.10',
inlined from 'fsl_samsung_hdmi_phy_configure' atdrivers/phy/freescale/phy-fsl-samsung-hdmi.c:466:2:include/linux/compiler_types.h:542:38: error: call to '__compiletime_assert_537' declared with attribute error: FIELD_PREP:
value too large for the field
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:523:4: note: in definition of macro
'__compiletime_assert'
prefix ## suffix(); \
^~~~~~include/linux/compiler_types.h:542:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~~~~~~~~~~~include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~include/linux/bitfield.h:68:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~include/linux/bitfield.h:115:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion of macro 'FIELD_PREP'
writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
^~~~~~~~~~make[6]: *** [scripts/Makefile.build:196:drivers/phy/freescale/phy-fsl-samsung-hdmi.o] Error 1
## Source
* kernel version: 6.13.2-rc1
* git tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git sha: 32cbb2e169ed556d3d60e8ea56a138cef824a28a
* git describe: v6.13-652-g32cbb2e169ed
* project details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.13.y/build/v6.13-652-g32cbb2e169ed
## Build
* build log: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.13.y/build/v6.13-652-g32cbb2e169ed/testrun/27199349/suite/build/test/gcc-8-defconfig/log
* build history: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.13.y/build/v6.13-652-g32cbb2e169ed/testrun/27199349/suite/build/test/gcc-8-defconfig/history/
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.13.y/build/v6.13-652-g32cbb2e169ed/testrun/27199349/suite/build/test/gcc-8-defconfig/
* kernel config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2scp7tWHD0J3Iyj4KIMuqDUMKSF/config
* architectures: arm64
* toolchain version: gcc-8
## Steps to reproduce
- tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8 --kconfig defconfig
Links:
[1] https://lore.kernel.org/all/CA+G9fYsHGrgZsEEVvP0XMcAhLyCYnrCPgZJ1puT6cfQBCGUB9g@mail.gmail.com/
--
Linaro LKFT
https://lkft.linaro.org
Greg KH
maintainerQuoted 50 lines · Theodore Grey
Regressions on the arm64, builds failed with gcc-8 on Linux stable-rc 6.13.2-rc1 But the gcc-13 and clang builds pass.
This was also reported on Linus tree a few weeks back [1] and also seen on the stable-rc 6.12.13-rc1.
Build regression: arm64, gcc-8
phy-fsl-samsung-hdmi.c__compiletime_assert_537Good: v6.13 (v6.13-26-g65a3016a79e2) Bad: 6.13.2-rc1 (v6.13-652-g32cbb2e169ed)* arm64:
build:
* gcc-8-defconfig
* gcc-8-defconfig-40bc7ee5
* gcc-8-lkftconfig-hardening## Build log
In function 'fsl_samsung_hdmi_phy_configure_pll_lock_det.isra.10',
inlined from 'fsl_samsung_hdmi_phy_configure' atdrivers/phy/freescale/phy-fsl-samsung-hdmi.c:466:2:include/linux/compiler_types.h:542:38: error: call to '__compiletime_assert_537' declared with attribute error:FIELD_PREP:
value too large for the field
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)^ include/linux/compiler_types.h:523:4: note: in definition of macro '__compiletime_assert' prefix ## suffix(); \ ^~~~~~
include/linux/compiler_types.h:542:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)^~~~~~~~~~~~~~~~~~~include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:68:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:115:3: note: in expansion of macro '__BF_FIELD_CHECK' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^~~~~~~~~~~~~~~~ drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion of macro 'FIELD_PREP' writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12)); ^~~~~~~~~~
Quoted 2 lines
make[6]: *** [
scripts/Makefile.build:196:drivers/phy/freescale/phy-fsl-samsung-hdmi.o] Error 1
Offending commit now dropped from 6.13.y and 6.12.y, thanks.
greg k-h
Jon Hunter
maintainerQuoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.13.2-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.13.y
and the diffstat can be found below.thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.13:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 115 pass, 1 failLinux version: 6.13.2-rc1-g32cbb2e169ed
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Test failures: tegra194-p2972-0000: pm-system-suspend.sh
Jon
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.13.2 release. There are 623 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 07 Feb 2025 13:42:57 +0000. Anything received after that time might be too late.
Tested on a ThinkPad E14 Gen 3 with a AMD Ryzen 5 5500U CPU and on the Steam Deck (LCD variant)