Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1622331ybv; Fri, 21 Feb 2020 00:28:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyE3pVdAmMZ/BU96tG08O9b5patxONBc5J6kvTI3XDzmpEGTYKdmfha3SScI1eAAF5FWVR6 X-Received: by 2002:a54:440e:: with SMTP id k14mr1003453oiw.160.1582273694952; Fri, 21 Feb 2020 00:28:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273694; cv=none; d=google.com; s=arc-20160816; b=qtWmoj/lANHTRTqbJFfNZ4TK7bKe2c44hOOrEI+lSG7De+asihi5gQrY0NL+nwWcqn KnLbUwYbl6k01K53nFUgVHMchjleo6+EUq2SZMhWraCtYNmjXMz7jbonRaFWZwL6NinT /hoyvvwjxD108qVZPeQ/zR2b9mamgW3X5AryR5PEQxvSGWFTDO3sW/pKygMF6f8wQp8y 5Mf8tGa6s83o3GQzA22n5WXGztpHLca2O+XtxPuadGoBeTSP722XHkmJ4mRDig+pDgh3 diachRGhwA5CgwMiTWzjutASbSjuLQpIK0ctqSqSsNO70tFLpZsmx/wk4bpFqkDZ9Syt qrFg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EGkr7cu8x7u3QkL6cMFWAb/v+Pufr0hxgsCSUEXOFkQ=; b=BNsLbjGYa3t16b/+bivmDQBDpo4Cp96bPE4S5x4t/clZIdEA4Q00/zPUNcJGWlIRtR Ia7Nz7tkqXxXhQeJ/FeTWaIYSvkXr3MEyK4j5JXnXNTGwHmgL8eukAffEOWbVitfxq4m s3hm6h8c1eVUsSDj2CJw7ATb67fiFcPE2sf9jQUWYxgKK1w3yxX/kUa7i3SHfMJ9eMtm 2n7l8DgBQo8loBBAOUV1Jbn+LJ5+HGoYUDsGiWqoVBBqWDz8R6QFrAtHdcBstMeogNAS iRonk8viZoH7bESG32mGPA6PkhMn/jMU+u0+kAy+JABN5iy9K9ug5oPohzi4oB9APgOZ ovDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ebARFfQc; 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 k20si469654oiw.273.2020.02.21.00.28.02; Fri, 21 Feb 2020 00:28:14 -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=@kernel.org header.s=default header.b=ebARFfQc; 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 S2388265AbgBUIWP (ORCPT + 99 others); Fri, 21 Feb 2020 03:22:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:33766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388260AbgBUIWN (ORCPT ); Fri, 21 Feb 2020 03:22:13 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 4B53D24672; Fri, 21 Feb 2020 08:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273332; bh=xQM0uPjZsooTMpC1WG3wcbR5D1vL5bOUNcfjkmPiN3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ebARFfQcdEVexjTwf8vOdDFCvgj2epKvmWPwOf35nVJF5BSNWyiGeeT7S7TBxv+my Jo5zWBAt7ptFlY+DnBU/LDM2b4w+NcsC5Eq+PpAawmcjfVQO0m5r5SDH9QGrGREsXS HHdMYlK9/Ar93wgA/IsKdk55dTPcRbww+qSyWlVU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiewei Ke , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.19 093/191] RDMA/rxe: Fix error type of mmap_offset Date: Fri, 21 Feb 2020 08:41:06 +0100 Message-Id: <20200221072302.181547119@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiewei Ke [ Upstream commit 6ca18d8927d468c763571f78c9a7387a69ffa020 ] The type of mmap_offset should be u64 instead of int to match the type of mminfo.offset. If otherwise, after we create several thousands of CQs, it will run into overflow issues. Link: https://lore.kernel.org/r/20191227113613.5020-1-kejiewei.cn@gmail.com Signed-off-by: Jiewei Ke Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h index 6a75f96b90962..b4e24362edbb0 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.h +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h @@ -407,7 +407,7 @@ struct rxe_dev { struct list_head pending_mmaps; spinlock_t mmap_offset_lock; /* guard mmap_offset */ - int mmap_offset; + u64 mmap_offset; atomic64_t stats_counters[RXE_NUM_OF_COUNTERS]; -- 2.20.1