msm: net: add the fix for the skb data alloc fail case
In some cases, the skb->data alloc fail, then it will get a wrong point value from the kmalloc_caches array. The value is little then 0x10,but in the slab reference, these value are all zero value. So change the zero judgement. CRs-Fixed: 573650 Change-Id: Iba138838821f515b131029cf240a5a99959bb2ff Signed-off-by: Pan Fang <fangpan@codeaurora.org>
This commit is contained in:
parent
1d6d830efd
commit
de51e415cc
|
@ -252,7 +252,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
|
|||
size = SKB_DATA_ALIGN(size);
|
||||
size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
data = kmalloc_reserve(size, gfp_mask, node, &pfmemalloc);
|
||||
if (!data)
|
||||
if (unlikely(ZERO_OR_NULL_PTR(data)))
|
||||
goto nodata;
|
||||
/* kmalloc(size) might give us more room than requested.
|
||||
* Put skb_shared_info exactly at the end of allocated zone,
|
||||
|
|
Loading…
Reference in New Issue