]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop two patches that I applied to the wrong branch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Mar 2025 06:58:33 +0000 (07:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Mar 2025 06:58:33 +0000 (07:58 +0100)
queue-6.6/io_uring-add-ring-freeing-helper.patch [deleted file]
queue-6.6/io_uring-return-error-pointer-from-io_mem_alloc.patch [deleted file]
queue-6.6/series

diff --git a/queue-6.6/io_uring-add-ring-freeing-helper.patch b/queue-6.6/io_uring-add-ring-freeing-helper.patch
deleted file mode 100644 (file)
index fd3c4a2..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From 8c273186074a591cfdcd4370849676bc3eeb6ecb Mon Sep 17 00:00:00 2001
-From: Jens Axboe <axboe@kernel.dk>
-Date: Fri, 5 Nov 2021 17:15:46 -0600
-Subject: io_uring: add ring freeing helper
-
-From: Jens Axboe <axboe@kernel.dk>
-
-Commit 9c189eee73af1825ea9c895fafad469de5f82641 upstream.
-
-We do rings and sqes separately, move them into a helper that does both
-the freeing and clearing of the memory.
-
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- io_uring/io_uring.c | 17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
-index ebcb0680f1cc..b211feb0d2b1 100644
---- a/io_uring/io_uring.c
-+++ b/io_uring/io_uring.c
-@@ -2525,6 +2525,14 @@ static void io_mem_free(void *ptr)
-               free_compound_page(page);
- }
-+static void io_rings_free(struct io_ring_ctx *ctx)
-+{
-+      io_mem_free(ctx->rings);
-+      io_mem_free(ctx->sq_sqes);
-+      ctx->rings = NULL;
-+      ctx->sq_sqes = NULL;
-+}
-+
- static void *io_mem_alloc(size_t size)
- {
-       gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP;
-@@ -2684,8 +2692,7 @@ static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx)
-               mmdrop(ctx->mm_account);
-               ctx->mm_account = NULL;
-       }
--      io_mem_free(ctx->rings);
--      io_mem_free(ctx->sq_sqes);
-+      io_rings_free(ctx);
-       percpu_ref_exit(&ctx->refs);
-       free_uid(ctx->user);
-@@ -3452,15 +3459,13 @@ static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx,
-       else
-               size = array_size(sizeof(struct io_uring_sqe), p->sq_entries);
-       if (size == SIZE_MAX) {
--              io_mem_free(ctx->rings);
--              ctx->rings = NULL;
-+              io_rings_free(ctx);
-               return -EOVERFLOW;
-       }
-       ptr = io_mem_alloc(size);
-       if (IS_ERR(ptr)) {
--              io_mem_free(ctx->rings);
--              ctx->rings = NULL;
-+              io_rings_free(ctx);
-               return PTR_ERR(ptr);
-       }
--- 
-2.47.2
-
diff --git a/queue-6.6/io_uring-return-error-pointer-from-io_mem_alloc.patch b/queue-6.6/io_uring-return-error-pointer-from-io_mem_alloc.patch
deleted file mode 100644 (file)
index b3487be..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From b001225fa4fe09610b35b428e46193ed2a28c95f Mon Sep 17 00:00:00 2001
-From: Jens Axboe <axboe@kernel.dk>
-Date: Fri, 5 Nov 2021 17:13:52 -0600
-Subject: io_uring: return error pointer from io_mem_alloc()
-
-From: Jens Axboe <axboe@kernel.dk>
-
-Commit e27cef86a0edd4ef7f8b4670f508a03b509cbbb2 upstream.
-
-In preparation for having more than one time of ring allocator, make the
-existing one return valid/error-pointer rather than just NULL.
-
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- io_uring/io_uring.c | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
-index 33597284e1cb..ebcb0680f1cc 100644
---- a/io_uring/io_uring.c
-+++ b/io_uring/io_uring.c
-@@ -2528,8 +2528,12 @@ static void io_mem_free(void *ptr)
- static void *io_mem_alloc(size_t size)
- {
-       gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP;
-+      void *ret;
--      return (void *) __get_free_pages(gfp, get_order(size));
-+      ret = (void *) __get_free_pages(gfp, get_order(size));
-+      if (ret)
-+              return ret;
-+      return ERR_PTR(-ENOMEM);
- }
- static unsigned long rings_size(struct io_ring_ctx *ctx, unsigned int sq_entries,
-@@ -3422,6 +3426,7 @@ static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx,
- {
-       struct io_rings *rings;
-       size_t size, sq_array_offset;
-+      void *ptr;
-       /* make sure these are sane, as we already accounted them */
-       ctx->sq_entries = p->sq_entries;
-@@ -3432,8 +3437,8 @@ static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx,
-               return -EOVERFLOW;
-       rings = io_mem_alloc(size);
--      if (!rings)
--              return -ENOMEM;
-+      if (IS_ERR(rings))
-+              return PTR_ERR(rings);
-       ctx->rings = rings;
-       ctx->sq_array = (u32 *)((char *)rings + sq_array_offset);
-@@ -3452,13 +3457,14 @@ static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx,
-               return -EOVERFLOW;
-       }
--      ctx->sq_sqes = io_mem_alloc(size);
--      if (!ctx->sq_sqes) {
-+      ptr = io_mem_alloc(size);
-+      if (IS_ERR(ptr)) {
-               io_mem_free(ctx->rings);
-               ctx->rings = NULL;
--              return -ENOMEM;
-+              return PTR_ERR(ptr);
-       }
-+      ctx->sq_sqes = ptr;
-       return 0;
- }
--- 
-2.47.2
-
index 0488fcb0ee06a29176eff8e651059c35de200a20..05f76b3c91ec75b736d2d36b4198a2a901ca9065 100644 (file)
@@ -108,5 +108,3 @@ io_uring-kbuf-vmap-pinned-buffer-ring.patch
 io_uring-kbuf-use-vm_insert_pages-for-mmap-ed-pbuf-ring.patch
 io_uring-use-unpin_user_pages-where-appropriate.patch
 io_uring-fix-error-pbuf-checking.patch
-io_uring-add-ring-freeing-helper.patch
-io_uring-return-error-pointer-from-io_mem_alloc.patch