2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 14:43:54 +08:00
linux-next/drivers/media
Sean Young 30b4e122d7 media: rc: sir_ir: detect presence of port
Without this test, sir_ir clumsy claims resources for a device which
does not exist.

The 0-day kernel test robot reports the following errors (in a loop):
	sir_ir sir_ir.0: Trapped in interrupt
	genirq: Flags mismatch irq 4. 00000000 (ttyS0) vs. 00000000 (sir_ir)

When sir_ir is loaded with the default io and irq, the following happens:
 - sir_ir claims irq 4
 - user space opens /dev/ttyS0
 - in serial8250_do_startup(), some setup is done for ttyS0, which causes
   irq 4 to fire (in THRE test)
 - sir_ir does not realise it was not for it, and spins until the "trapped
   in interrupt"
 - now serial driver calls setup_irq() and fails and we get the
   "Flags mismatch" error.

There is no port present at 0x3e8 so simply check for the presence of a
port, as suggested by Linus.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Cc: <stable@vger.kernel.org> # 4.12+
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-15 08:57:34 -05:00
..
cec media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZERO 2017-10-31 07:21:23 -04:00
common media: saa7146: Convert timers to use timer_setup() 2017-10-31 06:40:08 -04:00
dvb-core dvb_frontend: don't use-after-free the frontend struct 2017-11-07 08:39:39 -05:00
dvb-frontends media: drxd: make const array fastIncrDecLUT static 2017-11-07 04:00:31 -05:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c media: imx274: fix missing return assignment from call to imx274_mode_regs 2017-11-07 03:05:40 -05:00
mmc
pci media: cx88: make const arrays default_addr_list and pvr2000_addr_list static 2017-11-07 04:02:53 -05:00
platform media: s5p-mfc: fix lockdep warning 2017-11-07 05:44:48 -05:00
radio media: radio-raremono: remove redundant initialization of freq 2017-10-31 07:26:39 -04:00
rc media: rc: sir_ir: detect presence of port 2017-11-15 08:57:34 -05:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners media: dvb: i2c transfers over usb cannot be done from stack 2017-09-23 07:21:33 -04:00
usb media: dib0700: fix invalid dvb_detach argument 2017-11-07 05:52:52 -05:00
v4l2-core media: v4l2-ctrls: Don't validate BITMASK twice 2017-11-07 05:52:24 -05:00
Kconfig media: rc-core: do not depend on MEDIA_SUPPORT 2017-08-20 09:39:36 -04:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c [media] media: Check for active and has_no_links overrun 2017-10-04 17:16:14 -03:00