Re: [PATCH 4/7] IB/srp: Fix a potential queue overflow in an error path

2015-11-04 Thread Bart Van Assche
On 11/03/2015 08:03 PM, Christoph Hellwig wrote: On Tue, Nov 03, 2015 at 12:50:59PM -0800, Bart Van Assche wrote: Such a check wouldn't be that simple because the only way to perform such a check is either by doubling the number of ib_map_mr_sg() calls or by performing additional memory

Re: [PATCH 4/7] IB/srp: Fix a potential queue overflow in an error path

2015-11-03 Thread Bart Van Assche
On 11/03/2015 09:36 AM, Sagi Grimberg wrote: On 28/10/2015 00:02, Bart Van Assche wrote: Wait until memory registration has finished in the srp_queuecommand() error path before invalidating memory regions to avoid a send queue overflow. This looks backwards to me... Why do we even post

Re: [PATCH 4/7] IB/srp: Fix a potential queue overflow in an error path

2015-11-03 Thread Christoph Hellwig
On Tue, Nov 03, 2015 at 12:50:59PM -0800, Bart Van Assche wrote: > Such a check wouldn't be that simple because the only way to perform such a > check is either by doubling the number of ib_map_mr_sg() calls or by > performing additional memory allocations. The other option woud be to disallow

[PATCH 4/7] IB/srp: Fix a potential queue overflow in an error path

2015-10-27 Thread Bart Van Assche
Wait until memory registration has finished in the srp_queuecommand() error path before invalidating memory regions to avoid a send queue overflow. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer