On 08/20/2015 04:15 PM, sf...@users.sourceforge.net wrote: > Xavier Chantry: >> With a simple test case (see attachment), we were able to reproduce a >> kernel bug in msync system call. > Thank you for reporting. > I will try reproducing as soon as possible. > Currently (probably whole this month) I am too busy and don't have time > for aufs development. > I will post again after confirming the problem. > > > J. R. Okajima
I can reproduce the bug on all my machines, so it shouldn't be too difficult to reproduce. Applying the following hunk is enough to trigger the bug. So it looks like the problem exists since kernel 3.8 where that patch was reworked and renamed from aufs3-proc_map.patch to aufs3-mmap.patch. Which means all debian kernel >= 3.8 should be affected. diff --git a/mm/msync.c b/mm/msync.c index bb04d53..18a9fe3 100644 --- a/mm/msync.c +++ b/mm/msync.c @@ -84,10 +84,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) start = vma->vm_end; if ((flags & MS_SYNC) && file && (vma->vm_flags & VM_SHARED)) { - get_file(file); + get_file(vma->vm_file); up_read(&mm->mmap_sem); error = vfs_fsync_range(file, fstart, fend, 1); - fput(file); + fput(vma->vm_file); if (error || start >= end) goto out; down_read(&mm->mmap_sem); ------------------------------------------------------------------------------