* [PATCH] bcachefs: Ensure wo don't return with closure on waitlist
@ 2025-07-17 20:29 Kent Overstreet
0 siblings, 0 replies; only message in thread
From: Kent Overstreet @ 2025-07-17 20:29 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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 62dda821247e..8a8c94bd2580 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -2060,6 +2060,8 @@ struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *trans,
BUG_ON(trans->restarted);
return h;
err:
+ if (waiting)
+ 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] only message in thread
only message in thread, other threads:[~2025-07-17 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 20:29 [PATCH] bcachefs: Ensure wo don't return with closure on waitlist Kent Overstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox