linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsinfo: Fix uninitialized variable in fsinfo_generic_mount_all()
@ 2020-05-15 12:09 Dan Carpenter
  2020-05-19 16:18 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-05-15 12:09 UTC (permalink / raw)
  To: David Howells; +Cc: linux-fsdevel, kernel-janitors

The "conn" variable is never set to false.

Fixes: f2494de388bd ("fsinfo: Add an attribute that lists all the visible mounts in a namespace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
The buggy commit looks like preliminary stuff not pushed to anywhere so
probably this can just be folded in.

 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 3fd24575756b..ae489cbac467 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4433,7 +4433,7 @@ int fsinfo_generic_mount_all(struct path *path, struct fsinfo_context *ctx)
 	struct mnt_namespace *ns;
 	struct mount *m, *p;
 	struct path chroot;
-	bool conn;
+	bool conn = false;
 
 	m = real_mount(path->mnt);
 	ns = m->mnt_ns;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsinfo: Fix uninitialized variable in fsinfo_generic_mount_all()
  2020-05-15 12:09 [PATCH] fsinfo: Fix uninitialized variable in fsinfo_generic_mount_all() Dan Carpenter
@ 2020-05-19 16:18 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2020-05-19 16:18 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: dhowells, linux-fsdevel, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> wrote:

> The "conn" variable is never set to false.
> 
> Fixes: f2494de388bd ("fsinfo: Add an attribute that lists all the visible mounts in a namespace")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> The buggy commit looks like preliminary stuff not pushed to anywhere so
> probably this can just be folded in.

I folded in someone else's equivalent patch, thanks.

David


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-19 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 12:09 [PATCH] fsinfo: Fix uninitialized variable in fsinfo_generic_mount_all() Dan Carpenter
2020-05-19 16:18 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).