Re: [PATCH net v2] net: tun: fix bugs for oversize packet when napi frags enabled

From: Eric Dumazet
Date: Sat Oct 29 2022 - 11:35:32 EST


On Sat, Oct 29, 2022 at 2:41 AM Ziyang Xuan
<william.xuanziyang@xxxxxxxxxx> wrote:
>
> Recently, we got two syzkaller problems because of oversize packet
> when napi frags enabled.
>
> One of the problems is because the first seg size of the iov_iter
> from user space is very big, it is 2147479538 which is bigger than
> the threshold value for bail out early in __alloc_pages(). And
> skb->pfmemalloc is true, __kmalloc_reserve() would use pfmemalloc
> reserves without __GFP_NOWARN flag. Thus we got a warning as following:
>
>

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>