Received: by 10.223.185.116 with SMTP id b49csp1134126wrg; Fri, 23 Feb 2018 12:32:07 -0800 (PST) X-Google-Smtp-Source: AH8x226GjLNu1bG0Nc+4EWsUaxxfjUosSVlwPuZnnYEM1Wv2uSZ36VrBpx5Kf+3faNG8jRbwfHPM X-Received: by 10.99.109.77 with SMTP id i74mr2286360pgc.73.1519417927687; Fri, 23 Feb 2018 12:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417927; cv=none; d=google.com; s=arc-20160816; b=cL7g4ws8EYzmN7PR10QjFBcAuED8jFEnwpURYehYwZ6Mf/klPSA3OnmYKbEdhXzP5F ZiIFS26wB2ouu3uOEGHyfKdsW46WDV3KO635JEuiMF18FAKpDzJ1Q/k9DOkibNsRUjGN jdtm7YrPeYgICJG7Ce/bJCZJrkcDJnRa1Mq0SpK4XKRTQ39eeFo0Z0Sv42BiOG9k19P6 Sr+HhPvpJhkPIixL1fNSOvC3AR8lk+qXXHEKiNMnVw8Me14B0bLVixQc+Pe/Gmgb29DJ 2PtYG+Cd9Oqwzyw4mw6UqQjDzYoDzRprro99hnut3i3p6u7RtEOIuRfSKTvIvQt/k8or 72xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UOjWduX8ePEyODf9IkH1NKWPBDUB5NqjbGracGXKhiA=; b=ggKXydxH/8u4EHtVspeLKkJoN5TtjT8TSFSW2nrSfuivQKz4A9++0T7POOzX0mSHbI DtLfh8Bj2sfgvFHVJe2mrOvuWJWojDjuhrmIOhXCzz1obBSsY2twttnQkAIrm3yH5gG9 gstoVwp5d59QsO12ddKqllWd/eY9Sywdep00gnRmkeOhFSO2zjXk8YybIUjES3znGHFC O6KvdUZTUE3FnasbftUbfe4OdsQsPpYaJVyiUYJ8256s/xii+OcDsxEm8mPavmOGYkV5 t5iKR9IbcnVhyfPmCZlRZJ2dUj6WeXNjNiT4KzQC3oa4hVB0uu+55wasB7y4bTrLQkDl VmiA== ARC-Authentication-Results: i=1; mx.google.com; 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 y23-v6si2276482pli.633.2018.02.23.12.31.52; Fri, 23 Feb 2018 12:32: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; 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 S1753989AbeBWSgM (ORCPT + 99 others); Fri, 23 Feb 2018 13:36:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37578 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753969AbeBWSgJ (ORCPT ); Fri, 23 Feb 2018 13:36:09 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A009112D3; Fri, 23 Feb 2018 18:36:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Moni Shoua , Mukesh Kacker , Daniel Jurgens , Parav Pandit , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.4 039/193] RDMA/cma: Make sure that PSN is not over max allowed Date: Fri, 23 Feb 2018 19:24:32 +0100 Message-Id: <20180223170332.162586532@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Moni Shoua [ Upstream commit 23a9cd2ad90543e9da3786878d2b2729c095439d ] This patch limits the initial value for PSN to 24 bits as spec requires. Signed-off-by: Moni Shoua Signed-off-by: Mukesh Kacker Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -626,6 +626,7 @@ struct rdma_cm_id *rdma_create_id(struct INIT_LIST_HEAD(&id_priv->mc_list); get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num); id_priv->id.route.addr.dev_addr.net = get_net(net); + id_priv->seq_num &= 0x00ffffff; return &id_priv->id; }