Re: [PATCH for-rc 1/2] RDMA/core: Add helper function to retrieve driver gid context from gid index

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

 



On Fri, Feb 23, 2018 at 06:59:08AM +0000, Parav Pandit wrote:

> I am adding following APIs.
> struct ib_gid_attr* ib_get_cached_gid_ref(device, port, index);
> ib_put_cached_gid_ref();
> 
> So ib_get_gid_context_by_index() API makes sense to call after calling ib_get_cached_gid_ref().
> This ensure that GID won't get deleted while ib_get_gid_context_by_index() is invoked.

Considering this need in the drivers I wonder if we shouldn't be
hoisting the context pointer into the ib_gid_attr.

Selvin, is it OK to wait? Your original patch has the same basic
racing issue Parav describes, but it looks like it just malfunctions
not crashes?

Jason
--
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