On Tue, Jul 23, 2024 at 06:44:56AM -0700, Christoph Hellwig wrote: > On Tue, Jul 23, 2024 at 01:28:32PM +0200, Uladzislau Rezki wrote: > > Concurrent vfree() will lead to use-after-free. Either add a comment > > that a user is responsible for not using vrealloc()/vfree() on the same > > pointer concurrently or use find_unlink_vmap_area() which might be more > > complex when it comes to design of the vrealloc(). > > You can never use *free concurrently with *realloc. I guess it doesn't > hurt to clearly document that, but other than that we should not try > to cater to that use pattern at all. > Agree, i mentioned that as a first option. I think, it is enough to document that. Thanks! -- Uladzislau Rezki