Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp635277pxv; Thu, 15 Jul 2021 12:05:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEQpyaESMBC0JAb+ny76c3iUEygnXFhJ8Dm21N1vYtddAl/D+7eMhkshMmsftmAJWDhac/ X-Received: by 2002:a05:6638:148e:: with SMTP id j14mr5462020jak.136.1626375921761; Thu, 15 Jul 2021 12:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375921; cv=none; d=google.com; s=arc-20160816; b=aJHfuhwIHsc+iRl0FPJXmWHt7sUAvqoDVoWwRbT9TM2euj0/2/mBKA5JQwndbtPGmR IwRzn1oRNSlB6hqg/MaRKK9ziSmuendfQymDNnKlzhsYXNzj+A2uVMJuaFBunSaSr9wX zj796m7tOxm91vcgoyg5GZ1LCE7mj11pYxzBLZ5Z4PFqIxNzru03j0ubh+KY6lPd/X/S YFfaQetsSgs03ZH1bt91HvtVcz1d1f5lrOCOGCs7yurIpUZofyRJRfiPHrIWP0b9+8kY CBSK0Dbs427BxEusN/Db4hqPDuwjIRWjISXGFyb4mVAdBwn4e4dFbgFhSaMGlIkUr2HF 2+CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YeSU41mTGq8sjFmi/eNyXrPa2CBTF8F+tbBZCBUXa0s=; b=atNJm4v/8ifdTM+gbMO9hn7mZ8ROQxO12fPFV5DEAKu1enOP6HiEG4GSJvayGq2G+x nx4ijZM3lKBegV/AUwbqiB2D277h6vDeSnjEBOCfwX4XZOPs0uqYZd+jzwH7JB5vPqxe wytPlfWTcCmQjh8IyWUF1T7LBy5VcI9Mum9XVjFEku5TZO0ReyFzGWd7W3C8cgAADhJb n+2ZTmkJQ6TqZTX83LLEmA1fii+XsZBWCO0/+yF7FzFi9c68LLDfnQrfo5UG1UB6y5bZ dERASJfgnoZM7TJztvphBPpMNjFWrGNh0TBboN2rfeTsWQnJhQRMBHLEJD6UQXUtGK6n ZOTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mjks87Yo; 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=pass (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 j8si7170560ioq.34.2021.07.15.12.05.09; Thu, 15 Jul 2021 12:05:21 -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=@linuxfoundation.org header.s=korg header.b=mjks87Yo; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242367AbhGOTGc (ORCPT + 99 others); Thu, 15 Jul 2021 15:06:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241133AbhGOS4e (ORCPT ); Thu, 15 Jul 2021 14:56:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B111613DB; Thu, 15 Jul 2021 18:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375211; bh=gh1Dokpg8mc+rBHS3TG5+qodz7kuClBqeYXQe00w4Rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mjks87YodjBtZqCUA/T9PUTVzults7WCANLIq6m/DtOsyTOW943lyDoX67MLGj71Q de4wf7b4HArG4jkZh/D1f3kQRPXU71Q5bqxfW8+Wvewz1dkytD0lOApFz88lluH+Ym Rj0TMzX33ckevcUcz/C3iDoBMGec4B+hk3bZuuy0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang Subject: [PATCH 5.10 208/215] io_uring: fix clear IORING_SETUP_R_DISABLED in wrong function Date: Thu, 15 Jul 2021 20:39:40 +0200 Message-Id: <20210715182635.947795275@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang In commit 3ebba796fa25 ("io_uring: ensure that SQPOLL thread is started for exit"), the IORING_SETUP_R_DISABLED is cleared in io_sq_offload_start(), but when backport it to stable-5.10, IORING_SETUP_R_DISABLED is cleared in __io_req_task_submit(), move clearing IORING_SETUP_R_DISABLED to io_sq_offload_start() to fix this. Fixes: 6cae8095490ca ("io_uring: ensure that SQPOLL thread is started for exit") Signed-off-by: Yang Yingliang Signed-off-by: Greg Kroah-Hartman --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2087,7 +2087,6 @@ static void __io_req_task_submit(struct __io_req_task_cancel(req, -EFAULT); mutex_unlock(&ctx->uring_lock); - ctx->flags &= ~IORING_SETUP_R_DISABLED; if (ctx->flags & IORING_SETUP_SQPOLL) io_sq_thread_drop_mm(); } @@ -7992,6 +7991,7 @@ static void io_sq_offload_start(struct i { struct io_sq_data *sqd = ctx->sq_data; + ctx->flags &= ~IORING_SETUP_R_DISABLED; if ((ctx->flags & IORING_SETUP_SQPOLL) && sqd->thread) wake_up_process(sqd->thread); }