[PATCH] staging: Check for Null return of allocated skb in fw_download_code

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed Aug 13 15:06:43 EDT 2014


On Wed, 13 Aug 2014 12:55:00 -0400, Nick Krause said:
> On Wed, Aug 13, 2014 at 12:02 PM,  <Valdis.Kletnieks at vt.edu> wrote:
> > On Wed, 13 Aug 2014 18:50:43 +0400, Max Filippov said:
> >
> >> No need to trigger it, faking it would be enough, e.g.:
> >
> >> +                if (++i < 3)
> >> +                        skb  = dev_alloc_skb(frag_length + 4);
> >> +                else
> >> +                        skb = NULL;
> >
> > Don't bet on this triggering on a real system without some additional
> > scaffolding - take a look at what the function is doing, and ask yourself
> > how many times it will be called on the average system :)

> Seems to be called a lot.

Oh? Explain to us what this function is actually doing, in general terms,
and then give us a rough estimate of how many times per boot it's called.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140813/030850b6/attachment.bin 


More information about the Kernelnewbies mailing list