aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2015-02-12 16:32:58 +0800
committerAmit Pundir <amit.pundir@linaro.org>2015-02-12 16:32:58 +0800
commiteec2486674b53d8ca576677cae60bc3f380d33c1 (patch)
tree83b1946c01976be7cc261ece9c6778bc0dc5cdb4 /net
parentec7d2291ade4031a87bf32474d7c03b04c5fa5e9 (diff)
parent551780fc28cb7480dbc4f585ef80ca02c2922ec1 (diff)
Merge branch 'android-3.14' of https://android.googlesource.com/kernel/common into linaro-android-3.14-lsk
* aosp/android-3.14: (52 commits) xt_qtaguid: use sock_gen_put() instead of xt_socket_put_sk() android: base-cfg: enable ARMV8_DEPRECATED and subfeatures arm64: kconfig: move emulation option under kernel features kbuild: make it possible to specify the module output dir arm64: Emulate SETEND for AArch32 tasks arm64: Consolidate hotplug notifier for instruction emulation arm64: kernel: explicitly add include in armv8_deprecated arm64: Track system support for mixed endian EL0 arm64: Fix up /proc/cpuinfo arm64: cpuinfo: record cpu system register values arm64: add MIDR_EL1 field accessors arm64: fix return code check when changing emulation handler arm64: Trace emulation of AArch32 legacy instructions arm64: Emulate CP15 Barrier instructions arm64: barriers: add dmb barrier arm64: Port SWP/SWPB emulation support from arm arm64: Add framework for legacy instruction emulation arm64: Add AArch32 instruction set condition code checks arm64: Add support for hooks to handle undefined instructions arm64: kernel: Explicitly add include in traps.c ... Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Conflicts: arch/arm64/kernel/Makefile net/netfilter/xt_qtaguid.c
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_qtaguid.c5
-rw-r--r--net/netfilter/xt_socket.c10
2 files changed, 5 insertions, 10 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index 084967225f2e..87603f69eabc 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -1659,6 +1659,7 @@ static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
struct sock *sk;
kuid_t sock_uid;
bool res;
+ bool set_sk_callback_lock = false;
if (unlikely(module_passive))
return (info->match ^ info->invert) == 0;
@@ -1716,6 +1717,8 @@ static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
MT_DEBUG("qtaguid[%d]: sk=%p got_sock=%d fam=%d proto=%d\n",
par->hooknum, sk, got_sock, par->family, ipx_proto(skb, par));
if (sk != NULL) {
+ set_sk_callback_lock = true;
+ read_lock_bh(&sk->sk_callback_lock);
MT_DEBUG("qtaguid[%d]: sk=%p->sk_socket=%p->file=%p\n",
par->hooknum, sk, sk->sk_socket,
sk->sk_socket ? sk->sk_socket->file : (void *)-1LL);
@@ -1802,6 +1805,8 @@ static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
put_sock_ret_res:
if (got_sock)
sock_gen_put(sk);
+ if (set_sk_callback_lock)
+ read_unlock_bh(&sk->sk_callback_lock);
ret_res:
MT_DEBUG("qtaguid[%d]: left %d\n", par->hooknum, res);
return res;
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index c2d565bdb484..7eb9d7d534d6 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -35,16 +35,6 @@
#include <net/netfilter/nf_conntrack.h>
#endif
-void
-xt_socket_put_sk(struct sock *sk)
-{
- if (sk->sk_state == TCP_TIME_WAIT)
- inet_twsk_put(inet_twsk(sk));
- else
- sock_put(sk);
-}
-EXPORT_SYMBOL(xt_socket_put_sk);
-
static int
extract_icmp4_fields(const struct sk_buff *skb,
u8 *protocol,