From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B93A2C433F5 for ; Thu, 28 Apr 2022 07:56:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5442C827D2; Thu, 28 Apr 2022 07:56:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l1Wv35u7J5QP; Thu, 28 Apr 2022 07:56:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 31FE9817FF; Thu, 28 Apr 2022 07:56:19 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D2ABDC0032; Thu, 28 Apr 2022 07:56:18 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id C8C13C002D for ; Thu, 28 Apr 2022 07:56:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A6F8241956 for ; Thu, 28 Apr 2022 07:56:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Ou67IgYaU2t for ; Thu, 28 Apr 2022 07:56:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5BC2041918 for ; Thu, 28 Apr 2022 07:56:15 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id C5365452; Thu, 28 Apr 2022 09:56:11 +0200 (CEST) Date: Thu, 28 Apr 2022 09:56:10 +0200 From: Joerg Roedel To: Suravee Suthikulpanit Subject: Re: [PATCH] iommu/amd: Do not call sleep while holding spinlock Message-ID: References: <20220314024321.37411-1-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220314024321.37411-1-suravee.suthikulpanit@amd.com> Cc: iommu@lists.linux-foundation.org, jon.grimm@amd.com, linux-kernel@vger.kernel.org, wei.huang2@amd.com, terry.bowman@amd.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Sun, Mar 13, 2022 at 09:43:21PM -0500, Suravee Suthikulpanit wrote: > Smatch static checker warns: > drivers/iommu/amd/iommu_v2.c:133 free_device_state() > warn: sleeping in atomic context > > Fixes by storing the list of struct device_state in a temporary > list, and then free the memory after releasing the spinlock. > > Reported-by: Dan Carpenter > Fixes: dc6a709e5123 ("iommu/amd: Improve amd_iommu_v2_exit()") > Signed-off-by: Suravee Suthikulpanit > --- > drivers/iommu/amd/iommu_v2.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) Applied, thanks Suravee. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu