Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp610406ima; Sat, 20 Oct 2018 14:42:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60qWH1igzwJAxM6QipozIghN4TB7gAtQRa7d2Sq4JJRBN3FJWF2x5zewMNBilLfd96sZel4 X-Received: by 2002:a63:6643:: with SMTP id a64-v6mr8257001pgc.15.1540071720329; Sat, 20 Oct 2018 14:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540071720; cv=none; d=google.com; s=arc-20160816; b=xh+doxE5ywQwURF2yQnvDOylv7xe3J0z68QP7zo82FLSNOzlrygf0d7y7Bj9QZrV5D INY94wR00cPfOGmd0WU4xTgP4qSkbbYC7zITjuYO/QfEpXDkCT1EaUS6JGYSsYrrIjPh 39jkfpH/F1Cr0kmR9tgKEt52pTcWHGCekGVyzYFgGtJxOW/CHc8t0K2+zG+ZSkxjg5nm w4PiOH21aMZDNqydDZ04+1ifjLBdC6EbnlGPN6cdGCuGsL7z6mPvUPZQ0XXrkem3bXbb BRJk/T+k6FzRAgy2JzBiU1BaUSTaGL8nzeJUDnxGXgt5pch3XCMUSfYl36/o3mzHLw+X 1RXg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=pfUELqGAO8tyN+6luWoipK/YwX6LKz5afJWhLWbYcIg=; b=WhwrbnhIUJ5d0T3jEkL45AF0A/hm/3YZGHKb9g7nHPrHWDS3ivyaqyooo6aqkGrob3 wKUOqqEsb8fz6+hON7yB/cguu+nPm8oJkw9NchKUCIwVXCmm4hE6Tk8wM8/0gqffblqI q+oUTYehoHgb745iqMCIlT3vmxQHomMlzezr5ebJeEI6xdClzWIBpduR6f0codmySRkn 9vQOSL+L9QpADE4McSTCH1JJ6Wi5LWaujxA6zQ5nR9ohmCF7bPmrVosSHKnE+mwURk2/ Ov4PQIpPzm+8eEyAuULP8nU9Ip2ebQMvee0hfYYcG3qQAZ0Z7qp4M2OK7Ci4pQRt3v++ nFBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="BvF9D/Wh"; 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 u66-v6si29144280pgu.94.2018.10.20.14.41.16; Sat, 20 Oct 2018 14:42:00 -0700 (PDT) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="BvF9D/Wh"; 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 S1726751AbeJUFwQ (ORCPT + 99 others); Sun, 21 Oct 2018 01:52:16 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40296 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbeJUFwQ (ORCPT ); Sun, 21 Oct 2018 01:52:16 -0400 Received: by mail-pg1-f196.google.com with SMTP id o14-v6so1560937pgv.7 for ; Sat, 20 Oct 2018 14:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pfUELqGAO8tyN+6luWoipK/YwX6LKz5afJWhLWbYcIg=; b=BvF9D/WhAwCF2st9Orth5F4rXLJnwgAikIUe70RprUBmmoLALwnN1GMw1b1c767hoO ru+OVmPghxYipwmY4WUl2r3b2w66UP70t9U1cUlqtvyXtT8M90ANjlzq1TT1jLBDoTQ2 N3oarcI9nug1p6g9elP/IMTjhCn9WA2Nbt0JBjFM3ccew/6raYNXX4DKaHhXIQDeAFkU 0394JjMfL6jFCK2XHJXM6Zrni96UXlBAxlpLTdNjKW0EPf2c3+SnMO1fofjP8iMe/Wpg /mDhHAjEmSQPHBrrkLkjIUzflJGwW7TNyWq3awPWkjgCc8YqXxAdbuQxIOVbao6MSMWO jnfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pfUELqGAO8tyN+6luWoipK/YwX6LKz5afJWhLWbYcIg=; b=IOFNeKuBmvTtq2thtjEd/8fVx0ygoV/B/plq6lF1v5SW2X7KhRK6ndz31jLUViTzy8 rKHQmb64268fFBvnw19uB2+U/oME9dCBXzV+y9wrLFlUqYJWTVF9B9WEwQTtBGzjTMzc BvHVBgVvN67RB4KN/naV0OXtcH2B2COpcaDZJLo3aRTCSec5l1tS1NrrzGmaaA5znOyt mQi31fT8BbscnvWcKwHB+oTURAwmno8E3j9mt4obMQquuDlikJiy3yO0HqZRSmm9njNV 6FMQPBKlxvSBy31pAr6jnTqG5Db6MnvDblko4AaIciIGQlNy1W1eRzOzEt0y1Rnu6wEx GpoQ== X-Gm-Message-State: ABuFfogDSso7t/n3iGFu2DfoliGO3Aih6y3R5+coj7xOWMTREj+tLC3s pzMsMAGKL810nqyCaC6r2OkHKGkF1Fk= X-Received: by 2002:a63:9304:: with SMTP id b4-v6mr36491101pge.36.1540071624392; Sat, 20 Oct 2018 14:40:24 -0700 (PDT) Received: from [192.168.89.171] (50-207-252-210-static.hfc.comcastbusiness.net. [50.207.252.210]) by smtp.gmail.com with ESMTPSA id v83-v6sm51265542pfa.103.2018.10.20.14.40.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Oct 2018 14:40:22 -0700 (PDT) Subject: Re: [PATCH 0/2] block: fixes for always associate blkg To: Dennis Zhou Cc: Tejun Heo , Valdis Kletnieks , kernel-team@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181020185612.51587-1-dennis@kernel.org> From: Jens Axboe Message-ID: Date: Sat, 20 Oct 2018 15:40:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181020185612.51587-1-dennis@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/18 12:56 PM, Dennis Zhou wrote: > Hi everyone, > > It was reported in [1] that blk_get_rl() cleanup patch was causing a > null pointer dereference. After some back and forth debugging with > Valdis, it turns out I wasn't properly handling association with > recursive calls to make_request(). > > Another issue was identified with the blk_get_rl() update as it is > possible under certain circumstances that a blkg cannot be allocated > when called in blk_get_rl(). This could result in the blkcg_root being > returned. However, the blkcg_root is a special case where all blkgs > share the request_queue's request_list. > > The original series can be found at [2]. > > [1] https://lore.kernel.org/lkml/13987.1539646128@turing-police.cc.vt.edu/ > [2] https://lore.kernel.org/lkml/20180911184137.35897-1-dennisszhou@gmail.com/ > > This patchset contains the following 2 patches: > 0001-blkcg-fix-edge-case-for-blk_get_rl-under-memory-pres.patch > 0002-blkcg-reassociate-bios-when-make_request-is-called-r.patch > > 0001 addresses an edge case where a blkg cannot be created and can > possibly return a blkg associated with the blkcg_root. 0002 fixes the > stale association when make_request() is called recursively. Thanks Dennis, applied. -- Jens Axboe