From: Hans de Goede Date: Thu, 30 Dec 2010 22:54:33 +0000 (-0300) Subject: [media] gspca_main: Locking fixes 2 X-Git-Tag: v2.6.38-rc2~1^2~85 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27074efa2ee8c1ef07dc5f644104e35d39e43322;p=pandora-kernel.git [media] gspca_main: Locking fixes 2 Before this patch vidioc_dqbuf is using its own read_lock, where as other queue related functions use queue_lock. This means that dqbuf is accessing several variables in a racy manor. The most important one being fr_o, which may be changed from underneath dqbuf by vidioc_reqbufs or vidioc_streamoff. Other variables which it accesses unprotected are gspca_dev->memory, gspca_dev->streaming and gspca_dev->capt_file. This patch fixes this by changing vidioc_dqbuf to also use the queue_lock. Signed-off-by: Hans de Goede Acked-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed