mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
io_uring-6.6-2023-10-20
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmUyYoUQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgputgD/9RFagHCnHElhccvNL3E5VwUmfru/8fdNA7 Y+otcV24OPHSAVdVkPwyKt4IhhUUsXG/TO4RIb6W9JII1Y4dUT9XBanrWbJUCf08 2LHHuCJo+dvkeSrqW2u755giQGqavj0XQJntAdqA4hOFRXOhGFn+zn272lZdrNb2 HuU9NQNyhsh46e4h21On2Wlv0TqYsiAR/ScqhyofWhah92mzzJRImqls0Q1m5laM ibVjjspThPVfaxeW/9ktRL6Co+JAscQRHzYiN8dSDfeKcJmy3kiNFyps4cjtVCWw IY8m+UF3i/gVFAd84ltBtngeU63YS060pAILbLGcBuH/8kQyyaR7OTBX5jHgIM1O 1llWw3jT2v5UsBo++a0AOp5ZQ6C2pSP9cOj6gM+vGq+fkVyvJPOXs1nXxiSkywHq Fd6/Abk15YkXSBdPAl9U5Hj5zZ3LEN1pQ+BVNYgWAF69WybW0h1HUc+Yh+r87M29 Nw/FBHbWrK5tOxRiETlEU6/hlYfrjhCNHYwV5YWeHJ8OZNUO2JodSlgyZ1rahO46 S8UbGjnDr2XYX98DpS/MyOzQsalFbFCTSSYGhYJevoX/ToQcVsnYW6jjBqypYqMt L9q6k7JtDOhFwMzv/aedCMrkA1sDg8CBkPEoonwHYXBHFhhlLXm40cGcVP7OyUAn pKvWCN6iUQ== =+aok -----END PGP SIGNATURE----- Merge tag 'io_uring-6.6-2023-10-20' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix for a bug report that came in, fixing a case where failure to init a ring with IORING_SETUP_NO_MMAP can trigger a NULL pointer dereference" * tag 'io_uring-6.6-2023-10-20' of git://git.kernel.dk/linux: io_uring: fix crash with IORING_SETUP_NO_MMAP and invalid SQ ring address
This commit is contained in:
commit
747b7628ca
@ -2674,7 +2674,11 @@ static void io_pages_free(struct page ***pages, int npages)
|
||||
|
||||
if (!pages)
|
||||
return;
|
||||
|
||||
page_array = *pages;
|
||||
if (!page_array)
|
||||
return;
|
||||
|
||||
for (i = 0; i < npages; i++)
|
||||
unpin_user_page(page_array[i]);
|
||||
kvfree(page_array);
|
||||
@ -2758,7 +2762,9 @@ static void io_rings_free(struct io_ring_ctx *ctx)
|
||||
ctx->sq_sqes = NULL;
|
||||
} else {
|
||||
io_pages_free(&ctx->ring_pages, ctx->n_ring_pages);
|
||||
ctx->n_ring_pages = 0;
|
||||
io_pages_free(&ctx->sqe_pages, ctx->n_sqe_pages);
|
||||
ctx->n_sqe_pages = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user