Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1832672imm; Mon, 3 Sep 2018 10:35:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYx5GSDoYJ8XnT+3O3ePu6fAAI8pt1GvdP/Raxz1LJVNAeqIHxd5Pj5ompIsRQlkrGQtpRN X-Received: by 2002:a63:9c19:: with SMTP id f25-v6mr27496747pge.447.1535996124860; Mon, 03 Sep 2018 10:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535996124; cv=none; d=google.com; s=arc-20160816; b=nTsjL4JWK0/GGa/EbpbjfIArOLlQOABhUTDkbh1XuBfLsbaGiD3vhGG7WitK9qlmHE OxCaqkzl/6cqS4rW7s7VjLiXNMFlzkdAZbawOghgdDRcPqJ0GAO17r63MpcKHDXf3P78 Vf7EZPezwep3jFCW0nCOs46sHseoHaSFD/MtYfOQcObxopd8igP9tL0AL5iBZF+pNVzK qwMhqBvB1cDixCmZ4jF+5Dcn9hF55sLYr/vUwbvrZc74XJ4KaTl6fb3tL1Tusf8ymSwU Ih+jIxWLMW5PXHNbRIwkn72PKyD536aK8OrOJP/nCr5SKQe434ubvjzORS0IJbZIl0SY CYtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7yDSJDY+F2ywynzNkx7hywHWrez9YuFte8O2Pdy0t7Q=; b=GZVQk52M9/IPScCdekVf7DlJ7DKXiq2BukmN0J8svVk3HScF1L5RlSiXNs8Otm+CP1 4FBwdMrS1cJC4ue7FflQVhdN6+YU/d69uzZxlnU2zd3x16rNz44BPUOZRg1NIWmVLwOA 5Sthvux3XJ73VLnxAe5+vibW94Dw1iL8/2h0y4J6ztxCijT+pm6yYbTnpz+S29BPC4e7 G++82jS3+fjbukpPu6qPSWpMQJElGOU7FsKItIKqEMK/b6F0La8HGWRiyR7F5pVsScBq StIepMdYZbzQLJ6aNMDEjXQcBvl/BEdgs5dO+6LZVrQkCYCy+V2qK42OGBk91IKDFnYh 1KPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13-v6si18366414pgl.461.2018.09.03.10.35.09; Mon, 03 Sep 2018 10:35:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731318AbeICVyi (ORCPT + 99 others); Mon, 3 Sep 2018 17:54:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47658 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729001AbeICVyh (ORCPT ); Mon, 3 Sep 2018 17:54:37 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5B913D16; Mon, 3 Sep 2018 17:33:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Usyskin , Tomas Winkler Subject: [PATCH 4.18 005/123] mei: dont update offset in write Date: Mon, 3 Sep 2018 18:55:49 +0200 Message-Id: <20180903165719.714898512@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165719.499675257@linuxfoundation.org> References: <20180903165719.499675257@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Usyskin commit a103af1b64d74853a5e08ca6c86aeb0e5c6ca4f1 upstream. MEI enables writes of complete messages only while read can be performed in parts, hence write should not update the file offset to not break interleaving partial reads with writes. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/main.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -312,7 +312,6 @@ static ssize_t mei_write(struct file *fi } } - *offset = 0; cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, file); if (!cb) { rets = -ENOMEM;