Received: by 10.223.185.116 with SMTP id b49csp1072032wrg; Fri, 23 Feb 2018 11:24:30 -0800 (PST) X-Google-Smtp-Source: AH8x225W2kVRyw3RW6O5IFFgbmq/cYyNZQEEf+XkQFDHzDIbHjQvy+bUjtsAQFwhpbwanJp4c3wN X-Received: by 10.98.149.90 with SMTP id p87mr2761157pfd.28.1519413870115; Fri, 23 Feb 2018 11:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519413870; cv=none; d=google.com; s=arc-20160816; b=0QwUUp9bFwaaGaIoREo4czI3OCVZfifGI/79+bKTO8aEcsN2GHhkPp0vHScNV+oJeA gEJKtRdsXu0kxRa5OY3ObbNc7ecoOqe8Pb80Us6jCJI5Mvd9Q2VoH7wPcg1nBVq6CS3T FJgcmrXgl0wpIKv9fVMb52KnzKgUr61dBvL0ZrnQxGMaAeUD58X9VYKniIXhcqsisQr7 5OtZEczBERy3gPQ5xdU/S3TPWEiatQZ+xXiZiPjn9QnDI/RrG/cVKVUen/l46UoxmWAC sFNurOsjiuaaIgtOwrDsdxTmPsa9Z+W7+224ThtcWlId4UiY08OsZH7mbcv0zzhSwEA2 rZLw== 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=oAiIZ5HQfCJ8r15xmpAO1DhMHCIw8KwsUJ9Igianag0=; b=f6x784d1HyCHqHAkmjLsHivdCvIw6Hdr4zAUc2CbHzxFZHs9s0kCMIM/BI9Yu2CbYi XkfVSYZ0ZUbcR+qTuN52RTsF/oWLoDi2VoLCsSpEJMTz6/sM1gFrJeCeqE75DD37ofam Yq2xdjxAhBcO3onHsslXwNBYKfUg/b9N641Twade7RkExohb8Vicf7yektJbwaIJ6OJA HMB/QPJAFOxTwIebtPPobuAT3b0f+4HZkX4xQ9VoMqN01XhTVuFBrl8U3x/6lwryCe6K bKNvBGB1U0GzxD4rTzJ0hCi7gtCMWlhUCZmV3HSdmFFfKOQpgPraRxko5sqRqr7fz+Aj eeOw== 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 o14si2253099pfi.200.2018.02.23.11.24.15; Fri, 23 Feb 2018 11:24:30 -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 S1754646AbeBWTXQ (ORCPT + 99 others); Fri, 23 Feb 2018 14:23:16 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47342 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935396AbeBWSx1 (ORCPT ); Fri, 23 Feb 2018 13:53:27 -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 94699FCE; Fri, 23 Feb 2018 18:53:26 +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.14 092/159] RDMA/cma: Make sure that PSN is not over max allowed Date: Fri, 23 Feb 2018 19:26:40 +0100 Message-Id: <20180223170754.669742874@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@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.14-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 @@ -801,6 +801,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; }