Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1346036ybp; Thu, 17 Oct 2019 11:22:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7wOcMUdtayNfhU/WRV8qaZqetjZDmd1XONyXJpqJQXOGcg8aHyqeLgzV2l36svYy6tOuP X-Received: by 2002:a17:906:3751:: with SMTP id e17mr4927348ejc.269.1571336576697; Thu, 17 Oct 2019 11:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571336576; cv=none; d=google.com; s=arc-20160816; b=089gawXvQYWUbOBoK/tQwsPJJ76PY51BQA/fvkcSbi0BdBraj1Dyl7ORxmEru6I86j ChpN+ozOT5fZPs9abQT12bLT98Z0Z0Pb3McAWQWMpM5xkUwFafpDZRH0M6TRQIrZRiXj oFWeBtU+UR3W/nNrnB8GnddPE03cNdsgqSLXhJtrh3vFLJjJUowdrSxNYXE8GuNiqLGc 3AuBAS7EP41lJ8M4/wuTMZ1XGufeWFKv46P36Uf1W6tlDNpsJd3unSxRkIaNO9MsJXSa tTuxntpHjpCu/a/6ZTI27cWaXlAwn/YAjmqPNweS0UiZTNT/U/xtsDx2rWELCJ5w7vQW U5IQ== 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=D2Ow6058VrtHGPclNUtyQb70WMeIAd55AxZ2x5d8F0w=; b=0mgcxs6gDjHL8+oCOMSnA9XPjLJgmzzvUiAQEbrPdv/U5yir+Su3+cwpPhBMx+1p9s lyOx1RCxPaKS0xnKLB8xF2/S8ZuPpAtlSDrZGL81FesyjvuThtnvhwBVoM/XYzdnZXrJ Yc+7A4RGLbw0ZuuzG7SN3PSt0943r/AeIPiYmpxbisB2np78hlES2d2KZGkCnl2FKP2R +h6VB78aPV1Nz0VwLqlEwj9KY9vfBa1Acoix6bOHN8Klo6jO9GRwso84Kx+vhaXR2sEp BLFuhniMHyO8KcSu6KaZSIXDEZ33dWe66T1Eadj4mecV2lIDnr3CypX+mMo247mSJTxw PBVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oOgiPwEy; 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 oc20si1855422ejb.260.2019.10.17.11.22.25; Thu, 17 Oct 2019 11:22:56 -0700 (PDT) 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=oOgiPwEy; 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 S2438914AbfJPWA5 (ORCPT + 99 others); Wed, 16 Oct 2019 18:00:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:54840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438607AbfJPV7n (ORCPT ); Wed, 16 Oct 2019 17:59:43 -0400 Received: from localhost (unknown [192.55.54.58]) (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 279B5222C2; Wed, 16 Oct 2019 21:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263183; bh=OvHNm/qVCMS+oT5kxGIv21k4COUn0WEv4e0HUk1HUqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oOgiPwEy9YzTNJ10iIIlPEhBlh1/Lp/i0i35TfJFHPpPm90JK1A02VGkkkphOdKYB lO58MjRAgfLUcLbo0KzSq4EM2o9mRHmk277EnrulmzADInvG8io26u44GDXJQTTn+n t+3YZyAQ26ekjcnx1rPByD4ST2EyKynXbb/yrDac= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Hajnoczi , Jens Axboe Subject: [PATCH 5.3 110/112] io_uring: only flush workqueues on fileset removal Date: Wed, 16 Oct 2019 14:51:42 -0700 Message-Id: <20191016214907.445814511@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@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: Jens Axboe commit 8a99734081775c012a4a6c442fdef0379fe52bdf upstream. We should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal. Cc: stable@vger.kernel.org Fixes: 6b06314c47e1 ("io_uring: add file set registration") Reported-by: Stefan Hajnoczi Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2566,7 +2566,8 @@ static void io_destruct_skb(struct sk_bu { struct io_ring_ctx *ctx = skb->sk->sk_user_data; - io_finish_async(ctx); + if (ctx->sqo_wq) + flush_workqueue(ctx->sqo_wq); unix_destruct_scm(skb); }