Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1844180rwb; Fri, 19 Aug 2022 10:18:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR6P2HDjnRgVq3fWHZcj+UqyrpThloTtJ5Z65Es+8YpM7GDi6NULCrKH7tPMwm4aWn+c5Dgc X-Received: by 2002:a17:907:1c8f:b0:6e8:f898:63bb with SMTP id nb15-20020a1709071c8f00b006e8f89863bbmr5593355ejc.721.1660929488077; Fri, 19 Aug 2022 10:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660929488; cv=none; d=google.com; s=arc-20160816; b=EdYLT9G3HjaXfqa1JL9TWe0w8yZmxDRoEyaCSI7AxaDvm9QPj69udKOpEv9fqeoNmJ p5TeINZkDnpVOMFlDj9qdi//p2UMbz+5maC9QyiWTS0sweUn6O8DziCPlH6g8+5vmo1a BaNYWoTwPe5jj6O/cbuLX9Idx5P4LNWZM5XhhgS+k3f9ljA4fTve4acQrjIj/h6yAAWr wTAEnieo4KVzkVwUKhlZSaDujaHjnkodXzS1HKLLjVG4ouZpfyGn7IB8DB/bqgdQ5BfW 86XKXWPmmq23exH1ZyupoOROKKwRvXOCH7XTcQywrcjQEMCCvNil2uW7aeYnQ7ONc6qQ S4vg== 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=DY+3C0r6MD1XhUIMuX7afnwcn0/t9cHpTIvAfMC9U70=; b=jCiismA4NiJgVprfDROw5lxwHuQHeALim8nW58fdPWMG75xo7tiGoROrdgQGDl8WRW OZPRYKPvVmc9sN18K28Gqcoiip4FaqFmo/Kfoaik3unAILNVJ+iLf0Lr3dWZUfn/bgHz DpHbnOz2E53kz/FdpjsJn59UiOgUI4g7HHNqabfupGpjzOALKoqQc+S8pyDBIhl8t16W 79jJ2gA80l0lLWOxcGYeZQaKEfpBUUDmrjHM6fHKulI3kkO+LTpKkl4mLd7Bsv+jvcVs RMRvtDZ2wrakl3uTI4Dq89sofrMKYnXsUhX4b0rb3YK1cJYYVKPqNlTfH4psw62b+bFp WTgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2rnjkPK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg30-20020a170907a41e00b0072b193ac94bsi3012807ejc.627.2022.08.19.10.17.41; Fri, 19 Aug 2022 10:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2rnjkPK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1350052AbiHSPld (ORCPT + 99 others); Fri, 19 Aug 2022 11:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349967AbiHSPk6 (ORCPT ); Fri, 19 Aug 2022 11:40:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6301AFF8CD; Fri, 19 Aug 2022 08:40:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 055A3B8277D; Fri, 19 Aug 2022 15:40:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CC65C433C1; Fri, 19 Aug 2022 15:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660923645; bh=JH8YGLEcHg3LX4WC0hQaLrQ6zIleqe7Bxnu577DJ1JQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2rnjkPK1OE+wf3pv8lYDNW+ZT8ZZJprMO3k+vrqzCToIhCoK0+ICAUCNZi1Cz7rdi SJg36vAXfF5H6feyU4mYmHILLNNmCqsQZbXV8xNDW8PmjYQAunMULNgSibCqYm6pSn x5punIvHykIiMB++niSbr2fVoG9VVLA8t1WoD4wo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Axboe Subject: [PATCH 5.15 01/14] io_uring: use original request task for inflight tracking Date: Fri, 19 Aug 2022 17:40:17 +0200 Message-Id: <20220819153711.712418650@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153711.658766010@linuxfoundation.org> References: <20220819153711.658766010@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jens Axboe commit 386e4fb6962b9f248a80f8870aea0870ca603e89 upstream. In prior kernels, we did file assignment always at prep time. This meant that req->task == current. But after deferring that assignment and then pushing the inflight tracking back in, we've got the inflight tracking using current when it should in fact now be using req->task. Fixup that error introduced by adding the inflight tracking back after file assignments got modifed. Fixes: 9cae36a094e7 ("io_uring: reinstate the inflight tracking") Signed-off-by: Jens Axboe 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 @@ -1405,7 +1405,7 @@ static void io_req_track_inflight(struct { if (!(req->flags & REQ_F_INFLIGHT)) { req->flags |= REQ_F_INFLIGHT; - atomic_inc(¤t->io_uring->inflight_tracked); + atomic_inc(&req->task->io_uring->inflight_tracked); } }