Message ID | 20170525184327.23570-2-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7950B60209 for <patchwork-linux-block@patchwork.kernel.org>; Thu, 25 May 2017 18:43:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FD582679B for <patchwork-linux-block@patchwork.kernel.org>; Thu, 25 May 2017 18:43:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6450A2836D; Thu, 25 May 2017 18:43:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F7CF2679B for <patchwork-linux-block@patchwork.kernel.org>; Thu, 25 May 2017 18:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036476AbdEYSnr (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Thu, 25 May 2017 14:43:47 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:32064 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036429AbdEYSnh (ORCPT <rfc822;linux-block@vger.kernel.org>); Thu, 25 May 2017 14:43:37 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208";a="117364865" Received: from mail-dm3nam03lp0015.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.15]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:59:00 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BlzTsR4cii40tX14eWH+4d/23RkifecP69uUIK57MdQ=; b=gJ0cj94CeVxyTNsYhlmbX8KVg5ByZ7CHYHJkfr17y89OT5EQw2NBmZgFHK9fNoQrrTXh9wpUIMUuVAJZY1nXa8TcpVuAIrmnDyM/CazGWVLjRHX4Hhbl5Mn/KIFRZVUJRvE4wRlQVZVY/4hNVHwbwhvssOYFBlTZ8emu39HkGTk= Received: from BN6PR04CA0009.namprd04.prod.outlook.com (10.172.194.19) by MWHPR04MB0368.namprd04.prod.outlook.com (10.173.48.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 25 May 2017 18:43:34 +0000 Received: from BN3NAM04FT026.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::209) by BN6PR04CA0009.outlook.office365.com (2603:10b6:404:cb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Thu, 25 May 2017 18:43:33 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BN3NAM04FT026.mail.protection.outlook.com (10.152.92.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Thu, 25 May 2017 18:43:32 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id EB.2D.19026.3D527295; Thu, 25 May 2017 11:43:31 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Thu, 25 May 2017 11:43:27 -0700 X-AuditID: 0ac94371-41ba798000004a52-95-592725d3a899 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id A8.E8.11415.FC527295; Thu, 25 May 2017 11:43:27 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Jens Axboe <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, Christoph Hellwig <hch@lst.de>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Jens Axboe <axboe@fb.com>, Jan Kara <jack@suse.cz>, <stable@vger.kernel.org> Subject: [PATCH 01/19] block: Avoid that blk_exit_rl() triggers a use-after-free Date: Thu, 25 May 2017 11:43:09 -0700 Message-ID: <20170525184327.23570-2-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170525184327.23570-1-bart.vanassche@sandisk.com> References: <20170525184327.23570-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsXCddJ5ke5lVfVIgzX3jSz+7znGZrH6bj+b xcrVR5ksZk9vZrLYe0vbYsHGR4wObB4Tm9+xe1w+W+qx+2YDm8eZBUfYPT5vkgtgjeKySUnN ySxLLdK3S+DKmLR0E0vBX/mKGcs3MDYw9kt3MXJySAiYSJyZsoe1i5GLQ0hgKZPEhPNXoJxt jBKn/81hhqlqbZ4JldjM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KOz1Xb5vzs3t83aHfq9uqD9cJnZIa9v+hsv70v/ECd/SOiXRtqUe6619zdwhVRn ml3i9Xi9s0j4S0u2EktxRqKhFnNRcSIAiKgIRsQBAAA= MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39400400002)(39850400002)(39410400002)(39840400002)(39860400002)(2980300002)(438002)(189002)(199003)(9170700003)(47776003)(6666003)(48376002)(6916009)(2950100002)(1076002)(53936002)(4326008)(77096006)(50986999)(50466002)(356003)(2906002)(305945005)(33646002)(76176999)(86362001)(54906002)(230783001)(189998001)(8676002)(110136004)(106466001)(38730400002)(50226002)(72206003)(478600001)(575784001)(5003940100001)(5660300001)(36756003)(8936002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0368; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT026; 1:jTWUicuD0qC6+afiWCAmKfDLUKXiQ/wg7getowq2CXNhXdvcOmNzIy1jKYVQ55+EVsNBXrUcCIMAqisK6qcHSqkk7rYS/gajV8w/oAFOGOhnxdUMgyw1Y7p2HrtSHFEVxQwjTqpnMHbY+j/Cp2IU4cKUGUlGBsuSB9q4KcLnjhCjy6LLBgB+3QU7nTJ+le/cnFM/lVN75WR3Xxke4kCh5mhnqlnit5uw5qIG5L6dYT3ANQ+4cCqnTC5ncR2M43ZfaPspRxO8FCng93OZ8rO05+VHGcAaDmEw1PdTF34AgXtW3HE6G2zsXE/aPPBIcUFH89KWqDrsG5GyM3zWqcvILH/8WqchqeErql99jRKOXmah0uxKDPyV0TJgsPwVgvxyDq7l89zTSxCdLmJSecQqVSHIneveF0Cv4sR5/giEvK2aDesDtFqIOlkNuFXxP1nmxMV5nC4gIP4rvHFNfqlzTxnbo/OPENZJMbzufBueEl6WG2cMDBlOOO+VVkmakrZV8xdR823Cjg5q3FGthlrjkEOc3kwtnLhcZM8ZpM9DPV4= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0368: X-MS-Office365-Filtering-Correlation-Id: fcba87e7-1b7d-44eb-7781-08d4a39df234 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0368; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0368; 3:SVoKWjvF+GrtroDX6Af3E7qf7lFO98khghY7hjPK5RVO1u9bSZeIfFdtLRL+uBZf2HtF89vVg9whtCzSbMRsTS1irRe5oC9Y4COE9GnN2gRj4oU5d8EFWweNHIm0FftFQMgfRaAaD/rDGrBbgth1TfscYdG7pMthNi2LfdyF/bKLkF0ztYPvvE3qK0Ho5F4MpPoJzIFZ6ZQHr7twkMv6rGZHH57w+aip8Vt5UsiPNwYEkXMwVSGJhtyjzavxakyjb95cHYAqB29YxnIS13A1dZg1Wr3CB9PIj4d/hRqLNeiLOAC1RZe2JPKGrB+/MksRuZ6IoV/Z23cqYxg2foS3ZcnUxDorqawCMCtZJdwQ/corUuAlD6SF7Yw6nijaYemNJpEVmkyx3L73ljzcqD+Jlp6ibahHbol3wqMivF8sNPaojUPpVbyY3PwM8/TssE+2NuphYHy3+JnugR0S3IPDe57CldbKj8mbw/1Zg9UvF48wTpqzHZVPMFk5IN79AEkR X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0368; 25:RWnPfbAOYDw84mk62Zn6GrglsOXAfMqlmgfFJna+K44r8P0egfsQDvEQe08f4GKkxRog9MxmhW3ujavN0+ckpy0xqb0YBt6hGoMS7veZ6/BW8Jd0RqXiljseN0JtiNFncXU5GQQZCbXzp0W05SCQiIc/LHiOFkLjdyewlP5t4I2yzJ9KUAL0xifojipaziHr2pSG4jMjofJpc0xO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U3IOd0kVrw/nVIx6gfMfqQ+9PRvsANMNfjl9w3zUwmzRA6Ux8iUS/XDT2kkTFWy X-Microsoft-Antispam-PRVS: <MWHPR04MB0368CD641A394481D5BDD1A781FF0@MWHPR04MB0368.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:MWHPR04MB0368; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0368; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0368; 4:Yz9BjAdhsACpO+9/8hqXMs+C9VOd+BeChOvSdpORlX?= =?us-ascii?Q?HWbxanqxoy+67FmTxTjghGonaJiw1klmwmzNd8q64PlMeq0r95yu2Bpm+gHd?= =?us-ascii?Q?w2OzGXXZlnvlnkXZCLQcTPDfatlGb8sZQJRzEt7JehMHgBzkhlO4hX3hOU7a?= =?us-ascii?Q?M/+qLGKgLVS/abq/bKnU5gI7xNqRHEiM2/DSPEtkNvIgm/1XkduvmSbQFQoF?= =?us-ascii?Q?W+5Wom6vvOPUTjdEzLlgSMRcCSzvEKVh4nxj0NZLtcXIuX24wSEaTFUxLdUt?= =?us-ascii?Q?0+SfG0CsEx9p+ghRwK0D4hZgO+rvvKT224cMidXOyQ4hJQeh7d9GQybQtjdw?= =?us-ascii?Q?VaupK/q3WRwNoKRjCSL3A8he3YtYFQAbdikaQ7C440rwvAgzrZU8JDmrM1xl?= =?us-ascii?Q?GXES+YWjiH+iSbS/0KunrLBOYcTwMFsj5Jn+GQnorfBkA57EAtHGcE2VSfhU?= =?us-ascii?Q?YnVgruGvQXXF3YtRD6dPvx2XS3IbKXi4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GC6IExI+yPXA2Tf0tQio5M+Rs?= =?us-ascii?Q?DY+T5H924hj2hFGwYYSCvHx6hAPhjBVlajRqGtu4VZa3RteN1Y2Nrb/y/DCE?= =?us-ascii?Q?8GqCivYXeYtIhCNqOmdfdSxrxmj9VlWn+2YglxuUgYwql2uGJ9YjKR3MXMMG?= =?us-ascii?Q?7/cdihl3p76/ZlWsLedWh2fjLQEovXULec+QpohOzqgbZ7ltOk7N32QHTZ5/?= =?us-ascii?Q?AJJjOFS2oH0Tq7xBFynGcm8GLxaxn6/QfqfcoG8NQSQrjPDkRms87zuT2KEh?= =?us-ascii?Q?ns+ExoBJpYULGCeS3IhKhft8QcQ7NxrSbD0yOKhx3SgU4a21/HTYTXYjc63U?= =?us-ascii?Q?PvpOEnH1CosTeeIBvNp03ect8lbyYwYoxSYZ8BNKkzc3sca90bdq+f7XqzDb?= =?us-ascii?Q?9pStUww2IffjyHej1Obm5jNCHyF7ToMU7CId7YyH0UDAZHWYmby7s9jAeDvn?= =?us-ascii?Q?QOW/X320YQNVSWAo1BPbzdLy28WXxmumjRBXMMHJLxWBhHMFJVCcfVH9fu1d?= =?us-ascii?Q?LNjKmGjl2wmbRqWvNnjCny+onsrmEa2rYxS5YDKk9YQsus/JlWvduIz0j9ad?= =?us-ascii?Q?8hR9aPDZQZ5N0e6RbnPxjVS10MIijyxOay3YkRIxRsfFq4nsDk9KGf9sA6RV?= =?us-ascii?Q?DtkAXCNgj+k1CmO+IVLfF3qfku4RHrRJuIytLw2054/t7fvaE+V39ENsTvlW?= =?us-ascii?Q?G63DxxKEctLR6QYoUntjc0dtfdlgolMAhZLYu5RAWBvrApjTQjS0LdRh0wWG?= =?us-ascii?Q?IAtoUlUH4DJVL1q5GDYqxIVA/24pemyIA7sbZmJIb59dq/p4u8zOaGoY6WY5?= =?us-ascii?Q?JCEuAUmmpqDyBeeFl00BWZkNrNll6gj?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0368; 6:t7v0ki1IMWhgo0kR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EHBkpzU8avl7qOmBxtIB8BU+ydysXyLlCwfnDet3C7T4FwgxFlqNMtoaiL7Ry5qQsW6gHmc+d3AR1HFIP9V47/vwWFwA1mijNSJRCANRAYAhXlYpPXlGEYCJWoDVMSsf2GptCbbBurji22yUn1yMVDx6ZBT7Efw==; 20:Xf/x+5/IcoyXzlDD7aS1vz1QzKxoK1ZRbsluT+uIgLKKlTuTvq80ZhfnPUpNz9KmztbVfyLxbhRiuTeKYhM18D4tnxHXJ1kwzqcLbaPN57MxA1TFqvIgQm6GMltqPyG6bpWtJQp7ET9s26t1p2O7Ti94kb839I9AnfyH1w2igjE= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:32.9018 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0368 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 7c2947128f58..0480892e97e5 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -74,7 +74,7 @@ static void blkg_free(struct blkcg_gq *blkg) blkcg_policy[i]->pd_free_fn(blkg->pd[i]); if (blkg->blkcg != &blkcg_root) - blk_exit_rl(&blkg->rl); + blk_exit_rl(blkg->q, &blkg->rl); blkg_rwstat_exit(&blkg->stat_ios); blkg_rwstat_exit(&blkg->stat_bytes); diff --git a/block/blk-core.c b/block/blk-core.c index c580b0138a7f..9416f6f495d4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -648,13 +648,19 @@ int blk_init_rl(struct request_list *rl, struct request_queue *q, if (!rl->rq_pool) return -ENOMEM; + if (rl != &q->root_rl) + WARN_ON_ONCE(!blk_get_queue(q)); + return 0; } -void blk_exit_rl(struct request_list *rl) +void blk_exit_rl(struct request_queue *q, struct request_list *rl) { - if (rl->rq_pool) + if (rl->rq_pool) { mempool_destroy(rl->rq_pool); + if (rl != &q->root_rl) + blk_put_queue(q); + } } struct request_queue *blk_alloc_queue(gfp_t gfp_mask) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 504fee940052..2ff8842f0dc1 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -809,7 +809,7 @@ static void blk_release_queue(struct kobject *kobj) blk_free_queue_stats(q->stats); - blk_exit_rl(&q->root_rl); + blk_exit_rl(q, &q->root_rl); if (q->queue_tags) __blk_queue_free_tags(q); diff --git a/block/blk.h b/block/blk.h index 2ed70228e44f..83c8e1100525 100644 --- a/block/blk.h +++ b/block/blk.h @@ -59,7 +59,7 @@ void blk_free_flush_queue(struct blk_flush_queue *q); int blk_init_rl(struct request_list *rl, struct request_queue *q, gfp_t gfp_mask); -void blk_exit_rl(struct request_list *rl); +void blk_exit_rl(struct request_queue *q, struct request_list *rl); void blk_rq_bio_prep(struct request_queue *q, struct request *rq, struct bio *bio); void blk_queue_bypass_start(struct request_queue *q);