From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77649C43381 for ; Thu, 21 Mar 2019 10:16:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45F26218AE for ; Thu, 21 Mar 2019 10:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553163385; bh=KNIRwHBdih44VGPsPJZWUBq11VpIAQP8g66+sgR8aZ8=; h=Subject:To:Cc:From:Date:List-ID:From; b=efTZAnfNLGoFWQtIndArOZEhqgwqD4s65IHayjeKNO+8+Q9nhDP8Jp5dhSkDpSfeQ SfuoX6CENBcvlXNDcDZUS2EOMYPwraMDBaV4LG4CvucPTsPM+YROTCtYVJ3fz3Ld3G XeN9HZWXGeElinMRVUJH9w59+1JBifnX2tRreZpU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbfCUKQY (ORCPT ); Thu, 21 Mar 2019 06:16:24 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:48209 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbfCUKQY (ORCPT ); Thu, 21 Mar 2019 06:16:24 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9A7CF23702; Thu, 21 Mar 2019 06:16:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 06:16:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hAoX5f TIO65jiMaO4ZaQrmN1i6pjKONCqrQmNhl26R8=; b=m9N/aBc/Jujq9o1CegM3YH o4RIYhXy3JYAtXRa8j3G8CwF5a5OKr5Gw86Xet6xDlZAn9y2Df7ffLLPU30UU5Gf a9f+Bl1wHUfbbu9cQAIq4+N/Cg9aJvig0suoQ4vCjw6/1cXbUXvufX21rBfBrCQc qiptfo+aM2+In45GW+tWIqgU1ypLRhAIlklmXqSjliez0ku4MqcoTxW5SOaoDJP9 YErsTwi7Jl5W3RynBoZu58KCEyp1JOoyCMTvpyYCcIVftxgEa6IEcfTiNEYNTm5c SypGO9Ou1p0pAW5Asc4rqWaVwy7vlR991rJg0Z+vGRp79wMMye5djW82Ee51JD5g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieelucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttddtlfenuc fhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhrgheqnecu kfhppeelhedrleekrddvjedrudekjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvg hgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepge X-ME-Proxy: Received: from localhost (unknown [95.98.27.187]) by mail.messagingengine.com (Postfix) with ESMTPA id AE4E510312; Thu, 21 Mar 2019 06:16:22 -0400 (EDT) Subject: FAILED: patch "[PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is" failed to apply to 5.0-stable tree To: jarkko.sakkinen@linux.intel.com, jsnitsel@redhat.com, stefanb@linux.ibm.com Cc: From: Date: Thu, 21 Mar 2019 11:16:19 +0100 Message-ID: <1553163379222177@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.0-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 442601e87a4769a8daba4976ec3afa5222ca211d Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Fri, 8 Feb 2019 18:30:59 +0200 Subject: [PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete Return -E2BIG when the transfer is incomplete. The upper layer does not retry, so not doing that is incorrect behaviour. Cc: stable@vger.kernel.org Fixes: a2871c62e186 ("tpm: Add support for Atmel I2C TPMs") Signed-off-by: Jarkko Sakkinen Reviewed-by: Stefan Berger Reviewed-by: Jerry Snitselaar diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c index 32a8e27c5382..cc4e642d3180 100644 --- a/drivers/char/tpm/tpm_i2c_atmel.c +++ b/drivers/char/tpm/tpm_i2c_atmel.c @@ -69,6 +69,10 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len) if (status < 0) return status; + /* The upper layer does not support incomplete sends. */ + if (status != len) + return -E2BIG; + return 0; }