Miscellaneous

Faults in Linux Kernel 3.x : Inconsistent assumptions about NULL

As part of my work, I need to annotate the reports generated using Coccinelle Scripts as bugs/FPs for recent Linux Kernels, recent as in versions > 3.0 till the current one 3.18.

This blog post is about the bugs and FPs I found for the case which checks for inconsistent assumptions about NULL. This has two parts, one is where NULL test is done preceding a dereference and the second is where a NULL test is done following a dereference. You can view the annotated report for the first case and for the second case.

IsNull, where a null test on a pointer is followed by a dereference of the pointer, and NullRef, where a dereference of a pointer is followed by a null test on the pointer. The former is always an error, while the latter may be an error or may simply indicate overly cautious code, if the pointer can never be NULL.

What I found?

There were many bugs for type 1 and less for type 2.

There were some places that needed some cleaning as they are checking for the same thing two times, which is unncessary. A fix for those cases and patches for bugs are lined up for this case.

Advertisements

2 thoughts on “Faults in Linux Kernel 3.x : Inconsistent assumptions about NULL

  1. Hi Tapaswani, I am manager with Linux Technology Center IBM Bangalore, we work on core kernel development, One of my team member is a mentor for OPW 2015, I was curious to know if you are seeking internship/employment in Open Source area. Please ping me on your future plans and I will be please to get in touch with you. (tarundeep-at-gmail.com)

    Liked by 1 person

    1. Hi,

      Glad that you liked some of my work / projects.

      The work you do is really interesting. I read a lot about it, and all are awesome!

      I would love to join it, and contribute more to open source. But some days back, I have given my acceptance to SAP Labs. I’ll be joining SAP Labs as a Developer, very soon.

      I hope we can stay in touch until the timing is right. 🙂

      Thanks a lot for providing me an employment opportunity.

      Many Thanks!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s