android: drivers: workaround debugfs race in binder
authorRiley Andrews <riandrews@android.com>
Thu, 28 May 2015 19:10:05 +0000 (12:10 -0700)
committerRiley Andrews <riandrews@android.com>
Thu, 28 May 2015 21:32:35 +0000 (14:32 -0700)
commit67680c141957991b9350269a8eaf30baf1c85427
treeef082edfbdacf2a1932c35a7dcd1916e24c89393
parente4a6d6ba5a9e9e1796bbe6efe4f20ce7072df667
android: drivers: workaround debugfs race in binder

If a /d/binder/proc/[pid] entry is kept open after linux has
torn down the associated process, binder_proc_show can deference
an invalid binder_proc that has been stashed in the debugfs
inode.  Validate that the binder_proc ptr passed into binder_proc_show
has not been freed by looking for it within the global process list
whilst the global lock is held. If the ptr is not valid, print nothing.

Bug 19587483
Change-Id: Ice878c171db51ef9a4879c2f9299a2deb873d255
Signed-off-by: Riley Andrews <riandrews@android.com>
drivers/android/binder.c