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 B020CC43381 for ; Thu, 21 Mar 2019 10:16:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 815D8218AE for ; Thu, 21 Mar 2019 10:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553163392; bh=ocmgfPrx2S3pIx1+Gwyac8h5tkK8DrMai3BjGDcZpvo=; h=Subject:To:Cc:From:Date:List-ID:From; b=KvQYXn+6WJgx0biPLnjwM1mzpdCi4ktAXYJYha6XGz6iNL7RHU3sD+wikW74ih3r2 O2o+uTU72kz9Q/mRCHiHPymNCj/PD24Jw0Kc5n68Jr54XWaDvj+MuGG9n/f7RgFzxg 3/cJAp4JPOO6StQFCaZ0HsMjLG0G/wZYBpHOSb5A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbfCUKQc (ORCPT ); Thu, 21 Mar 2019 06:16:32 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:46853 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbfCUKQc (ORCPT ); Thu, 21 Mar 2019 06:16:32 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1E25F236F9; Thu, 21 Mar 2019 06:16:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 06:16:31 -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=/dRdCx A6M4n6eeoPMPyLn8qcGTDHiJCQ0t1ZzxdrdJw=; b=WW2opUtA/DO1Ch3kx06XVI RnO+CvHN95bjCOBghl8APYNYp1Ry1B9m41L1bcRktGLTAs/MaYMw38wukKndGcy7 9zw9AOSPkhcKla6ZHjgPTv8tXEAdMyh+JGUWSNJrL/hAMNf+8iu9bMknE7HsAUDj EapaJnQP8pxwCcbDOJC3hK/oy6U52ihXWTUiti6qDQ/v7+F/8nivsYBLU2fOwGC6 s9/jVcU3dAwg5wxZZx3Bn8AfY7QEFWZIBVvhKooPCTkhyu2lwaJm04fSSpI5Ks2q UKWZwYGpMjQ55Hin0TfsszRH7FBPIWfvxaI0FGe+d9HbwoqS+9IwfyXD19frL6OQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieelucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttddtlfenuc fhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhrgheqnecu kfhppeelhedrleekrddvjedrudekjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvg hgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepje X-ME-Proxy: Received: from localhost (unknown [95.98.27.187]) by mail.messagingengine.com (Postfix) with ESMTPA id 765F0E409D; Thu, 21 Mar 2019 06:16:30 -0400 (EDT) Subject: FAILED: patch "[PATCH] tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is" failed to apply to 4.9-stable tree To: jarkko.sakkinen@linux.intel.com, jsnitsel@redhat.com, stefanb@linux.ibm.com Cc: From: Date: Thu, 21 Mar 2019 11:16:22 +0100 Message-ID: <1553163382231212@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.9-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; }