Re: [PATCHv2] tcmu: Fix possbile memory leak when recalculating the cmd base size

2017-07-11 Thread Nicholas A. Bellinger
On Tue, 2017-07-11 at 17:59 +0800, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For all the entries allocated from the ring cmd area, the memory is > something like the stack memory, which will always reserve the old > data, so the entry->req.iov_bidi_cnt maybe none zero. > > On some

Re: [PATCHv2] tcmu: Fix possbile memory leak when recalculating the cmd base size

2017-07-11 Thread Mike Christie
On 07/11/2017 04:59 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For all the entries allocated from the ring cmd area, the memory is > something like the stack memory, which will always reserve the old > data, so the entry->req.iov_bidi_cnt maybe none zero. > > On some environmen

Re: [PATCHv2] tcmu: Fix possbile memory leak when recalculating the cmd base size

2017-07-11 Thread Bryant G. Ly
From: Xiubo Li For all the entries allocated from the ring cmd area, the memory is something like the stack memory, which will always reserve the old data, so the entry->req.iov_bidi_cnt maybe none zero. On some environments, the crash could be reporduce very easy and some not. The following

[PATCHv2] tcmu: Fix possbile memory leak when recalculating the cmd base size

2017-07-11 Thread lixiubo
From: Xiubo Li For all the entries allocated from the ring cmd area, the memory is something like the stack memory, which will always reserve the old data, so the entry->req.iov_bidi_cnt maybe none zero. On some environments, the crash could be reporduce very easy and some not. The following is