Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1236687pxa; Thu, 20 Aug 2020 06:25:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhq+WzSNVbzHLG9W3dnWsjxckIcS5E2ZjNFk/w50le7Miud2mEjg59gZCqYmZDEx2DMdrK X-Received: by 2002:a05:6402:12d0:: with SMTP id k16mr2939511edx.199.1597929902830; Thu, 20 Aug 2020 06:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597929902; cv=none; d=google.com; s=arc-20160816; b=FuGrRWJhUzcbunsSNRbWhOvp6u3K4P3O2T4Uvbii4u/5o7lZpQZ6lzOf8yrOLDX9gx +6k1qp4bGWjQInsuKspxCMFOLxJMWHlt5wKK9ZaccSdtnILWD17beuxa1MMG5mdxQ4dz P8u7+K+5T4mz+4Up2r6C7YavS1wFdG20C6KbrUZOkRvRFe+hRfb7X/qRjJqQUk5X7gVX RlBkemg+WsuJLv4PF/PNq3Ag+NZ55mHfW+xqRY9acHhn8Z5SWmzlejycbTcrycbihmMO CKmTCRrJALjvRuqlWU0El36cSi/Z9MsfI6fXoXn44G6ZUqjyW4nSEM/t1L4gHFsSMmtt HGjQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W2EVBYup9IwnyQne2Qz7FQXrRpF4Lr1LRt6iUXkiIW8=; b=ga4oZT5zKLJ/rQV+K1M3DOHdTMu4rLe8zqX5B0cDGJReWjUQ0p+hJUn4x1MV7fd7/I c57zhi+Eump00re/C6x+cZqz0VzPfU8IqJTIxUIaolMeniVv7gQNV73EaSnDz3tu9BQb XSU0IauzgjXWme2RnDAWJdVjVUGy2jkL6DG5auOcTgHJ7p1/CAzHe78JaDHULh2E8P6M DzwjT2yuyf/KUQRsSE9EE5AeP8K/7f0uBjU1ipe5fKIF2cyETQoBShEW+ukKImEZ2w07 Gy2S950pPu6NI2CmuOOhL9utc8npzf2updhimLlm8J0IL0iqgXQcCbD46HQi7PTIHdDf HrEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bzeB29XO; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si1115797ejx.663.2020.08.20.06.24.37; Thu, 20 Aug 2020 06:25:02 -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=@kernel.org header.s=default header.b=bzeB29XO; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730299AbgHTNYB (ORCPT + 99 others); Thu, 20 Aug 2020 09:24:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728223AbgHTJeM (ORCPT ); Thu, 20 Aug 2020 05:34:12 -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 3274222BED; Thu, 20 Aug 2020 09:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916045; bh=Y+fIIY8x7WyEz2cmhqro6qkEptl2S2GE6qcCTO4P/Mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bzeB29XOKfL4G+Uoj5uaqPpcdIkSgeZ3v54f5mmhiumHzb4Su1hJWGbulCs9dZ+T1 uM8nkGhL1IjrwFfIFdNTWrXhEgPRYKSYZ3AdVA1qZW35keyCqcOGcVTiPQ+Ht0aurd 73+8ouFJIUMYrZF1seL497g74NfDjp+KVmZqG9VY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Max Gurtovoy , "Michael S. Tsirkin" , Sasha Levin Subject: [PATCH 5.8 195/232] vdpa_sim: init iommu lock Date: Thu, 20 Aug 2020 11:20:46 +0200 Message-Id: <20200820091622.235916680@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael S. Tsirkin [ Upstream commit 1e3e792650d2c0df8dd796906275b7c79e278664 ] The patch adding the iommu lock did not initialize it. The struct is zero-initialized so this is mostly a problem when using lockdep. Reported-by: kernel test robot Cc: Max Gurtovoy Fixes: 0ea9ee430e74 ("vdpasim: protect concurrent access to iommu iotlb") Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 8ac6f341dcc16..412fa85ba3653 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -331,6 +331,7 @@ static struct vdpasim *vdpasim_create(void) INIT_WORK(&vdpasim->work, vdpasim_work); spin_lock_init(&vdpasim->lock); + spin_lock_init(&vdpasim->iommu_lock); dev = &vdpasim->vdpa.dev; dev->coherent_dma_mask = DMA_BIT_MASK(64); -- 2.25.1