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=-9.0 required=3.0 tests=MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 3F3AFC2BBFD for ; Tue, 14 Apr 2020 04:19:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D8072082E for ; Tue, 14 Apr 2020 04:19:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D8072082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7C0E08E0005; Tue, 14 Apr 2020 00:19:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 798928E0001; Tue, 14 Apr 2020 00:19:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AE408E0005; Tue, 14 Apr 2020 00:19:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0166.hostedemail.com [216.40.44.166]) by kanga.kvack.org (Postfix) with ESMTP id 4F3F18E0001 for ; Tue, 14 Apr 2020 00:19:07 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0AAAD582B for ; Tue, 14 Apr 2020 04:19:07 +0000 (UTC) X-FDA: 76705155534.14.sack70_89c6227b85759 X-HE-Tag: sack70_89c6227b85759 X-Filterd-Recvd-Size: 4118 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Apr 2020 04:19:06 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id t11so3506285pgg.2 for ; Mon, 13 Apr 2020 21:19:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=poV2Gq3cnOyqeOUmPYdgy85BjQ09uingBc0EV8v87Ns=; b=IEV3mN35sn0ul7N80dMDJiG74m3chrzBTF6YVl7VKIzzC5KiT9OuAZJZZ8NtFddn94 p8iT887vvtLsxfpuc+MEYpRxKW3SqQomwzqfWkU+lnDchSJnqOiYAtXsmwBrK26O7Q4v 1pejV36HFL6Nxarj9OKLXKAV6iaeFJkhal0OoHqS/D7xZfsfscVDEtWQI42ptN3RadRx rkfTctg7sBjVYfh5lBKe1TxMLndpKIGBVyQtCScVbSZkKNuAg+wb9ixFGbt/mOl3MJTH IWS+FzDo3QfLXjWfASxYcjAYmCQvviIqt9H6NXRnnnTHLZkchNZSzibu7UPSCKO4CHbI 5DUQ== X-Gm-Message-State: AGi0PuY/vpS49KBpr163PrukAnaLWIkFCYORbR4c7osEc23d5F4ci1AE ZBZKQYnOx3NtPSbtQAUbuc8= X-Google-Smtp-Source: APiQypIPVTvGDIP97mlZYr8HYNDrY3xOgxZ6XX7zeOVslg6foBZORtgdB4RsrxGGv5idwWedLPG2vA== X-Received: by 2002:a63:140c:: with SMTP id u12mr13690380pgl.243.1586837945624; Mon, 13 Apr 2020 21:19:05 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id l30sm8257941pgu.29.2020.04.13.21.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 21:19:04 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id CDA6140277; Tue, 14 Apr 2020 04:19:03 +0000 (UTC) From: Luis Chamberlain To: axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org Cc: mhocko@suse.com, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 0/5] blktrace: fix use after free Date: Tue, 14 Apr 2020 04:18:57 +0000 Message-Id: <20200414041902.16769-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: After two iterations of RFCs I think this is ready now. I've taken the feedback from the last series, both on code and commit log. I've also extended the commit log on the last patch to also explain how the original shift to async request_queue removal turned out to actually be a userspace regression and added a respective fixes tag for it. You can find these patches on my 20200414-dev-blkqueue-defer-removal-patc= h-v1 branch based on linux-next tag next-20200414 on kernel.org [0]. Further review and rants are appreciated. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git= /log/?h=3D20200414-dev-blkqueue-defer-removal Luis Chamberlain (5): block: move main block debugfs initialization to its own file blktrace: fix debugfs use after free blktrace: refcount the request_queue during ioctl mm/swapfile: refcount block and queue before using blkcg_schedule_throttle() block: revert back to synchronous request_queue removal block/Makefile | 1 + block/blk-core.c | 28 ++++++++++++++++-------- block/blk-debugfs.c | 27 ++++++++++++++++++++++++ block/blk-mq-debugfs.c | 5 ----- block/blk-sysfs.c | 41 ++++++++++++++++++------------------ block/blk.h | 17 +++++++++++++++ include/linux/blkdev.h | 7 +++--- include/linux/blktrace_api.h | 1 - kernel/trace/blktrace.c | 25 ++++++++++++---------- mm/swapfile.c | 14 ++++++++++-- 10 files changed, 114 insertions(+), 52 deletions(-) create mode 100644 block/blk-debugfs.c --=20 2.25.1