Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2993323pxk; Mon, 28 Sep 2020 05:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVKP85SlURFtOcnSGHJwE5PMkQHXis0D0Ddj5t6cGqpvmRXUmdCZ/e2k8KYpRQynQxxBN6 X-Received: by 2002:a17:906:4087:: with SMTP id u7mr1507738ejj.466.1601297697240; Mon, 28 Sep 2020 05:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601297697; cv=none; d=google.com; s=arc-20160816; b=R1J27kk+A6YN5/jeE3swEd9NqIad4jlbis5iNTYu1dysNOFaUJkl0WoPU2k5oH/9O8 0+dEuh0Tr17qJiaMw33DSCOWQA/oua3Dve5QrfwADPRI0/LtBWhDaq+bc2drRQUyuNni RpNjqJttFBGMcbVU2ZGZjz5S1w3Rq+CM3YYbfK/FS0U4LmrDbt6UIUdyQpoQIakdoies sYbFnnFBYa8oes89BtKcacsm6idtx3KAl3hQO9FbW405DPBhXLzA0+Ahx1op/wHH6Vqo JQ9HS0yT5aE7hGqrodpREkXUyDouftUmBhuv4k0GaSAgfm0z3JZfNjkjDulZin9laC2E pyYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QctrJGO1I1Zuq9UjMR9T/NENbwiqNJx5W8ogBL7RQ5k=; b=KDbSOc3lLYuT38p1ubT9ReyRmU2YKNl4/WFdA21FOMLQMksL2NKzvnrXScppSAqndA TqBsbwESPZEvNiikHLqLs+Hh3emAoci1hK4Lqu/PP5jzNZIL+Tq8LreJU/W1YekXbXxt sujgjJs5ouRbnhYL+BBYVGt9te4RoQl91PiYMJBNSsuX9wphwmEP3Pr7LywMJtYzE+nT rLFz1D3aQergeI0v1ccU0RSDi+6F6M1V8ytxX2LOA2uTWa2oEcXcrEZ5I2yt/Mq8Z7dl KhkbpV9ayjmdKb0ANZODq1d8Wr6ug0xLIyQgApdPL9UfZiiaMPmw2abQd1G4jxgnzpMb gT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=Wdbs+kQh; 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=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si556060edv.452.2020.09.28.05.54.34; Mon, 28 Sep 2020 05:54:57 -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=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=Wdbs+kQh; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgI1MvY (ORCPT + 99 others); Mon, 28 Sep 2020 08:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726504AbgI1MvV (ORCPT ); Mon, 28 Sep 2020 08:51:21 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6AD2C061755 for ; Mon, 28 Sep 2020 05:51:21 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id x123so936463pfc.7 for ; Mon, 28 Sep 2020 05:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QctrJGO1I1Zuq9UjMR9T/NENbwiqNJx5W8ogBL7RQ5k=; b=Wdbs+kQhoDgB+n99eSez3KyAycIljc9Qj/GQ39BXZvD9xGiS9EynalYs0Q4br8vS12 drU4r1qnw04T/+k4hDdBJ6lu/ugHFPvQ59DawL4UGbaCznu28po0/vwp23JsmL6ajkU1 7+dL2mIBh/kofHf4TWgUnp63wdbkh2lK8w+K5UXkgLGA0XEBvGo9II52ooO2Bf6XPsfJ L5iQws00GWLHkVNkL6qkJJZLkS3USdMpipUqDZZTbxkKZQshtpRw9B8cD/yIr0LSj3Lk ONA23uHk80zPrU9hYVszOHe/Veleq9MpkYzzePz31Ywp24nsCK2jp3XDUBKlHeRYs2PY 821w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QctrJGO1I1Zuq9UjMR9T/NENbwiqNJx5W8ogBL7RQ5k=; b=tIZLRg+NYqRqP4DEBXAUCJS3OO8N/k8TV8XMHnsZDnP5c5D4x8hUCP9YxbkxaN/ia5 5U2JN03qVVamygULMbaPWev75NWh39PXGPIs0DaKVVOVy3sQD3aj4NXVHGLZ7LRSegvV irntMRGX80N3qqNvzfoeli+r+Qn6L8TqYzdApTUC75wUylsDllyrusATsP75ccPfVVy8 jPQMk9PIlxatzlyPLjVwdZfSMHVFQG0+wyaPHe4yej9KRbQcYqAgjwvl76UVLzql4i98 +mGLSECJiuDVGDMXJ1/Qu3Sv2mGfSnKzTHDXIc4yULy/4qI9aKYZ2psiasGP5zN36Jlk ahag== X-Gm-Message-State: AOAM533tB/hMECAgg2tb30R9mtBXcS1m+xw/2hYGG7ET6h5kS/8dybAK PihOnFvBHprnghOp8+V1+yOyE87OYJ2woArk7OqyUw== X-Received: by 2002:a63:c112:: with SMTP id w18mr1007690pgf.31.1601297481123; Mon, 28 Sep 2020 05:51:21 -0700 (PDT) MIME-Version: 1.0 References: <20200923114419.71218-1-songmuchun@bytedance.com> In-Reply-To: <20200923114419.71218-1-songmuchun@bytedance.com> From: Muchun Song Date: Mon, 28 Sep 2020 20:50:44 +0800 Message-ID: Subject: Re: [PATCH v2 0/5] io_uring: Fix async workqueue is not canceled on some corner case To: axboe@kernel.dk, viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, LKML , Yinyin Zhu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping guys. This is worth fixing. On Wed, Sep 23, 2020 at 7:44 PM Muchun Song wrote: > > We should make sure that async workqueue is canceled on exit, but on > some corner case, we found that the async workqueue is not canceled > on exit in the linux-5.4. So we started an in-depth investigation. > Fortunately, we finally found the problem. The commit: > > 1c4404efcf2c ("io_uring: make sure async workqueue is canceled on exit") > > did not completely solve this problem. This patch series to solve this > problem completely. And there's no upstream variant of this commit, so > this patch series is just fix the linux-5.4.y stable branch. > > changelog in v2: > 1. Fix missing save the current thread files > 2. Fix double list add in io_queue_async_work() > > Muchun Song (4): > io_uring: Fix missing smp_mb() in io_cancel_async_work() > io_uring: Fix remove irrelevant req from the task_list > io_uring: Fix missing save the current thread files > io_uring: Fix double list add in io_queue_async_work() > > Yinyin Zhu (1): > io_uring: Fix resource leaking when kill the process > > fs/io_uring.c | 59 +++++++++++++++++++++++++++++++++++++++-------------------- > 1 file changed, 39 insertions(+), 20 deletions(-) > > -- > 2.11.0 > -- Yours, Muchun