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 22E5CC43381 for ; Thu, 21 Mar 2019 10:16:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9168218D4 for ; Thu, 21 Mar 2019 10:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553163388; bh=3Eqj5EVBvFqCFid4Rt+kssrGgGC7iPoTmzWopxkf4no=; h=Subject:To:Cc:From:Date:List-ID:From; b=AaR9hWNJLagObvHPVqjFUQXiPodAr5JT7aqpYsD2oqVslRPT9D4/XO1VW4m+KoKBm 27zk8vrm5M2OomVIxWQki6B2cBcsCXZbsAuqoZRzbiWMgmQvWMosdeeVsheOoybzj3 WiRtW40uS4QZCG8iaZ+kN/zn0EbVqthVE+R/ABE8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727924AbfCUKQ1 (ORCPT ); Thu, 21 Mar 2019 06:16:27 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50743 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbfCUKQ1 (ORCPT ); Thu, 21 Mar 2019 06:16:27 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 83D7B236DF; Thu, 21 Mar 2019 06:16:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 06:16:26 -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=IX8GZH w7drX04FxE6xsZVgcGPOA+ZaWNwmesw4BUdWw=; b=3+2J5D29nOxUjjurfDBcgq tnDBvOLONSyS/sYFn/Aq/cBHckJwr+Oclm1Xx8Mz6pmH/OiI7yEUwJoJOOTvjMY9 VdzeskWC8j2+0SicRjE0IxsZ8s23vkY6osxb1whuDAhD0VzkOw1Fr5dVuhttcMSb S/+lnWNhFRtN7nV3CR0AB2FzFBT+lrnmd5tbT9cQC78T9F0R42TyNQWU0u8QNf42 F6o7LHhxRo7SroVTNVIjQbqfidNJvvWEkSdp02hoATbOXVWpkpAE0AFnib4fHKRv r2EMXuppf9aakdYlhinyPXNaXt2hK5O+Zs3g3wIFD52EotPjlfC0ZOnS71BcxI0Q == 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 DD331E415C; Thu, 21 Mar 2019 06:16:25 -0400 (EDT) Subject: FAILED: patch "[PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is" failed to apply to 4.19-stable tree To: jarkko.sakkinen@linux.intel.com, jsnitsel@redhat.com, stefanb@linux.ibm.com Cc: From: Date: Thu, 21 Mar 2019 11:16:20 +0100 Message-ID: <155316338025153@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 4.19-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; }