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=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 196EEC2D0A8 for ; Mon, 28 Sep 2020 14:04:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEC0A21D46 for ; Mon, 28 Sep 2020 14:04:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601301858; bh=1FfURhtQ8JHbcDEiyFHeG/P8Mr7lfy9SfKp1AMXhdB8=; h=Subject:To:Cc:From:Date:List-ID:From; b=iB8HavDoWg5R4EErnh53QPRN6W3mGsDAoKHURpcnzDu/clCw9I4uhSvm05m3rN6sE 4EjqvzIFPOnpMEcIiIWlStYdTmDXv+/LgVpdlGYzEjIGlqGT8V7/rDfEwtBkAjW/z7 no62FESKNKIa01aRBqiwA5/5YUcfY3B6I3hNNAvg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726325AbgI1OES (ORCPT ); Mon, 28 Sep 2020 10:04:18 -0400 Received: from wforward1-smtp.messagingengine.com ([64.147.123.30]:38327 "EHLO wforward1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgI1OES (ORCPT ); Mon, 28 Sep 2020 10:04:18 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id 5B51E92C; Mon, 28 Sep 2020 10:04:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 28 Sep 2020 10:04:17 -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=2I3ppU wCcCPNNIRyPfpb0L2n/qAD80Rm0ZdAFxMpiE8=; b=p8kC0sddQcBlvuFLZSzVL5 JV4cOM2ntxXtuVLuDQ/or7xjtZDe4Ded3NWKwRFJCxtueN6aebZvU1I/z+bLUiU+ pO6yEeDotwfz4frCim0Ack3tEhjXbJONNDDSJUPowML8iSIr0oK6zCeSxDc6M2KF 3L1YT5U3E8eV3KFyXXBb67UBGiZeH1AdYI3MaM971j2CKOc9W7OneuqWuBxpfV3y z0l/d+Jwwj7xPckyfsuZUvHXe0XSJthL6gfkjUo3Y6f/U9qV7Cx0cAFbof/J+n/F 0gc8zDYvdXCzXo18auAaelclpkjdNEP0qTLuYGPJ0wIDAOV35kx0gfOOYOBZXz/w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdeigdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucggtffrrghtthgvrhhnpeeiteevheeuvdfhtdfgvdeiieehheefleevveehjedute evueevledujeejgfetheenucfkphepkeefrdekiedrjeegrdeigeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtg homh X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 23BBD3064680; Mon, 28 Sep 2020 10:04:16 -0400 (EDT) Subject: FAILED: patch "[PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation" failed to apply to 5.8-stable tree To: axboe@kernel.dk, sgarzare@redhat.com Cc: From: Date: Mon, 28 Sep 2020 16:04:25 +0200 Message-ID: <1601301865177128@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.8-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 f3cd4850504ff612d0ea77a0aaf29b66c98fcefe Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 24 Sep 2020 14:55:54 -0600 Subject: [PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation If we cancel these requests, we'll leak the memory associated with the filename. Add them to the table of ops that need cleaning, if REQ_F_NEED_CLEANUP is set. Cc: stable@vger.kernel.org Fixes: e62753e4e292 ("io_uring: call statx directly") Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe diff --git a/fs/io_uring.c b/fs/io_uring.c index e6004b92e553..0ab16df31288 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5671,6 +5671,11 @@ static void __io_clean_op(struct io_kiocb *req) io_put_file(req, req->splice.file_in, (req->splice.flags & SPLICE_F_FD_IN_FIXED)); break; + case IORING_OP_OPENAT: + case IORING_OP_OPENAT2: + if (req->open.filename) + putname(req->open.filename); + break; } req->flags &= ~REQ_F_NEED_CLEANUP; }