FAILED: patch "[PATCH] dm-verity: avoid double increment of &use_bh_wq_enabled" failed to apply to 6.6-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 72e9ec2fe32b00994f41719cf77423fca67d48b2
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026072019-washhouse-dweeb-5963@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 72e9ec2fe32b00994f41719cf77423fca67d48b2 Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <[email protected]>
Date: Thu, 9 Jul 2026 21:33:16 +0200
Subject: [PATCH] dm-verity: avoid double increment of &use_bh_wq_enabled
verity_parse_opt_args is called twice, first with the only_modifier_opts, first with only_modifier_opts == true and then with only_modifier_opts == false. Thus, the static branch &use_bh_wq_enabled was incremented twice and the destructor verity_dtr would only decrement it once.
Fix tihs bug by only incrementing it on the first call, on the second call, when v->use_bh_wq is true, do nothing.
drivers/md/dm-verity-target.c +2 -0
@@ -1262,6 +1262,8 @@ static int verity_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,continue ; }else if (!strcasecmp (arg_name,DM_VERITY_OPT_TASKLET_VERIFY )) { +if (v->use_bh_wq) +continue ; v->use_bh_wq = true;static_branch_inc (&use_bh_wq_enabled);continue ;
Sasha Levin
maintainerPATCH 1/1 dm-verity: avoid double increment of &use_bh_wq_enabled
From: Mikulas Patocka <[email protected]>
[ Upstream commit 72e9ec2fe32b00994f41719cf77423fca67d48b2 ]
verity_parse_opt_args is called twice, first with the only_modifier_opts, first with only_modifier_opts == true and then with only_modifier_opts == false. Thus, the static branch &use_bh_wq_enabled was incremented twice and the destructor verity_dtr would only decrement it once.
Fix tihs bug by only incrementing it on the first call, on the second call, when v->use_bh_wq is true, do nothing.
--- drivers/md/dm-verity-target.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/dm-verity-target.c +2 -0
@@ -1172,6 +1172,8 @@ static int verity_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v,continue ; }else if (!strcasecmp (arg_name,DM_VERITY_OPT_TASKLET_VERIFY )) { +if (v->use_tasklet) +continue ; v->use_tasklet = true;static_branch_inc (&use_tasklet_enabled);continue ;
Signature · 1 line
2.53.0