Re: [PATCH] virtio: Return correct errno for function init_vq's failure

2016-07-13 Thread Cornelia Huck
On Wed, 13 Jul 2016 19:54:00 +0800 Minfei Huang wrote: > On 07/06/16 at 11:18P, Cornelia Huck wrote: > > On Mon, 27 Jun 2016 10:09:18 +0800 > > Minfei Huang wrote: > > > > > The error number -ENOENT or 0 will be returned, if we can not allocate > > > more memory in function init_vq. If host can

Re: [PATCH] virtio: Return correct errno for function init_vq's failure

2016-07-13 Thread Minfei Huang
On 07/06/16 at 11:18P, Cornelia Huck wrote: > On Mon, 27 Jun 2016 10:09:18 +0800 > Minfei Huang wrote: > > > The error number -ENOENT or 0 will be returned, if we can not allocate > > more memory in function init_vq. If host can support multiple virtual > > queues, and we fails to allocate necess

Re: [PATCH] virtio: Return correct errno for function init_vq's failure

2016-07-06 Thread Cornelia Huck
On Mon, 27 Jun 2016 10:09:18 +0800 Minfei Huang wrote: > The error number -ENOENT or 0 will be returned, if we can not allocate > more memory in function init_vq. If host can support multiple virtual > queues, and we fails to allocate necessary memory structures for vq, > kernel may crash due to

[PATCH] virtio: Return correct errno for function init_vq's failure

2016-07-01 Thread Minfei Huang
The error number -ENOENT or 0 will be returned, if we can not allocate more memory in function init_vq. If host can support multiple virtual queues, and we fails to allocate necessary memory structures for vq, kernel may crash due to incorrect returning. To fix it, kernel will return correct value