]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vchiq_core: fix service dereference in unlock_service
authorStefan Wahren <stefan.wahren@i2se.com>
Mon, 31 Oct 2016 14:39:27 +0000 (14:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Nov 2016 10:05:47 +0000 (11:05 +0100)
commitdf717314c6bf557cba1e9f60711065b4379a9417
treee0e9e100eaeb43a2766f7a8f6463302440238690
parent8cfa02235f2d1c7cab1a9631b1ebfe89569abb0c
staging: vchiq_core: fix service dereference in unlock_service

The service state is dereferenced before BUG_ON and outside of the
spin lock. So in order to avoid possible NULL pointer dereferences or
races move the whole scope at a safer place.

This issue has been found by Cppcheck.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c