Files
apfstests/tests/overlay/034.out
T
Amir Goldstein c7169fada6 overlay: test dropping nlink below zero
nlink of overlay inode could be dropped indefinitely by adding
un-accounted lower hardlinks underneath a mounted overlay and
trying to remove them.

The simplest way to understand this test is this:
Imagine that you have a tool (e.g. xfs_db) with which you can add
hardlinks, without changing the value of nlink stored on-disk for
the inode. This is exactly what this test does when it adds lower
hardlinks underneath a mounted overlay.

Commit 5f8415d6b87e ("ovl: persistent overlay inode nlink for
indexed inodes") fixes this issue, although the issue was never
exposed in any released kernel.

With overlayfs indexed copy up and without the fix, the test
triggers WARN_ON(inode->i_nlink == 0) in drop_link().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-06 13:39:10 +08:00

3 lines
43 B
Plaintext

QA output created by 034
Silence is golden