[FS#579] Rename failure when file both in rom and overlay in mvebu / wrt3200acm, due to kernel 4.9 or ubi?

LEDE Bugs lede-bugs at lists.infradead.org
Thu Mar 2 02:23:48 PST 2017


The following task has a new comment added:

FS#579 - Rename failure when file both in rom and overlay in mvebu / wrt3200acm, due to kernel 4.9 or ubi? 
User who did this - Hannu Nyman (hnyman)

----------
Fix proposal here. Any comments from ubifs / overlayfs specialists?

I patched my system with this:

target/linux/generic/patches-4.9/552-ubifs-overlayfs-fix-rename.patch 


--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -1088,8 +1088,10 @@
 	struct timespec time;
 	unsigned int uninitialized_var(saved_nlink);
 
+	/*
	if (flags & ~RENAME_NOREPLACE)
		return -EINVAL;
+	*/
 
 	/*
 	 * Budget request settings: deletion direntry, new direntry, removing


At the first glance it looks ok:
Renaming a problematic file works again, and both the deletion record and the newly named file are visible in /overlay. And /etc looks normal:


root at LEDE:~# mv /etc/dropbear/dropbear_rsa_host_key  /etc/dropbear/dropbear_rsa_host_key-x
root at LEDE:~# ls -l /rom/etc/dropbear/
-rw-r--r--    1 root     root             0 Mar  2 10:09 dropbear_rsa_host_key
root at LEDE:~# ls -l /overlay/upper/etc/dropbear/
-rwxr--r--    1 root     root           959 Feb 18 18:09 authorized_keys
c---------    1 root     root        0,   0 Mar  2 10:16 dropbear_rsa_host_key
-rw-------    1 root     root           804 Feb 20 17:13 dropbear_rsa_host_key-x
root at LEDE:~# ls -l /etc/dropbear/
-rwxr--r--    1 root     root           959 Feb 18 18:09 authorized_keys
-rw-------    1 root     root           804 Feb 20 17:13 dropbear_rsa_host_key-x

----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=579#comment2038



More information about the lede-bugs mailing list