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-- 8.0 KB
Makefile -rw-r--r-- 636 bytes
asn1.c -rw-r--r-- 13.6 KB
cache.c -rw-r--r-- 8.0 KB
cifs_debug.c -rw-r--r-- 18.6 KB
cifs_debug.h -rw-r--r-- 2.1 KB
cifs_dfs_ref.c -rw-r--r-- 9.8 KB
cifs_fs_sb.h -rw-r--r-- 3.2 KB
cifs_spnego.c -rw-r--r-- 4.8 KB
cifs_spnego.h -rw-r--r-- 1.6 KB
cifs_unicode.c -rw-r--r-- 13.3 KB
cifs_unicode.h -rw-r--r-- 10.2 KB
cifs_uniupr.h -rw-r--r-- 12.6 KB
cifsacl.c -rw-r--r-- 30.4 KB
cifsacl.h -rw-r--r-- 2.9 KB
cifsencrypt.c -rw-r--r-- 22.2 KB
cifsfs.c -rw-r--r-- 33.8 KB
cifsfs.h -rw-r--r-- 5.9 KB
cifsglob.h -rw-r--r-- 52.8 KB
cifspdu.h -rw-r--r-- 82.8 KB
cifsproto.h -rw-r--r-- 23.1 KB
cifssmb.c -rw-r--r-- 191.7 KB
connect.c -rw-r--r-- 106.2 KB
dir.c -rw-r--r-- 23.8 KB
dns_resolve.c -rw-r--r-- 2.8 KB
dns_resolve.h -rw-r--r-- 1.2 KB
export.c -rw-r--r-- 2.4 KB
file.c -rw-r--r-- 101.2 KB
fscache.c -rw-r--r-- 6.8 KB
fscache.h -rw-r--r-- 4.8 KB
inode.c -rw-r--r-- 62.5 KB
ioctl.c -rw-r--r-- 6.5 KB
link.c -rw-r--r-- 17.8 KB
misc.c -rw-r--r-- 18.3 KB
netmisc.c -rw-r--r-- 39.4 KB
nterr.c -rw-r--r-- 33.5 KB
nterr.h -rw-r--r-- 30.0 KB
ntlmssp.h -rw-r--r-- 5.7 KB
readdir.c -rw-r--r-- 24.4 KB
rfc1002pdu.h -rw-r--r-- 2.8 KB
sess.c -rw-r--r-- 38.7 KB
smb1ops.c -rw-r--r-- 32.0 KB
smb2file.c -rw-r--r-- 6.9 KB
smb2glob.h -rw-r--r-- 1.9 KB
smb2inode.c -rw-r--r-- 7.5 KB
smb2maperror.c -rw-r--r-- 126.9 KB
smb2misc.c -rw-r--r-- 18.4 KB
smb2ops.c -rw-r--r-- 48.6 KB
smb2pdu.c -rw-r--r-- 72.6 KB
smb2pdu.h -rw-r--r-- 32.5 KB
smb2proto.h -rw-r--r-- 8.5 KB
smb2status.h -rw-r--r-- 125.2 KB
smb2transport.c -rw-r--r-- 15.9 KB
smbencrypt.c -rw-r--r-- 6.0 KB
smberr.h -rw-r--r-- 7.5 KB
smbfsctl.h -rw-r--r-- 6.3 KB
transport.c -rw-r--r-- 27.5 KB
winucase.c -rw-r--r-- 36.9 KB
xattr.c -rw-r--r-- 12.1 KB

back to top