Message ID | 20210726153830.058229813@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 1CD6AC4338F for <stable@archiver.kernel.org>; Mon, 26 Jul 2021 15:49:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F35ED60FC2 for <stable@archiver.kernel.org>; Mon, 26 Jul 2021 15:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236295AbhGZPIU (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 26 Jul 2021 11:08:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:47892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236175AbhGZPHY (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 26 Jul 2021 11:07:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D1BCC60F90; Mon, 26 Jul 2021 15:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627314471; bh=D3IIjkA5yER3niYQvRmMm6l0o+q1RlEfc7VICA/lr/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2L1/phgAFuWWw7FyQUGHLBjKZZAZRYoq9uD+CDbl3XqOeV0KSac8ZXiEiq8qZWayc 8mEcIoc9qZccsEtfrVsi+dEGvrgHM3cE3hTG2vADa6YcUvwgD6XZzJMV/B0rF4jBSB JogXQdNBnryGvTK//l4pVdLa4aiX2K3Q9Hu8R91Y= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, David Disseldorp <ddiss@suse.de>, Thadeu Lima de Souza Cascardo <cascardo@canonical.com>, Marcelo Henrique Cerri <marcelo.cerri@canonical.com>, Alexey Dobriyan <adobriyan@gmail.com>, Christian Brauner <christian.brauner@ubuntu.com>, Michel Lespinasse <walken@google.com>, Helge Deller <deller@gmx.de>, Oleg Nesterov <oleg@redhat.com>, Lorenzo Stoakes <lstoakes@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.14 58/82] proc: Avoid mixing integer types in mem_rw() Date: Mon, 26 Jul 2021 17:38:58 +0200 Message-Id: <20210726153830.058229813@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153828.144714469@linuxfoundation.org> References: <20210726153828.144714469@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/fs/proc/base.c b/fs/proc/base.c index 005d4cb2347e..5f68454cf421 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -841,7 +841,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf, flags = FOLL_FORCE | (write ? FOLL_WRITE : 0); while (count > 0) { - int this_len = min_t(int, count, PAGE_SIZE); + size_t this_len = min_t(size_t, count, PAGE_SIZE); if (write && copy_from_user(page, buf, this_len)) { copied = -EFAULT;