diff options
author | Ingo Molnar <mingo@kernel.org> | 2022-02-21 11:53:51 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2022-02-21 11:53:51 +0100 |
commit | 6255b48aebfd4dff375e97fc8b075a235848db0b (patch) | |
tree | bcedf2b959a843a18cf7ebcc9120a0dd1c4e234f /drivers/misc/fastrpc.c | |
parent | arm64: Support PREEMPT_DYNAMIC (diff) | |
parent | Linux 5.17-rc5 (diff) | |
download | linux-dev-6255b48aebfd4dff375e97fc8b075a235848db0b.tar.xz linux-dev-6255b48aebfd4dff375e97fc8b075a235848db0b.zip |
Merge tag 'v5.17-rc5' into sched/core, to resolve conflicts
New conflicts in sched/core due to the following upstream fixes:
44585f7bc0cb ("psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n")
a06247c6804f ("psi: Fix uaf issue when psi trigger is destroyed while being polled")
Conflicts:
include/linux/psi_types.h
kernel/sched/psi.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/misc/fastrpc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 4ccbf43e6bfa..aa1682b94a23 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1288,7 +1288,14 @@ static int fastrpc_dmabuf_alloc(struct fastrpc_user *fl, char __user *argp) } if (copy_to_user(argp, &bp, sizeof(bp))) { - dma_buf_put(buf->dmabuf); + /* + * The usercopy failed, but we can't do much about it, as + * dma_buf_fd() already called fd_install() and made the + * file descriptor accessible for the current process. It + * might already be closed and dmabuf no longer valid when + * we reach this point. Therefore "leak" the fd and rely on + * the process exit path to do any required cleanup. + */ return -EFAULT; } |