generic: test two vfsmount no peers
authorZorro Lang <zlang@redhat.com>
Tue, 14 Feb 2017 00:55:45 +0000 (19:55 -0500)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Feb 2017 09:55:57 +0000 (17:55 +0800)
commit8a02ca3bcc62d2944325857a4e5f8529a16f8aeb
treee68be732545179ae2c29bf4ea722e1f933184313
parent101cb277500f1a8bd47c0d1e30c366b43597d669
generic: test two vfsmount no peers

This test cover linux commit 7ae8fd0, when mnt_group_id=0, it means
this mount no peers. But this bug treat two zero mnt_group_id as
peers. And it cause a crash by dereference a NULL address.

As below, the crash will happen when mount fs on "B/mnt1/mnt2":

           shared            New FS           shared
     -----------------------[A/mnt1]----------------------
    |                           |                         |
    |                bind       |    bind                 |
[C/mnt1]--[slave C]<------[shared A]------>[slave B]--[B/mnt1]
                                                          |
                                                          |
                                                    [B/mnt1/mnt2]
                                                       (New FS)

Signed-off-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/411 [new file with mode: 0755]
tests/generic/411.out [new file with mode: 0644]
tests/generic/group