Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3853300ybi; Mon, 27 May 2019 07:08:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfufC2cpq4wH6amUH8s5sEkP/oFPQk8vCZ+0VODQWwY6zD792B+PKleJOa3GX+0wtFhQth X-Received: by 2002:a63:de43:: with SMTP id y3mr1353813pgi.271.1558966114143; Mon, 27 May 2019 07:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558966114; cv=none; d=google.com; s=arc-20160816; b=ebtqVq/DzK70CITZhTws3FIcB3FBzye5+4nPbXzgaEuJ9Q18QBrFt72tXR20MQiQ/h kKriujuylnAdd34fAEtTr98LLhdnf5qKTKofnWNNYhRfaYkJnKM8TI4NGeFg+2NX3Kyv +k7Bm3mNpf+Qjhc0BbWTChZfaG1kGdxxQyzL47Dxut2Z0Vwr+NzEZBhXpQ5z24medVf2 i+FK5pM7gazOmiOZDBNnNV0JKTLbtOdd72wHQjouPCeaLaabozAE2D7HmW+ON9B71uB3 xodJfFsoYN55SlIJFT+MCmGr9pNVCz5aOE7scClSO2Fl1+mANP0kxs3u96duWzrjWUvJ 3lpg== 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=k/uXH97zQ0GZQqsUxhI2Vw+xQakTagvXwyLdORdTn5M=; b=fgdpQbJa3soNoJr/3zWVPrPGrrdCTib/KeJ75JuOdh97NYQiXbsUwkrACbzhN7uAtO 5Vta/ZtdstUPwNbVyh9t3kZUFAkRK/PPG1YSf8QsGcin++Cv7YEtAPGzgjF5tQtOmag1 wIbaubg5lFb19iJR2ESjdqKbUsasLy1RcOBcqCwMrS5B6josOdZ0J0MRjE6Rd8Uhu2CA AvCANmCrC11B6wn516UwDGM0H6Ol65K0kZEkP38nNS2+yJd3vsUlEPySuwDl5MW4r0ob hOFMKA/zSrsqarJR3Wlq79Q+6fbnUSvyAZrDj+yqBQ/9nfzuq6k2wt7X5AMRIOrO7fWz 6SSw== 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=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r69si17848440pgr.120.2019.05.27.07.08.02; Mon, 27 May 2019 07:08:34 -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; 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=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbfE0OFV (ORCPT + 99 others); Mon, 27 May 2019 10:05:21 -0400 Received: from 8bytes.org ([81.169.241.247]:40248 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfE0OFV (ORCPT ); Mon, 27 May 2019 10:05:21 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 6FB302E2; Mon, 27 May 2019 16:05:19 +0200 (CEST) Date: Mon, 27 May 2019 16:05:15 +0200 From: Joerg Roedel To: Lukasz Odzioba Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, dwmw2@infradead.org, grzegorz.andrejczuk@intel.com Subject: Re: [PATCH 1/1] iommu/vt-d: Remove unnecessary rcu_read_locks Message-ID: <20190527140514.GE8420@8bytes.org> References: <1558359688-21804-1-git-send-email-lukasz.odzioba@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558359688-21804-1-git-send-email-lukasz.odzioba@intel.com> 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 Mon, May 20, 2019 at 03:41:28PM +0200, Lukasz Odzioba wrote: > We use RCU's for rarely updated lists like iommus, rmrr, atsr units. > > I'm not sure why domain_remove_dev_info() in domain_exit() was surrounded > by rcu_read_lock. Lock was present before refactoring in d160aca527, > but it was related to rcu list, not domain_remove_dev_info function. > > dmar_remove_one_dev_info() doesn't touch any of those lists, so it doesn't > require a lock. In fact it is called 6 times without it anyway. > > Fixes: d160aca5276d ("iommu/vt-d: Unify domain->iommu attach/detachment") > > Signed-off-by: Lukasz Odzioba Applied, thanks.