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

Nick Krause xerofoify at gmail.com
Wed Aug 13 14:03:08 EDT 2014


On Wed, Aug 13, 2014 at 12:55 PM, Nick Krause <xerofoify at gmail.com> wrote:
> 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. In addition I can only build test this as I
> don't have the hardware.
> Cheers Nick


I did test my patch by doing a kernel build and I get this error,
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c:66:4: error:
implicit declaration of function ‘skb_quene_purge’
[-Werror=implicit-function-declaration]
    skb_quene_purge(&priv->rtllib->skb_waitQ[tcb_desc->queue_index]);
I am wondering how do I fix this, I will attach my patch so I can fix
this out and send a proper patch :).
By the way thanks for the help guys :).
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-staging-Check-for-Null-return-of-fw_download_code.patch
Type: text/x-patch
Size: 1380 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140813/2e6775dd/attachment.bin 


More information about the Kernelnewbies mailing list