Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3431877imu; Sun, 11 Nov 2018 14:59:07 -0800 (PST) X-Google-Smtp-Source: AJdET5eheGXTlqYF9TXUnBNxQ/PRuwQJKmbhPKThU95eVenL2aXye3YW5E3Lx6O/nSfNTLA/1T0x X-Received: by 2002:a62:11c7:: with SMTP id 68mr261663pfr.21.1541977147738; Sun, 11 Nov 2018 14:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977147; cv=none; d=google.com; s=arc-20160816; b=jsfFF5Vh1UOZTN+xXvKLk/Hx3HtBrzwFwIuc5cUZ0yFeoMDaFFwMtUh94/5zYizLf4 xWOzh+WIeOvmmQMapA3Cbq3qsYvDduMfltZJFWuoSpVv0iOTz4J0RhAp85y+nk0u2wCe HxS6la9d+RGVgHYGcCPdjKEj51PGxso8l9pa6JCKsxIFfLpS1G2yPtPrpAvKc1GpJO+Z KkKIkvShhm4AtbWx+zx2mzHQDOcsagPj/7C7gniw5t4E3cXRo+PfFsQN7Q2QNdAyA/4d GxN4dd6ZBIdoHOhTrp8gTjhjkHjXSv5iUzC+/UR6dDy9WFXzxtVgx2/MvBkuR3oXzSut 8NyA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r0Wo0FkLX0rhzpU29CV3v9QON4d072x7CaFiVCSJyx0=; b=F0msPjI1Jf60fW5NAS/rPYq6+nYuc9eETJzOg3LyEZ9A9CHWa/vdzmxfLSwQcZN6rZ TR8EvLLZbTt1OAXZDzoFB65x58vJcI2fvkGS+TIPwtX8guX/z6KoZSXC19ALNj/KuKsF OXDLKJ21XpjTKXVtYc/idfyYvSUQd7I8/OlMnXNwDVIBlz1c7LhWFdZDTAGnWZQTVElW n+G8/7NbRkCtl/w74RWjb13tSvqkaMYNMGLBV8IJ7cuHky1mkoL6AxFqt1xRfW7ZohaR MfoDxxd4mL6moYMq8U4TeL6y/Lk6UBT7T1FdCPTKIJtz/wgCTx1D1+VGIVe8FMj3a6n3 ZJ/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qPWNTxzs; 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 65-v6si16733009pfl.220.2018.11.11.14.58.52; Sun, 11 Nov 2018 14:59: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=qPWNTxzs; 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 S2390817AbeKLIWn (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:54138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390805AbeKLIWm (ORCPT ); Mon, 12 Nov 2018 03:22:42 -0500 Received: from localhost (unknown [206.108.79.134]) (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 02D5622503; Sun, 11 Nov 2018 22:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975565; bh=Cj3MjZgaSNz8Lijy/mZFObp5c6DL2x8UwFO/sSm9O+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qPWNTxzsezdsqXpXmeIiNZo1NZ8NTJ/Qovec4gua0Ma3PWP60qdQdMEG/lukbjBSn prfThB7n0nr4GlqhW+eVeYIXCNJX00tdFsTTV/3oowD/AmDLJIb6uJV8ciqCbR+DZT UYF3mHr+KKdCCDwoOc7b6jAHJ4BEmPObMDpYLHbg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Artemy Kovalyov , Majd Dibbiny , Leon Romanovsky , Jason Gunthorpe Subject: [PATCH 4.14 134/222] IB/mlx5: Fix MR cache initialization Date: Sun, 11 Nov 2018 14:23:51 -0800 Message-Id: <20181111221659.550124307@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Artemy Kovalyov commit 013c2403bf32e48119aeb13126929f81352cc7ac upstream. Schedule MR cache work only after bucket was initialized. Cc: # 4.10 Fixes: 49780d42dfc9 ("IB/mlx5: Expose MR cache for mlx5_ib") Signed-off-by: Artemy Kovalyov Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -675,7 +675,6 @@ int mlx5_mr_cache_init(struct mlx5_ib_de init_completion(&ent->compl); INIT_WORK(&ent->work, cache_work_func); INIT_DELAYED_WORK(&ent->dwork, delayed_cache_work_func); - queue_work(cache->wq, &ent->work); if (i > MR_CACHE_LAST_STD_ENTRY) { mlx5_odp_init_mr_cache_entry(ent); @@ -694,6 +693,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_de ent->limit = dev->mdev->profile->mr_cache[i].limit; else ent->limit = 0; + queue_work(cache->wq, &ent->work); } err = mlx5_mr_cache_debugfs_init(dev);