summaryrefslogtreecommitdiff
path: root/io_uring/openclose.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-02-01 17:45:32 +0000
committerMark Brown <broonie@kernel.org>2024-02-01 17:45:32 +0000
commite81fdba0208666b65bafeaba814874b4d6e5edde (patch)
tree5de26e8be4ca1801ca27bffe25c129d29b13dba9 /io_uring/openclose.c
parent5513c5d0fb3d509cdd0a11afc18441c57eb7c94c (diff)
parent28876c1ae8b8cd1dacef50bd6c0555824774f0d2 (diff)
ALSA: Various fixes for Cirrus Logic CS35L56 support
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These patches fixe various things that were undocumented, unknown or uncertain when the original driver code was written. And also a few things that were just bugs.
Diffstat (limited to 'io_uring/openclose.c')
-rw-r--r--io_uring/openclose.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io_uring/openclose.c b/io_uring/openclose.c
index 0fe0dd305546..e3357dfa14ca 100644
--- a/io_uring/openclose.c
+++ b/io_uring/openclose.c
@@ -277,6 +277,10 @@ int io_install_fixed_fd_prep(struct io_kiocb *req, const struct io_uring_sqe *sq
if (flags & ~IORING_FIXED_FD_NO_CLOEXEC)
return -EINVAL;
+ /* ensure the task's creds are used when installing/receiving fds */
+ if (req->flags & REQ_F_CREDS)
+ return -EPERM;
+
/* default to O_CLOEXEC, disable if IORING_FIXED_FD_NO_CLOEXEC is set */
ifi = io_kiocb_to_cmd(req, struct io_fixed_install);
ifi->o_flags = O_CLOEXEC;