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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 C0346C433DF for ; Mon, 15 Jun 2020 13:59:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C882207DD for ; Mon, 15 Jun 2020 13:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592229555; bh=Jo9d/aS8EjDex8evyOuuqs0b4YWW5KBSvkgQyuteWK8=; h=Subject:To:Cc:From:Date:List-ID:From; b=KanXd5m8/dqeN7Z0iuuTS/8ufD7UvG1k6qQbj0moGTSGrq6EjKgSsyMR9IoyfJxd+ C+f1gPfIZQqwIPpHo3c/DzrrDSyR1I9KSxROYI5pD5T7Y0CGI0mHAhm+cQxdxGtNiV bUnFMntATa4tpBSIfgAB4UrDchrirZvtT0BGzdSU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729930AbgFON7P (ORCPT ); Mon, 15 Jun 2020 09:59:15 -0400 Received: from wforward1-smtp.messagingengine.com ([64.147.123.30]:54227 "EHLO wforward1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbgFON7P (ORCPT ); Mon, 15 Jun 2020 09:59:15 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 2FE746EA; Mon, 15 Jun 2020 09:59:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 15 Jun 2020 09:59:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=7RwG+s NPU2SZH/sjZnnvfkRHLoqIee3Ap52gwU1oaYM=; b=JGwzY8NEjwh4KpgmeGdyNE tNPHABQf/rmC+hHo+65xfBzyaENsE4l0gCVNWBzJHJjsoTeVfiYxu9824SVSUPph gcBGXjYtM09k2qRnZLre2I5tDXZhqmWtnthUNt/BDkvlTEz4cQkValuZIoA65Wdy OIhOs4zHJ1IBFttbYx3BGIHxtjuJUEPloHhq4C60nUQ6le3bvEMLF7+qff/bB3Vo 2ijMp5XK9KnCbpC9aWsKknrTT8yUBAyjG61JaDduSTKJtpvn9R1BSAcgTQIgqnB/ GRHkX9XrJynIhIoghVg7YQvnnbKDUI9KIXHde4hCuEQXhzD5s9GG4HBC4MEbwzFA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeikedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepieetveehuedvhfdtgfdvieeiheehfeelveevheejud etveeuveeludejjefgteehnecukfhppeekfedrkeeirdekledruddtjeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 30C6130618BF; Mon, 15 Jun 2020 09:59:13 -0400 (EDT) Subject: FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree To: asml.silence@gmail.com, axboe@kernel.dk Cc: From: Date: Mon, 15 Jun 2020 15:59:00 +0200 Message-ID: <159222954019964@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 4518a3cc273cf82efdd36522fb1f13baad173c70 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Tue, 26 May 2020 20:34:02 +0300 Subject: [PATCH] io_uring: fix flush req->refs underflow In io_uring_cancel_files(), after refcount_sub_and_test() leaves 0 req->refs, it calls io_put_req(), which would also put a ref. Call io_free_req() instead. Cc: stable@vger.kernel.org Fixes: 2ca10259b418 ("io_uring: prune request from overflow list on flush") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe diff --git a/fs/io_uring.c b/fs/io_uring.c index 0b51f21e5432..37422fcdaa7f 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7534,7 +7534,7 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx, * all we had, then we're done with this request. */ if (refcount_sub_and_test(2, &cancel_req->refs)) { - io_put_req(cancel_req); + io_free_req(cancel_req); finish_wait(&ctx->inflight_wait, &wait); continue; }