Re: [PATCH] 9p/trans_virtio: use kvfree() for iov_iter_get_pages_alloc()

2016-08-03 Thread Michael S. Tsirkin
On Wed, Aug 03, 2016 at 11:32:33AM +0200, Vegard Nossum wrote: > On 07/22/2016 01:12 PM, Vegard Nossum wrote: > > The memory allocated by iov_iter_get_pages_alloc() can be allocated with > > vmalloc() if kmalloc() failed -- see get_pages_array(). > > > > In that case we need to free it with vfree(

Re: [PATCH] 9p/trans_virtio: use kvfree() for iov_iter_get_pages_alloc()

2016-08-03 Thread Vegard Nossum
On 07/22/2016 01:12 PM, Vegard Nossum wrote: The memory allocated by iov_iter_get_pages_alloc() can be allocated with vmalloc() if kmalloc() failed -- see get_pages_array(). In that case we need to free it with vfree(), so let's use kvfree(). The bug manifests like this: BUG: unable to handle