lkml.org 
[lkml]   [2016]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] tpm: Get rid of chip->pdev
On Fri, Feb 12, 2016 at 08:33:20PM -0700, Jason Gunthorpe wrote:
> On Fri, Feb 12, 2016 at 08:31:21PM -0500, Stefan Berger wrote:
> > > I'll send you something else that might work for vtpm...'
> >
> > The vtpm driver will introduce chip->priv, which will point to vtpm_dev. For
> > this reason we need to hold a reference to the vtpm_dev->dev in the
> > front end.
>
> This should take care of it for all drivers including vtpm.
>
> https://github.com/jgunthorpe/linux/commits/for-jarkko
>
> At the very least this turns silent use after free into a null pointer
> oops.
>
> We should also discuss if we want to continue to have the driver
> module locked while /dev/tpmX is open, that is no longer needed for
> corectness.

I'm happy the patch that was sent before although I didn't give it
Reviewed-by because it had couple of style errors. If those two
style errors are the *only* issues I can fix up them.

Unless the differences are trivial (like a missing return value or
couple of minor style errors something very obvious) for me to fixup I'd
hope to re-review the code.

I'm not trying to be difficult here. For small errors I can amend
the commits but it seems that there was something more non-trival
done

Other than the first patch (for which I'm still waiting a clear
explanation why it is wrong), these are not going to 4.5 anyway so
there's lots time to things the long way.

/Jarkko

\
 
 \ /
  Last update: 2016-02-14 06:41    [W:0.087 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site