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.

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fix from Al Viro:
"Fixes an obvious bug (memory leak introduced in 5.8)"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
pipe: Fix memory leaks in create_pipe_files()

+11 -6
+5 -6
fs/pipe.c
··· 894 894 { 895 895 struct inode *inode = get_pipe_inode(); 896 896 struct file *f; 897 + int error; 897 898 898 899 if (!inode) 899 900 return -ENFILE; 900 901 901 902 if (flags & O_NOTIFICATION_PIPE) { 902 - #ifdef CONFIG_WATCH_QUEUE 903 - if (watch_queue_init(inode->i_pipe) < 0) { 903 + error = watch_queue_init(inode->i_pipe); 904 + if (error) { 905 + free_pipe_info(inode->i_pipe); 904 906 iput(inode); 905 - return -ENOMEM; 907 + return error; 906 908 } 907 - #else 908 - return -ENOPKG; 909 - #endif 910 909 } 911 910 912 911 f = alloc_file_pseudo(inode, pipe_mnt, "",
+6
include/linux/watch_queue.h
··· 122 122 */ 123 123 #define watch_sizeof(STRUCT) (sizeof(STRUCT) << WATCH_INFO_LENGTH__SHIFT) 124 124 125 + #else 126 + static inline int watch_queue_init(struct pipe_inode_info *pipe) 127 + { 128 + return -ENOPKG; 129 + } 130 + 125 131 #endif 126 132 127 133 #endif /* _LINUX_WATCH_QUEUE_H */