diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 08:48:43 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 08:48:43 +0000 |
commit | d96975039f6238c18ca96c4d7aef5106a832a12a (patch) | |
tree | 0154d95f1e4581561b1821699847b92122aee95b /linux/drivers/media/video/soc_camera.c | |
parent | 3b2debfac58aca6943b589154043995420ea3d74 (diff) | |
download | mediapointer-dvb-s2-d96975039f6238c18ca96c4d7aef5106a832a12a.tar.gz mediapointer-dvb-s2-d96975039f6238c18ca96c4d7aef5106a832a12a.tar.bz2 |
Fix concurrent read from /proc/videocodecs
From: Alexey Dobriyan <adobriyan@gmail.com>
Observation one: ->write_proc and ->data assignments aren't needed. Removed.
Observation two: codecs lists are unprotected. Patch doesn't fix this.
Observation three:
/proc/videocodecs printout is done to temporary _global_ buffer which
is freed in between. Consequently, two users hitting this file can
screwup each other.
Steps to reproduce:
modprobe videocodec
while true; do cat /proc/videocodecs &>/dev/null; done &
while true; do cat /proc/videocodecs &>/dev/null; done &
The fix is switching to seq_files, this removes code, especially some
line-length "logic".
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/soc_camera.c')
0 files changed, 0 insertions, 0 deletions