On Thu Jun 5 08:57:36 2025 +0200, Hans Verkuil wrote:
> vb2 no longer requires locking around mmap since commit
> f035eb4e976e ("[media] videobuf2: fix lockdep warning").
>
> Since the streaming I/O mode for DVB support is by default off, and
> the dvb utilities were never updated with streaming support, and
> we never had regression tests for this streaming mode, this was
> never noticed before.
>
> Signed-off-by: Hans Verkuil <[email protected]>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Patch committed.
Thanks,
Mauro Carvalho Chehab
drivers/media/dvb-core/dmxdev.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c
index 17184b367490..1cc0e9ecc56a 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -1217,24 +1217,11 @@ static int dvb_demux_mmap(struct file *file, struct
vm_area_struct *vma)
{
struct dmxdev_filter *dmxdevfilter = file->private_data;
struct dmxdev *dmxdev = dmxdevfilter->dev;
- int ret;
if (!dmxdev->may_do_mmap)
return -ENOTTY;
- if (mutex_lock_interruptible(&dmxdev->mutex))
- return -ERESTARTSYS;
-
- if (mutex_lock_interruptible(&dmxdevfilter->mutex)) {
- mutex_unlock(&dmxdev->mutex);
- return -ERESTARTSYS;
- }
- ret = dvb_vb2_mmap(&dmxdevfilter->vb2_ctx, vma);
-
- mutex_unlock(&dmxdevfilter->mutex);
- mutex_unlock(&dmxdev->mutex);
-
- return ret;
+ return dvb_vb2_mmap(&dmxdevfilter->vb2_ctx, vma);
}
#endif
@@ -1367,7 +1354,6 @@ static int dvb_dvr_mmap(struct file *file, struct
vm_area_struct *vma)
{
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
- int ret;
if (!dmxdev->may_do_mmap)
return -ENOTTY;
@@ -1375,12 +1361,7 @@ static int dvb_dvr_mmap(struct file *file, struct
vm_area_struct *vma)
if (dmxdev->exit)
return -ENODEV;
- if (mutex_lock_interruptible(&dmxdev->mutex))
- return -ERESTARTSYS;
-
- ret = dvb_vb2_mmap(&dmxdev->dvr_vb2_ctx, vma);
- mutex_unlock(&dmxdev->mutex);
- return ret;
+ return dvb_vb2_mmap(&dmxdev->dvr_vb2_ctx, vma);
}
#endif
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]