Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1825180imm; Mon, 3 Sep 2018 10:24:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZxxYE2OOKA22GtZveEVVQXOwoX8jwrk2p+HVNwm9NpZcXWPU2s3pqHT9mEVPhXlJrvWhUI X-Received: by 2002:a17:902:6bc8:: with SMTP id m8-v6mr29419675plt.162.1535995464552; Mon, 03 Sep 2018 10:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995464; cv=none; d=google.com; s=arc-20160816; b=Rr86G4DRqlPQnsz1nq3B/T2FxrPm3f8a1ggiPpqP0tvNt/fHUIUhtrmvX7lPoJAPEk Sko93CZl8LkD5zYSxcoTLMOs20A0U73Qa5V/rqZEPopLymE71qeq00RWht1qY1B3rgzN yxiV07jSD77ZOiP4c7vvBPvEBU//PNOQWnMZXyojI28gYaYxEIVLSj+R2OFhPG4hKpVE 81E1qmOFTy7EHMlJG7hY9zRrfFwRcrko8+oZMbpKKAygqCkoB4IdreOXpl9JAqyZUhhm fcau6wkNc10Ps8UVeIW1ydJDHZHrwq5sburkGQ5+AMeRM20w3gR2I1ZTxV2Kkswbg1vr uknQ== 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=QdpVBVDKtQ1szMbWRzEO+WYvOOgCa42r8qcoHLJ0Jls=; b=x+LMYq6eZxXX+XTxnMCv+4pcMR+Oq1YHuzroxK9HEnvKQUli0L5teQ6GahcRUtxIB+ xC8qa4z6zw0qYfpC9cYRMhTrPmemYyzDTtmos1fsqOcvH1UUJdKajQtJKxD2KQbs7yH5 rwzhZSahKS0eSEfnci8wxVz/kgJZhrTLVDJK1JF19OiCY3sbYOPCORCRvpBEWDckXaTh CzwAQrMotyTSA4HxbfoKM4RgRlBGL/6Kszr8RZ4w3nAikmMGVvCvfq1YDCpEtGjO4t8i Q+GKStLcR+d4fU6hyTrg9Ev3G7GTOMhkKB7mMBzoJqMwgt/zth4J1BaxW9xBB1W8pQNg GIfw== 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 n1-v6si18225816pld.429.2018.09.03.10.24.09; Mon, 03 Sep 2018 10:24: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 S1730272AbeICVnN (ORCPT + 99 others); Mon, 3 Sep 2018 17:43:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43316 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728651AbeICVnN (ORCPT ); Mon, 3 Sep 2018 17:43:13 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D41C1D2F; Mon, 3 Sep 2018 17:22:06 +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.14 083/165] mei: dont update offset in write Date: Mon, 3 Sep 2018 18:56:09 +0200 Message-Id: <20180903165659.241373435@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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.14-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 @@ -291,7 +291,6 @@ static ssize_t mei_write(struct file *fi goto out; } - *offset = 0; cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, file); if (!cb) { rets = -ENOMEM;