From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH 4.9] dm bufio: avoid false-positive Wmaybe-uninitialized warning
Date: Tue, 12 Jun 2018 18:12:13 +0200 [thread overview]
Message-ID: <20180612161213.GC28706@kroah.com> (raw)
In-Reply-To: <20180611160533.26606-1-natechancellor@gmail.com>
On Mon, Jun 11, 2018 at 09:05:33AM -0700, Nathan Chancellor wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> commit 590347e4000356f55eb10b03ced2686bd74dab40 upstream.
>
> gcc-6.3 and earlier show a new warning after a seemingly unrelated
> change to the arm64 PAGE_KERNEL definition:
>
> In file included from drivers/md/dm-bufio.c:14:0:
> drivers/md/dm-bufio.c: In function 'alloc_buffer':
> include/linux/sched/mm.h:182:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
> current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
> ^
>
> The same warning happened earlier on linux-3.18 for MIPS and I did a
> workaround for that, but now it's come back.
>
> gcc-7 and newer are apparently smart enough to figure this out, and
> other architectures don't show it, so the best I could come up with is
> to rework the caller slightly in a way that makes it obvious enough to
> all arm64 compilers what is happening here.
>
> Fixes: 41acec624087 ("arm64: kpti: Make use of nG dependent on arm64_kernel_unmapped_at_el0()")
> Link: https://patchwork.kernel.org/patch/9692829/
> Cc: stable@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> [snitzer: moved declarations inside conditional, altered vmalloc return]
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> [nc: Backport to 4.9, adjust context for lack of 19809c2da28a]
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Hi Greg,
>
> Resending this with a proper prefix and message, in case the other one
> fell through the cracks. I came across this warning when building with
> Google's stock GCC 4.9 toolchain on the OnePlus 6. Context was adjusted
> around lack of commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM
> implicitly") in 4.9. Please apply when you get a chance.
Now queued up, thanks. The other one was still in my queue, give me a
chance to catch up :)
greg k-h
next prev parent reply other threads:[~2018-06-12 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 16:05 [PATCH 4.9] dm bufio: avoid false-positive Wmaybe-uninitialized warning Nathan Chancellor
2018-06-12 16:12 ` Greg Kroah-Hartman [this message]
2018-06-12 16:37 ` Nathan Chancellor
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=20180612161213.GC28706@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=natechancellor@gmail.com \
--cc=snitzer@redhat.com \
--cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.