[Linux-cachefs] fscache: bug report: dereferencing before checking

David Howells dhowells at redhat.com
Mon Mar 22 12:47:17 UTC 2010


Dan Carpenter <error27 at gmail.com> wrote:

> Can "page" be NULL here?

Hmmm...  Interesting question.  I'm not sure it can be NULL.

radix_tree_gang_lookup_tag() finds pages in the tree that have a particular
tag set, and returns the number of pages it has selected.  If that number is
!= 1, then I don't proceed with accessing the array.

So I think the tests of page later are unnecessary.

David




More information about the Linux-cachefs mailing list