kernel_user_data: ignore v4l2_subdev_call()
commit13bd288389327847ee142387db2275353663c364
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 May 2021 14:37:31 +0000 (18 17:37 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 May 2021 14:37:31 +0000 (18 17:37 +0300)
tree4fc6f95cec0a1f62d58adefcaba535a7cdd7f471
parent6635127afab31d900a42f4541d4aa757a6aa970d
kernel_user_data: ignore v4l2_subdev_call()

The way v4l2 does input validation is quite tricky for Smatch.  Normally
when Smatch sees a function pointer like (struct foo)->subscribe_event() it
assumes all those functions are the same.  But what v4l2 does is it has
one ->subscribe_event() function main pointer that is called and does then
input validation and which calls the driver ->subscribe_event() function
pointer.

The initial validation/launcher function is called from the
v4l2_subdev_call().  So if something is called from the v4l2_subdev_call()
then we can safely treat it as trusted.

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