From: Joerg Roedel <joro@8bytes.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, clang-built-linux@googlegroups.com,
Andrey Ryabinin <arbn@yandex-team.com>,
Will Deacon <will@kernel.org>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH 4.9 1/2] iommu/amd: Fix backport of 140456f994195b568ecd7fc2287a34eadffef3ca
Date: Wed, 28 Jul 2021 09:59:12 +0200 [thread overview]
Message-ID: <YQEOUD0uP6v/i3Y0@8bytes.org> (raw)
In-Reply-To: <20210727225650.726875-1-nathan@kernel.org>
On Tue, Jul 27, 2021 at 03:56:49PM -0700, Nathan Chancellor wrote:
> 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 <arbn@yandex-team.com>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Will Deacon <will@kernel.org>
> Fixes: 1d648460d7c5 ("iommu/amd: Fix sleeping in atomic in increase_address_space()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Joerg Roedel <jroedel@suse.de>
prev parent reply other threads:[~2021-07-28 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 22:56 [PATCH 4.9 1/2] iommu/amd: Fix backport of 140456f994195b568ecd7fc2287a34eadffef3ca Nathan Chancellor
2021-07-27 22:56 ` [PATCH 4.9 2/2] tipc: Fix backport of b77413446408fdd256599daf00d5be72b5f3e7c6 Nathan Chancellor
2021-07-28 18:05 ` Greg Kroah-Hartman
2021-07-28 7:59 ` Joerg Roedel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YQEOUD0uP6v/i3Y0@8bytes.org \
--to=joro@8bytes.org \
--cc=arbn@yandex-team.com \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=lkp@intel.com \
--cc=nathan@kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox