Re: [PATCH net V2 1/2] tuntap: limit head length of skb allocated

2013-11-14 Thread David Miller
From: Jason Wang Date: Wed, 13 Nov 2013 14:00:39 +0800 > We currently use hdr_len as a hint of head length which is advertised by > guest. But when guest advertise a very big value, it can lead to an 64K+ > allocating of kmalloc() which has a very high possibility of failure when host > memory is

[PATCH net V2 1/2] tuntap: limit head length of skb allocated

2013-11-12 Thread Jason Wang
We currently use hdr_len as a hint of head length which is advertised by guest. But when guest advertise a very big value, it can lead to an 64K+ allocating of kmalloc() which has a very high possibility of failure when host memory is fragmented or under heavy stress. The huge hdr_len also reduce t