Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932096AbbKGSJI (ORCPT ); Sat, 7 Nov 2015 13:09:08 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33162 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753938AbbKGSI7 (ORCPT ); Sat, 7 Nov 2015 13:08:59 -0500 Date: Sat, 7 Nov 2015 10:08:56 -0800 From: Jeremiah Mahler To: Jarkko Sakkinen Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com, dhowells@redhat.com, artem.bityutskiy@linux.intel.com, Tejun Heo , NeilBrown , Guenter Roeck , "Eric W. Biederman" Subject: Re: [BUG, PATCH 03/10] sysfs: added __compat_only_sysfs_link_entry_to_kobj() Message-ID: <20151107180856.GA2250@newt.localdomain> Mail-Followup-To: Jeremiah Mahler , Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com, dhowells@redhat.com, artem.bityutskiy@linux.intel.com, Tejun Heo , NeilBrown , Guenter Roeck , "Eric W. Biederman" References: <1445020843-9382-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1445020843-9382-4-git-send-email-jarkko.sakkinen@linux.intel.com> <20151107025518.GB2911@newt.localdomain> <20151107105543.GA6897@intel.com> <20151107114137.GA5100@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151107114137.GA5100@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1771 Lines: 58 Jarkko, On Sat, Nov 07, 2015 at 01:41:37PM +0200, Jarkko Sakkinen wrote: > On Sat, Nov 07, 2015 at 12:55:43PM +0200, Jarkko Sakkinen wrote: > > On Fri, Nov 06, 2015 at 06:55:18PM -0800, Jeremiah Mahler wrote: > > > Jarkko, > > > [...] > > > > + entry = kernfs_find_and_get(target_kobj->sd, target_name); > > > > + if (!entry) { > > > > + kernfs_put(target); > > > > + return -ENOENT; > > > > + } > > > > + > > > > > > On an Acer C720 this call to kernfs_find_and_get fails resulting in > > > a failed resume after suspend. > > > > > > Apparently it can't find an object for the name "ppi". > > > > > > This bug does not appear until the next patch is applied which > > > calls __compat_only_sysfs_link_entry_to_kobj. > > > > I think I might have found something thanks to your help > > > > First I found this old bug: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1096511 > > > > What is happening is that DSM is not found and therefore tpm_add_ppi() > > does not add ppi to sysfs groups array. > > > > __compat_only_sysfs_link_entry_to_kobj() is called after tpm_add_ppi > > unconditionally for TPM1. > > > > I'll implement a fix for this ASAP. > > > > Thank you for great effort on finding tis! > > I pushed a fix over here: > > https://github.com/jsakkine/linux-tpmdd/tree/fixes > This fix does work since it effectively avoids the call to __compat_only_sysfs_link_entry_to_kobj(). Have you tested cases where __compat_only_sysfs_link_entry_to_kobj() is actually used? [...] -- - Jeremiah Mahler -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/