Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ovl: fix file leak in ovl_real_fdget_meta()

ovl_open_realfile() is wrongly called twice after conversion to
new struct fd.

Fixes: 88a2f6468d01 ("struct fd: representation change")
Reported-by: syzbot+d9efec94dcbfa0de1c07@syzkaller.appspotmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Amir Goldstein and committed by
Linus Torvalds
0c33037c 34e1a5d4

+1 -1
+1 -1
fs/overlayfs/file.c
··· 117 117 struct file *f = ovl_open_realfile(file, &realpath); 118 118 if (IS_ERR(f)) 119 119 return PTR_ERR(f); 120 - real->word = (unsigned long)ovl_open_realfile(file, &realpath) | FDPUT_FPUT; 120 + real->word = (unsigned long)f | FDPUT_FPUT; 121 121 return 0; 122 122 } 123 123