cozybit/android_kernel_sony_apq8064 — pull request #2 by bcopeland (2014-03-20 00:13:27+00:00)
Title: kgsl: hold rcu lock around find_task_by_vpid()

The task list must be rcu-protected.

Fixes:
===============================
[ INFO: suspicious RCU usage. ]
3.4.0-g4a73a1d-00004-gf7d262d-dirty #1 Tainted: G W O
-------------------------------
/home/bob/ext/cmbuild/kernel/sony/apq8064/kernel/pid.c:425 find_task_by_pid_ns() needs rcu_read_lock() protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 1
3 locks held by kworker/u:2/106:
#0: ((device->name)){.+.+.+}, at: [] process_one_work+0x1d8/0x698
#1: ((device_3d0.dev).hang_check_ws){+.+.+.}, at: [] process_one_work+0x1d8/0x698
#2: ((device_3d0.dev).mutex){+.+.+.}, at: [] kgsl_hang_check+0x2c/0x84

stack backtrace:
[] (unwind_backtrace+0x0/0x128) from [] (dump_stack+0x20/0x24)
[] (dump_stack+0x20/0x24) from [] (lockdep_rcu_suspicious+0xd0/0x10c)
[] (lockdep_rcu_suspicious+0xd0/0x10c) from [] (find_task_by_pid_ns+0x88/0xb0)
[] (find_task_by_pid_ns+0x88/0xb0) from [] (find_task_by_vpid+0x30/0x34)
[] (find_task_by_vpid+0x30/0x34) from [] (snapshot_os+0x1a8/0x228)
[] (snapshot_os+0x1a8/0x228) from [] (kgsl_device_snapshot+0x11c/0x26c)
[] (kgsl_device_snapshot+0x11c/0x26c) from [] (adreno_dump_and_exec_ft+0xbc/0xae0)
[] (adreno_dump_and_exec_ft+0xbc/0xae0) from [] (kgsl_hang_check+0x54/0x84)
[] (kgsl_hang_check+0x54/0x84) from [] (process_one_work+0x33c/0x698)
[] (process_one_work+0x33c/0x698) from [] (worker_thread+0x1a8/0x2cc)
[] (worker_thread+0x1a8/0x2cc) from [] (kthread+0xa8/0xbc)
[] (kthread+0xa8/0xbc) from [] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Bob Copeland