Re: [PATCH 1/4] IB/isert: properly type the login buffer

Christoph Hellwig
2016-02-17T10:33:25Z

On Tue, Feb 16, 2016 at 07:19:19PM +0200, Max Gurtovoy wrote:
> Hi Christoph,
> I have noticed that we are allocating login_req_buf sized
> ISCSI_DEF_MAX_RECV_SEG_LEN but the sge.lenth we post_recv is
> ISER_RX_LOGIN_SIZE, thus the rx_buflen in the recv completion is also
> ISER_RX_LOGIN_SIZE in case we are in login stage.
> I think we might crash here in case the initiator send request bigger than
> ISCSI_DEF_MAX_RECV_SEG_LEN, won't we ?

I just distangled the allocations.. But I think your are right, and
the existing code is already confused about the RX vs TX allocations.

I'll respin the patch to fix this issue and add a stable tag.