diff --git a/PATCH/kernel/others/999-net-net-fix-data-races-around-sk--sk_forward_alloc.patch b/PATCH/kernel/others/999-net-net-fix-data-races-around-sk--sk_forward_alloc.patch new file mode 100644 index 000000000..86cfc81ac --- /dev/null +++ b/PATCH/kernel/others/999-net-net-fix-data-races-around-sk--sk_forward_alloc.patch @@ -0,0 +1,31 @@ +--- a/net/dccp/ipv6.c ++++ b/net/dccp/ipv6.c +@@ -616,7 +616,7 @@ static int dccp_v6_do_rcv(struct sock *s + by tcp. Feel free to propose better solution. + --ANK (980728) + */ +- if (np->rxopt.all) ++ if (np->rxopt.all && sk->sk_state != DCCP_LISTEN) + opt_skb = skb_clone_and_charge_r(skb, sk); + + if (sk->sk_state == DCCP_OPEN) { /* Fast path */ +--- a/net/ipv6/tcp_ipv6.c ++++ b/net/ipv6/tcp_ipv6.c +@@ -1458,7 +1458,7 @@ int tcp_v6_do_rcv(struct sock *sk, struc + by tcp. Feel free to propose better solution. + --ANK (980728) + */ +- if (np->rxopt.all) ++ if (np->rxopt.all && sk->sk_state != TCP_LISTEN) + opt_skb = skb_clone_and_charge_r(skb, sk); + + reason = SKB_DROP_REASON_NOT_SPECIFIED; +@@ -1497,8 +1497,6 @@ int tcp_v6_do_rcv(struct sock *sk, struc + if (nsk != sk) { + if (tcp_child_process(sk, nsk, skb)) + goto reset; +- if (opt_skb) +- __kfree_skb(opt_skb); + return 0; + } + } else diff --git a/SCRIPTS/02_prepare_package.sh b/SCRIPTS/02_prepare_package.sh index 0d5910af0..7d6959992 100755 --- a/SCRIPTS/02_prepare_package.sh +++ b/SCRIPTS/02_prepare_package.sh @@ -64,6 +64,8 @@ CONFIG_LRNG_SELFTEST=y cp -rf ../PATCH/kernel/wg/* ./target/linux/generic/hack-6.6/ # dont wrongly interpret first-time data echo "net.netfilter.nf_conntrack_tcp_max_retrans=5" >>./package/kernel/linux/files/sysctl-nf-conntrack.conf +# OTHERS +cp -rf ../PATCH/kernel/others/* ./target/linux/generic/pending-6.6/ ### Fullcone-NAT 部分 ### # bcmfullcone