Re: [PATCH V4 2/2] ptr_ring: try vmalloc() when kmalloc() fails

From: Jason Wang
Date: Sat Feb 10 2018 - 21:46:06 EST




On 2018å02æ09æ 23:53, Michael S. Tsirkin wrote:
On Fri, Feb 09, 2018 at 05:45:50PM +0800, Jason Wang wrote:
This patch switch to use kvmalloc_array() for using a vmalloc()
fallback to help in case kmalloc() fails.
Above isn't really saying anything about the motivation, it
just explains what kvmalloc_array does.

How about:

Switch ptr_ring from kmalloc to kvmalloc. This way it can support larger
ring sizes.

Reported-by:syzbot+e4d4f9ddd4295539735d@xxxxxxxxxxxxxxxxxxxxxxxxx
Fixes: 2e0ab8ca83c12 ("ptr_ring: array based FIFO for pointers")
I don't see this as a bugfix - it's more of an enhancement.

Do we need this in net or can we defer this to net-next?

Consider they are users of tx_queue_len of more than 1000000 from google searching. We'd better have this in -net.

Thanks


I'm not sure myself. For now

Acked-by: Michael S. Tsirkin<mst@xxxxxxxxxx>