Thank you and sorry. I thought Gmail corrupts only tabs, but seems whitespaces as well. Next time will use git to send it. On Mon, Sep 16, 2019 at 5:31 PM Jens Axboe <axboe@xxxxxxxxx> wrote: > > On 9/16/19 9:39 AM, Ignat Korchagin wrote: > > Commit dd093eb1c48e ("Fix warnings on newer gcc") moved string buffers holding > > device names during map file parse stage to stack. However, only pointers to > > them are being stored in the allocated "struct map_dev" structure. These > > pointers are invalid outside of scope of this function and in a different > > thread context. Also "release_map_devs" function still tries to "free" them > > later as if they were allocated on the heap. > > > > Moving the buffers back to the heap by instructing "fscanf" to allocate them > > while parsing the file. > > > > Alternatively, we could redefine the "struct map_dev" to include the whole > > buffers instead of just pointers to them and free them as part of releasing the > > whole "struct map_dev". > > Applied - but by hand, your patch is corrupted, it has mangled whitespace. > > -- > Jens Axboe >