Skip to content

Commit 91a9ab7

Browse files
committed
io_uring: convert io_uring to the secure anon inode interface
Converting io_uring's anonymous inode to the secure anon inode API enables LSMs to enforce policy on the io_uring anonymous inodes if they chose to do so. This is an important first step towards providing the necessary mechanisms so that LSMs can apply security policy to io_uring operations. Signed-off-by: Paul Moore <[email protected]>
1 parent 3a862ca commit 91a9ab7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/io_uring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10155,8 +10155,8 @@ static struct file *io_uring_get_file(struct io_ring_ctx *ctx)
1015510155
return ERR_PTR(ret);
1015610156
#endif
1015710157

10158-
file = anon_inode_getfile("[io_uring]", &io_uring_fops, ctx,
10159-
O_RDWR | O_CLOEXEC);
10158+
file = anon_inode_getfile_secure("[io_uring]", &io_uring_fops, ctx,
10159+
O_RDWR | O_CLOEXEC, NULL);
1016010160
#if defined(CONFIG_UNIX)
1016110161
if (IS_ERR(file)) {
1016210162
sock_release(ctx->ring_sock);

0 commit comments

Comments
 (0)