linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] bcachefs: Ensure we don't return with closure on waitlist
@ 2025-07-18  6:47 Kent Overstreet
  2025-07-18  6:47 ` [PATCH 2/4] bcachefs: bch2_move_data() now walks btree nodes Kent Overstreet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kent Overstreet @ 2025-07-18  6:47 UTC (permalink / raw)
  To: linux-bcachefs; +Cc: Kent Overstreet, syzbot+0ea2c41a649240197795

things will break wildly if we leave a stack allocated closure on a
waitlist

Reported-by: syzbot+0ea2c41a649240197795@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 fs/bcachefs/ec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 62dda821247e..bea14f02114f 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -2060,6 +2060,9 @@ struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *trans,
 	BUG_ON(trans->restarted);
 	return h;
 err:
+	if (waiting &&
+	    !bch2_err_matches(ret, BCH_ERR_operation_blocked))
+		closure_wake_up(&c->freelist_wait);
 	bch2_ec_stripe_head_put(c, h);
 	return ERR_PTR(ret);
 }
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-18  6:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18  6:47 [PATCH 1/4] bcachefs: Ensure we don't return with closure on waitlist Kent Overstreet
2025-07-18  6:47 ` [PATCH 2/4] bcachefs: bch2_move_data() now walks btree nodes Kent Overstreet
2025-07-18  6:47 ` [PATCH 3/4] bcachefs: rereplicate flushes interior updates Kent Overstreet
2025-07-18  6:47 ` [PATCH 4/4] bcachefs: can_use_btree_node() Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).