fill_db_untrusted: follow untrusted data down the call tree
[smatch.git] / validation / sm_check_kunmap.c
blobe3f96c20d684ace27a12d896a1fa9cb6c3758533
1 void something();
3 int kmap(int p);
4 int kunmap(int p);
5 int kmap_atomic(int p);
6 int kunmap_atomic(int p);
8 void func(void)
10 int page;
11 int x;
12 int y;
13 int z;
15 x = kmap(page);
16 kunmap(page);
17 kunmap(x);
18 y = kmap_atomic(z);
19 kunmap_atomic(y);
20 kunmap_atomic(z);
23 * check-name: smatch check kunmap
24 * check-command: smatch -p=kernel sm_check_kunmap.c
26 * check-output-start
27 sm_check_kunmap.c +17 func(9) warn: passing the wrong stuff kunmap()
28 sm_check_kunmap.c +20 func(12) warn: passing the wrong stuff to kmap_atomic()
29 * check-output-end