From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup Date: Mon, 21 Nov 2016 22:46:10 +0200 Message-ID: <20161121204610.v56fhxfxibhsvzss@intel.com> References: <1479429004-7962-1-git-send-email-stefanb@linux.vnet.ibm.com> <1479429004-7962-2-git-send-email-stefanb@linux.vnet.ibm.com> <20161118155249.sdxp2qfjfzfw4tzt@intel.com> <20161119182228.GA22775@obsidianresearch.com> <20161120121451.awcraondhcvzpbig@intel.com> <20161121175520.GA24191@obsidianresearch.com> <20161121203244.iwx2wa2zcilqd5ao@intel.com> <20161121203708.GA7294@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20161121203708.GA7294-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jason Gunthorpe Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Mon, Nov 21, 2016 at 01:37:08PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 10:32:44PM +0200, Jarkko Sakkinen wrote: > > > > And this one fixes the sysfs problem > > > > > > https://patchwork.kernel.org/patch/9438331/ > > > > > > Here is a commit message: > > > > > > tpm: Do not call tpm_chip_unregister if register has not succeeded > > > > > > This is no longer allowed, vtpm was relying on the check inside the > > > tpm core which was removed. Fixes an oops during error unwind. > > > > > > Fixes: a8ed92219a04 ("tpm: Get rid of TPM_CHIP_FLAG_REGISTERED") > > > Signed-off-by: Jason Gunthorpe > > > Tested-by: Stefan Berger > > > > > > That just leaves the ACPI thing.. > > > > I like the original commit message more. It documents the change. > > ?? > > This is for https://patchwork.kernel.org/patch/9438331/ which didn't > have a message yet. This was the commit message when I did git am: tpm: vtpm_proxy: Do not access host's event log On Thu, Nov 17, 2016 at 06:15:20PM -0500, Stefan Berger wrote: > >>Further, I had the impression that the error unwinding following -ENODEV has > >>an issue related to sysfs. > >I don't follow this comment.. > > I have encountered this error here, which gets masked when applying the > previously shown patch. If tpm_chip_register fails vtpm must not call tpm_chip_unregister: > [ 58.271017] [] dpm_sysfs_remove+0x22/0x60 > [ 58.271017] [] device_del+0x58/0x280 > [ 58.271017] [] tpm_chip_unregister+0x40/0xb0 [tpm] > [ 58.271017] [] vtpm_proxy_fops_release+0x40/0x60 [tpm_vtpm_proxy] So, this is a vtpm thing I missed for 'tpm: Get rid of TPM_CHIP_FLAG_REGISTERED' Does this do the trick? /Jarkko ------------------------------------------------------------------------------