Lin Ma 0fc044b2b5 media: dvbdev: adopts refcnt to avoid UAF
dvb_unregister_device() is known that prone to use-after-free.
That is, the cleanup from dvb_unregister_device() releases the dvb_device
even if there are pointers stored in file->private_data still refer to it.

This patch adds a reference counter into struct dvb_device and delays its
deallocation until no pointer refers to the object.

Link: https://lore.kernel.org/linux-media/20220807145952.10368-1-linma@zju.edu.cn
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-25 10:08:23 +00:00
..
2022-10-22 15:30:15 -07:00
2022-03-18 05:58:35 +01:00
2022-11-25 07:55:21 +00:00
2022-03-23 14:51:35 -07:00
2022-11-25 07:55:21 +00:00
2022-11-25 07:55:21 +00:00
2022-11-25 07:55:21 +00:00
2022-03-12 16:59:52 +01:00