Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp247597ybv; Wed, 12 Feb 2020 23:24:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyQcqSGtdio45uDuSOX/6VSD3uvMNexcK/AVrS5JWIc3ZH9oeri/wkt3X1DaNURg/rZaeFG X-Received: by 2002:a9d:5885:: with SMTP id x5mr11999789otg.132.1581578687427; Wed, 12 Feb 2020 23:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581578687; cv=none; d=google.com; s=arc-20160816; b=ftPcfcJkXWzhOWxE0E8R5wsczSPIbx5aMOzp7YLtYDpw2mz9SOWG+0tugNAsd09MUG mwqfdu6pwdL0fjU4IpkdMuQ4JVKO06I00oRcJiWujmZs6O5jpjPGr8wu6LdqeHBbh4Jb shml4cUKJMaFtpjqgaNxzbSSQZsK8vfZYubvRzQu823tc5sF5oAbYhSvuH7SoI2EUTlP 6NAoFgx1sP06ql7DP1rjduHw6gIjmhrAQUHU+7RQqDCH3MwA9AhBMPebn1Tk4eHeNHMQ olVZc+8EVH7GrxPc+K1YOqxFDT2cCV7i4PDYUV0f99sJEbzN9zOV0vlnn86GrCLAKHWF 9erg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=muyZ7YMznir5WH5exT0RbBmxdQ/Z+Ljlf7z/NaG6Agg=; b=hwzSEwpknwWEirh2Bcp+RQlllT6g8vFy1UpDlK3CwLA68T9e2ei2XGHb+2EXFezIiD NYl1zjU8LV8780cwDAXW5zpCnDHNjCiNFlgaDgWCBEj7ID7q6Sz0HjrLJFoQA62LzSL5 LM2XayOIHoVe3uKBndg8OMEnLDFei/V1oJVEqM0wTwMc9POs/yXWRkbHkZdBSOGV0MxK 0M6O/LECVUz4LuYAsLf0jCJ9d5LFmPJjD5xAJ2+Q1hGvjfz169ouFQ3eKkKSozg02dWV jS9KessH9c0D+1/8ShbNj1Vu0zokckaMfhoqYInHNnZe8jiONHXlhBwzvx4N7wPBBVQu MYjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@stapelberg-ch.20150623.gappssmtp.com header.s=20150623 header.b=L61FooOw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si678285otp.260.2020.02.12.23.24.32; Wed, 12 Feb 2020 23:24:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@stapelberg-ch.20150623.gappssmtp.com header.s=20150623 header.b=L61FooOw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729783AbgBMHXU (ORCPT + 99 others); Thu, 13 Feb 2020 02:23:20 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43460 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729364AbgBMHXT (ORCPT ); Thu, 13 Feb 2020 02:23:19 -0500 Received: by mail-oi1-f196.google.com with SMTP id p125so4787692oif.10 for ; Wed, 12 Feb 2020 23:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stapelberg-ch.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=muyZ7YMznir5WH5exT0RbBmxdQ/Z+Ljlf7z/NaG6Agg=; b=L61FooOwf9pKuM2tfav43uuzApo0o0TxSOJOE8dnOlQ2hvwEnOdmfFgEZ9qB3fIp8r 2pmCCAJR5/24PQuRFSN8Bva5hmG31QIxHh81GHBe5gqIeMmvV182MBY4wKMq2nsPBYlN z/fjVcD813zY1x8Mnu0IlyjefBRM5kPjRfL8r7FOspda6BVKzYeat4nC571OE/yz0Azz VDm3z2c+NGuF7fFrXMXkXQGm8Lv6JykpaZONh26d+TPoK+l1dOvEqJeXmHQrbwApcyri 0zOeQlWzlQTkeMPMlqFbG2uoodOvV8f3yD783BxTbMazdQtkiE7N0osbll+5OSSQ62kp CY0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=muyZ7YMznir5WH5exT0RbBmxdQ/Z+Ljlf7z/NaG6Agg=; b=nQLZUBE13D3Pu7DERRSGFIcVL/i6CNR3nj+kPSPVmXWSfM9A9C3HRFUntVickPmqKn ERvFiftiKawcuhDI7pkyobnK6PWR2s33KehiWawTngG6C8fyUJmwG2AI7kMKWpmMkbs9 JFhuS3VuuWkAsFUHOfsdiv/3WQme7zUAOa5UHuxR3fA1LLopCnEc8a+0r37UTxQUYjeS b+l6ORyNcwGx+TyUkj8kv9jo6IFp1JVdMtifrvL4UuMTZNDRwMlQzPXUXAb0m6tIhBNy /gTNjssgFAjS771AO7L7oBGEpDK0VWLR6aJIWQ1jgHmMF8fB0vndKquZs7sLe/UaMqZm TqSg== X-Gm-Message-State: APjAAAUk7I39G5A+y7khFyOI7/p1BTs6LB8Rl8D56ubacsN+0WT0rQvd yvsFGwp3FIGSk8SEd2C4RE7yDbFVIQyEFHGldVyKeNiQJ0Q= X-Received: by 2002:a05:6808:8ca:: with SMTP id k10mr2012050oij.164.1581578598795; Wed, 12 Feb 2020 23:23:18 -0800 (PST) MIME-Version: 1.0 References: <20200209080918.1562823-1-michael+lkml@stapelberg.ch> In-Reply-To: From: Michael Stapelberg Date: Thu, 13 Feb 2020 08:23:07 +0100 Message-ID: Subject: Re: Still a pretty bad time on 5.4.6 with fuse_request_end. To: Miklos Szeredi Cc: fuse-devel , Greg Kroah-Hartman , Kyle Sanderson , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I confirm that the patch fixes the issue I was seeing. Thanks a lot! On Wed, Feb 12, 2020 at 8:36 PM Miklos Szeredi wrote: > > On Wed, Feb 12, 2020 at 10:38 AM Michael Stapelberg > wrote: > > > > Unfortunately not: when I change the code like so: > > > > bool async; > > uint32_t opcode_early =3D req->args->opcode; > > > > if (test_and_set_bit(FR_FINISHED, &req->flags)) > > goto put_request; > > > > async =3D req->args->end; > > > > =E2=80=A6gdb only reports: > > > > (gdb) bt > > #0 0x000000a700000001 in ?? () > > #1 0xffffffff8137fc99 in fuse_copy_finish (cs=3D0x20000ffffffff) at > > fs/fuse/dev.c:681 > > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > > > > But maybe that=E2=80=99s a hint in and of itself? > > Yep, it's a stack use after return bug. Attached patch should fix > it, though I haven't tested it. > > Thanks, > Miklos