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,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 63EEFC11D3D for ; Thu, 27 Feb 2020 14:44:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3760B2468F for ; Thu, 27 Feb 2020 14:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582814675; bh=p5e5+dj/rRUMiUhx7SjErNTvVSgmlKbtP28hNVhouik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Kb+tEvx7WfBkwkPdS7/xlEWwZ5tqd6lgY1vPCvby0KwrW4Wl16D3C0pS/ZlxgPeLd uqSEf5yu5XWYYlnpU66+rHPqY6iki2c674doU6P1yrwRxSe3wjM+TPVbyiVj7dXqZx 6FbM09yj/SxrF/CibQoAPHymgXaOwnfXSMsB9HB0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730749AbgB0Nrr (ORCPT ); Thu, 27 Feb 2020 08:47:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:44254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730453AbgB0Nrn (ORCPT ); Thu, 27 Feb 2020 08:47:43 -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 D9C6F2469F; Thu, 27 Feb 2020 13:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582811263; bh=p5e5+dj/rRUMiUhx7SjErNTvVSgmlKbtP28hNVhouik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=szVvbxWRoD4gL3PeTlTvJ4/O1VY0stNi6nfR/jdrRIiBe/ZUwBgO6yIBXnVZ5jPSH NQs/x/6Y/GEGWfCQThEF1gaI67dTEsEl0VSHLhKuiEaU2CdflElxW4BG4C8tx4IpA6 idTlF0qbCkOyV5+Dp2LVZnc/o6Z0ytJPtmmGyp3w= 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.9 065/165] RDMA/rxe: Fix error type of mmap_offset Date: Thu, 27 Feb 2020 14:35:39 +0100 Message-Id: <20200227132240.991120634@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132230.840899170@linuxfoundation.org> References: <20200227132230.840899170@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 47003d2a4a46e..dee3853163b60 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.h +++ b/drivers/infiniband/sw/rxe/rxe_verbs.h @@ -422,7 +422,7 @@ struct rxe_dev { struct list_head pending_mmaps; spinlock_t mmap_offset_lock; /* guard mmap_offset */ - int mmap_offset; + u64 mmap_offset; struct rxe_port port; struct list_head list; -- 2.20.1