ANDROID: move up spin_unlock_bh() ahead of remove_proc_entry()
It causes BUG because remove_proc_entry may sleep while holding spinlock. BUG: scheduling while atomic: ip6tables-resto/887/0x00000202 [<c0f03f00>] (wait_for_completion) from [<c031b8c8>] (proc_entry_rundown+0x74/0xd0) [<c031b854>] (proc_entry_rundown) from [<c03225c4>] (remove_proc_entry+0xc0/0x18c) [<c0322504>] (remove_proc_entry) from [<c0d656e0>] (quota_mt2_destroy+0x88/0xa8) [<c0d65658>] (quota_mt2_destroy) from [<c0e405f0>] (cleanup_entry+0x6c/0xf0) [<c0e40584>] (cleanup_entry) from [<c0e41400>] (do_replace.constprop.2+0x314/0x438) [<c0e410ec>] (do_replace.constprop.2) from [<c0e41640>] (do_ip6t_set_ctl+0x11c/0x238) [<c0e41524>] (do_ip6t_set_ctl) from [<c0d2e7ec>] (nf_setsockopt+0xd4/0xf0) [<c0d2e718>] (nf_setsockopt) from [<c0e16bb8>] (ipv6_setsockopt+0x90/0xb8) [<c0e16b28>] (ipv6_setsockopt) from [<c0e1e908>] (rawv6_setsockopt+0x54/0x22c) [<c0e1e8b4>] (rawv6_setsockopt) from [<c0cb48dc>] (sock_common_setsockopt+0x28/0x30) [<c0cb48b4>] (sock_common_setsockopt) from [<c0cb3ac8>] (SyS_setsockopt+0xb8/0x110) [<c0cb3a10>] (SyS_setsockopt) from [<c01094e0>] (ret_fast_syscall+0x0/0x48) This is a fix for an Android specific feature which was imported from unofficial upstream (xtables-addons), which also has the same issue: https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l235 After this change the proc entry may now be removed later, when we're already adding another one, potentially with the same name, this will simply fail during creation, see error path for this at: https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/extensions/xt_quota2.c#l179 Bug: 143092160 Signed-off-by:Maciej Żenczykowski <maze@google.com> Signed-off-by:
DongJoo Kim <micomx@gmail.com> Change-Id: I3ff3883738353785f5792c5f06bf6b72985c4c68
-
mentioned in commit 60f6534a
-
mentioned in commit 0803cc8b
-
mentioned in commit c39f7ce9
-
mentioned in commit dc9ebce3
-
mentioned in commit c9867885
-
mentioned in commit 594e79cd
-
mentioned in commit 8f42edc5
-
mentioned in commit b81daae6
-
mentioned in commit a6608d14
-
mentioned in commit 59788b1e
-
mentioned in commit d50ac40a
-
mentioned in commit 14ddb392
-
mentioned in commit cce63eda
-
mentioned in commit 184536d0
-
mentioned in commit dca7c526
-
mentioned in commit 5d425b0b
-
mentioned in commit f3b262d8
-
mentioned in commit ca72f49a
-
mentioned in commit 0d7a0c24
-
mentioned in commit e9262010
-
mentioned in commit 1dd7e2d0
-
mentioned in commit dee84816
-
mentioned in commit 95a8ae4a
-
mentioned in commit 4997c4fe
-
mentioned in commit 3deb3be1
-
mentioned in commit 2ec84e06
-
mentioned in commit 1f826540
-
mentioned in commit 2160d88a
-
mentioned in commit f6bf76f7
-
mentioned in commit 982dad26
-
mentioned in commit 938b00db
-
mentioned in commit 1f238e8b
-
mentioned in commit 3990d634
-
mentioned in commit 0b36cc4d
-
mentioned in commit ac0f391a
-
mentioned in commit e0a14a79
-
mentioned in commit 62cb7381
-
mentioned in commit aed89317
-
mentioned in commit 2e90131e
-
mentioned in commit 9f95b856
-
mentioned in commit 8382501f
-
mentioned in commit 1732c37a