* [PATCH 3.18-stable] dm bufio: hide bogus warning
@ 2017-04-21 13:41 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-04-21 13:41 UTC (permalink / raw)
To: stable
Cc: Arnd Bergmann, Mike Snitzer, gregkh, linux-kernel, linux-raid,
dm-devel, Alasdair Kergon
mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:
In file included from ../include/linux/blkdev.h:4:0,
from ../drivers/md/dm-bufio.h:12,
from ../drivers/md/dm-bufio.c:9:
../drivers/md/dm-bufio.c: In function 'alloc_buffer':
../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here
The warning disappeared on later kernels with this commit: be0c37c985ed
("MIPS: Rearrange PTE bits into fixed positions.") I assume this only
happened because it changed some inlining decisions.
On 3.18.y, we can shut up the warning by adding an extra initialization.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/md/dm-bufio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index ecbd3ffcf359..91fe43b98c96 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -349,6 +349,7 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask,
* as if GFP_NOIO was specified.
*/
+ noio_flag = 0;
if (gfp_mask & __GFP_NORETRY)
noio_flag = memalloc_noio_save();
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3.18-stable] dm bufio: hide bogus warning
@ 2017-04-21 13:41 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-04-21 13:41 UTC (permalink / raw)
To: stable
Cc: gregkh, Arnd Bergmann, Alasdair Kergon, Mike Snitzer, dm-devel,
linux-raid, linux-kernel
mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:
In file included from ../include/linux/blkdev.h:4:0,
from ../drivers/md/dm-bufio.h:12,
from ../drivers/md/dm-bufio.c:9:
../drivers/md/dm-bufio.c: In function 'alloc_buffer':
../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here
The warning disappeared on later kernels with this commit: be0c37c985ed
("MIPS: Rearrange PTE bits into fixed positions.") I assume this only
happened because it changed some inlining decisions.
On 3.18.y, we can shut up the warning by adding an extra initialization.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/md/dm-bufio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index ecbd3ffcf359..91fe43b98c96 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -349,6 +349,7 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask,
* as if GFP_NOIO was specified.
*/
+ noio_flag = 0;
if (gfp_mask & __GFP_NORETRY)
noio_flag = memalloc_noio_save();
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 3.18-stable] dm bufio: hide bogus warning
2017-04-21 13:41 ` Arnd Bergmann
(?)
@ 2017-04-27 9:57 ` Greg KH
-1 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2017-04-27 9:57 UTC (permalink / raw)
To: Arnd Bergmann
Cc: stable, Alasdair Kergon, Mike Snitzer, dm-devel, linux-raid,
linux-kernel
On Fri, Apr 21, 2017 at 03:41:10PM +0200, Arnd Bergmann wrote:
> mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:
>
> In file included from ../include/linux/blkdev.h:4:0,
> from ../drivers/md/dm-bufio.h:12,
> from ../drivers/md/dm-bufio.c:9:
> ../drivers/md/dm-bufio.c: In function 'alloc_buffer':
> ../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
> current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> ../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here
>
> The warning disappeared on later kernels with this commit: be0c37c985ed
> ("MIPS: Rearrange PTE bits into fixed positions.") I assume this only
> happened because it changed some inlining decisions.
>
> On 3.18.y, we can shut up the warning by adding an extra initialization.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Now applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Patch "dm bufio: hide bogus warning" has been added to the 3.18-stable tree
2017-04-21 13:41 ` Arnd Bergmann
(?)
(?)
@ 2017-04-27 10:04 ` gregkh
-1 siblings, 0 replies; 4+ messages in thread
From: gregkh @ 2017-04-27 10:04 UTC (permalink / raw)
To: arnd, agk, gregkh, snitzer; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
dm bufio: hide bogus warning
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-bufio-hide-bogus-warning.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From arnd@arndb.de Thu Apr 27 11:57:34 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 21 Apr 2017 15:41:10 +0200
Subject: dm bufio: hide bogus warning
To: stable@vger.kernel.org
Cc: gregkh@linuxfoundation.org, Arnd Bergmann <arnd@arndb.de>, Alasdair Kergon <agk@redhat.com>, Mike Snitzer <snitzer@redhat.com>, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Message-ID: <20170421134212.2727744-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
mips-gcc-5.3 warns about correct code on linux-3.18 and earlier:
In file included from ../include/linux/blkdev.h:4:0,
from ../drivers/md/dm-bufio.h:12,
from ../drivers/md/dm-bufio.c:9:
../drivers/md/dm-bufio.c: In function 'alloc_buffer':
../include/linux/sched.h:1975:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../drivers/md/dm-bufio.c:325:11: note: 'noio_flag' was declared here
The warning disappeared on later kernels with this commit: be0c37c985ed
("MIPS: Rearrange PTE bits into fixed positions.") I assume this only
happened because it changed some inlining decisions.
On 3.18.y, we can shut up the warning by adding an extra initialization.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-bufio.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -349,6 +349,7 @@ static void *alloc_buffer_data(struct dm
* as if GFP_NOIO was specified.
*/
+ noio_flag = 0;
if (gfp_mask & __GFP_NORETRY)
noio_flag = memalloc_noio_save();
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-3.18/acpi-power-avoid-maybe-uninitialized-warning.patch
queue-3.18/gadgetfs-fix-uninitialized-variable-in-error-handling.patch
queue-3.18/clk-at91-usb-fix-determine_rate-prototype-again.patch
queue-3.18/arm-psci-fix-header-file.patch
queue-3.18/dm-bufio-hide-bogus-warning.patch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-27 10:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21 13:41 [PATCH 3.18-stable] dm bufio: hide bogus warning Arnd Bergmann
2017-04-21 13:41 ` Arnd Bergmann
2017-04-27 9:57 ` Greg KH
2017-04-27 10:04 ` Patch "dm bufio: hide bogus warning" has been added to the 3.18-stable tree gregkh
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.