[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453672883-2708-28-git-send-email-luis.henriques@canonical.com>
Date: Sun, 24 Jan 2016 21:59:42 +0000
From: Luis Henriques <luis.henriques@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Sagi Grimberg <sagig@...lanox.com>,
Doug Ledford <dledford@...hat.com>,
Luis Henriques <luis.henriques@...onical.com>
Subject: [PATCH 3.16.y-ckt 027/128] IB/srp: Fix possible send queue overflow
3.16.7-ckt23 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Sagi Grimberg <sagig@...lanox.com>
commit 09c0c0bea500a9ad362589990ee316c9b2482f44 upstream.
When using work request based memory registration (fast_reg)
we must reserve SQ entries for registration and invalidation
in addition to send operations. Each IO consumes 3 SQ entries
(registration, send, invalidation) so we need to allocate 3x
larger send-queue instead of 2x.
Signed-off-by: Sagi Grimberg <sagig@...lanox.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Signed-off-by: Doug Ledford <dledford@...hat.com>
[ luis: backported to 3.16:
- change function srp_create_target_ib() instead of srp_create_ch_ib()
- adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@...onical.com>
---
drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 767000811cf9..36876960f97e 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -451,7 +451,7 @@ static int srp_create_target_ib(struct srp_target_port *target)
struct ib_qp *qp;
struct ib_fmr_pool *fmr_pool = NULL;
struct srp_fr_pool *fr_pool = NULL;
- const int m = 1 + dev->use_fast_reg;
+ const int m = dev->use_fast_reg ? 3 : 1;
int ret;
init_attr = kzalloc(sizeof *init_attr, GFP_KERNEL);
Powered by blists - more mailing lists