[PATCH] Fix endless loop in automount code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux