On Fri, Dec 5, 2014 at 3:20 AM, Michael Laß <l...@mail.upb.de> wrote: > Hi, > > an ArchLinux user reported an issue with OpenAFS on recent Linux kernels > to me. When unmounting /afs after using it he gets the following error: > >> openafs: inode freed while on LRU >> ------------[ cut here ]------------ >> kernel BUG at >> /var/lib/dkms/openafs/1.6.11pre1/build/src/libafs/MODLOAD-3.17.4-1-ARCH-SP/osi_vfsops.c:291! > > This happens using OpenAFS 1.6.10 (11549, 11550 applied on top) and > 1.6.11pre1. > > It seems that this issue was introduced after Linux 3.17.2, so I had a > look at the changes and found this one here introduced in 3.17.3: > https://lkml.org/lkml/2014/11/11/1597 > > If I understand this correctly the kernel now frees the inode reference > that's still used in OpenAFS. Is that correct? If not, some further > debugging might be necessary and the user will jump into this thread. > > Greetings, > Michael
Thanks for the pointer, yes that kernel patch would cause a problem, as in the case of an error from d_splice_alias we proceed to d_add an inode to which we've lost our reference. What probably needs to happen is that we should grab an extra reference before calling d_splice_alias, and we should drop it for the non error case, and for the error case after checking that d_splice_alias has not already done so. I'll try to come up with a proposed fix. Marc _______________________________________________ OpenAFS-devel mailing list OpenAFS-devel@openafs.org https://lists.openafs.org/mailman/listinfo/openafs-devel