user_data2: handle functions that merely return passed in user data
commit770b058fc4a4fc5f9be2e2a4d1d2d588a5023222
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Jan 2017 11:51:29 +0000 (20 14:51 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Jan 2017 11:51:29 +0000 (20 14:51 +0300)
treeea48525537215f2d77af1c1bffd8f596aa804192
parenta45bd4572dcbbd58652a9948178e56f880649e14
user_data2: handle functions that merely return passed in user data

This is sort of lazy...  In theory, I should reproduce PARAM_SET and
PARAM_FILTER.  But even that would not fix everything because it's not
exactly the same problem.  With param_set we don't care if the returned
value comes from a parameter or not.  Meanwhile this lazy solution so
of work-ish for that.

Let's say we have a function add_to_x(), and sometimes we pass a user value
and sometimes we pass a kernel value.  In the current code, the returned
value is normally treated as a user value.  With this change we only
treat the returned value as a user value if we passed in a user controlled
parameter.

I believe this is the common case, so this patch improves the situation
quite a bit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_user_data2.c
smatch.h