OSDN Git Service

ANDROID: netfilter: xt_qtaguid: fix the deadlock when enable DDEBUG
authorChenbo Feng <fengc@google.com>
Thu, 23 Mar 2017 20:51:24 +0000 (13:51 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commita99dc99978b70eda5a1cd01c580525ce0183112b
treed495c13faae9b619b4a6715fab501916bec66d0f
parent377f1b20378cc3998d525c8500291bc42749293c
ANDROID: netfilter: xt_qtaguid: fix the deadlock when enable DDEBUG

When DDEBUG is enabled, the prdebug_full_state() function will try to
recursively aquire the spinlock of sock_tag_list and causing deadlock. A
check statement is added before it aquire the spinlock to differentiate
the behavior depend on the caller of the function.

Bug: 36559739
Test: Compile and run test under system/extra/test/iptables/
Change-Id: Ie3397fbaa207e14fe214d47aaf5e8ca1f4a712ee
Signed-off-by: Chenbo Feng <fengc@google.com>
(cherry picked from commit f0faedd6b468777f3bb5834f97100794d562c8b7)
net/netfilter/xt_qtaguid.c