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 A0674C43381 for ; Thu, 21 Mar 2019 10:16:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72A3E218D4 for ; Thu, 21 Mar 2019 10:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553163397; bh=OEN6hfIjfiFkZS7mV/9YtijYINgsysiercj6SbKRAfw=; h=Subject:To:Cc:From:Date:List-ID:From; b=TYUVaWOFutU2HTx7upEjp9ELmQCrldLlFJDm1g1oAMueoowAl17pjfaUnjMnu8WSJ GAkmdTmA78xBCBdul517YXRplbt9stCS/104i2DY/8slYEO7gKybIxpreLbOSFoUYw /NwY9EFHGeXO5V8F7Wo8dcAySVYppKsGrEhBLWUk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728061AbfCUKQh (ORCPT ); Thu, 21 Mar 2019 06:16:37 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50559 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbfCUKQg (ORCPT ); Thu, 21 Mar 2019 06:16:36 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 023A92076C; Thu, 21 Mar 2019 06:16:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 06:16:36 -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=2L7V0M XQPpKvW6ThVck0fVaspiQVFR5LWR3CrZ3ypLA=; b=j6R2A2RsAD9gvJBCtB9SMd 0QKXEmPSm1V5UeaW5oXj3N5Iv/YxOfUGpnIntfi21gJaCpMF/MDTfILCqs5mc5kg U+Ug0se55Y74wDxK3CNawFcXwxdH6k0ytWJi1h3dOMtQo8ouF1bvPx3ksv5ee3eF CJlQPhCNXHnVAzCEJiYHjH5H7lGd6fPJj3asjvXXPV1dkJ8FwD5fUaF7jWCf8tng NLr8eUIgzqJXRD66xoRPWs8YNLDEUBE/WercKYoifAA1Gno5XZ/M1588wE5/m+XV YdG4ZNMGCpJOfFUBB89W9wd8R2yaG3QRUD5472tx0wnreOBE7C7c7DFrkmSwkEUA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieelucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttddtlfenuc fhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhrgheqnecu kfhppeelhedrleekrddvjedrudekjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvg hgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeple X-ME-Proxy: Received: from localhost (unknown [95.98.27.187]) by mail.messagingengine.com (Postfix) with ESMTPA id 3771EE4176; Thu, 21 Mar 2019 06:16:35 -0400 (EDT) Subject: FAILED: patch "[PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is" failed to apply to 3.18-stable tree To: jarkko.sakkinen@linux.intel.com, jsnitsel@redhat.com, stefanb@linux.ibm.com Cc: From: Date: Thu, 21 Mar 2019 11:16:23 +0100 Message-ID: <155316338310385@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 3.18-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; }