lkml.org 
[lkml]   [2017]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get()
On Wed, Oct 25, 2017 at 02:17:44PM -0600, Jason Gunthorpe wrote:
> On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote:
>
> > The id has a nice feature that it is unique for one boot cycle you can
> > even try to get a chip that has been deleted. It has the most stable
> > properties in the long run.
>
> It isn't unique, we can re-use ids them via idr_alloc(). We should
> never use index inside the kernel.
>
> > Address is a reusable identifier in one boot cycle.
>
> It is invalid to pass in a chip for which the caller does not hold a
> kref, so address is the safest argument.
>
> Jason

I'll buy this too (sending update today).

/Jarkko

\
 
 \ /
  Last update: 2017-10-26 12:55    [W:0.049 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site