Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1946725ybv; Fri, 14 Feb 2020 08:41:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxzpipYVWg+Hn0mqTFZlrekmY9FaD0ELXySAd99Vnh/Ctu5cEgkglNT5Qe/wvN+z7Av+I2U X-Received: by 2002:a9d:774e:: with SMTP id t14mr2951945otl.358.1581698467476; Fri, 14 Feb 2020 08:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698467; cv=none; d=google.com; s=arc-20160816; b=gKQ8oFDR+CrPgCiLA3tBvum6HPhA/RYt2x0Etge87MYXjoI0pD4LkQyDDTXu6xPnEi VAYKscuHPRYwzApAL173CxsdrQczjh3uZyVK8Ab/0Jm7MGCoIgYNSJFJcwHeiuOKrSZ3 r9zGTUFI2L2ZYM20FXKDOs/TaSPyrq78SeZsjN+N5F3nGeI+RULLY536vpSUUpMeRpd8 NqSSV7Po0nxImN1XM+9J2OBBB/oMfxTvEwb7+YbgqeNPpB3hMHPJphcIlDrAJ9+pmUTp hnnwZ7Jb9reklUnddldgiof/L/trkjnqhVKVU2Ip4VgEySeCI6nu1C5594TWIKvjcyqj enrA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Gr70Vz+bKGWyrojdud/bejy8gePEZWcIjvrmyB51HU0=; b=mSjgS0XLTWpL4rkBKSHl0FBcP/QsiDtH0GiFMa/3u1FuduYDHeKLudiBSkue06W5VN QFDrWaCBf3aGs/06QifYmbSa8uDMo8q/H3mH7AsqbF/r5zeb0fEbbqD67ccjLGnHu9nX h9E4nJD8DiqF1RDYdx64XBt8hU7QzN2cQ8lqPiJjMp4IaUEeZKMHEccBNFAkBlXW5xdH XMeSfxRpeydG0KdO9BGX6A3oPFd+K5H0/PmGapgsl2gOSnuZkzhhKOJ1s75L3THm8xp3 5VDPa9T/XxilqsDzUHWkoCBc1RNcSjxd/L0kqcqtotN9qjbxfkMYaabqcHgmqNZoO2Tz VrVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z+NWyJHN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k66si2921177oih.200.2020.02.14.08.40.55; Fri, 14 Feb 2020 08:41:07 -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=z+NWyJHN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393326AbgBNQkV (ORCPT + 99 others); Fri, 14 Feb 2020 11:40:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:58970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393308AbgBNQXA (ORCPT ); Fri, 14 Feb 2020 11:23:00 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B0FD24764; Fri, 14 Feb 2020 16:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697380; bh=p5e5+dj/rRUMiUhx7SjErNTvVSgmlKbtP28hNVhouik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z+NWyJHNCnsZMS5cjpKt67tZdTHTqDlQBkd7SU6N7c/zxQn7r0kqWd2Gd16liCw9W o2e43Etq8wMUnrMJ6vpDlyJ2ZaFJCa+MsMJ9W9LxMBmKGromuaXJIUCfSHQOOo0gaC 6bTy1dFZ2UCihFFt8cqFUbKrIDfONHMkUzAWsm7U= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jiewei Ke , Jason Gunthorpe , Sasha Levin , linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 077/141] RDMA/rxe: Fix error type of mmap_offset Date: Fri, 14 Feb 2020 11:20:17 -0500 Message-Id: <20200214162122.19794-77-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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