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-fixes

Pull aio bugfixes from Ben LaHaise:
"Two small fixes"

* git://git.kvack.org/~bcrl/aio-fixes:
aio: block exit_aio() until all context requests are completed
aio: add missing smp_rmb() in read_events_ring

+12 -1
+12 -1
fs/aio.c
··· 793 793 794 794 for (i = 0; i < table->nr; ++i) { 795 795 struct kioctx *ctx = table->table[i]; 796 + struct completion requests_done = 797 + COMPLETION_INITIALIZER_ONSTACK(requests_done); 796 798 797 799 if (!ctx) 798 800 continue; ··· 806 804 * that it needs to unmap the area, just set it to 0. 807 805 */ 808 806 ctx->mmap_size = 0; 809 - kill_ioctx(mm, ctx, NULL); 807 + kill_ioctx(mm, ctx, &requests_done); 808 + 809 + /* Wait until all IO for the context are done. */ 810 + wait_for_completion(&requests_done); 810 811 } 811 812 812 813 RCU_INIT_POINTER(mm->ioctx_table, NULL); ··· 1115 1110 head = ring->head; 1116 1111 tail = ring->tail; 1117 1112 kunmap_atomic(ring); 1113 + 1114 + /* 1115 + * Ensure that once we've read the current tail pointer, that 1116 + * we also see the events that were stored up to the tail. 1117 + */ 1118 + smp_rmb(); 1118 1119 1119 1120 pr_debug("h%u t%u m%u\n", head, tail, ctx->nr_events); 1120 1121