dma-buf: fix wrong variable of task to check condition
authorhyesoo.yu <hyesoo.yu@samsung.com>
Thu, 23 Aug 2018 04:49:28 +0000 (13:49 +0900)
committerhskang <hs1218.kang@samsung.com>
Wed, 29 Aug 2018 07:34:08 +0000 (16:34 +0900)
commit94550f1e55bddc55099e9e1cd37b1d7a9eff9aec
tree43ef5b424ac4de56d449aad9a286a9cb39b656bd
parent930b39ba38592ac883a79315d50c8d439d938c88
dma-buf: fix wrong variable of task to check condition

dmabuf trace should release all references between task
and buffer when the task exit.

To know when the task exit, the dmabuf trace registers
anon file descriptor and that should be closed only by
do_exit. Thus, the task need to have 'PF_EXITING'
when closing the file system. If not, it is possible
for user to manage file descriptor incorrectly, so we
check the flags of task.
However, release function could be called by kernel thread
though delayed work, we have to check the task from
file inode's private data instead of 'current'

Change-Id: Id2750fc0f4231817537e183df7bc75d010b348b0
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/dma-buf/dma-buf-trace.c