Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1648736ybj; Wed, 6 May 2020 02:37:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJk571KWoOFuw8hjH6AbDDeu5Dn6Pz7LSSUT4s3UaWIZkdnbvbimSxcobd0Y7afYkGk64s7 X-Received: by 2002:aa7:db0b:: with SMTP id t11mr5673660eds.304.1588757871811; Wed, 06 May 2020 02:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588757871; cv=none; d=google.com; s=arc-20160816; b=EvxDiyzzRjh6zjUvpxEan4kT5yZg+/XeeISmkSbmYp7JW7DPTNmLfDqbz/5/OnWKnC QhMBeagO0iT0S4WvhoJBX5TpBU651GYbRngeRvNMlRcSKLDo+KAWNTHa12bMO2Sef5oW p5IXIc0N9gKvW6F5DJaXCWXUhDuqAWiSY/OgChGvgeUOeR2S5omk1l+lat+Jt0QIYfGu Mop6F8Zc7mSIMFi6EKyo/EdVfG4OoeU3KEKrz7UMLhyM1prAy8wjUEpoAlER4Sp/lhI8 9YpaAMcBb0r3ndgriwa4kZG5m/4GkDr0cdFrgN3cbxiYi9lkPth8xcKRbKkFlnSEYzgK me9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hCCpyyCsOwf45inMt3o257A10/7eYZVNmL7O126puyY=; b=mDX7M6BGMjKGs+zHaATwtD8MinDU7DJM64G1uyOnJRDSOCu0kWV9M5VOz1WnkNcAR1 vkV+yYpgYzS9uUA8ptgy/0XcKGBdMNw6k8eqR0kyMfotyp/SXwqtLgK+Uik4qu9zt2vp 5iSgtPfzlmgtI9OZKtd7ZVETfE1ISPKhBzQtU6JjB9OnN0P70Zx9YtQlsZvaYxKRYd0B iImMjxuVHY+JMG+GIUMqqgjz9F/ktU+QIzi48ohjOwvdjm7azrPEC6fyrQ9POPYv44/p TCOzjucP6o0sZ4SM84UPZbXVmDrlaUOrMcTCfVRDtXjtMFqHV+8RPnTiZXyLTNugfvGD VEtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qQmDygjw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si787485ejj.269.2020.05.06.02.37.28; Wed, 06 May 2020 02:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qQmDygjw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgEFJfh (ORCPT + 99 others); Wed, 6 May 2020 05:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728640AbgEFJfh (ORCPT ); Wed, 6 May 2020 05:35:37 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B849C061A10 for ; Wed, 6 May 2020 02:35:35 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id l18so1353057wrn.6 for ; Wed, 06 May 2020 02:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hCCpyyCsOwf45inMt3o257A10/7eYZVNmL7O126puyY=; b=qQmDygjweLPcARZKtEeUbSr/HBXsPReN+4F8YbS6vvDa0tGq1EHXWrXA75PwpaRdjY mXiK+Z9ZeDkNeevpk4kqT3qKXBtxVsqTd0+msRTI9uCUkUr51sm73HUAZVDRr7C6OHBY vdEovuXdY87GlYoUTYozZ5pLMPDzr1vD4JSeHk8GGhmi9SWbc61tM5SHbcQPYjMeB1Bf 9A6HoSI1Ck8eLfK6x8dOfo/L8/KpJJw3ITP42d6xcQyVuM46JE5qGEKHxJeGScrEg9by mk9TRYdKUIwdHujQ2wm11KE5z73mZ2TaE1PTlkPj3X+H+EG513sFepobGLXfwUyqe9BL zF1g== 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; bh=hCCpyyCsOwf45inMt3o257A10/7eYZVNmL7O126puyY=; b=jp0z142SivMjvL1LQUHfkFf5bMVYJkrg/CSdL5jzAtkx/JStJXnhKk+mRgqolewYIN QOhlJkqFviudb4pMS7m1Zt1rbyYtH8BioUuAkZ0GevMfOWPjf7zhGB95vkTREwxRDtbd CItoj9ijqq7vqSGFU1uUgH+qlUglVx0jLKdH2qSAtYOwSgV39awelVgmg+tIykGMbyJ8 6Qk7ntIhKbtwa2D8m1a6T3pXwRbFqp4RYgSkbKZgljkRlKohHfwsX2eGVwW4xOM5H5dG Pfg3uDic7zHLAPc0fYdTtBK8nfKvq/UscovGHhrR3qkKC+Kk+pTA7e/rQEKGRcpOfFoQ UU3w== X-Gm-Message-State: AGi0PuZ293jvlY4w7Uq7/n+975JSlndbcmBR9/3He4HA5+7Aizo9ke3w Smc9Qe4bRjvAoCl8UCSzjY4YmQ== X-Received: by 2002:a5d:6082:: with SMTP id w2mr8373863wrt.163.1588757734052; Wed, 06 May 2020 02:35:34 -0700 (PDT) Received: from myrica ([2001:171b:226e:c200:c43b:ef78:d083:b355]) by smtp.gmail.com with ESMTPSA id x7sm1677336wmi.17.2020.05.06.02.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 02:35:33 -0700 (PDT) Date: Wed, 6 May 2020 11:35:24 +0200 From: Jean-Philippe Brucker To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Joerg Roedel , virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, eugene.volanschi@inria.fr Subject: Re: [PATCH] iommu/virtio: reverse arguments to list_add Message-ID: <20200506093524.GA497896@myrica> References: <1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 05, 2020 at 08:47:47PM +0200, Julia Lawall wrote: > Elsewhere in the file, there is a list_for_each_entry with > &vdev->resv_regions as the second argument, suggesting that > &vdev->resv_regions is the list head. So exchange the > arguments on the list_add call to put the list head in the > second argument. > > Fixes: 2a5a31487445 ("iommu/virtio: Add probe request") > Signed-off-by: Julia Lawall Thanks for the fix. The reason this hasn't blown up so far is iommu_alloc_resv_region() initializes region->list, but adding more than one item would break the list. Reviewed-by: Jean-Philippe Brucker > --- > drivers/iommu/virtio-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c > index d5cac4f46ca5..4e1d11af23c8 100644 > --- a/drivers/iommu/virtio-iommu.c > +++ b/drivers/iommu/virtio-iommu.c > @@ -453,7 +453,7 @@ static int viommu_add_resv_mem(struct viommu_endpoint *vdev, > if (!region) > return -ENOMEM; > > - list_add(&vdev->resv_regions, ®ion->list); > + list_add(®ion->list, &vdev->resv_regions); > return 0; > } > >