Re: [PATCH v2] infiniband: Fix a use after free in isert_connect_request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/22/2021 6:13 PM, Lv Yunlong wrote:
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. This patch
free the device in the correct order.

Signed-off-by: Lv Yunlong <lyl2019@xxxxxxxxxxxxxxxx>
---
  drivers/infiniband/ulp/isert/ib_isert.c | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)

looks good,

Reviewed-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>





[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux