From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 D5B46C35641 for ; Fri, 21 Feb 2020 08:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 947C62465D for ; Fri, 21 Feb 2020 08:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273337; bh=xQM0uPjZsooTMpC1WG3wcbR5D1vL5bOUNcfjkmPiN3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dCpcbiXrvBGUeTWMP7GEcYEktZo8BKLywBz8oBijmCGqqNGEri8lPlWFRoNrBS/+P IkP97C/wv1gov7NGxvTUQjKIYxGHa8d+f4Zud4t/HwUlqSRu0Ptezh6va6ukjttdlm KyFhuFJcxfZS5o4MEcl0bvdXXnjPDbRQaYCWZQjA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388269AbgBUIWQ (ORCPT ); Fri, 21 Feb 2020 03:22:16 -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