Re: [PATCH rdma-next v6 3/8] RDMA/restrack: Add general infrastructure to track RDMA resources

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

 



On Fri, Jan 26, 2018 at 08:24:23AM +0200, Leon Romanovsky wrote:

> > I've often thought I'd like a helper type that had the kref+complete
> > semantics, because that does seem to crop up in a few places and it
> > would really help clarity.
> 
> Actually, it is used a lot, one of closest examples to us - qib sdma
> kref counting.

Looks like it has the same race bug between the put and
wait_for_completion compared to the async sdma_sw_clean_up_task. Needs
the 'get if not zero' approach too.

Kinda proves my point right? People using krefs for this get it wrong
because it DOESN'T follow well understood kref semantics, because it
ISN'T a kref - it a usecount.

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