[PATCH 1/1] staging: Add NULL checks to return value of skb_clone() and dev_alloc_skb()

Dan Carpenter dan.carpenter at oracle.com
Wed Oct 30 09:38:54 UTC 2013


On Mon, Oct 28, 2013 at 12:37:26PM +0800, RUC_SoftSec wrote:
> Function skb_clone() and dev_alloc_skb() may return NULL pointers if there is no enough memroy, their return values should be checked against NULL before used.
> This bug is found by a static tool developed by RUC_SoftSec, supported by China.X.Orion.
> 

Run your patches through scripts/checkpatch.pl.  It should complain
about the printks.  Really, my feeling is that you can just leave the
printks out.

regards,
dan carpenter



More information about the devel mailing list