All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Bin Lan <bin.lan.cn@windriver.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] closures: Change BUG_ON() to WARN_ON()
Date: Thu, 21 Nov 2024 07:38:43 -0500	[thread overview]
Message-ID: <20241121073837-8522dece4a873ee3@stable.kernel.org> (raw)
In-Reply-To: <20241121064607.3768607-1-bin.lan.cn@windriver.com>

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 339b84ab6b1d66900c27bd999271cb2ae40ce812

WARNING: Author mismatch between patch and upstream commit:
Backport author: Bin Lan <bin.lan.cn@windriver.com>
Commit author: Kent Overstreet <kent.overstreet@linux.dev>


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.11.y | Present (exact SHA1)
6.6.y | Not found
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
--- -	2024-11-21 06:59:47.405492326 -0500
+++ /tmp/tmp.e7rRZ1qHWZ	2024-11-21 06:59:47.399091975 -0500
@@ -1,3 +1,5 @@
+[ Upstream commit 339b84ab6b1d66900c27bd999271cb2ae40ce812 ]
+
 If a BUG_ON() can be hit in the wild, it shouldn't be a BUG_ON()
 
 For reference, this has popped up once in the CI, and we'll need more
@@ -51,15 +53,17 @@
 03246 ========= FAILED TIMEOUT copygc_torture_no_checksum in 7200s
 
 Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
+[ Resolve minor conflicts to fix CVE-2024-42252 ]
+Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
 ---
- lib/closure.c | 10 ++++++++--
+ drivers/md/bcache/closure.c | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/lib/closure.c b/lib/closure.c
-index 07409e9e35a53..2e1ee9fdec081 100644
---- a/lib/closure.c
-+++ b/lib/closure.c
-@@ -17,12 +17,18 @@ static inline void closure_put_after_sub(struct closure *cl, int flags)
+diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
+index d8d9394a6beb..18f21d4e9aaa 100644
+--- a/drivers/md/bcache/closure.c
++++ b/drivers/md/bcache/closure.c
+@@ -17,10 +17,16 @@ static inline void closure_put_after_sub(struct closure *cl, int flags)
  {
  	int r = flags & CLOSURE_REMAINING_MASK;
  
@@ -71,12 +75,13 @@
 +		r &= ~CLOSURE_GUARD_MASK;
  
  	if (!r) {
- 		smp_acquire__after_ctrl_dep();
- 
 +		WARN(flags & ~CLOSURE_DESTRUCTOR,
 +		     "closure ref hit 0 with incorrect flags set: %x (%u)",
 +		     flags & ~CLOSURE_DESTRUCTOR, (unsigned) __fls(flags));
 +
- 		cl->closure_get_happened = false;
- 
  		if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) {
+ 			atomic_set(&cl->remaining,
+ 				   CLOSURE_REMAINING_INITIALIZER);
+-- 
+2.43.0
+
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

      parent reply	other threads:[~2024-11-21 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21  6:46 [PATCH 6.1] closures: Change BUG_ON() to WARN_ON() Bin Lan
2024-11-21  7:13 ` Kent Overstreet
2024-11-21 11:04   ` Bin Lan
2024-11-21 12:38 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241121073837-8522dece4a873ee3@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=bin.lan.cn@windriver.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.