kernel-fxtec-pro1x/drivers/media/dvb/dvb-core
Laurent Pinchart f41ced8f10 Check fops_get() return value
Several subsystem open handlers dereference the fops_get() return value
without checking it for nullness.  This opens a race condition between the
open handler and module unloading.

A module can be marked as being unloaded (MODULE_STATE_GOING) before its
exit function is called and gets the chance to unregister the driver.
During that window open handlers can still be called, and fops_get() will
fail in try_module_get() and return a NULL pointer.

This change checks the fops_get() return value and returns -ENODEV if NULL.

Reported-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Acked-by: Takashi Iwai <tiwai@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:11 -08:00
..
demux.h V4L/DVB (8131): dmx_write: memcpy from user-supplied pointer 2008-07-20 07:13:27 -03:00
dmxdev.c V4L/DVB (9029): Fix deadlock in demux code 2008-10-04 22:59:55 -03:00
dmxdev.h V4L/DVB (5511): Fix 2/3 for bug 7819: demux and dvr 2007-04-27 15:45:31 -03:00
dvb_ca_en50221.c V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings 2008-09-03 18:37:13 -03:00
dvb_ca_en50221.h
dvb_demux.c V4L/DVB (9029): Fix deadlock in demux code 2008-10-04 22:59:55 -03:00
dvb_demux.h V4L/DVB (5512): Fix 3/3 for bug 7819: fixed hotplugging for dvbnet 2007-04-27 15:45:32 -03:00
dvb_filter.c V4L/DVB (3218): Whitespace cleanups 2006-01-09 15:25:34 -02:00
dvb_filter.h [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3 2005-12-12 08:57:44 -08:00
dvb_frontend.c V4L/DVB (9916): dvb-core: don't add an event when in ONE SHOT mode for algo type HW 2008-12-30 09:39:16 -02:00
dvb_frontend.h V4L/DVB (9344): DVB-Core update 2008-12-29 17:53:12 -02:00
dvb_math.c V4L/DVB (3996): Make the table static 2006-06-25 02:00:11 -03:00
dvb_math.h V4L/DVB (3988): Add math routines required by DVB demods 2006-06-25 02:00:08 -03:00
dvb_net.c dvb: Kill directly reference of netdev->priv 2008-12-03 21:13:13 -08:00
dvb_net.h V4L/DVB (5512): Fix 3/3 for bug 7819: fixed hotplugging for dvbnet 2007-04-27 15:45:32 -03:00
dvb_ringbuffer.c V4L/DVB (8130): split dvb_ringbuffer dual-use functions 2008-07-20 07:13:23 -03:00
dvb_ringbuffer.h V4L/DVB (8130): split dvb_ringbuffer dual-use functions 2008-07-20 07:13:23 -03:00
dvbdev.c Check fops_get() return value 2009-01-06 15:59:11 -08:00
dvbdev.h V4L/DVB (9361): Dynamic DVB minor allocation 2008-12-29 17:53:12 -02:00
Makefile V4L/DVB (4411): Fix minor errors in build files 2006-08-08 15:53:03 -03:00