coredump.c (c503c193db7d7ccc0c58b1ef694eaef331318149) | coredump.c (58ec9059b396a570b208239b4edc45eeb68b14c4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/slab.h> 3#include <linux/file.h> 4#include <linux/fdtable.h> 5#include <linux/freezer.h> 6#include <linux/mm.h> 7#include <linux/stat.h> 8#include <linux/fcntl.h> --- 741 unchanged lines hidden (view full) --- 750 * current->fs->root must not be used. Instead, use the 751 * root directory of init_task. 752 */ 753 struct path root; 754 755 task_lock(&init_task); 756 get_fs_root(init_task.fs, &root); 757 task_unlock(&init_task); | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/slab.h> 3#include <linux/file.h> 4#include <linux/fdtable.h> 5#include <linux/freezer.h> 6#include <linux/mm.h> 7#include <linux/stat.h> 8#include <linux/fcntl.h> --- 741 unchanged lines hidden (view full) --- 750 * current->fs->root must not be used. Instead, use the 751 * root directory of init_task. 752 */ 753 struct path root; 754 755 task_lock(&init_task); 756 get_fs_root(init_task.fs, &root); 757 task_unlock(&init_task); |
758 cprm.file = file_open_root(root.dentry, root.mnt, 759 cn.corename, open_flags, 0600); | 758 cprm.file = file_open_root(&root, cn.corename, 759 open_flags, 0600); |
760 path_put(&root); 761 } else { 762 cprm.file = filp_open(cn.corename, open_flags, 0600); 763 } 764 if (IS_ERR(cprm.file)) 765 goto fail_unlock; 766 767 inode = file_inode(cprm.file); --- 368 unchanged lines hidden --- | 760 path_put(&root); 761 } else { 762 cprm.file = filp_open(cn.corename, open_flags, 0600); 763 } 764 if (IS_ERR(cprm.file)) 765 goto fail_unlock; 766 767 inode = file_inode(cprm.file); --- 368 unchanged lines hidden --- |