]> git.baikalelectronics.ru Git - kernel.git/commit
iser-target: Allocate PI contexts dynamically
authorSagi Grimberg <sagig@mellanox.com>
Tue, 2 Dec 2014 14:57:31 +0000 (16:57 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 13 Dec 2014 07:31:40 +0000 (23:31 -0800)
commit9f2624f705398ac8aefac71f3d52d013db87c9ae
treefbead04664dc846388acccaa4ed8c0ef456f506a
parent2127897412708c297c9b459caf38eadf7ea54607
iser-target: Allocate PI contexts dynamically

This patch converts to allocate PI contexts dynamically in order
avoid a potentially bogus np->tpg_np and associated NULL pointer
dereference in isert_connect_request() during iser-target endpoint
shutdown with multiple network portals.

Also, there is really no need to allocate these at connection
establishment since it is not guaranteed that all the IOs on
that connection will be to a PI formatted device.

We can do it in a lazy fashion so the initial burst will have a
transient slow down, but very fast all IOs will allocate a PI
context.

Squashed:

iser-target: Centralize PI context handling code

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h