Revision 6cf11ee6300f38b7cfc43af9b7be2afaa5e05869 authored by Hans Verkuil on 19 January 2015, 09:16:18 UTC, committed by Mauro Carvalho Chehab on 21 January 2015, 23:07:26 UTC
The locking scheme inside the vb2 thread is unsafe when stopping the
thread. In particular kthread_stop was called *after* internal data
structures were cleaned up instead of doing that before. In addition,
internal vb2 functions were called after threadio->stop was set to
true and vb2_internal_streamoff was called. This is also not allowed.

All this led to a variety of race conditions and kernel warnings and/or
oopses.

Fixed by moving the kthread_stop call up before the cleanup takes
place, and by checking threadio->stop before calling internal vb2
queuing operations.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org>      # for v3.16 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent 42d74e4
History
File Mode Size
Kconfig -rw-r--r-- 2.2 KB
Makefile -rw-r--r-- 1.4 KB
bat_algo.h -rw-r--r-- 805 bytes
bat_iv_ogm.c -rw-r--r-- 59.5 KB
bitarray.c -rw-r--r-- 2.8 KB
bitarray.h -rw-r--r-- 1.7 KB
bridge_loop_avoidance.c -rw-r--r-- 47.3 KB
bridge_loop_avoidance.h -rw-r--r-- 3.0 KB
debugfs.c -rw-r--r-- 13.7 KB
debugfs.h -rw-r--r-- 1.1 KB
distributed-arp-table.c -rw-r--r-- 34.0 KB
distributed-arp-table.h -rw-r--r-- 4.6 KB
fragmentation.c -rw-r--r-- 14.7 KB
fragmentation.h -rw-r--r-- 1.7 KB
gateway_client.c -rw-r--r-- 24.0 KB
gateway_client.h -rw-r--r-- 1.7 KB
gateway_common.c -rw-r--r-- 6.6 KB
gateway_common.h -rw-r--r-- 1.5 KB
hard-interface.c -rw-r--r-- 19.2 KB
hard-interface.h -rw-r--r-- 3.0 KB
hash.c -rw-r--r-- 1.8 KB
hash.h -rw-r--r-- 5.0 KB
icmp_socket.c -rw-r--r-- 10.0 KB
icmp_socket.h -rw-r--r-- 1003 bytes
main.c -rw-r--r-- 35.8 KB
main.h -rw-r--r-- 13.5 KB
multicast.c -rw-r--r-- 23.0 KB
multicast.h -rw-r--r-- 2.1 KB
network-coding.c -rw-r--r-- 57.4 KB
network-coding.h -rw-r--r-- 3.4 KB
originator.c -rw-r--r-- 32.3 KB
originator.h -rw-r--r-- 4.2 KB
packet.h -rw-r--r-- 17.9 KB
routing.c -rw-r--r-- 31.4 KB
routing.h -rw-r--r-- 2.1 KB
send.c -rw-r--r-- 19.7 KB
send.h -rw-r--r-- 3.9 KB
soft-interface.c -rw-r--r-- 30.3 KB
soft-interface.h -rw-r--r-- 1.5 KB
sysfs.c -rw-r--r-- 25.8 KB
sysfs.h -rw-r--r-- 1.9 KB
translation-table.c -rw-r--r-- 111.1 KB
translation-table.h -rw-r--r-- 2.6 KB
types.h -rw-r--r-- 45.9 KB

back to top