diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-03-17 16:29:25 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-03-17 16:29:25 -0700 |
commit | 1118aa4c70a6978afb0c4391ad29826c14b842b3 (patch) | |
tree | 7286d535c06b720d45f0427f9060b42bf8ab1425 /io_uring/rsrc.c | |
parent | 79a22238b4f22c45cadd3b4040d644f4de320d1b (diff) | |
parent | 478a351ce0d69cef2d2bf2a686a09b356b63a66c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
net/wireless/nl80211.c
b27f07c50a73 ("wifi: nl80211: fix puncturing bitmap policy")
cbbaf2bb829b ("wifi: nl80211: add a command to enable/disable HW timestamping")
https://lore.kernel.org/all/20230314105421.3608efae@canb.auug.org.au
tools/testing/selftests/net/Makefile
62199e3f1658 ("selftests: net: Add VXLAN MDB test")
13715acf8ab5 ("selftest: Add test for bind() conflicts.")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'io_uring/rsrc.c')
-rw-r--r-- | io_uring/rsrc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 2e0a14e87187..ad10bae33b23 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -410,7 +410,7 @@ __cold static int io_rsrc_data_alloc(struct io_ring_ctx *ctx, unsigned nr, struct io_rsrc_data **pdata) { struct io_rsrc_data *data; - int ret = -ENOMEM; + int ret = 0; unsigned i; data = kzalloc(sizeof(*data), GFP_KERNEL); @@ -1234,7 +1234,13 @@ static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov, } } if (folio) { - folio_put_refs(folio, nr_pages - 1); + /* + * The pages are bound to the folio, it doesn't + * actually unpin them but drops all but one reference, + * which is usually put down by io_buffer_unmap(). + * Note, needs a better helper. + */ + unpin_user_pages(&pages[1], nr_pages - 1); nr_pages = 1; } } |