mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix endless loop in automount code
@ 2013-11-27 10:37 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2013-11-27 10:37 UTC (permalink / raw)
  To: barebox; +Cc: jbe

A chdir to a path registered as an automount path followed by a 'ls'
results in an endless loop. This happens because the command the
automounter executes results in another automount request.
Fix this by running the automounter from the chdir code before
the cwd is actually changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/fs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fs.c b/fs/fs.c
index 4563a81..32dba8c 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -579,6 +579,8 @@ int chdir(const char *pathname)
 	if (ret)
 		goto out;
 
+	automount_mount(p, 0);
+
 	strcpy(cwd, p);
 
 out:
-- 
1.8.4.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-27 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 10:37 [PATCH] Fix endless loop in automount code Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox