Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3477731imu; Sun, 11 Nov 2018 16:01:29 -0800 (PST) X-Google-Smtp-Source: AJdET5fd+0VZNDUwq6YtABfvPaCI3uo234L5V6aVQKb5fjboHTtTP+n6rI3rRXb5lHSzWnUWVvUz X-Received: by 2002:a17:902:2863:: with SMTP id e90-v6mr17191656plb.244.1541980889508; Sun, 11 Nov 2018 16:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980889; cv=none; d=google.com; s=arc-20160816; b=mS8NzhCpKhXDHqm0HbL83af3y7HWv8RFqV/AzXKdlwrg9GV/IJ9Fsc+qAEbreZF4H4 N3hqLKbPIsbPaF5jNhNCL36tbV0AHfVBwt8XklvtMKQUf9JD7L1COFCaXtCQ5gchJHPc GRTJH4P8/NbalYGRwNyn+HHQHv9o8Wu61bd4lfUYKJHEhesxV62LXrSC0xPDXinBb9+p +mmBH/ljPEeV9C8wanbmG+GHbBNohzTBPyuiaklPQBsWKGX12l97LxH4k53jbeKThisp 6kLv0uPrEmK/GXUKBMceyvtTO28njEDAHi6aMc0Xvi7O9q+8T45LvY3UoyBmTnAenBoj N3cg== 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=SLXC5Z5paWa7m9VTE3cAGv5CM9Fn+x4SH1MlXg2Pj+I=; b=kWGwPfrTGSuOR/T7M5UC8mjZgZhZqL5RFzID8/RnvY98tjY6XrudWcC3lwWGbe87jY TTIXyQoEaPnZSUGWjAcG8ywkEqWXbG1ru2YwPW+RG4JT+6iOYkdeSWrZce8mYpl4MdRM q0I0QH8gBhePv1L6jvxIfDjHX2H/bN/qIFPXl/6EB679EJQfFfzTGvtvWkXZ8f0aurGL 7pIDWglLmKyImmWnuXkD96ma/O3V+IjlWIjZxqUP7AEO7hPb0n7bGPw6fEgXdLF/fPK/ wa1VhY8eGRbeihQs2KWXaasVJrDIIT7t9VfpteadwbXCammQn9J0N0QN6Ang1tMSCI+w oKdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I3JkNvrb; 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 i5-v6si14285619pgg.559.2018.11.11.16.01.14; Sun, 11 Nov 2018 16:01:29 -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=I3JkNvrb; 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 S1732449AbeKLJuG (ORCPT + 99 others); Mon, 12 Nov 2018 04:50:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:35400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732334AbeKLISD (ORCPT ); Mon, 12 Nov 2018 03:18:03 -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 88548216FD; Sun, 11 Nov 2018 22:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975287; bh=V/WlHZ5Bv0vJuuHEFG/jXZAXTc/DCOrr9NJfBDSc9kw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3JkNvrb/Qo/lDwQEf76f8SHq7uhXOOvcdIXXaSm9tBkwesLQuHUItLTc22XjS76e F77MdrCqFzu4vGSOks+6xIyRl37i8m50nMrZonhQ7sZVHiGtiniyGPflPOhWriMR6z ZBslGM4FvbH7XKwb9j8haHN83iYfutb30w7Ui0QU= 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.19 222/361] IB/mlx5: Fix MR cache initialization Date: Sun, 11 Nov 2018 14:19:29 -0800 Message-Id: <20181111221650.818422875@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -691,7 +691,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); @@ -711,6 +710,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);