On Thu, Mar 28, 2019 at 4:38 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > This nasty little syzbot repro: > https://syzkaller.appspot.com/x/repro.syz?x=12c7a94f400000 > > Creates overlay mounts where the same directory is both in upper > and lower layers. Simplified example: > > mkdir foo work > mount -t overlay none foo -o"lowerdir=.,upperdir=foo,workdir=work" Shouldn't the mount fail in this case? Does it make any sense to allow overlapping layers? If doing the check the dumb way, the number of d_ancestor() calls would increase quadratically with the number of layers, but I think it's possible to do it in linear time if necessary. Thanks, Miklos