[PATCH for-next V2 0/4] RoCE GID management fixes

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

 



This patch-set mainly fixes teardown and error flow fixes that Jason and
you have found in the recent submitted patchset. As suggested by
Jason, I've split the cache removal process to cleanup and release.
Although I don't expect the HW vendor drivers to use the cache after
it was cleaned up, releasing it in the put function could prevent
possible use-after-free errors. Saying that, we could alternatively
review the vendors' usage more carefully and probably put the release
function as part of the unregister device flow, but asynchronous contexts
make it harder to review.

The third patch in this series was written by Jason.
The current implementation of ib_register_device could have caused
the device to be released if an error occurs. By then, a consumer
would call  ib_dealloc_device and get a double-free bug.
This patch makes the following schema mandatory for all flows:
ib_alloc_device
ib_register_device
ib_unregister_device
ib_dealloc_device

In addition, this patch-set also fixes a small error flow issue that
was found by Dan Carpenter's kbuild system and a possible dead-lock.

Except for patch 0003, these patches could be squashed into
"IB/core: Add RoCE GID table management". If you choose to do so,
patch 0003 should come before this series. I can of course re-send
the RoCE GID table management series if needed.

Thanks,
Matan

Jason Gunthorpe (1):
  IB/core: Make ib_alloc_device initialize the kobject

Matan Barak (3):
  IB/core: Access to one past end of array in _gid_table_setup_one
  IB/core: Fix possible deadlock in write_gid
  IB/core: RoCE GID management separate cleanup and release

 drivers/infiniband/core/cache.c     | 109 +++++++++++++++++++++++++-----------
 drivers/infiniband/core/core_priv.h |   4 +-
 drivers/infiniband/core/device.c    | 109 +++++++++++++++++++++++-------------
 drivers/infiniband/core/sysfs.c     |  52 ++---------------
 4 files changed, 151 insertions(+), 123 deletions(-)

-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux