Searched hist:"4 a579da2586bd3b79b025947ea24ede2bbfede62" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/infiniband/ulp/isert/ |
H A D | ib_isert.c | diff fce50a2fa4e9c6e103915c351b6d4a98661341d6 Fri Jun 30 07:21:31 CEST 2017 Nicholas Bellinger <nab@linux-iscsi.org> iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done
This patch fixes a NULL pointer dereference in isert_login_recv_done() of isert_conn->cm_id due to isert_cma_handler() -> isert_connect_error() resetting isert_conn->cm_id = NULL during a failed login attempt.
As per Sagi, we will always see the completion of all recv wrs posted on the qp (given that we assigned a ->done handler), this is a FLUSH error completion, we just don't get to verify that because we deref NULL before.
The issue here, was the assumption that dereferencing the connection cm_id is always safe, which is not true since:
commit 4a579da2586bd3b79b025947ea24ede2bbfede62 Author: Sagi Grimberg <sagig@mellanox.com> Date: Sun Mar 29 15:52:04 2015 +0300
iser-target: Fix possible deadlock in RDMA_CM connection error
As I see it, we have a direct reference to the isert_device from isert_conn which is the one-liner fix that we actually need like we do in isert_rdma_read_done() and isert_rdma_write_done().
Reported-by: Andrea Righi <righi.andrea@gmail.com> Tested-by: Andrea Righi <righi.andrea@gmail.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> diff 4a579da2586bd3b79b025947ea24ede2bbfede62 Sun Mar 29 14:52:04 CEST 2015 Sagi Grimberg <sagig@mellanox.com> iser-target: Fix possible deadlock in RDMA_CM connection error
Before we reach to connection established we may get an error event. In this case the core won't teardown this connection (never established it), so we take care of freeing it ourselves.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Cc: <stable@vger.kernel.org> # v3.10+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
|