Received: by 10.223.185.116 with SMTP id b49csp1100765wrg; Fri, 23 Feb 2018 11:58:15 -0800 (PST) X-Google-Smtp-Source: AH8x227MR4drNtIz/LqljsGBRBIfRxcXTCOdCXPfA+6W7Fcuqq9WCYdvNh7QxGbbv1FLSUmJOVMv X-Received: by 10.99.60.8 with SMTP id j8mr2275412pga.209.1519415895205; Fri, 23 Feb 2018 11:58:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415895; cv=none; d=google.com; s=arc-20160816; b=AyM1GJVtfHSzURUEtJElkmRhDPgMeHum9m087mVPBP2s/JswYzg2faqh6cmO+9XEwb cd4vJHPpClUjoUv9eHFVIAQKH94nCPDV7hissRf59iIEGJHB7jy16QqEUtqvlNo1h8lw nTNuSOaRw22jnmIc9X2VpmyArFTUhCkajNlKjCAIKA0nO1GbgdjQo+F2ucKlrorpu/rk /wG0lwzHWpB5+AvTYplE9tiUBsW1rgIMWwG4dYbXdpU7tk7aNz0711ydOX8k86p/kRJm eL1b4f46ZqiUekcmtO83zkKWxQRXlSaUHYvojdR6pl21cg395aSPjnT/3bCvJwF0Tum3 Zf5A== 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=bOeywt1aP2VIAJBbwNxns5GpJLHW0RhCOnqWDBcFTxE=; b=yR36Z5Hhvafm4CuU64BZ+61GDgbAcjhV5cAhctKdNLLgshplCf/bVukOlD3oash0aU D9F1THs6/MMolTlqKvxaeLRmCGl2g2Guu5qH9Rivk7sa8Zyv2rXRqjOTTcX0WSJVGSfA wbWzrLfpMZKD1v/7pBJM8abmRbP4S8+wWV85Fikr2syFUxVrTjYjNrS0sZtr5oSPw0u8 IUxu1xviSfwBtvk10vZJguBFH9mtd8CLh7iBNnf/SqtJYUsoLSfoYjtLKhYvT/yd9Gem jOCr4XFoqYJ3Cov4fWjyqo+2JwFnxt6Ez6NTYOkvlVb5c7xMYpRlVOTKbwUn0p+W/i2b cSGg== 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 j12si1882994pgn.115.2018.02.23.11.58.00; Fri, 23 Feb 2018 11:58:15 -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 S933274AbeBWSoi (ORCPT + 99 others); Fri, 23 Feb 2018 13:44:38 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42586 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933575AbeBWSof (ORCPT ); Fri, 23 Feb 2018 13:44:35 -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 8B27C120B; Fri, 23 Feb 2018 18:44:34 +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.9 056/145] RDMA/cma: Make sure that PSN is not over max allowed Date: Fri, 23 Feb 2018 19:26:02 +0100 Message-Id: <20180223170732.099643452@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-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 @@ -744,6 +744,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; }