Miklos Szeredi 445d2dc63e ovl: fix warning in ovl_create_real()
commit 1f5573cfe7a7056e80a92c7a037a3e69f3a13d1c upstream.

Syzbot triggered the following warning in ovl_workdir_create() ->
ovl_create_real():

	if (!err && WARN_ON(!newdentry->d_inode)) {

The reason is that the cgroup2 filesystem returns from mkdir without
instantiating the new dentry.

Weird filesystems such as this will be rejected by overlayfs at a later
stage during setup, but to prevent such a warning, call ovl_mkdir_real()
directly from ovl_workdir_create() and reject this case early.

Reported-and-tested-by: syzbot+75eab84fd0af9e8bf66b@syzkaller.appspotmail.com
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-22 09:19:04 +01:00
..
2020-11-05 11:08:53 +01:00
2021-06-30 08:48:14 -04:00
2019-08-06 19:06:51 +02:00
2021-07-20 16:15:46 +02:00
2021-09-22 11:48:02 +02:00
2021-11-26 11:36:12 +01:00
2021-11-26 11:36:23 +01:00
2020-03-05 16:42:12 +01:00
2020-03-25 08:06:14 +01:00
2021-05-22 10:59:50 +02:00
2021-12-14 10:18:07 +01:00