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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 13, 2014 at 5:56 PM,  <Valdis.Kletnieks@xxxxxx> wrote:
> On Tue, 12 Aug 2014 22:53:37 -0700, Manish Katiyar said:
>
>> And it may also be a good idea to post the logs regarding how you tested
>> your patch and verified that the fix works as expected. As you are asking
>
> I want to see how he sets up an environment where he can *trigger* the issue
> reliably. :)

No need to trigger it, faking it would be enough, e.g.:

-               skb  = dev_alloc_skb(frag_length + 4);
+        {
+                static int i;
+                if (++i < 3)
+                        skb  = dev_alloc_skb(frag_length + 4);
+                else
+                        skb = NULL;
+        }
+        if (skb == NULL) {
+                rt_status =  false;
+                break;
+        }

-- 
Thanks.
-- Max

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux