Merge 94f0b2d4a1 ("proc: only require mm_struct for writing") into android-mainline

Steps on the way to 5.13-rc7

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If84940afe39be4ff143088c6da494920709287a9
This commit is contained in:
Greg Kroah-Hartman
2021-06-16 13:38:32 +02:00
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -203,8 +203,8 @@ static int __init afs_init(void)
goto error_fs;
afs_proc_symlink = proc_symlink("fs/afs", NULL, "../self/net/afs");
if (IS_ERR(afs_proc_symlink)) {
ret = PTR_ERR(afs_proc_symlink);
if (!afs_proc_symlink) {
ret = -ENOMEM;
goto error_proc;
}
+3 -1
View File
@@ -2677,7 +2677,9 @@ out:
#ifdef CONFIG_SECURITY
static int proc_pid_attr_open(struct inode *inode, struct file *file)
{
return __mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
file->private_data = NULL;
__mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
return 0;
}
static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,