stree: move stree_id into the avl root
[smatch.git] / validation / sm_user_data2.c
blob8e3e9bd151003b9eb258e0820cb459274b581e8e
1 #include "check_debug.h"
3 int copy_from_user(void *dest, void *src, int size){}
5 struct my_struct {
6 int x, y;
7 };
9 void *pointer;
10 struct my_struct *dest;
12 struct my_struct *returns_copy(void)
14 copy_from_user(dest, pointer, sizeof(*dest));
15 return dest;
18 struct my_struct *a;
19 void test(void)
21 a = returns_copy();
22 __smatch_state("check_user_data", "a->x");
26 * check-name: smatch user data #2
27 * check-command: smatch -p=kernel -I.. sm_user_data2.c
29 * check-output-start
30 sm_user_data2.c:22 test() 'a->x' = 'user_data_set'
31 * check-output-end