Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1376487ybv; Sun, 23 Feb 2020 05:17:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyUgts0p5O53oZf0cCUlceqjsxj6i+AOllI4S4SOZwN0pvWiwqJJHg4W+FEQGu3BIgn8x7o X-Received: by 2002:aca:514e:: with SMTP id f75mr9696130oib.103.1582463876138; Sun, 23 Feb 2020 05:17:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582463876; cv=none; d=google.com; s=arc-20160816; b=Xlly5OxtVS3+GPwrCDVmD8Fj135LTUiEXHT6alMRrOwB59lb0hV3tgEO7+f/dbAEjE c86cSoYUXZ6BHUIPb2/7I0Pfh35l5wdYNbOq2kOvghQcmApvbgPxNzfcbvPlUjdkFqiK 65oNXUC9qLF/S1LfzoUFCd+LNc5uKtgcsVoCy2bkHVB06Oqbl66sDYwoWnh5HLQ4eH8D dmG2yTx+GI6BwU0rh67KteGkihbqOFmDnPlTR4YSKAdQSfxu1g4IT0Q3A5ObzJmze289 wugV9n5Lb46i6eFXLSrlV5vYxwgUPtExcKtdhyVxnf886MIL0b4gZEfyoFwD6bYRjknW nGpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=HUcMinlJztCOhwy6UvhkEzNXlyN6matYqtCW9mEf2tg=; b=zqZ9Y1N5TE6/CEe4zd3do9Xykqcx4GBroma6UV4y3YCJfyZDtkCK4m46td9WRGFcyo WWq0d+yUZpjEgt3donOuElEotWb5gcRcmyTikwzW/urK+Mi4bn+hbprE1WA/45hl7p8q Ipb5fEj4x4uU5b5pHsiyQ8/IpAx1xQW/wngZw6c03N6V5N8JUYHs+l+n9WW7LUh1EJbG SoI9A3kdEFnQrVSP+xSs8mEgXbfSu9G5VN54ul0UlvjrH/Bnwdz2bWjVgbXuxrL+gm0l g8m62IH+nBQNzw/JMdcbUoepVhJESOBxSOLEg2SyG5IbyWmN7T3cLWpz/STyWsiD3e04 JJlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=cyjb4Jh2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si4688557otl.214.2020.02.23.05.17.44; Sun, 23 Feb 2020 05:17:56 -0800 (PST) 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; dkim=pass header.i=@mediatek.com header.s=dk header.b=cyjb4Jh2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727168AbgBWNPT (ORCPT + 99 others); Sun, 23 Feb 2020 08:15:19 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:62408 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726302AbgBWNPS (ORCPT ); Sun, 23 Feb 2020 08:15:18 -0500 X-UUID: 1d18b034a6be43ee88cd15a93b00d9fb-20200223 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=HUcMinlJztCOhwy6UvhkEzNXlyN6matYqtCW9mEf2tg=; b=cyjb4Jh2uiN5gqUWXcDwNSbbBVQ3VHvCM2Bac0nMvB+TU+UEj1X0VX443+da8woBc78lZX2D00EuYgtDBxqrxzXVnpF/zvaNrtN7oOulBxQJJ5XSmN6RM2SeAzYcvbTPeIwqoYFR2vF7IIKMvWuCsA2LkzSg713ZlOzSXTT6XpQ=; X-UUID: 1d18b034a6be43ee88cd15a93b00d9fb-20200223 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 708867206; Sun, 23 Feb 2020 21:15:08 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 23 Feb 2020 21:11:02 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sun, 23 Feb 2020 21:14:50 +0800 Message-ID: <1582463706.19053.32.camel@mtkswgap22> Subject: Re: [PATCH] lib: iov_iter.c: fix a possible calculation error on remaining bytes From: Macpaul Lin To: Al Viro CC: Matthias Brugger , Shen Jing , Sasha Levin , John Stultz , Andrzej Pietrasiewicz , Vincent Pelletier , Jerry Zhang , , , , , Mediatek WSD Upstream , CC Hwang , Loda Chou Date: Sun, 23 Feb 2020 21:15:06 +0800 In-Reply-To: <20200218124142.GJ23230@ZenIV.linux.org.uk> References: <1582011672-17189-1-git-send-email-macpaul.lin@mediatek.com> <20200218124142.GJ23230@ZenIV.linux.org.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: D743D5FFED43F9BC952FE27FF4BE8AE9BAFC6F359885D5FD278658A4DF9A560E2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVl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