From patchwork Wed May 13 09:45:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 226009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F11C2D0FD for ; Wed, 13 May 2020 09:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4B0E20575 for ; Wed, 13 May 2020 09:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363485; bh=90R9d456XOzRYbcfVgnZtYoyVzTMA4FXJCi9jzO42zE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=bD0LORMD26pYxujN+8xTbYVeNFrwenXJ4NxvzKzQvFqAnU1FIwDNENria98K8oFOw oCZX9pm+vfuP431MYKOcrQMGi168q7oOdnsI9Tsa5oYZOadhvOSlyYF04LYil952rW dgqDH3ApnkP6AV9+3pHByXGMguwZnBLZwxOox9hI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387647AbgEMJvZ (ORCPT ); Wed, 13 May 2020 05:51:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:52096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732717AbgEMJvW (ORCPT ); Wed, 13 May 2020 05:51:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D91D206D6; Wed, 13 May 2020 09:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363482; bh=90R9d456XOzRYbcfVgnZtYoyVzTMA4FXJCi9jzO42zE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c66uPGtOnA2bm3TrgevUyX7TJUoWOwqpG0Mj7aRgu4frzM60B6Jq5tVRnIxhvcxu9 fk4IXl+6Hr4bDx9qze01wiK0fsxk/Rs55juAwsyXH7xIVNEK5p0wyeIVWyVXiknoIe dpEHSaWF9meFtmjGu9XLxF/Hdg++Upd0AQ6FqhQU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julia Lawall , Jean-Philippe Brucker , Joerg Roedel Subject: [PATCH 5.4 84/90] iommu/virtio: Reverse arguments to list_add Date: Wed, 13 May 2020 11:45:20 +0200 Message-Id: <20200513094417.937658233@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513094408.810028856@linuxfoundation.org> References: <20200513094408.810028856@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Julia Lawall commit fb3637a113349f53830f7d6ca45891b7192cd28f upstream. 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 Signed-off-by: Greg Kroah-Hartman Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/1588704467-13431-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Joerg Roedel --- drivers/iommu/virtio-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio-iommu.c @@ -454,7 +454,7 @@ static int viommu_add_resv_mem(struct vi if (!region) return -ENOMEM; - list_add(&vdev->resv_regions, ®ion->list); + list_add(®ion->list, &vdev->resv_regions); return 0; }