From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Cc: jbe@pengutronix.de
Subject: [PATCH] Fix endless loop in automount code
Date: Wed, 27 Nov 2013 11:37:38 +0100 [thread overview]
Message-ID: <1385548658-13958-1-git-send-email-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2013-11-27 10:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1385548658-13958-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jbe@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox