Re: [Qemu-devel] [PATCH] [RFC v2] aio: properly bubble up errors from initialization

2018-06-19 Thread Nishanth Aravamudan via Qemu-devel
On 19.06.2018 [15:35:57 -0700], Nishanth Aravamudan wrote: > On 19.06.2018 [13:14:51 -0700], Nishanth Aravamudan wrote: > > On 19.06.2018 [14:35:33 -0500], Eric Blake wrote: > > > On 06/15/2018 12:47 PM, Nishanth Aravamudan via Qemu-devel wrote: > > > > > > > } else if (s->use_linux_ai

Re: [Qemu-devel] [PATCH] [RFC v2] aio: properly bubble up errors from initialization

2018-06-19 Thread Nishanth Aravamudan via Qemu-devel
On 19.06.2018 [13:14:51 -0700], Nishanth Aravamudan wrote: > On 19.06.2018 [14:35:33 -0500], Eric Blake wrote: > > On 06/15/2018 12:47 PM, Nishanth Aravamudan via Qemu-devel wrote: > > > } else if (s->use_linux_aio) { > > > +int rc; > > > +rc = aio_setup_linux_a

Re: [Qemu-devel] [PATCH] [RFC v2] aio: properly bubble up errors from initialization

2018-06-19 Thread Nishanth Aravamudan via Qemu-devel
On 19.06.2018 [14:35:33 -0500], Eric Blake wrote: > On 06/15/2018 12:47 PM, Nishanth Aravamudan via Qemu-devel wrote: > > laio_init() can fail for a couple of reasons, which will lead to a NULL > > pointer dereference in laio_attach_aio_context(). > > > > To solve this, add a aio_setup_linux_aio()

Re: [Qemu-devel] [PATCH] [RFC v2] aio: properly bubble up errors from initialization

2018-06-19 Thread Eric Blake
On 06/15/2018 12:47 PM, Nishanth Aravamudan via Qemu-devel wrote: laio_init() can fail for a couple of reasons, which will lead to a NULL pointer dereference in laio_attach_aio_context(). To solve this, add a aio_setup_linux_aio() function which is called before aio_get_linux_aio() where it is c

[Qemu-devel] [PATCH] [RFC v2] aio: properly bubble up errors from initialization

2018-06-15 Thread Nishanth Aravamudan via Qemu-devel
laio_init() can fail for a couple of reasons, which will lead to a NULL pointer dereference in laio_attach_aio_context(). To solve this, add a aio_setup_linux_aio() function which is called before aio_get_linux_aio() where it is called currently, and which propogates setup errors up. The signature