diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-07-11 19:39:30 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-07-13 10:46:12 +0200 |
commit | f0601ef8631ceeab10c7af69b248fc106e0ecf09 (patch) | |
tree | 1d78a07227dc8b7669aaa3e6fa62c6fe3ef318d2 /drivers/misc/isl29020.c | |
parent | 881f6d945b34e5604003ba1cc85c9dfbb7e31af2 (diff) |
drm/vc4: vec: Protect device resources after removal
Whenever the device and driver are unbound, the main device and all the
subdevices will be removed by calling their unbind() method.
However, the DRM device itself will only be freed when the last user will
have closed it.
It means that there is a time window where the device and its resources
aren't there anymore, but the userspace can still call into our driver.
Fortunately, the DRM framework provides the drm_dev_enter() and
drm_dev_exit() functions to make sure our underlying device is still there
for the section protected by those calls. Let's add them to the VEC driver.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220711173939.1132294-61-maxime@cerno.tech
Diffstat (limited to 'drivers/misc/isl29020.c')
0 files changed, 0 insertions, 0 deletions