Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2113786imj; Fri, 8 Feb 2019 12:49:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IaVBLGakNFNUvoXrIhYSjY7NRrGGsPZny5Vrh44UwP1MFVslbTrXkY6CSEriBP2OWAfHEEv X-Received: by 2002:a17:902:be10:: with SMTP id r16mr24819857pls.304.1549658943059; Fri, 08 Feb 2019 12:49:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549658943; cv=none; d=google.com; s=arc-20160816; b=HgN6GYqhDcqOnUa6YJWZW2O32hXFz11ndazG/+XQSPVowrsjfRFiFZ0a97NH3FbEna +V9ZtBqoq3rW23Ccg19ICQNTmRLLSSGnbyi0dh4DqRGd2zX7w4AQJmbXDatcYhYkULSR kL7PAsNrepogqgMQg6mBLNs8cn0Vivyco26wgkhxYjNbUkPFXRczs48GEOeq8Abt0VyZ lW9VOqBTBvxtoyJhbAfxsF5JWLCWHlRQXNGalxP5OGdNb36UAMvI1X4XpRCGpQJ/kCFW 26WxSsaXhlNHFTuUauu5NIAiHLOihHte0kzOerM8e0FE5OwfoTS1aQ2AdJiOxHbXYhMU sNPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=V5pDIGXKPUI7ezDMFLgCSF1twyEzvom+or97Mp14MTo=; b=TfqWpL8MGz6gz4Z7zHbdtZEB00et5s5Rw2XKD7Fmt/f55f2tYp0HbYzA3xOGHJmovh aKrZyvXke0QXfeQ1pHkprnuoHHTWzsuDsVPsLF1Zffz3hIH0hoBfNKa2zcWuebMPPHUw pFLj6WRD4ry0v5Uor/QF6vPcIwrPF+ojX/XMlliGI0ImLlzxGu2NxO2RxZF5SfX+9uHN mWmOYtG9bLbiLpCUAso11K4vYLr6RvMNuDdAtCYlP/EJYrzGZuo7NUFCwPBbmzKcVbUw OuTy1NKoSsii8shlHN6ZDM+ijZq6ifCvc9sCzH1UVjbt9PJdCQKyibL2LfymoEogmsfV K/Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r81si3577927pfr.164.2019.02.08.12.48.47; Fri, 08 Feb 2019 12:49:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726941AbfBHUqm (ORCPT + 99 others); Fri, 8 Feb 2019 15:46:42 -0500 Received: from mga09.intel.com ([134.134.136.24]:1853 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbfBHUqm (ORCPT ); Fri, 8 Feb 2019 15:46:42 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2019 12:46:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,348,1544515200"; d="scan'208";a="114775062" Received: from szilberm-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.172]) by orsmga006.jf.intel.com with ESMTP; 08 Feb 2019 12:46:36 -0800 Date: Fri, 8 Feb 2019 22:46:35 +0200 From: Jarkko Sakkinen To: Stefan Berger Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Stefan Berger , Alexander Steffen , stable@vger.kernel.org Subject: Re: [PATCH v4 1/2] tpm: =?iso-8859-1?Q?Uni?= =?iso-8859-1?Q?fy_the_send_callback_behaviour=E4?= Message-ID: <20190208204635.GA24938@linux.intel.com> References: <20190208180857.12330-1-jarkko.sakkinen@linux.intel.com> <20190208180857.12330-2-jarkko.sakkinen@linux.intel.com> <4072b2b6-0f95-be50-0772-7e2869c2c24e@linux.ibm.com> <20190208190057.GA3439@linux.intel.com> <20190208191710.GA30645@linux.intel.com> <6a86e3e8-e311-7a0f-585d-3f0435b0143a@linux.ibm.com> <20190208202353.GB1836@linux.intel.com> <36dc691e-4f00-7f6b-5a53-763c12d4fa16@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <36dc691e-4f00-7f6b-5a53-763c12d4fa16@linux.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 08, 2019 at 03:32:32PM -0500, Stefan Berger wrote: > On 2/8/19 3:23 PM, Jarkko Sakkinen wrote: > > On Fri, Feb 08, 2019 at 02:27:31PM -0500, Stefan Berger wrote: > > > On 2/8/19 2:17 PM, Jarkko Sakkinen wrote: > > > > */ > > > > if (rc > 0) { > > > > dev_warn(&chip->dev, > > > > "%s: send(): invalid value %d\n", __func__, rc); > > > > rc = 0; > > > > } > > > > > > > > Should be fairly safe play now. > > > Unfortuantely it isn't. You seemed to have lost the > > > EXPORT_SYMBOL_GPL(tpm_chip_start/stop) and the tpm_chip_start/stop around > > > the tpm2_shutdown()... > > OK, now those fixes are back. In tpm_pm_shutdown() case you need also > > take the lock. > > tpm_del_char_device also needs the start/stop! Done and updated the commit message to have all the call sites: * tpm_chip_register() * tpm_class_shutdown() * tpm_del_char_device() * tpm_pm_suspend() * tpm_try_get_ops() and tpm_put_ops() * tpm2_del_space() /Jarkko