Re: Bug Patch

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

 



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

_______________________________________________
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