projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64abd1
)
Revert "netfilter: xt_qtaguid: fix crash on non-full sks"
author
Huang, Tao
<huangtao@rock-chips.com>
Tue, 5 Jul 2016 10:24:14 +0000
(18:24 +0800)
committer
Huang, Tao
<huangtao@rock-chips.com>
Tue, 5 Jul 2016 10:24:14 +0000
(18:24 +0800)
This reverts commit
1b96a26c65104ee06eaa46dc23bbe22ebe3bf7d0
.
Fixes by LSK commit
202d12a1f733a252ee76f4cc497c9ce86270ebb2
("xt_qtaguid: Fix panic caused by synack processing")
and commit
4158b3431f473aad101da1100a9b241ff8b3cc74
("xt_qtaguid: Fix panic caused by processing non-full socket.")
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
net/netfilter/xt_qtaguid.c
patch
|
blob
|
history
diff --git
a/net/netfilter/xt_qtaguid.c
b/net/netfilter/xt_qtaguid.c
index 2596e1bf402f671ccaf1a8cb38a19533cdeff7ec..e1442bfb668dbaf9ecd3f7f425cc70a49b500a1a 100644
(file)
--- a/
net/netfilter/xt_qtaguid.c
+++ b/
net/netfilter/xt_qtaguid.c
@@
-1606,7
+1606,7
@@
static struct sock *qtaguid_find_sk(const struct sk_buff *skb,
* When in TCP_TIME_WAIT the sk is not a "struct sock" but
* "struct inet_timewait_sock" which is missing fields.
*/
- if (
!sk_fullsock(sk)
) {
+ if (
sk->sk_state == TCP_TIME_WAIT
) {
sock_gen_put(sk);
sk = NULL;
}
@@
-1689,7
+1689,7
@@
static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
/* default: Fall through and do UID releated work */
}
- sk = skb
_to_full_sk(skb)
;
+ sk = skb
->sk
;
/*
* When in TCP_TIME_WAIT the sk is not a "struct sock" but
* "struct inet_timewait_sock" which is missing fields.