New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DECLARE_WAIT_QUEUE_HEAD_ONSTACK triggers -Wuninitialized #499
Comments
Multiple instances of this:
Reported-by: kernelci.org bot bot@kernelci.org |
Patch submitted: https://lore.kernel.org/lkml/20190703081119.209976-1-arnd@arndb.de/ |
Andrew Morton pushed back a bit while still tentatively picking up the patch: https://lore.kernel.org/lkml/20190711174949.dc74310efd1fd3c8bd4ea276@linux-foundation.org/ https://www.ozlabs.org/~akpm/mmotm/broken-out/waitqueue-fix-clang-wuninitialized-warnings.patch
With the following interestingness script:
I cleaned it up as I don't think the second parameter of |
https://llvm.org/pr42604 (just seeing your creduce case @nathanchance now, sorry. Looks like the same thing I wrote up in the BR). |
No worries, I think yours makes it clearer what is going on here :) |
The Clang-9 release manager Hans picked this up for clang-9: r367150 |
-Wunintialized was disabled in commit c562746 ("drm/i915: Disable -Wuninitialized") because there were two warnings that were false positives. The first was due to DECLARE_WAIT_QUEUE_HEAD_ONSTACK, which was fixed in LLVM 9.0.0. The second was in busywait_stop, which was fixed in LLVM 10.0.0 (issue 415). The kernel's minimum version for LLVM is 10.0.1 so this warning can be safely enabled, where it has already caught a couple bugs. Link: ClangBuiltLinux#220 Link: ClangBuiltLinux#415 Link: ClangBuiltLinux#499 Link: llvm/llvm-project@2e04039 Link: llvm/llvm-project@c667cdc Fixes: c562746 ("drm/i915: Disable -Wuninitialized") References: 2ea4a7b ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show") References: 2034c21 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state") Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
-Wunintialized was disabled in commit c562746 ("drm/i915: Disable -Wuninitialized") because there were two warnings that were false positives. The first was due to DECLARE_WAIT_QUEUE_HEAD_ONSTACK, which was fixed in LLVM 9.0.0. The second was in busywait_stop, which was fixed in LLVM 10.0.0 (issue 415). The kernel's minimum version for LLVM is 10.0.1 so this warning can be safely enabled, where it has already caught a couple bugs. Link: ClangBuiltLinux/linux#220 Link: ClangBuiltLinux/linux#415 Link: ClangBuiltLinux/linux#499 Link: llvm/llvm-project@2e04039 Link: llvm/llvm-project@c667cdc Fixes: c562746 ("drm/i915: Disable -Wuninitialized") References: 2ea4a7b ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show") References: 2034c21 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state") Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20210216212953.24458-1-nathan@kernel.org (cherry picked from commit b242318) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Arnd has a proposed fix that has not been sent out yet: https://lore.kernel.org/lkml/CAK8P3a20t1f6Fmjd7HcGVSXCxx9SP2q7_WpZyj16MgnJe8m8zQ@mail.gmail.com/
The text was updated successfully, but these errors were encountered: