On Mon, Aug 21, 2023 at 11:25:35AM -0500, Mike Christie wrote: > On 8/21/23 2:57 AM, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro@xxxxxxxxxx> Commit: 699826f4e30a ("IB/isert: Fix incorrect release of isert connection") is > > Was the issue described in that commit just not correct? Or was it > supposed to be for some sort of race'y error path? > > It looks like that analysis was wrong for the normal login/logout path where > we call: I came to same conclusion when analyzed Dennis's report. Thanks > > 1. isert_init_conn sets kref to 1. > 2. If we are connected we set kref to 2 via isert_connected_handler -> kref_get > 3. When we logout from there then isert_wait_conn -> queue_work release_work > and release_work does isert_put_conn so kref = 1. > 4. Then we do isert_free_conn which does isert_put_conn to set the kref to 0 > and then free the conn. > > So the patch in this mail looks ok. > > I checked most of the error paths, but I might have missed some. It looks ok > for them as well.