Re: [PATCHv4 1/4] tcmu: Fix possible overwrite of t_data_sg's last iov[]

2017-03-21 Thread Mike Christie
On 03/21/2017 04:36 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > If there has BIDI data, its first iov[] will overwrite the last > iov[] for se_cmd->t_data_sg. > > To fix this, we can just increase the iov pointer, but this may > introuduce a new memory leakage bug: If the se_cmd

[PATCHv4 1/4] tcmu: Fix possible overwrite of t_data_sg's last iov[]

2017-03-21 Thread lixiubo
From: Xiubo Li If there has BIDI data, its first iov[] will overwrite the last iov[] for se_cmd->t_data_sg. To fix this, we can just increase the iov pointer, but this may introuduce a new memory leakage bug: If the se_cmd->data_length and se_cmd->t_bidi_data_sg->length are all not aligned up to