Skip to content

block: fix error injection static_branch dec imbalance#1011

Open
blktests-ci[bot] wants to merge 4 commits into
for-next_basefrom
series/1117330=>for-next
Open

block: fix error injection static_branch dec imbalance#1011
blktests-ci[bot] wants to merge 4 commits into
for-next_basefrom
series/1117330=>for-next

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Jun 27, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block: fix error injection static_branch dec imbalance
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1117330

axboe and others added 4 commits June 24, 2026 06:44
* io_uring-7.2:
  io_uring/memmap: bound io_pin_pages() by page array byte size
  io_uring: Use system_dfl_wq instead of system_unbound_wq
  io_uring/register: preserve SQ array entries on resize
  io_uring, audit: don't log IORING_OP_RECV_ZC
  io_uring: get rid of tw_pending for !DEFER task work
  io_uring/rw: preserve partial result for iopoll
  io_uring/nop: fix file reference leak with IOSQE_FIXED_FILE
* block-7.2: (43 commits)
  block, bfq: don't grab queue_lock to initialize bfq
  mm/page_io: don't nest queue_lock under rcu in bio_associate_blkg_from_page()
  blk-cgroup: don't nest queue_lock under blkcg->lock in blkcg_destroy_blkgs()
  blk-cgroup: don't nest queue_lock under rcu in bio_associate_blkg()
  blk-cgroup: don't nest queue_lock under rcu in blkg_lookup_create()
  blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs()
  blk-cgroup: delay freeing policy data after rcu grace period
  blk-cgroup: protect iterating blkgs with blkcg->lock in blkcg_print_stat()
  md/raid5: avoid R5_Overlap races while breaking stripe batches
  md/raid5: use stripe state snapshot in break_stripe_batch_list()
  blk-cgroup: defer blkcg css_put until blkg is unlinked from queue
  blk-cgroup: fix UAF in __blkcg_rstat_flush()
  block, bfq: protect async queue reset with blkcg locks
  nbd: don't warn when reclassifying a busy socket lock
  block: fix incorrect error injection static key decrement
  md/raid5: let stripe batch bm_seq comparison wrap-safe
  md/raid1: protect head_position for read balance
  md/raid1: free r1_bio when REQ_NOWAIT is set and read would block on retry
  md/raid1: honor REQ_NOWAIT when waiting for behind writes
  md/raid5: always convert llbitmap bits for discard
  ...
* block-7.2:
  block: handle REQ_OP_ZONE_APPEND in __bio_integrity_action
  block: fix GFP_ flags confusion in bio_integrity_alloc_buf
@blktests-ci

blktests-ci Bot commented Jun 27, 2026

Copy link
Copy Markdown
Author

Upstream branch: 523fc0d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1117330
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=1117330
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: block: fix error injection static_branch dec imbalance
Using index info to reconstruct a base tree...
M	block/error-injection.c
Falling back to patching base and 3-way merge...
Auto-merging block/error-injection.c
CONFLICT (content): Merge conflict in block/error-injection.c
Patch failed at 0001 block: fix error injection static_branch dec imbalance
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch'

conflict:

diff --cc block/error-injection.c
index cfb83138960c,d210bd5fd8fb..000000000000
--- a/block/error-injection.c
+++ b/block/error-injection.c
@@@ -118,15 -118,24 +118,32 @@@ out_free_inj
  static void error_inject_removeall(struct gendisk *disk)
  {
  	struct blk_error_inject *inj;
+ 	bool had_entries;
  
  	mutex_lock(&disk->error_injection_lock);
++<<<<<<< HEAD
 +	if (test_and_clear_bit(GD_ERROR_INJECT, &disk->state))
 +		static_branch_dec(&blk_error_injection_enabled);
++=======
+ 	had_entries = !list_empty(&disk->error_injection_list);
+ 	clear_bit(GD_ERROR_INJECT, &disk->state);
++>>>>>>> block: fix error injection static_branch dec imbalance
  	while ((inj = list_first_entry_or_null(&disk->error_injection_list,
  			struct blk_error_inject, entry))) {
  		list_del_rcu(&inj->entry);
  		kfree_rcu_mightsleep(inj);
  	}
++<<<<<<< HEAD
++=======
+ 	/*
+ 	 * blk_error_injection_exit() runs for every gendisk teardown, not
+ 	 * only for disks that configured rules.  Only adjust the global
+ 	 * static key if this disk ever contributed to it, mirroring the
+ 	 * list_empty() check in error_inject_add().
+ 	 */
+ 	if (had_entries)
+ 		static_branch_dec(&blk_error_injection_enabled);
++>>>>>>> block: fix error injection static_branch dec imbalance
  	mutex_unlock(&disk->error_injection_lock);
  }
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant