Bug Patch
Doug Wilson
doug.lkml at gmail.com
Mon Sep 8 08:45:28 EDT 2014
Tobi, Nick,
> I think Nick's patch is regarding dev_alloc_skb(nSubframe_Length + 12) ;
> There is no error check for the return value of dev_alloc_skb , and
> it can return NULL if it fails and the memory is not allocated.
> I admit return -ENOMEM is wrong , but still I think Nick has found
> something this time.
>
Nick, the patch you sent is doing the right thing, but like Tobi
mentioned -ENOMEM is wrong.
dev_alloc_skb internally calls __netdev_alloc_skb and the comment on
top of the function says
*%NULL is returned if there is no free memory*. So could you change
the patch accordingly.
for eg: if (sub_skb == NULL)
return NULL;
- Doug
More information about the Kernelnewbies
mailing list