fix the deadlock in xt_qtaguid 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>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commit82b6efc31b3571b46673f0b2267895b8a7892f73
treefff4a965abddcee3cff1ec9a4966f17e8507cf41
parentf2a4a926f814066843d083bc3555cc1c86c03b3b
fix the deadlock in xt_qtaguid 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>
net/netfilter/xt_qtaguid.c