From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C3DFC4320A for ; Sun, 25 Jul 2021 19:10:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DE2F60F35 for ; Sun, 25 Jul 2021 19:10:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231382AbhGYS36 (ORCPT ); Sun, 25 Jul 2021 14:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbhGYS3z (ORCPT ); Sun, 25 Jul 2021 14:29:55 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1C71C061760 for ; Sun, 25 Jul 2021 12:10:25 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id pf12-20020a17090b1d8cb0290175c085e7a5so16625627pjb.0 for ; Sun, 25 Jul 2021 12:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=kX0eYY9YjEaivkZX4gZmRWQoX5AVWchp0HevtnDPnVw=; b=Dur6eMDuTvAkBjxN5DFykUolJuJfOjcaoqcODAp46b1yil9KulA8uUGwZTDhk4nyFs CP1D3UTft8rGs8rkJxLhdckRscpRLbyfMoAWegJaJsIV+cjW1vphzhF0eoXSzy+3t50f HetlSuDMhM5u8/4GobkY72JHklydNFotcsZz8r2PhnhgTlQr1fISdiB+T0aY+vD67Nrl h7ZhGL5VyRL4evggJPgg26P498goeg31GDx6+zj3VZODxq/CnHKUci8dsbHRF8iz2RoI Y39ZFg0EhtjpJl30R0goupAxo9pG3/T69UAhYgh40xa5D7Em1/4QKOkJPC+fEDpVFafC woLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kX0eYY9YjEaivkZX4gZmRWQoX5AVWchp0HevtnDPnVw=; b=aV0wLtEvaewdNVdTpOl0KlKCQEBErVMtMbuar6Fzo81ZKCFVMIO+9gKJRSTvQJx1uW xByd3Vuh35MT+AXIgHdpwpV8+Z+S048TDDUdDgyBxOeRNMnRBvTbJWbGRidbfFzSuqmf YK2fkSPXzZXIjAjT9MsD91529Hglqa5TxJRr/daAoW4XKMaa9S6QBOFWbDXQXjZi98a6 SThRIuvFG7Alnt92L1OUy0bgFXRW8DGvOKqTEcaDfHh1wkjJPUE5nOWBTbzZHy6ju17c jfJbt3FNwhdz0tI7eU5PEhymBGzGBdUb+ozdyQI/tJhYrVd8u0Ue8o8H0Qo9Qikr3BJE NsKg== X-Gm-Message-State: AOAM533sVnrfGIQIgwGnrt57TTLAhifGUsGBwEFSxCJUlIbedBxETylW d8ftmkVYVrp6sy/cYmXXfxJP8A== X-Google-Smtp-Source: ABdhPJzpbjlw6cp7Z+jqoYrInoZDHFwmkxNjruW9JkW/6NtbfsfsTb5QFdOTVYq3kgTWS5DYGWbmzA== X-Received: by 2002:a17:902:ec86:b029:129:ab4e:9ab2 with SMTP id x6-20020a170902ec86b0290129ab4e9ab2mr11638010plg.12.1627240224697; Sun, 25 Jul 2021 12:10:24 -0700 (PDT) Received: from [192.168.1.187] ([198.8.77.61]) by smtp.gmail.com with ESMTPSA id o9sm42890179pfh.217.2021.07.25.12.10.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jul 2021 12:10:24 -0700 (PDT) Subject: Re: [PATCH io_uring backport to 5.13.y] io_uring: Fix race condition when sqp thread goes to sleep To: Olivier Langlois , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, gregkh@linuxfoundation.org References: <82a82077d8b02166482df754b1abb7c3fbc3c560.1627189961.git.olivier@trillion01.com> From: Jens Axboe Message-ID: Date: Sun, 25 Jul 2021 13:10:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <82a82077d8b02166482df754b1abb7c3fbc3c560.1627189961.git.olivier@trillion01.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/24/21 11:07 PM, Olivier Langlois wrote: > [ Upstream commit 997135017716 ("io_uring: Fix race condition when sqp thread goes to sleep") ] > > If an asynchronous completion happens before the task is preparing > itself to wait and set its state to TASK_INTERRUPTIBLE, the completion > will not wake up the sqp thread. Looks good to me - Greg, would you mind queueing this one up? -- Jens Axboe