On Sun, 5 Sep 2010 23:54:32 +0100, Chris Wilson chris@chris-wilson.co.uk wrote:
kref_init(handlecount) initialises the number of handles to 1 upon creation when it should remain 0 until the first allocation. All the drivers were working around this by deleting the extra count when they created the first handle for the object in spite of the documentation saying that it was unecessary.
Aside from the fact that the kref API prevents this as kref_get() complains if called on a zero handlecount == 0.