linux_dsm_epyc7002/drivers/media
Shuah Khan ed940cd274 [media] au0828: fix au0828_v4l2_close() dev_state race condition
au0828_v4l2_close() check for dev_state == DEV_DISCONNECTED will fail to
detect the device disconnected state correctly, if au0828_v4l2_open() runs
to set the DEV_INITIALIZED bit. A loop test of bind/unbind found this bug
by increasing the likelihood of au0828_v4l2_open() occurring while unbind
is in progress. When au0828_v4l2_close() fails to detect that the device
is in disconnect state, it attempts to power down the device and fails with
the following general protection fault:

[  260.992962] Call Trace:
[  260.993008]  [<ffffffffa0f80f0f>] ? xc5000_sleep+0x8f/0xd0 [xc5000]
[  260.993095]  [<ffffffffa0f6803c>] ? fe_standby+0x3c/0x50 [tuner]
[  260.993186]  [<ffffffffa0ef541c>] au0828_v4l2_close+0x53c/0x620 [au0828]
[  260.993298]  [<ffffffffa0d08ec0>] v4l2_release+0xf0/0x210 [videodev]
[  260.993382]  [<ffffffff81570f9c>] __fput+0x1fc/0x6c0
[  260.993449]  [<ffffffff815714ce>] ____fput+0xe/0x10
[  260.993519]  [<ffffffff8116eb83>] task_work_run+0x133/0x1f0
[  260.993602]  [<ffffffff810035d0>] exit_to_usermode_loop+0x140/0x170
[  260.993681]  [<ffffffff810061ca>] syscall_return_slowpath+0x16a/0x1a0
[  260.993754]  [<ffffffff82835fb3>] entry_SYSCALL_64_fastpath+0xa6/0xa8

Cc: stable@vger.kernel.org
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-31 15:01:08 -03:00
..
common [media] siano: firmware buffer is too small 2016-02-16 09:29:13 -02:00
dvb-core [media] dvb-core: fix return code checking for devices with CA 2016-03-03 14:33:33 -03:00
dvb-frontends [media] cx24120: make sure tuner is locked at get_frontend 2016-03-03 14:26:55 -03:00
firewire [media] dvb: modify core to implement interfaces/entities at MC new gen 2016-01-11 12:18:52 -02:00
i2c [media] adv7604: fix SPA register location for ADV7612 2016-03-03 07:32:20 -03:00
mmc [media] siano: register media controller earlier 2015-02-26 09:10:39 -03:00
pci Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
platform [media] vsp1: use proper dma alloc/free functions 2016-03-21 13:49:01 -07:00
radio [media] tea575x: convert to library 2016-02-10 09:34:28 -02:00
rc [media] mceusb: use %*ph for small buffer dumps 2016-03-10 13:37:44 -03:00
tuners [media] xc4000: shut up a bogus smatch message 2016-02-23 07:14:02 -03:00
usb [media] au0828: fix au0828_v4l2_close() dev_state race condition 2016-03-31 15:01:08 -03:00
v4l2-core [media] v4l2-mc: cleanup a warning 2016-03-31 14:50:38 -03:00
Kconfig [media] Kconfig: Re-enable Media controller support for DVB 2016-01-11 12:18:40 -02:00
Makefile [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal 2014-12-16 23:21:44 -02:00
media-device.c Merge commit '840f5b0572ea' into v4l_for_linus 2016-03-15 07:48:28 -03:00
media-devnode.c [media] media: Fix media_open() to clear filp->private_data in error leg 2016-02-01 13:21:33 -02:00
media-entity.c [media] media: add prefixes to interface types 2016-03-05 09:03:16 -03:00