Received: by 2002:a05:6622:f08:0:0:0:0 with SMTP id l8csp4489708ivc; Tue, 3 Nov 2020 13:24:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMj+hfgkBULL6rP12NFZpxY4BMf/CfkwbDOZZrr/hrfJHfEbguJKbY/CsqrYGZ8ps1WW55 X-Received: by 2002:a50:e041:: with SMTP id g1mr24190984edl.385.1604438679927; Tue, 03 Nov 2020 13:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438679; cv=none; d=google.com; s=arc-20160816; b=QppCABGxz7yq+pU41I5S3IJB5STTW9gHKzR1vEBmJKieyhDIKpo6BR6rI31/Fy9zvu Af1WUXSpHQu4JS5menTCLshTIbvHoKsZeXnZq+B8iNAoOCnvnpeXhylbvkJpEmFcB7pO 3e9ZxTH5bof8CAa2z4Wbgpq5ofxPS4eMgaMqnhoKeltfHj9u3yL7eIEdLRarAL68/xPT J5GwbSx1LObN+HUzJVohClbvnf0tjbLntHufY6SMHQ9wJqkYD8UXajw6+cgyOxg4r/1d cY54WHqmZrJfsgo/pnUrAor/qFtO176WTz08znsFutU3BxhxTP3KGFfAhn1OMugziRn2 6PPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lS8Cyr19Rp/QgbwzUQEZ7pyUZ5PKgIUI6orzl2isyYo=; b=VyuFJmpwPVJjS7AdJVv2n8iE81rLYh2Op7ZZm9kHZlvaUGSdTraCPSclPZTGD053+a iGqC46Ev1ObFrAWIUkvl/+KmwMge8BBthrFdEnyeD+r0hLwdTCt+PtC9UItb71FQU2f6 JChjwjKPQuG4CXSKpQXWxgaP2lc6g9+xyVVWiM3QwJjQHY8mWybdSdgUgJZV0jKDLfJD anei8KcnJ6kdmo9VVuiLm7O03/o4xEyjmqnF8yozQawzpsaFZmJbY0tcy4vLPRkrH60S k3Kxq44LeZDDPi1cxLnRRICGz3V5XNhAcr3qlqCk8x1D8LrOG4HQIETH2Zt9dPUJnElp njkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rWllkLMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si13372389edq.0.2020.11.03.13.24.17; Tue, 03 Nov 2020 13:24:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rWllkLMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388371AbgKCVH6 (ORCPT + 99 others); Tue, 3 Nov 2020 16:07:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:47194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388320AbgKCVHu (ORCPT ); Tue, 3 Nov 2020 16:07:50 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D68A206B5; Tue, 3 Nov 2020 21:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437669; bh=Z8JWT2IlKxNsYnmjq6xYxwEC4b2ESUwMC99mECSD2Z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rWllkLMhCzPhTjBCKPN5t5+J0f1VF06eob98mSB+//dWvKMLOh3YRrGsz5EG9wwTt MV6f9qMhNwSnaINqpSPqsRDKWx2kdLaldzwcKsk+u4Y8aerAbVExy2otKEHMRhYinB ynVKQJ7K5OPDIbRP2sKrhAkk9vN97/74Ldaa0hEk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Matthew Wilcox (Oracle)" , Jeff Layton , Ilya Dryomov Subject: [PATCH 4.19 168/191] ceph: promote to unsigned long long before shifting Date: Tue, 3 Nov 2020 21:37:40 +0100 Message-Id: <20201103203248.218981174@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203232.656475008@linuxfoundation.org> References: <20201103203232.656475008@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: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox (Oracle) commit c403c3a2fbe24d4ed33e10cabad048583ebd4edf upstream. On 32-bit systems, this shift will overflow for files larger than 4GB. Cc: stable@vger.kernel.org Fixes: 61f68816211e ("ceph: check caps in filemap_fault and page_mkwrite") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1437,7 +1437,7 @@ static vm_fault_t ceph_filemap_fault(str struct ceph_inode_info *ci = ceph_inode(inode); struct ceph_file_info *fi = vma->vm_file->private_data; struct page *pinned_page = NULL; - loff_t off = vmf->pgoff << PAGE_SHIFT; + loff_t off = (loff_t)vmf->pgoff << PAGE_SHIFT; int want, got, err; sigset_t oldset; vm_fault_t ret = VM_FAULT_SIGBUS;