Control: tag -1 patch upstream fixed-upstream Control: tag -1 - moreinfo On Tue, 2017-09-26 at 01:35 -0400, Dianne Skoll wrote: > Hi, > > I have not had time to reproduce this yet, but in the meantime, I > think it's the same as this Red Hat bug: https://bugzilla.redhat.com/ > show_bug.cgi?id=1066751 > > I will use the script from that bug to try to reproduce the issue.
Yes, that makes sense. That bug appears to have been fixed upstream in Linux 4.2. You can verify the fix (attached) following instructions at <https://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official>. I'll add this to the next upload anyway and assume it does fix this bug unless you tell me it doesn't. Ben. -- Ben Hutchings Larkinson's Law: All laws are basically false.
From: Carlos Maiolino <cmaiol...@redhat.com> Date: Thu, 25 Jun 2015 12:25:58 -0300 Subject: vfs: avoid creation of inode number 0 in get_next_ino Origin: https://git.kernel.org/linus/2adc376c551943a07170cbe70f43e6d6065f8906 Bug-Debian: https://bugs.debian.org/876762 currently, get_next_ino() is able to create inodes with inode number = 0. This have a bad impact in the filesystems relying in this function to generate inode numbers. While there is no problem at all in having inodes with number 0, userspace tools which handle file management tasks can have problems handling these files, like for example, the impossiblity of users to delete these files, since glibc will ignore them. So, I believe the best way is kernel to avoid creating them. This problem has been raised previously, but the old thread didn't have any other update for a year+, and I've seen too many users hitting the same issue regarding the impossibility to delete files while using filesystems relying on this function. So, I'm starting the thread again, with the same patch that I believe is enough to address this problem. Signed-off-by: Carlos Maiolino <cmaiol...@redhat.com> Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> --- fs/inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/inode.c b/fs/inode.c index 0401d2c6d087..648e71ce6ec2 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -840,7 +840,11 @@ unsigned int get_next_ino(void) } #endif - *p = ++res; + res++; + /* get_next_ino should not provide a 0 inode number */ + if (unlikely(!res)) + res++; + *p = res; put_cpu_var(last_ino); return res; }
signature.asc
Description: This is a digitally signed message part