From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbcBNFYT (ORCPT ); Sun, 14 Feb 2016 00:24:19 -0500 Received: from mga04.intel.com ([192.55.52.120]:36454 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbcBNFYS (ORCPT ); Sun, 14 Feb 2016 00:24:18 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,444,1449561600"; d="scan'208";a="911664329" Date: Sun, 14 Feb 2016 07:24:14 +0200 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: Stefan Berger , linux-kernel@vger.kernel.org, Peter Huewe , tpmdd-devel@lists.sourceforge.net Subject: Re: [PATCH 2/3] tpm: Get rid of chip->pdev Message-ID: <20160214052414.GB8065@intel.com> References: <1455321871-28296-1-git-send-email-jgunthorpe@obsidianresearch.com> <1455321871-28296-3-git-send-email-jgunthorpe@obsidianresearch.com> <201602130037.u1D0bDEN029756@d01av04.pok.ibm.com> <20160213011130.GA2547@obsidianresearch.com> <201602130128.u1D1S2Xn006955@d01av05.pok.ibm.com> <20160213033320.GA27869@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160213033320.GA27869@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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