user_data: improve tracking set vs passed in user data
commit0a991aed20012f2eeb79035456f5c3bcc44d64bd
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Jul 2013 06:16:01 +0000 (15 09:16 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Jul 2013 06:16:01 +0000 (15 09:16 +0300)
tree3e21f27a884bf81988896de30b643f4a2841ff2d
parent1b25d3db20b62c7a2b669c1444adcb2e760be2e7
user_data: improve tracking set vs passed in user data

Say we have strncpy(dest, src, 5) and src is user_data then dest is user
data at the end as well.  But it's not the same as copy_from_user() where
dest is always set to user_data.

I have tried to differentiate between the two before but it was buggy.
This change introduces two states user_data_set and user_data_passed so
we can track this.  The is_user_data() now returns 0, 1, or 2 instead of
just 0 or 1.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_user_data.c
validation/sm_user_data1.c
validation/sm_user_data2.c
validation/sm_user_data3.c
validation/sm_user_data4.c