Skip to content

Conversation

@xiaoyin0208
Copy link

This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin hw.wangxiaoyin@hisilicon.com

This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com>
@docularxu docularxu merged this pull request into 96boards-hikey:hikey960-upstream-rebase Jan 20, 2017
docularxu pushed a commit that referenced this pull request Feb 8, 2017
This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com>
gaozhangfei pushed a commit that referenced this pull request Feb 22, 2017
This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com>
docularxu pushed a commit that referenced this pull request Mar 15, 2017
This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com>
docularxu pushed a commit that referenced this pull request Mar 15, 2017
This patch adds pinctrl dtsi file

Signed-off-by: Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com>
docularxu pushed a commit that referenced this pull request Mar 17, 2017
…stream-rebase

* working-hikey960-upstream-dts:
  arm64: dts: enable gpu
  arm64: dts: hi3660: add sd/sdio device nodes
  arm64: dts: hi3660: add ufs node and reset property
  arm64: dts: hi3660: add spi device nodes
  arm64: dts: hisilicon: add device node for hi6421 regulator chip
  arm64: dts: hisilicon: Add uarts and enable uart6 for v2 board
  arm64: dts: hisilicon: add gpio dtsi file for Hisilicon Hi3660 SOC
  arm64: dts: hisilicon: add dtsi file for Hisilicon Hi3660 SOC (#25)
  arm64: dts: hi3660: add clk, i2c & reset
  arm64: dts: Add dts files for Hisilicon Hi3660 SoC
  document: dt: add binding for Hi3660 SoC
docularxu pushed a commit that referenced this pull request Mar 17, 2017
…60-v4.9

* working-hikey960-upstream-dts-v4.9:
  arm64: dts: enable gpu
  arm64: dts: hi3660: add sd/sdio device nodes
  arm64: dts: hi3660: add ufs node and reset property
  arm64: dts: hi3660: add spi device nodes
  arm64: dts: hisilicon: add device node for hi6421 regulator chip
  arm64: dts: hisilicon: Add uarts and enable uart6 for v2 board
  arm64: dts: hisilicon: add gpio dtsi file for Hisilicon Hi3660 SOC
  arm64: dts: hisilicon: add dtsi file for Hisilicon Hi3660 SOC (#25)
  arm64: dts: hi3660: add clk, i2c & reset
  arm64: dts: Add dts files for Hisilicon Hi3660 SoC
  document: dt: add binding for Hi3660 SoC
docularxu pushed a commit that referenced this pull request Mar 21, 2017
…60-v4.9

* working-hikey960-upstream-dts-v4.9:
  arm64: dts: hisilicon: pcie dts for Hisilicon Kirin960 SoC
  arm64: dts: enable gpu
  arm64: dts: hi3660: add sd/sdio device nodes
  arm64: dts: hi3660: add ufs node and reset property
  arm64: dts: hi3660: add spi device nodes
  arm64: dts: hisilicon: add device node for hi6421 regulator chip
  arm64: dts: hisilicon: Add uarts and enable uart6 for v2 board
  arm64: dts: hisilicon: add gpio dtsi file for Hisilicon Hi3660 SOC
  arm64: dts: hisilicon: add dtsi file for Hisilicon Hi3660 SOC (#25)
  arm64: dts: hi3660: add clk, i2c & reset
  arm64: dts: Add dts files for Hisilicon Hi3660 SoC
  document: dt: add binding for Hi3660 SoC
docularxu pushed a commit that referenced this pull request Apr 10, 2017
[ Upstream commit 45caeaa ]

As Eric Dumazet pointed out this also needs to be fixed in IPv6.
v2: Contains the IPv6 tcp/Ipv6 dccp patches as well.

We have seen a few incidents lately where a dst_enty has been freed
with a dangling TCP socket reference (sk->sk_dst_cache) pointing to that
dst_entry. If the conditions/timings are right a crash then ensues when the
freed dst_entry is referenced later on. A Common crashing back trace is:

 #8 [] page_fault at ffffffff8163e648
    [exception RIP: __tcp_ack_snd_check+74]
.
.
 #9 [] tcp_rcv_established at ffffffff81580b64
#10 [] tcp_v4_do_rcv at ffffffff8158b54a
#11 [] tcp_v4_rcv at ffffffff8158cd02
#12 [] ip_local_deliver_finish at ffffffff815668f4
#13 [] ip_local_deliver at ffffffff81566bd9
#14 [] ip_rcv_finish at ffffffff8156656d
#15 [] ip_rcv at ffffffff81566f06
#16 [] __netif_receive_skb_core at ffffffff8152b3a2
#17 [] __netif_receive_skb at ffffffff8152b608
#18 [] netif_receive_skb at ffffffff8152b690
#19 [] vmxnet3_rq_rx_complete at ffffffffa015eeaf [vmxnet3]
#20 [] vmxnet3_poll_rx_only at ffffffffa015f32a [vmxnet3]
#21 [] net_rx_action at ffffffff8152bac2
#22 [] __do_softirq at ffffffff81084b4f
#23 [] call_softirq at ffffffff8164845c
#24 [] do_softirq at ffffffff81016fc5
#25 [] irq_exit at ffffffff81084ee5
#26 [] do_IRQ at ffffffff81648ff8

Of course it may happen with other NIC drivers as well.

It's found the freed dst_entry here:

 224 static bool tcp_in_quickack_mode(struct sock *sk)↩
 225 {↩
 226 ▹       const struct inet_connection_sock *icsk = inet_csk(sk);↩
 227 ▹       const struct dst_entry *dst = __sk_dst_get(sk);↩
 228 ↩
 229 ▹       return (dst && dst_metric(dst, RTAX_QUICKACK)) ||↩
 230 ▹       ▹       (icsk->icsk_ack.quick && !icsk->icsk_ack.pingpong);↩
 231 }↩

But there are other backtraces attributed to the same freed dst_entry in
netfilter code as well.

All the vmcores showed 2 significant clues:

- Remote hosts behind the default gateway had always been redirected to a
different gateway. A rtable/dst_entry will be added for that host. Making
more dst_entrys with lower reference counts. Making this more probable.

- All vmcores showed a postitive LockDroppedIcmps value, e.g:

LockDroppedIcmps                  267

A closer look at the tcp_v4_err() handler revealed that do_redirect() will run
regardless of whether user space has the socket locked. This can result in a
race condition where the same dst_entry cached in sk->sk_dst_entry can be
decremented twice for the same socket via:

do_redirect()->__sk_dst_check()-> dst_release().

Which leads to the dst_entry being prematurely freed with another socket
pointing to it via sk->sk_dst_cache and a subsequent crash.

To fix this skip do_redirect() if usespace has the socket locked. Instead let
the redirect take place later when user space does not have the socket
locked.

The dccp/IPv6 code is very similar in this respect, so fixing it there too.

As Eric Garver pointed out the following commit now invalidates routes. Which
can set the dst->obsolete flag so that ipv4_dst_check() returns null and
triggers the dst_release().

Fixes: ceb3320 ("ipv4: Kill routes during PMTU/redirect updates.")
Cc: Eric Garver <egarver@redhat.com>
Cc: Hannes Sowa <hsowa@redhat.com>
Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
docularxu pushed a commit that referenced this pull request May 3, 2017
…stream-rebase

* working-hikey960-upstream-dts:
  arm64: dts: hi3660-hikey960: add bluetooth nodes for hikey960
  arm64: dts: hi3660-hikey960: add nodes for WiFi
  arm64: dts: hisilicon: pcie dts for Hisilicon Kirin960 SoC
  arm64: dts: enable gpu
  arm64: dts: hi3660: add sd/sdio device nodes
  arm64: dts: hi3660: add ufs node and reset property
  arm64: dts: hi3660: add spi device nodes
  arm64: dts: hisilicon: add device node for hi6421 regulator chip
  arm64: dts: hisilicon: Add uarts and enable uart6 for v2 board
  arm64: dts: hisilicon: add gpio dtsi file for Hisilicon Hi3660 SOC
  arm64: dts: hisilicon: add dtsi file for Hisilicon Hi3660 SOC (#25)
  arm64: dts: hi3660: add clk, i2c & reset
  arm64: dts: Add dts files for Hisilicon Hi3660 SoC
  document: dt: add binding for Hi3660 SoC
docularxu pushed a commit that referenced this pull request May 11, 2017
…60-v4.9

* working-hikey960-upstream-dts-v4.9:
  dts: hi3660: Add EAS energy model provide big.LITTLE info
  dts: hi3660: bind OPP table for CPUs
  dts: hi3660: bind stub clock driver
  dts: hi3660: add mailbox binding
  dts: hi3660: add CPU idle states
  dts: hi3660: bind for sp804 timer
  dts: hi3660: add reserved memory regions
  arm64: dts: hisilicon: pcie dts for Hisilicon Kirin960 SoC
  arm64: dts: enable gpu
  arm64: dts: hi3660: add sd/sdio device nodes
  arm64: dts: hi3660: add ufs node and reset property
  arm64: dts: hi3660: add spi device nodes
  arm64: dts: hisilicon: add device node for hi6421 regulator chip
  arm64: dts: hisilicon: Add uarts and enable uart6 for v2 board
  arm64: dts: hisilicon: add gpio dtsi file for Hisilicon Hi3660 SOC
  arm64: dts: hisilicon: add dtsi file for Hisilicon Hi3660 SOC (#25)
  arm64: dts: hi3660: add clk, i2c & reset
  arm64: dts: Add dts files for Hisilicon Hi3660 SoC
  document: dt: add binding for Hi3660 SoC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants