linux_dsm_epyc7002/drivers/media/video/ivtv
Paul Cassella 7fd4b41f05 [media] ivtv: yuv: handle get_user_pages() -errno returns
get_user_pages() may return -errno, such as -EFAULT.  So don't blindly use
its return value as an offset into dma->map[] for the next get_user_pages()
call.  Since we'll give up and return an error if either fails, don't even
make the second call if the first failed to give us exactly what we were
looking for.

The old code would also call put_page() on as many elements of dma->map[]
as we'd asked for, regardless of how many were valid.

[Andy Walls modified this patch to return -EFAULT instead of -EINVAL
as Paul's observation "I'm not sure -EINVAL is the best return code vs
-EFAULT or -ENOMEM, [...]" was correct.  The return value bubbles up
as a return code for write(), for which the V4L2 API spec indicates
EINVAL is incorrect and EFAULT is correct.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@maneteren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
..
ivtv-cards.c [media] ivtv: Add Adaptec Remote Controller 2010-12-30 12:17:08 -02:00
ivtv-cards.h [media] ivtv: Add Adaptec Remote Controller 2010-12-30 12:17:08 -02:00
ivtv-controls.c V4L/DVB: ivtv: convert to the new control framework 2010-08-08 23:43:06 -03:00
ivtv-controls.h V4L/DVB: ivtv: convert to the new control framework 2010-08-08 23:43:06 -03:00
ivtv-driver.c [media] ivtv, cx18: Make ioremap failure messages more useful for users 2010-12-29 08:17:09 -02:00
ivtv-driver.h V4L/DVB: V4L2: avoid name conflicts in macros 2010-10-21 01:04:48 -02:00
ivtv-fileops.c [media] ivtv: Return EFAULT when copy_from_user() fails in ivtv_write_vbi_from_user() 2010-12-29 08:17:10 -02:00
ivtv-fileops.h
ivtv-firmware.c V4L/DVB: ivtv: convert to the new control framework 2010-08-08 23:43:06 -03:00
ivtv-firmware.h V4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problems 2010-08-02 14:47:55 -03:00
ivtv-gpio.c V4L/DVB: ivtv: convert gpio subdev to new control framework 2010-08-08 23:43:05 -03:00
ivtv-gpio.h
ivtv-i2c.c [media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg() 2011-01-19 11:45:30 -02:00
ivtv-i2c.h V4L/DVB (13443): ivtv: Defer legacy I2C IR probing until after setup of known I2C devices 2009-12-05 18:41:56 -02:00
ivtv-ioctl.c V4L/DVB: v4l: remove unused i2c-id.h headers 2010-10-21 01:06:05 -02:00
ivtv-ioctl.h
ivtv-irq.c [media] ivtv: Fix corrective action taken upon DMA ERR interrupt to avoid hang 2011-03-02 13:45:42 -03:00
ivtv-irq.h ivtv: use kthread_worker instead of workqueue 2010-06-29 10:07:09 +02:00
ivtv-mailbox.c V4L/DVB: ivtv: Automatic firmware reload 2010-08-02 14:48:13 -03:00
ivtv-mailbox.h V4L/DVB: ivtv: Automatic firmware reload 2010-08-02 14:48:13 -03:00
ivtv-queue.c ivtv: Fix PCI DMA direction 2009-06-05 08:05:23 -07:00
ivtv-queue.h
ivtv-routing.c
ivtv-routing.h
ivtv-streams.c V4L/DVB: ivtv: convert to the new control framework 2010-08-08 23:43:06 -03:00
ivtv-streams.h
ivtv-udma.c [media] ivtv: udma: handle get_user_pages() returning fewer pages than we asked for 2011-03-21 20:32:33 -03:00
ivtv-udma.h
ivtv-vbi.c [media] ivtv: Fix sparse warning regarding a user pointer in ivtv_write_vbi_from_user() 2011-03-21 20:32:35 -03:00
ivtv-vbi.h [media] ivtv: Return EFAULT when copy_from_user() fails in ivtv_write_vbi_from_user() 2010-12-29 08:17:10 -02:00
ivtv-version.h V4L/DVB: ivtv: Increment driver version due to firmware loading changes 2010-08-02 14:48:30 -03:00
ivtv-yuv.c [media] ivtv: yuv: handle get_user_pages() -errno returns 2011-03-21 20:32:35 -03:00
ivtv-yuv.h
ivtvfb.c V4L/DVB: ivtvfb: prevent reading uninitialized stack memory 2010-09-27 22:22:11 -03:00
Kconfig [media] rc: rename the remaining things to rc_core 2010-12-29 08:16:50 -02:00
Makefile