From: Alexey Dobriyan Date: Sun, 13 Apr 2008 11:48:43 +0000 (-0300) Subject: V4L/DVB (7580): Fix concurrent read from /proc/videocodecs X-Git-Tag: v2.6.26-rc1~1084^2~136 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9faa2d75822e1950b3aacc8ccbdf0cdb595e47de;p=pandora-kernel.git V4L/DVB (7580): Fix concurrent read from /proc/videocodecs 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 Acked-by: Jan Kara Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed