On Wed, 5 Mar 2025 at 08:08, K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote: > > > And it turns out my worry about pipe_discard_from() was unnecessary. > > Yes, the code is buggy. But no, it doesn't matter. Why? There are no > > callers of that function ;) > ]> I don't see any in kernel user of this helper currently so can the > wrap-around issue be addressed and the helper be removed later? Yes. That's what I did. I still would love to see - more testing - explicit limit checking in pipe_resize_ring() and then I think we could make CONFIG_64BIT use the 16-bit pipe_index_t too (because not doing so clearly was a mistake: it meant that people didn't test the 32-bit case, so the wrap-around bugs weren't as obvious). Linus Linus