Check for kmalloc retrun values

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

 




Hi!

I found several places in the kernel source code where kmalloc is called without any check if the return value is null. Is this a serious matter, e.g. should such code be fixed?

My intuition is that otherwise this could lead to code defreferencing a null pointer, though it is not likely that kmalloc fails...

Is it reasonable to enforce such checks for errors for all modules?

Thanks for clarification on that matter,

Hendrik

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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