Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: dvb-core/dmxdev: drop locks around mmap()

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 <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
37fd4a03 c4e620ec

+2 -21
+2 -21
drivers/media/dvb-core/dmxdev.c
··· 1217 1217 { 1218 1218 struct dmxdev_filter *dmxdevfilter = file->private_data; 1219 1219 struct dmxdev *dmxdev = dmxdevfilter->dev; 1220 - int ret; 1221 1220 1222 1221 if (!dmxdev->may_do_mmap) 1223 1222 return -ENOTTY; 1224 1223 1225 - if (mutex_lock_interruptible(&dmxdev->mutex)) 1226 - return -ERESTARTSYS; 1227 - 1228 - if (mutex_lock_interruptible(&dmxdevfilter->mutex)) { 1229 - mutex_unlock(&dmxdev->mutex); 1230 - return -ERESTARTSYS; 1231 - } 1232 - ret = dvb_vb2_mmap(&dmxdevfilter->vb2_ctx, vma); 1233 - 1234 - mutex_unlock(&dmxdevfilter->mutex); 1235 - mutex_unlock(&dmxdev->mutex); 1236 - 1237 - return ret; 1224 + return dvb_vb2_mmap(&dmxdevfilter->vb2_ctx, vma); 1238 1225 } 1239 1226 #endif 1240 1227 ··· 1354 1367 { 1355 1368 struct dvb_device *dvbdev = file->private_data; 1356 1369 struct dmxdev *dmxdev = dvbdev->priv; 1357 - int ret; 1358 1370 1359 1371 if (!dmxdev->may_do_mmap) 1360 1372 return -ENOTTY; ··· 1361 1375 if (dmxdev->exit) 1362 1376 return -ENODEV; 1363 1377 1364 - if (mutex_lock_interruptible(&dmxdev->mutex)) 1365 - return -ERESTARTSYS; 1366 - 1367 - ret = dvb_vb2_mmap(&dmxdev->dvr_vb2_ctx, vma); 1368 - mutex_unlock(&dmxdev->mutex); 1369 - return ret; 1378 + return dvb_vb2_mmap(&dmxdev->dvr_vb2_ctx, vma); 1370 1379 } 1371 1380 #endif 1372 1381