* Re: [PATCH] drm/virtio: use kvmalloc for large allocations
       [not found] <20201105014744.1662226-1-senozhatsky@chromium.org>
@ 2020-11-05  6:52 ` Gerd Hoffmann
  2020-11-05  7:00   ` Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2020-11-05  6:52 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: David Airlie, linux-kernel, dri-devel, virtualization,
	Daniel Vetter, Suleiman Souhlal
  Hi,
> -	*ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry),
> -			      GFP_KERNEL);
> +	*ents = kvmalloc_array(*nents,
> +			       sizeof(struct virtio_gpu_mem_entry),
> +			       GFP_KERNEL);
Shouldn't that be balanced with a kvfree() elsewhere?
take care,
  Gerd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [PATCH] drm/virtio: use kvmalloc for large allocations
  2020-11-05  6:52 ` [PATCH] drm/virtio: use kvmalloc for large allocations Gerd Hoffmann
@ 2020-11-05  7:00   ` Sergey Senozhatsky
  2020-11-05 11:34     ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2020-11-05  7:00 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, linux-kernel, dri-devel, virtualization,
	Sergey Senozhatsky, Daniel Vetter, Suleiman Souhlal
Hi,
On (20/11/05 07:52), Gerd Hoffmann wrote:
> > -	*ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry),
> > -			      GFP_KERNEL);
> > +	*ents = kvmalloc_array(*nents,
> > +			       sizeof(struct virtio_gpu_mem_entry),
> > +			       GFP_KERNEL);
> 
> Shouldn't that be balanced with a kvfree() elsewhere?
I think it already is. ents pointer is assigned to vbuf->data_buf,
and free_vbuf() already uses kvfree(vbuf->data_buf) to free it.
	-ss
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [PATCH] drm/virtio: use kvmalloc for large allocations
  2020-11-05  7:00   ` Sergey Senozhatsky
@ 2020-11-05 11:34     ` Gerd Hoffmann
  0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-11-05 11:34 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: David Airlie, linux-kernel, dri-devel, virtualization,
	Sergey Senozhatsky, Daniel Vetter, Suleiman Souhlal
On Thu, Nov 05, 2020 at 04:00:54PM +0900, Sergey Senozhatsky wrote:
> Hi,
> 
> On (20/11/05 07:52), Gerd Hoffmann wrote:
> > > -	*ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry),
> > > -			      GFP_KERNEL);
> > > +	*ents = kvmalloc_array(*nents,
> > > +			       sizeof(struct virtio_gpu_mem_entry),
> > > +			       GFP_KERNEL);
> > 
> > Shouldn't that be balanced with a kvfree() elsewhere?
> 
> I think it already is. ents pointer is assigned to vbuf->data_buf,
> and free_vbuf() already uses kvfree(vbuf->data_buf) to free it.
Ah, right, we needed that before elsewhere.
Ok then, pushed to drm-misc-next.
thanks,
  Gerd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply	[flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-05 11:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20201105014744.1662226-1-senozhatsky@chromium.org>
2020-11-05  6:52 ` [PATCH] drm/virtio: use kvmalloc for large allocations Gerd Hoffmann
2020-11-05  7:00   ` Sergey Senozhatsky
2020-11-05 11:34     ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).