OSDN Git Service

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)
committerChenbo Feng <fengc@google.com>
Thu, 23 Mar 2017 23:52:48 +0000 (16:52 -0700)
commitf0faedd6b468777f3bb5834f97100794d562c8b7
tree9ad6e99c3403cbaebd58851994ae749e3b5c87a9
parente953f89b8563efe0b92f70033d237874c43d4a3d
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