Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kvack.org/~bcrl/aio-next

Pull aio fix from Benjamin LaHaise:
"AIO fix from Gu Zheng that fixes a GPF that Dave Jones uncovered with
trinity"

* git://git.kvack.org/~bcrl/aio-next:
aio: clean up aio ring in the fail path

+6 -2
+6 -2
fs/aio.c
··· 367 367 if (nr_pages > AIO_RING_PAGES) { 368 368 ctx->ring_pages = kcalloc(nr_pages, sizeof(struct page *), 369 369 GFP_KERNEL); 370 - if (!ctx->ring_pages) 370 + if (!ctx->ring_pages) { 371 + put_aio_ring_file(ctx); 371 372 return -ENOMEM; 373 + } 372 374 } 373 375 374 376 ctx->mmap_size = nr_pages * PAGE_SIZE; ··· 647 645 aio_nr + nr_events < aio_nr) { 648 646 spin_unlock(&aio_nr_lock); 649 647 err = -EAGAIN; 650 - goto err; 648 + goto err_ctx; 651 649 } 652 650 aio_nr += ctx->max_reqs; 653 651 spin_unlock(&aio_nr_lock); ··· 664 662 665 663 err_cleanup: 666 664 aio_nr_sub(ctx->max_reqs); 665 + err_ctx: 666 + aio_free_ring(ctx); 667 667 err: 668 668 free_percpu(ctx->cpu); 669 669 free_percpu(ctx->reqs.pcpu_count);