Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2112245imu; Sat, 22 Dec 2018 12:31:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wwxh+d2rC2iAxPv92IvC2SBA9mHMbT0eITeCKCCDUDwEH2nCWweNBfvF0+SUIt6kTok3M1 X-Received: by 2002:a62:2781:: with SMTP id n123mr7826073pfn.138.1545510670057; Sat, 22 Dec 2018 12:31:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545510670; cv=none; d=google.com; s=arc-20160816; b=ERXn2aOorzOGVau/drqTaPBG3ch4yaKZH0BlEb5HkX5dLvy2jJNHAQeCdIvY21fmOU uH8X1YIF2xZwsQZXQaVXKPV2lbki7u5uBuK/PdOCqK69E9ppkZjIKzdHgmqnOw3fm2hE CtDFEgEu5w4FzZQ5XsZ8PifdGi3q2TQG9TUEE4jF/WfnXq6cNk1A+iyJab6GMUHGhnpn kDOiYeIPbX1/Is2/nkvPbp0/asMufGgh3lENJ9WyVvviVX5QSWF1w5oueqzzdJRbPT5R 54pMUDG86orL7c1gN7fH/4qTFkwecMDDbFvzTuXJ9+hpBpmPEiGOB0Jt9Cen3hzrZbIM uEGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=f2S/HUpNrybDo8EwdKrGzEanCsjWjx4bQPRK1gN9MBY=; b=SpQZPkiehpX6AyYsz3GK0kpvSrjnjSkVd7IYLqFt+5ymSYIeclCbO4M3/zmvTeudVf saNpC6NXzwFCtCH/Tju7nyvzUnoImwf3Dwk6l+O+AOch9HSZfWvPPNAwRd7VxaoJn0XK hfuWct/FYjQYO66vC0YkY8WCNUnygyk+aET7BtDDoukCA/emZ0MUbk9Q95goM7AHXi+1 yUWHcKsRkuQZpgkWKtA22GrcQzZHjXjUvo71ZN+cWimi/Xp8/Wq7iRZ5iykVaPELqTzg enm1raYy0BvRx3VteJKaNn1YUk32DraPvqq+o8eh8BjGPO0mqV25ho6+Tn/T6uQekPzJ pwLQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i63si21780423pgc.116.2018.12.22.12.30.54; Sat, 22 Dec 2018 12:31:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389849AbeLURCr (ORCPT + 99 others); Fri, 21 Dec 2018 12:02:47 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:40396 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389352AbeLURCr (ORCPT ); Fri, 21 Dec 2018 12:02:47 -0500 Received: by mail-it1-f193.google.com with SMTP id h193so7454219ita.5; Fri, 21 Dec 2018 09:02:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f2S/HUpNrybDo8EwdKrGzEanCsjWjx4bQPRK1gN9MBY=; b=qDr++mgo3iurYUnuiZGIBuVbI6kaPtL7Et7S52LODMvs7D1rZszQWPbo0BtCST/i4K M6l0t0Cv571hcv83MXM9JXSCShaOsf2l/nH/sD59nT7LWW1g/Gblni4l2VHTLj2+C1cG wTPICcubP8AjIR1Hjo6N7x3vn2tNgH0TuRhnGzahe/MyCJyYK8pf8/ZoZL276nUhyMce vI4n7abfB3/iMR2KFednlvL5/7lTam19AglzN08SQdmcW0AeMPWkRjfjUsYHI9CDkjCu egGlXH1MMj9VEkaUit4eoKY6T0IbzFpD20VfTk/zUWre4OfEfmGk1/f2OMuSzkNQJzI1 aKvQ== X-Gm-Message-State: AA+aEWZvYfx9Uvqu+j+K8pU0UhJeIKmzW2AaQ7Kp+3k2cCIVxPyggYPl n5Z170p8aW3cfD2ic6CrGTo= X-Received: by 2002:a24:4709:: with SMTP id t9mr2658005itb.47.1545411766213; Fri, 21 Dec 2018 09:02:46 -0800 (PST) Received: from dennisz-mbp (c-68-59-32-93.hsd1.mn.comcast.net. [68.59.32.93]) by smtp.gmail.com with ESMTPSA id y76sm6966359ita.18.2018.12.21.09.02.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 09:02:45 -0800 (PST) Date: Fri, 21 Dec 2018 11:02:43 -0600 From: Dennis Zhou To: Jens Axboe Cc: Dennis Zhou , kernel-team@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blkcg: add rcu lock to bio_clone_blkg_association() Message-ID: <20181221170243.GA17140@dennisz-mbp> References: <20181221145441.13814-1-dennis@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 08:26:02AM -0700, Jens Axboe wrote: > On 12/21/18 7:54 AM, Dennis Zhou wrote: > > I cleaned up blkg_tryget_closest() to require rcu_read_lock() earlier. > > However, this was a subtle case too which clearly was too subtle for me. > > The idea was the src bio should be holding a ref to the blkg so rcu > > wasn't technically needed. If it doesn't hold a ref, it should be %NULL > > and the blkg->parent pointers are unused. > > > > This adds the appropriate read lock in bio_clone_blkg_association(). > > Shall I just fold this with the previous? I staged it in a > later-in-merge-cycle branch, so that's not an issue to amend. > Yeah that would be great! Thanks, Dennis