diff options
author | 2021-03-22 09:13:25 -0700 | |
---|---|---|
committer | 2021-03-26 14:15:40 -0300 | |
commit | adb76a520d068a54ee5ca82e756cf8e5a47363a4 (patch) | |
tree | d555b618fc0fb2792dcb144ff088bc227b852d53 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | RDMA: Fix a typo (diff) | |
download | linux-dev-adb76a520d068a54ee5ca82e756cf8e5a47363a4.tar.xz linux-dev-adb76a520d068a54ee5ca82e756cf8e5a47363a4.zip |
IB/isert: Fix a use after free in isert_connect_request
The device is got by isert_device_get() with refcount is 1, and is
assigned to isert_conn by
isert_conn->device = device.
When isert_create_qp() failed, device will be freed with
isert_device_put().
Later, the device is used in isert_free_login_buf(isert_conn) by the
isert_conn->device->ib_device statement.
Free the device in the correct order.
Fixes: ae9ea9ed38c9 ("iser-target: Split some logic in isert_connect_request to routines")
Link: https://lore.kernel.org/r/20210322161325.7491-1-lyl2019@mail.ustc.edu.cn
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions