Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3212632pxb; Mon, 9 Nov 2020 05:44:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJypXlvYfGDoIVvvXdvqUy21bDMhC4FYKLr0a7PXjBhnARNO2Tbh16lfR7fpB4SYLVFU50kP X-Received: by 2002:aa7:c151:: with SMTP id r17mr11446158edp.216.1604929462568; Mon, 09 Nov 2020 05:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604929462; cv=none; d=google.com; s=arc-20160816; b=eOEggK5Dpl5TnLuFm1cQ6/c/VZGA0nMxLZDad1ZTG6P7D+WraWe8gpc8vdzH99/jFL q0WTt2UoTyXKxN5TQEm5+LEoDDS/nA85nIxeV8fwrz/k49RajThCZusK6r7P1tFSTddl MiRzN7QMfikKIlPakY4N04F1HcdO8VGxfKJYBbzzXzqiFfgqDRYI5cwPJ5N+zDZTD6nZ 75eHEzeUHyUWhQVDR3+9G5z02GsOgKSwaTL/96qPbwx5+tfSFPyBHotcyK94JFPPJAcg JkuG05IYD3AKf+cd8MtKeUs9X+Hr/kzN8Bm6ie4gz6y2t1kZ1CBlBhuuvtALwmqIgLjv WR3Q== 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=N16f1xe4NrilvikCGlyJ+BZIEfY1nABmn06w4i1SPNw=; b=dEygTcAG0KLKQpS4Jy+aON81+88nM98H3yQMn+SLmoAXIDg9/23NEwlqytGcpxe2i3 6r4u1pOq3w72CNmRmhAfd6g0JtvvHWxE1qFBy14HmjZPP3yCZAhk3z8DQjB83oRul23I MfcQH+Q1wqqiDGdIWe2Wdov91XAGlVlIxp26KJMtQnuqOO4ueFNdUluztKAKsU2biWdj pEc8khYt3qB1kpMemF8QzUU5wbWiqE7YiwDUiMcCdz15gbV71dw4s29Knz9JcLXC8tEA hfCSFZjdsQkxYwRiZ1UpzPtUTQ2hTuwjCf2XgzKUtC+Cu4WiI7mraCijJ+CY8LPgcdf5 96DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PwMrJmrK; 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 h15si8845984ejq.475.2020.11.09.05.43.59; Mon, 09 Nov 2020 05:44:22 -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=PwMrJmrK; 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 S2387838AbgKINjr (ORCPT + 99 others); Mon, 9 Nov 2020 08:39:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:56388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730686AbgKINDl (ORCPT ); Mon, 9 Nov 2020 08:03:41 -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 EFCD02222A; Mon, 9 Nov 2020 13:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926994; bh=XIMQnMghpz6vXvnvbYYPsyqWFNGcOkzsRKpAXmee1LQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PwMrJmrKMkuIXF7sjk5k+H+L7vTpMxBko5QDx5Z3wK1Ibp68HaCFDtbt0xSzFKKmY BRIDBYsiWGNx/ZYQaRq79/IxRMoxW1MFa+Vw2o0ov05ZDjYydWaXVqkI+EAyktcBBD RdHq5MXT+JU1FHU3OuR58ExKFteZA+0aygZA+58w= 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.9 074/117] ceph: promote to unsigned long long before shifting Date: Mon, 9 Nov 2020 13:55:00 +0100 Message-Id: <20201109125029.194101071@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125025.630721781@linuxfoundation.org> References: <20201109125025.630721781@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 @@ -1392,7 +1392,7 @@ static int ceph_filemap_fault(struct vm_ 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, ret; sigset_t oldset;