Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2634906pxa; Mon, 17 Aug 2020 15:03:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE+tBKfz5rAav4HT2OKCyqY2tJSQuWfgtU20YEtBr3KiJJ5oFgdUp99mS7Cmu7C3nMZJZh X-Received: by 2002:a17:906:e218:: with SMTP id gf24mr17901548ejb.469.1597701807750; Mon, 17 Aug 2020 15:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701807; cv=none; d=google.com; s=arc-20160816; b=DPil/OIrVAO19sfmI41j8NDrWStnlv04hu4GFPIzUs01UrjkzKZ0HRjklxY56WS5mK WI2vfwJJTtRmgIQUDRZmz7v4nnVZytc2RS4wc8pXW2iVdwDFoY9jnkpUceDFPN7iWsJr qALDJHG8MyroA2y7h9/nZmUlNs+/ssHKqni7AvDjso1OJH093kbHknNPLt8x+aBIztEa 48ZhFamahdTm1oRLW8POXo6f8XtxwltT0kVgohUD06VFr4uRlC0EX5+YnOJg8PrEI+Jh 7MvILbRvgU7H/AjdYsDRSnp5rX53v8d57xjONlytF3npEfGXVVfZlTdMGbv7lWKRrhfa QdFg== 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=3XtQjc5+wcwT63+f01LA4N/e1VpKpQhkwSoAyGps0RM=; b=qYJpaWd8iV7dktBiNOAYRRgttkvDLwPijj2Fv3EoT+EWcMVZ21cl2miI/cFYFcrB7x 1zj5Sjvihbl2JAuzoV/R83YIfCClcOrsNlI6pdZ5yIi7CH7iZaeajonMSAGYxZXBKnP/ hgYXkTJSbszcXJpBQv8tpM9LGwhQEPkswcHKFiCJUM8pDbx8Es/xIa71iLSM5kvKdecI AgPOWvIqrceYVtKfXfmJ8iFffqEBrt2yy74Oys9ywQ3rU+0TfNx5T3Gj13ZAYgHgNzxr 3acIQkZ3+SSJOqRAu5R/cB7Ti2QPAJvM3bH+WyVauo6l9NNUWObqLaFCxD9cvyYJf4fy nRvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TTDYKMJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si12018868edv.479.2020.08.17.15.03.04; Mon, 17 Aug 2020 15:03:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TTDYKMJO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387489AbgHQPmB (ORCPT + 99 others); Mon, 17 Aug 2020 11:42:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:40116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730444AbgHQPew (ORCPT ); Mon, 17 Aug 2020 11:34:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 CA11520888; Mon, 17 Aug 2020 15:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678492; bh=2iTKKjooyqukB+e6TTCtLKXF4mZFXs2I/Cpu/fnjy7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTDYKMJOXey2fBhVrNw54Ll+hMRnxwDtrGKplXFm7e6d9eKWBHAjskRUTWian2290 a9jEIgBvrkywS5mCUEdbBuzk0J0wbuoHZynhJPX3ESuAaDgrEi62FQF7o+Iku0xM/b yEwd9h6n4Tzn9/LvoE1cL7Re5ukplQg4DLFb+pyc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jack Wang , Md Haris Iqbal , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.8 321/464] RDMA/rtrs: remove WQ_MEM_RECLAIM for rtrs_wq Date: Mon, 17 Aug 2020 17:14:34 +0200 Message-Id: <20200817143849.172844464@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jack Wang [ Upstream commit 03ed5a8cda659e3c71d106b0dd4ce6520e4dcd6e ] lockdep triggers a warning from time to time when running a regression test: rnbd_client L685: Device disconnected. rnbd_client L1756: Unloading module workqueue: WQ_MEM_RECLAIM rtrs_client_wq:rtrs_clt_reconnect_work [rtrs_client] is flushing !WQ_MEM_RECLAIM ib_addr:process_one_req [ib_core] WARNING: CPU: 2 PID: 18824 at kernel/workqueue.c:2517 check_flush_dependency+0xad/0x130 The root cause is workqueue core expect flushing should not be done for a !WQ_MEM_RECLAIM wq from a WQ_MEM_RECLAIM workqueue. In above case ib_addr workqueue without WQ_MEM_RECLAIM, but rtrs_wq WQ_MEM_RECLAIM. To avoid the warning, remove the WQ_MEM_RECLAIM flag. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20200724111508.15734-4-haris.iqbal@cloud.ionos.com Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index 5b31d3b03737c..776e89231c52f 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -2982,7 +2982,7 @@ static int __init rtrs_client_init(void) pr_err("Failed to create rtrs-client dev class\n"); return PTR_ERR(rtrs_clt_dev_class); } - rtrs_wq = alloc_workqueue("rtrs_client_wq", WQ_MEM_RECLAIM, 0); + rtrs_wq = alloc_workqueue("rtrs_client_wq", 0, 0); if (!rtrs_wq) { class_destroy(rtrs_clt_dev_class); return -ENOMEM; diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index 0d9241f5d9e68..a219bd1bdbc26 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -2150,7 +2150,7 @@ static int __init rtrs_server_init(void) err = PTR_ERR(rtrs_dev_class); goto out_chunk_pool; } - rtrs_wq = alloc_workqueue("rtrs_server_wq", WQ_MEM_RECLAIM, 0); + rtrs_wq = alloc_workqueue("rtrs_server_wq", 0, 0); if (!rtrs_wq) { err = -ENOMEM; goto out_dev_class; -- 2.25.1