Re: [PATCH] btreplay: fix device IO remap functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux