Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1638765pxy; Mon, 2 Aug 2021 06:50:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCnNuby7O9H0RWlYPPCZ0gfrNM+KdAwvF321aXB+G5iA8KYkDXZauDD/TaMt9wM8+Mz3SC X-Received: by 2002:a6b:f101:: with SMTP id e1mr1287320iog.118.1627912244959; Mon, 02 Aug 2021 06:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912244; cv=none; d=google.com; s=arc-20160816; b=QHSM7tPGaYe2zdW3+uGousjsnpz7y4H2qfo43pNAXvYT16KYb0VZmMmge4/F3KB7E1 iMbHaKOXEZsyuk21MArnTk5yJ+3PMI2A0OytChNjo9XuRCqKipdVivcv5HcSeyNB6bXQ 9ILIbAKhHJBemBumyic+evcf/Y2z1VHHqs7m5T+Ss8xU19vnFRB+uIrnF+ShJKGaKOBo HmdE06MN6Ie1e5NI1v6vNdtSTj3CUEEQqYPbPVgOvr6kkehIaODZgaTr8r7xvc4F/dvg cmdMBzbe62a6NfBTW55IIidNK9Fj+qJUzjZMEjnuM/s+6LkuXtAA6mevcyO3EkB4mqO+ LuPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ftDHUO9SN5Jdzc9/Nl2RZca0NCuY+C6BV9Sk1LbPp/U=; b=k3iHPTliKmaxLRRlTA8nsifPbqjbibIqOYlNNUP7z5zMiAQPxavkbJj0FWPmjIpAjC dlB6VLUpQJseStAzUyTOVjAzxlYFGazEkaOpU+1qXJx8Tli0dCBIHkFNKpmH2tRSstJ1 sGqC+bcORRBjYL7FNb9zQxYdZxaM2SX0LO+SBKVPPgoBpM1/PtvjjjYU2/J2vjDDvV0v nV+AxrkN7gKvr+0hCpzWrwLWBi6kMux5icRDCKgzLYNcVd9CE1WKS62KJ65ESBXBUn0a UBqbxVlhCJ470vDsBpsDBOnD7hgbzSHEBqg6Tk5s0jhWBXEvHDGr/z8W4IgZpswaEPY4 MZeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jn2otSIU; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si708969jam.9.2021.08.02.06.50.33; Mon, 02 Aug 2021 06:50:44 -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=@linuxfoundation.org header.s=korg header.b=Jn2otSIU; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234168AbhHBNsq (ORCPT + 99 others); Mon, 2 Aug 2021 09:48:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234262AbhHBNrC (ORCPT ); Mon, 2 Aug 2021 09:47:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C738560527; Mon, 2 Aug 2021 13:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912013; bh=Gudp8J5W1gnJEbJwes9Zn2naYxoaEFxWmhDv7mTC0Sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jn2otSIUwbT7JHpbXRT63fOnUAWHWXoyVNYo8MsADJ/ys2L0bPoLrDZEhcHsPdjUM xVnwVkLG9XAToSApqRNhKIHo96RU9nnO+Zfzj2G9qg2HjPe6ScTb0OD94b0Y8zK3cQ 7r3pRYElN7EDKkSEpQwZmKs0QcikWW4WCBXllIbQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrey Ryabinin , Joerg Roedel , Will Deacon , kernel test robot , Nathan Chancellor , Joerg Roedel Subject: [PATCH 4.9 01/32] iommu/amd: Fix backport of 140456f994195b568ecd7fc2287a34eadffef3ca Date: Mon, 2 Aug 2021 15:44:21 +0200 Message-Id: <20210802134332.978902579@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.931915241@linuxfoundation.org> References: <20210802134332.931915241@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor Clang warns: drivers/iommu/amd_iommu.c:1335:6: warning: variable 'flags' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!pte) ^~~~ drivers/iommu/amd_iommu.c:1352:40: note: uninitialized use occurs here spin_unlock_irqrestore(&domain->lock, flags); ^~~~~ drivers/iommu/amd_iommu.c:1335:2: note: remove the 'if' if its condition is always false if (!pte) ^~~~~~~~~ drivers/iommu/amd_iommu.c:1331:21: note: initialize the variable 'flags' to silence this warning unsigned long flags; ^ = 0 1 warning generated. The backport of commit 140456f99419 ("iommu/amd: Fix sleeping in atomic in increase_address_space()") to 4.9 as commit 1d648460d7c5 ("iommu/amd: Fix sleeping in atomic in increase_address_space()") failed to keep the "return false", which in 4.9 needs to be a regular "return" due to a lack of commit f15d9a992f90 ("iommu/amd: Remove domain->updated"). This resolves the warning and matches the 4.14-4.19 backport. Cc: Andrey Ryabinin Cc: Joerg Roedel Cc: Will Deacon Fixes: 1d648460d7c5 ("iommu/amd: Fix sleeping in atomic in increase_address_space()") Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Acked-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1333,7 +1333,7 @@ static void increase_address_space(struc pte = (void *)get_zeroed_page(gfp); if (!pte) - goto out; + return; spin_lock_irqsave(&domain->lock, flags);