projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RISCV: config: tizen_visionfive2: Enable USB_DUMMY_HCD as module for usb hcd tetst
[platform/kernel/linux-starfive.git]
/
io_uring
/
kbuf.c
diff --git
a/io_uring/kbuf.c
b/io_uring/kbuf.c
index
e2c4688
..
acc37e5
100644
(file)
--- a/
io_uring/kbuf.c
+++ b/
io_uring/kbuf.c
@@
-228,17
+228,18
@@
static int __io_remove_buffers(struct io_ring_ctx *ctx,
return i;
}
return i;
}
- /* the head kbuf is the list itself */
+ /* protects io_buffers_cache */
+ lockdep_assert_held(&ctx->uring_lock);
+
while (!list_empty(&bl->buf_list)) {
struct io_buffer *nxt;
nxt = list_first_entry(&bl->buf_list, struct io_buffer, list);
while (!list_empty(&bl->buf_list)) {
struct io_buffer *nxt;
nxt = list_first_entry(&bl->buf_list, struct io_buffer, list);
- list_
del(&nxt->list
);
+ list_
move(&nxt->list, &ctx->io_buffers_cache
);
if (++i == nbufs)
return i;
cond_resched();
}
if (++i == nbufs)
return i;
cond_resched();
}
- i++;
return i;
}
return i;
}
@@
-509,7
+510,7
@@
int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
}
pages = io_pin_pages(reg.ring_addr,
}
pages = io_pin_pages(reg.ring_addr,
-
struct
_size(br, bufs, reg.ring_entries),
+
flex_array
_size(br, bufs, reg.ring_entries),
&nr_pages);
if (IS_ERR(pages)) {
kfree(free_bl);
&nr_pages);
if (IS_ERR(pages)) {
kfree(free_bl);