Re: mm: keep page cache radix tree nodes in check

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

 



On Thu, Mar 10, 2016 at 11:12:00AM -0500, Johannes Weiner wrote:
> We know that page->tree[page->index] is present and the tree is
> locked, so __radix_tree_lookup() will always return with an entry, as
> well as &node and &slot set. I'm not sure how you would annotate this.
> 

That's tricky...

> Is it also warning about slot?

It does, yes.

> Or can it know that they are always set
> together?

It knows they are set together but it warns about both.

> Could it maybe be linked to the function's return value? I
> would prefer not setting node and slot to NULL to suppress the false
> positive. However, what we could do is add a BUG_ON() if the function
> call returns NULL. Would that be enough of a hint to the checker that
> we expect the function to be always successful and set node and slot?

I'm sort of just trying to get a feel for what the issues are.  Calling
BUG_ON() would silence the warning, yes.

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]