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 AA366C43381 for ; Thu, 21 Mar 2019 10:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7516F218AE for ; Thu, 21 Mar 2019 10:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553163390; bh=oPUWNTRaYECMn6zW92sxlAWxsZ+8pEw2dkibKu2K/a4=; h=Subject:To:Cc:From:Date:List-ID:From; b=cAMX0NoWlbxEUTyJnu1Y92LqT6JoYhLzxWW+y4iXqZF8+eLfCneXZDY3uYdspXHba tZaXEDBrnOtJINXec4J/Oy3XcAUlEXTT5q2R4zFAyrdPueln8LMKzzk8ILpJYoqLfp 6Zu/iFweXalbK7FFD7HoIfTD5YlMsj0BeT/JUPGI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727945AbfCUKQa (ORCPT ); Thu, 21 Mar 2019 06:16:30 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45035 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbfCUKQ3 (ORCPT ); Thu, 21 Mar 2019 06:16:29 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 136A9236DF; Thu, 21 Mar 2019 06:16:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 06:16:29 -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=+8vUP8 RDtn/ijSz7fhZeffwdh+07tP+oclL2sZhTX0A=; b=X/qWh+XAco9iQwWcCSFihg yPtMj0omEPUto7bUZVmjUUnK5vvB88/UYC6VV98sV+KDQaHIJvhnbkPHnP5i3tbB 0DKW9+Xkt94vDCNYv1DgZsfpPdgiSP6O2gJWu10dwWAAvUZqKcg0bupxV5k01zTm 5ed2zMhoxddDze/0HVLOUeQ5aAUrFcypjJyPwW2GXjRJiyVU9hihG797aElEmF2O RR4neu9z2G4770QjngVqub6Bh7QE8WKssvliLJHsUpU8vhbMH+UenO9WpvA4HFU1 G0dBiiQ2kx3DmPHShKJOQ41xI4pZD+KLGiqCI9OyZAeGTOKCGcURDN5Gmba6eXgA == 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 3618C10316; Thu, 21 Mar 2019 06:16:28 -0400 (EDT) Subject: FAILED: patch "[PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is" failed to apply to 4.14-stable tree To: jarkko.sakkinen@linux.intel.com, jsnitsel@redhat.com, stefanb@linux.ibm.com Cc: From: Date: Thu, 21 Mar 2019 11:16:21 +0100 Message-ID: <1553163381195104@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.14-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; }