1. 08 Jul, 2017 11 commits
    • Gustavo A. R. Silva's avatar
      net: ethernet: mediatek: remove useless code in mtk_probe() · e8df7603
      Gustavo A. R. Silva authored
      Remove useless local variables _match_, _soc_ and the code related.
      
      Notice that
      
      const struct of_device_id of_mtk_match[] = {
              { .compatible = "mediatek,mt2701-eth" },
              {},
      };
      
      So match->data is NULL.
      Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8df7603
    • Roopa Prabhu's avatar
      mpls: fix uninitialized in_label var warning in mpls_getroute · a906c1aa
      Roopa Prabhu authored
      Fix the below warning generated by static checker:
          net/mpls/af_mpls.c:2111 mpls_getroute()
          error: uninitialized symbol 'in_label'."
      
      Fixes: 397fc9e5 ("mpls: route get support")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a906c1aa
    • Nicolas Dichtel's avatar
      doc: SKB_GSO_[IPIP|SIT] have been replaced · 11bafd54
      Nicolas Dichtel authored
      Those enum values don't exist anymore.
      
      Fixes: 7e13318d ("net: define gso types for IPx over IPv4 and IPv6")
      CC: Tom Herbert <tom@herbertland.com>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11bafd54
    • WANG Cong's avatar
      bonding: avoid NETDEV_CHANGEMTU event when unregistering slave · f51048c3
      WANG Cong authored
      As Hongjun/Nicolas summarized in their original patch:
      
      "
      When a device changes from one netns to another, it's first unregistered,
      then the netns reference is updated and the dev is registered in the new
      netns. Thus, when a slave moves to another netns, it is first
      unregistered. This triggers a NETDEV_UNREGISTER event which is caught by
      the bonding driver. The driver calls bond_release(), which calls
      dev_set_mtu() and thus triggers NETDEV_CHANGEMTU (the device is still in
      the old netns).
      "
      
      This is a very special case, because the device is being unregistered
      no one should still care about the NETDEV_CHANGEMTU event triggered
      at this point, we can avoid broadcasting this event on this path,
      and avoid touching inetdev_event()/addrconf_notify() path.
      
      It requires to export __dev_set_mtu() to bonding driver.
      Reported-by: default avatarHongjun Li <hongjun.li@6wind.com>
      Reported-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f51048c3
    • David S. Miller's avatar
      Merge branch 'rds-tcp-sock_graft-leak' · 5dc314f8
      David S. Miller authored
      Sowmini Varadhan says:
      
      ====================
      rds-tcp: sock_graft() leak
      
      Following up on the discussion at
        https://www.spinics.net/lists/netdev/msg442859.html
      - make rds_tcp_accept_one() call sock_create_lite()
      - add a WARN_ON() to sock_graft()
      
      Tested by running an infinite while() loop that does
      (module-load; rds-stress; module-unload) and monitors
      TCP slabinfo while the test is running.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dc314f8
    • Sowmini Varadhan's avatar
      net/sock: add WARN_ON(parent->sk) in sock_graft() · 0ffdaf5b
      Sowmini Varadhan authored
      sock_graft() unilaterally sets up parent->sk based on the
      assumption that the existing parent->sk is null. If this
      condition is not true, then the existing parent->sk would
      be leaked, so add a WARN_ON() to alert callers who may fall
      in this category.
      Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ffdaf5b
    • Sowmini Varadhan's avatar
      rds: tcp: use sock_create_lite() to create the accept socket · 0933a578
      Sowmini Varadhan authored
      There are two problems with calling sock_create_kern() from
      rds_tcp_accept_one()
      1. it sets up a new_sock->sk that is wasteful, because this ->sk
         is going to get replaced by inet_accept() in the subsequent ->accept()
      2. The new_sock->sk is a leaked reference in sock_graft() which
         expects to find a null parent->sk
      
      Avoid these problems by calling sock_create_lite().
      Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0933a578
    • David S. Miller's avatar
      Merge branch 'hns-fixes' · 9dc351da
      David S. Miller authored
      Lin Yun Sheng says:
      
      ====================
      Bugfixs for hns ethernet driver
      
      This patchset fix skb used after free and C45 op code issues
      in hns driver.
      
      Patch V2:
      	1. Remove ndev->feature checking in TX description patch.
      	2. Add Fixes: Tag in patch description.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dc351da
    • Yunsheng Lin's avatar
      net: hns: Fix a skb used after free bug · 27463ad9
      Yunsheng Lin authored
      skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK,
      which cause hns_nic_net_xmit to use a freed skb.
      
      BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940...
      	[17659.112635]      alloc_debug_processing+0x18c/0x1a0
      	[17659.117208]      __slab_alloc+0x52c/0x560
      	[17659.120909]      kmem_cache_alloc_node+0xac/0x2c0
      	[17659.125309]      __alloc_skb+0x6c/0x260
      	[17659.128837]      tcp_send_ack+0x8c/0x280
      	[17659.132449]      __tcp_ack_snd_check+0x9c/0xf0
      	[17659.136587]      tcp_rcv_established+0x5a4/0xa70
      	[17659.140899]      tcp_v4_do_rcv+0x27c/0x620
      	[17659.144687]      tcp_prequeue_process+0x108/0x170
      	[17659.149085]      tcp_recvmsg+0x940/0x1020
      	[17659.152787]      inet_recvmsg+0x124/0x180
      	[17659.156488]      sock_recvmsg+0x64/0x80
      	[17659.160012]      SyS_recvfrom+0xd8/0x180
      	[17659.163626]      __sys_trace_return+0x0/0x4
      	[17659.167506] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=23 cpu=1 pid=13
      	[17659.174000]      free_debug_processing+0x1d4/0x2c0
      	[17659.178486]      __slab_free+0x240/0x390
      	[17659.182100]      kmem_cache_free+0x24c/0x270
      	[17659.186062]      kfree_skbmem+0xa0/0xb0
      	[17659.189587]      __kfree_skb+0x28/0x40
      	[17659.193025]      napi_gro_receive+0x168/0x1c0
      	[17659.197074]      hns_nic_rx_up_pro+0x58/0x90
      	[17659.201038]      hns_nic_rx_poll_one+0x518/0xbc0
      	[17659.205352]      hns_nic_common_poll+0x94/0x140
      	[17659.209576]      net_rx_action+0x458/0x5e0
      	[17659.213363]      __do_softirq+0x1b8/0x480
      	[17659.217062]      run_ksoftirqd+0x64/0x80
      	[17659.220679]      smpboot_thread_fn+0x224/0x310
      	[17659.224821]      kthread+0x150/0x170
      	[17659.228084]      ret_from_fork+0x10/0x40
      
      	BUG: KASAN: use-after-free in hns_nic_net_xmit+0x8c/0xc0...
      	[17751.080490]      __slab_alloc+0x52c/0x560
      	[17751.084188]      kmem_cache_alloc+0x244/0x280
      	[17751.088238]      __build_skb+0x40/0x150
      	[17751.091764]      build_skb+0x28/0x100
      	[17751.095115]      __alloc_rx_skb+0x94/0x150
      	[17751.098900]      __napi_alloc_skb+0x34/0x90
      	[17751.102776]      hns_nic_rx_poll_one+0x180/0xbc0
      	[17751.107097]      hns_nic_common_poll+0x94/0x140
      	[17751.111333]      net_rx_action+0x458/0x5e0
      	[17751.115123]      __do_softirq+0x1b8/0x480
      	[17751.118823]      run_ksoftirqd+0x64/0x80
      	[17751.122437]      smpboot_thread_fn+0x224/0x310
      	[17751.126575]      kthread+0x150/0x170
      	[17751.129838]      ret_from_fork+0x10/0x40
      	[17751.133454] INFO: Freed in kfree_skbmem+0xa0/0xb0 age=19 cpu=7 pid=43
      	[17751.139951]      free_debug_processing+0x1d4/0x2c0
      	[17751.144436]      __slab_free+0x240/0x390
      	[17751.148051]      kmem_cache_free+0x24c/0x270
      	[17751.152014]      kfree_skbmem+0xa0/0xb0
      	[17751.155543]      __kfree_skb+0x28/0x40
      	[17751.159022]      napi_gro_receive+0x168/0x1c0
      	[17751.163074]      hns_nic_rx_up_pro+0x58/0x90
      	[17751.167041]      hns_nic_rx_poll_one+0x518/0xbc0
      	[17751.171358]      hns_nic_common_poll+0x94/0x140
      	[17751.175585]      net_rx_action+0x458/0x5e0
      	[17751.179373]      __do_softirq+0x1b8/0x480
      	[17751.183076]      run_ksoftirqd+0x64/0x80
      	[17751.186691]      smpboot_thread_fn+0x224/0x310
      	[17751.190826]      kthread+0x150/0x170
      	[17751.194093]      ret_from_fork+0x10/0x40
      
      Fixes: 13ac695e ("net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem")
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarlipeng <lipeng321@huawei.com>
      Reported-by: default avatarJun He <hjat2005@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27463ad9
    • Yunsheng Lin's avatar
      net: hns: Fix a wrong op phy C45 code · ebe8d359
      Yunsheng Lin authored
      As the user manual described, the second step to write to C45 phy
      by mdio should be data, but not address. Here we should fix this
      issue.
      
      Fixes: 5b904d39 ("net: add Hisilicon Network Subsystem MDIO support")
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Reviewed-by: default avatarlipeng <lipeng321@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebe8d359
    • vishnuvardhan's avatar
      net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 · 233a1587
      vishnuvardhan authored
      As per the SAMA5D3 device specification it supports Jumbo frames.
      But the suggested flag and length of bytes it supports was not updated
      in this driver config_structure.
      The maximum jumbo frames the device supports :
      10240 bytes as per the device spec.
      
      While changing the MTU value greater than 1500, it threw error:
      sudo ifconfig eth1 mtu 9000
      SIOCSIFMTU: Invalid argument
      
      Add this support to driver so that it works as expected and designed.
      Signed-off-by: default avatarvishnuvardhan <vardhanraj4143@gmail.com>
      [nicolas.ferre@microchip.com: modify slightly commit msg]
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      233a1587
  2. 07 Jul, 2017 9 commits
  3. 06 Jul, 2017 11 commits
    • Nikolay Aleksandrov's avatar
      vrf: fix bug_on triggered by rx when destroying a vrf · f630c38e
      Nikolay Aleksandrov authored
      When destroying a VRF device we cleanup the slaves in its ndo_uninit()
      function, but that causes packets to be switched (skb->dev == vrf being
      destroyed) even though we're pass the point where the VRF should be
      receiving any packets while it is being dismantled. This causes a BUG_ON
      to trigger if we have raw sockets (trace below).
      The reason is that the inetdev of the VRF has been destroyed but we're
      still sending packets up the stack with it, so let's free the slaves in
      the dellink callback as David Ahern suggested.
      
      Note that this fix doesn't prevent packets from going up when the VRF
      device is admin down.
      
      [   35.631371] ------------[ cut here ]------------
      [   35.631603] kernel BUG at net/ipv4/fib_frontend.c:285!
      [   35.631854] invalid opcode: 0000 [#1] SMP
      [   35.631977] Modules linked in:
      [   35.632081] CPU: 2 PID: 22 Comm: ksoftirqd/2 Not tainted 4.12.0-rc7+ #45
      [   35.632247] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
      [   35.632477] task: ffff88005ad68000 task.stack: ffff88005ad64000
      [   35.632632] RIP: 0010:fib_compute_spec_dst+0xfc/0x1ee
      [   35.632769] RSP: 0018:ffff88005ad67978 EFLAGS: 00010202
      [   35.632910] RAX: 0000000000000001 RBX: ffff880059a7f200 RCX: 0000000000000000
      [   35.633084] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff82274af0
      [   35.633256] RBP: ffff88005ad679f8 R08: 000000000001ef70 R09: 0000000000000046
      [   35.633430] R10: ffff88005ad679f8 R11: ffff880037731cb0 R12: 0000000000000001
      [   35.633603] R13: ffff8800599e3000 R14: 0000000000000000 R15: ffff8800599cb852
      [   35.634114] FS:  0000000000000000(0000) GS:ffff88005d900000(0000) knlGS:0000000000000000
      [   35.634306] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   35.634456] CR2: 00007f3563227095 CR3: 000000000201d000 CR4: 00000000000406e0
      [   35.634632] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   35.634865] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   35.635055] Call Trace:
      [   35.635271]  ? __lock_acquire+0xf0d/0x1117
      [   35.635522]  ipv4_pktinfo_prepare+0x82/0x151
      [   35.635831]  raw_rcv_skb+0x17/0x3c
      [   35.636062]  raw_rcv+0xe5/0xf7
      [   35.636287]  raw_local_deliver+0x169/0x1d9
      [   35.636534]  ip_local_deliver_finish+0x87/0x1c4
      [   35.636820]  ip_local_deliver+0x63/0x7f
      [   35.637058]  ip_rcv_finish+0x340/0x3a1
      [   35.637295]  ip_rcv+0x314/0x34a
      [   35.637525]  __netif_receive_skb_core+0x49f/0x7c5
      [   35.637780]  ? lock_acquire+0x13f/0x1d7
      [   35.638018]  ? lock_acquire+0x15e/0x1d7
      [   35.638259]  __netif_receive_skb+0x1e/0x94
      [   35.638502]  ? __netif_receive_skb+0x1e/0x94
      [   35.638748]  netif_receive_skb_internal+0x74/0x300
      [   35.639002]  ? dev_gro_receive+0x2ed/0x411
      [   35.639246]  ? lock_is_held_type+0xc4/0xd2
      [   35.639491]  napi_gro_receive+0x105/0x1a0
      [   35.639736]  receive_buf+0xc32/0xc74
      [   35.639965]  ? detach_buf+0x67/0x153
      [   35.640201]  ? virtqueue_get_buf_ctx+0x120/0x176
      [   35.640453]  virtnet_poll+0x128/0x1c5
      [   35.640690]  net_rx_action+0x103/0x343
      [   35.640932]  __do_softirq+0x1c7/0x4b7
      [   35.641171]  run_ksoftirqd+0x23/0x5c
      [   35.641403]  smpboot_thread_fn+0x24f/0x26d
      [   35.641646]  ? sort_range+0x22/0x22
      [   35.641878]  kthread+0x129/0x131
      [   35.642104]  ? __list_add+0x31/0x31
      [   35.642335]  ? __list_add+0x31/0x31
      [   35.642568]  ret_from_fork+0x2a/0x40
      [   35.642804] Code: 05 bd 87 a3 00 01 e8 1f ef 98 ff 4d 85 f6 48 c7 c7 f0 4a 27 82 41 0f 94 c4 31 c9 31 d2 41 0f b6 f4 e8 04 71 a1 ff 45 84 e4 74 02 <0f> 0b 0f b7 93 c4 00 00 00 4d 8b a5 80 05 00 00 48 03 93 d0 00
      [   35.644342] RIP: fib_compute_spec_dst+0xfc/0x1ee RSP: ffff88005ad67978
      
      Fixes: 193125db ("net: Introduce VRF device driver")
      Reported-by: default avatarChris Cormier <chriscormier@cumulusnetworks.com>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f630c38e
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · c644bd79
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains two Netfilter fixes for your net tree,
      they are:
      
      1) Fix memleak from netns release path of conntrack protocol trackers,
         patch from Liping Zhang.
      
      2) Uninitialized flags field in ebt_log, that results in unpredictable
         logging format in ebtables, also from Liping.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c644bd79
    • Geert Uytterhoeven's avatar
      ptp: dte: Use LL suffix for 64-bit constants · 3d05035e
      Geert Uytterhoeven authored
      With gcc 4.1.2:
      
          drivers/ptp/ptp_dte.c: In function ‘dte_write_nco_delta’:
          drivers/ptp/ptp_dte.c:105: warning: integer constant is too large for ‘long’ type
          drivers/ptp/ptp_dte.c:112: warning: integer constant is too large for ‘long’ type
          drivers/ptp/ptp_dte.c:114: warning: integer constant is too large for ‘long’ type
      
      Add the missing "LL" suffix to fix this.
      
      Fixes: 8a56aa10 ("ptp: Add a ptp clock driver for Broadcom DTE")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d05035e
    • Zheng Li's avatar
      sctp: set the value of flowi6_oif to sk_bound_dev_if to make sctp_v6_get_dst... · 25e7f2de
      Zheng Li authored
      sctp: set the value of flowi6_oif to sk_bound_dev_if to make sctp_v6_get_dst to find the correct route entry.
      
      if there are several same route entries with different outgoing net device,
      application's socket specifies the oif through setsockopt with
      SO_BINDTODEVICE, sctpv6 should choose the route entry whose outgoing net
      device is the oif which was specified by socket, set the value of
      flowi6_oif to sk->sk_bound_dev_if to make sctp_v6_get_dst to find the
      correct route entry.
      Signed-off-by: default avatarZheng Li <james.z.li@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25e7f2de
    • Matthias Rosenfelder's avatar
      TLS: Fix length check in do_tls_getsockopt_tx() · 5a3b886c
      Matthias Rosenfelder authored
      copy_to_user() copies the struct the pointer is pointing to, but the
      length check compares against sizeof(pointer) and not sizeof(struct).
      On 32-bit the size is probably the same, so it might have worked
      accidentally.
      Signed-off-by: default avatarMatthias Rosenfelder <mrosenfelder.lkml@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a3b886c
    • Wu Fengguang's avatar
      tcp: md5: tcp_md5_do_lookup_exact() can be static · e8f37d57
      Wu Fengguang authored
      Fixes: 6797318e ("tcp: md5: add an address prefix for key lookup")
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8f37d57
    • David Ahern's avatar
      net: ipv6: Compare lwstate in detecting duplicate nexthops · f06b7549
      David Ahern authored
      Lennert reported a failure to add different mpls encaps in a multipath
      route:
      
        $ ip -6 route add 1234::/16 \
              nexthop encap mpls 10 via fe80::1 dev ens3 \
              nexthop encap mpls 20 via fe80::1 dev ens3
        RTNETLINK answers: File exists
      
      The problem is that the duplicate nexthop detection does not compare
      lwtunnel configuration. Add it.
      
      Fixes: 19e42e45 ("ipv6: support for fib route lwtunnel encap attributes")
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Reported-by: default avatarJoão Taveira Araújo <joao.taveira@gmail.com>
      Reported-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Tested-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f06b7549
    • Derek Chickles's avatar
      liquidio: fix bug in soft reset failure detection · 05a6b4ca
      Derek Chickles authored
      The code that detects a failed soft reset of Octeon is comparing the wrong
      value against the reset value of the Octeon SLI_SCRATCH_1 register,
      resulting in an inability to detect a soft reset failure.  Fix it by using
      the correct value in the comparison, which is any non-zero value.
      
      Fixes: f21fb3ed ("Add support of Cavium Liquidio ethernet adapters")
      Fixes: c0eab5b3 ("liquidio: CN23XX firmware download")
      Signed-off-by: default avatarDerek Chickles <derek.chickles@cavium.com>
      Signed-off-by: default avatarSatanand Burla <satananda.burla@cavium.com>
      Signed-off-by: default avatarRaghu Vatsavayi <raghu.vatsavayi@cavium.com>
      Signed-off-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05a6b4ca
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 9b51f044
      Linus Torvalds authored
      Pull another parisc update from Helge Deller:
       "Christoph Hellwig provided one patch for the parisc architecture to
        drop the DMA_ERROR_CODE define from the parisc architecture"
      
      * 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: ->mapping_error
      9b51f044
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 55a7b212
      Linus Torvalds authored
      Pull arm64 updates from Will Deacon:
      
       - RAS reporting via GHES/APEI (ACPI)
      
       - Indirect ftrace trampolines for modules
      
       - Improvements to kernel fault reporting
      
       - Page poisoning
      
       - Sigframe cleanups and preparation for SVE context
      
       - Core dump fixes
      
       - Sparse fixes (mainly relating to endianness)
      
       - xgene SoC PMU v3 driver
      
       - Misc cleanups and non-critical fixes
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (75 commits)
        arm64: fix endianness annotation for 'struct jit_ctx' and friends
        arm64: cpuinfo: constify attribute_group structures.
        arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set()
        arm64: ptrace: Remove redundant overrun check from compat_vfp_set()
        arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails
        arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn()
        arm64: fix endianness annotation in get_kaslr_seed()
        arm64: add missing conversion to __wsum in ip_fast_csum()
        arm64: fix endianness annotation in acpi_parking_protocol.c
        arm64: use readq() instead of readl() to read 64bit entry_point
        arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm()
        arm64: fix endianness annotation for aarch64_insn_write()
        arm64: fix endianness annotation in aarch64_insn_read()
        arm64: fix endianness annotation in call_undef_hook()
        arm64: fix endianness annotation for debug-monitors.c
        ras: mark stub functions as 'inline'
        arm64: pass endianness info to sparse
        arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels
        arm64: signal: Allow expansion of the signal frame
        acpi: apei: check for pending errors when probing GHES entries
        ...
      55a7b212
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · e5f76a2e
      Linus Torvalds authored
      Pull mnt namespace updates from Eric Biederman:
       "A big break-through came during this development cycle as a way was
        found to maintain the existing umount -l semantics while allowing for
        optimizations that improve the performance. That is represented by the
        first change in this series moving the reparenting of mounts into
        their own pass. This has allowed addressing the horrific performance
        of umount -l on a carefully crafted tree of mounts with locks held
        (0.06s vs 60s in my testing). What allowed this was not changing where
        umounts propagate to while propgating umounts.
      
        The next change fixes the case where the order of the mount whose
        umount are being progated visits a tree where the mounts are stacked
        upon each other in another order. This is weird but not hard to
        implement.
      
        The final change takes advantage of the unchanging mount propgation
        tree to skip parts of the mount propgation tree that have already been
        visited. Yielding a very nice speed up in the worst case.
      
        There remains one outstanding question about the semantics of umount -l
        that I am still discussiong with Ram Pai. In practice that area of the
        semantics was changed by 1064f874 ("mnt: Tuck mounts under others
        instead of creating shadow/side mounts.") and no regressions have been
        reported. Still I intend to finish talking that out with him to ensure
        there is not something a more intense use of mount propagation in the
        future will not cause to become significant"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        mnt: Make propagate_umount less slow for overlapping mount propagation trees
        mnt: In propgate_umount handle visiting mounts in any order
        mnt: In umount propagation reparent in a separate pass
      e5f76a2e
  4. 05 Jul, 2017 9 commits
    • Linus Torvalds's avatar
      Merge tag 'gfs2-4.13.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · c96e6dab
      Linus Torvalds authored
      Pull GFS2 updates from Bob Peterson:
       "We've got eight GFS2 patches for this merge window:
      
         - Andreas Gruenbacher has four patches related to cleaning up the
           GFS2 inode evict process. This is about half of his patches
           designed to fix a long-standing GFS2 hang related to the inode
           shrinker: Shrinker calls gfs2 evict, evict calls DLM, DLM requires
           memory and blocks on the shrinker.
      
           These four patches have been well tested. His second set of patches
           are still being tested, so I plan to hold them until the next merge
           window, after we have more weeks of testing. The first patch
           eliminates the flush_delayed_work, which can block.
      
         - Andreas's second patch protects setting of gl_object for rgrps with
           a spin_lock to prevent proven races.
      
         - His third patch introduces a centralized mechanism for queueing
           glock work with better reference counting, to prevent more races.
      
          -His fourth patch retains a reference to inode glocks when an error
           occurs while creating an inode. This keeps the subsequent evict
           from needing to reacquire the glock, which might call into DLM and
           block in low memory conditions.
      
         - Arvind Yadav has a patch to add const to attribute_group
           structures.
      
         - I have a patch to detect directory entry inconsistencies and
           withdraw the file system if any are found. Better that than silent
           corruption.
      
         - I have a patch to remove a vestigial variable from glock
           structures, saving some slab space.
      
         - I have another patch to remove a vestigial variable from the GFS2
           in-core superblock structure"
      
      * tag 'gfs2-4.13.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        GFS2: constify attribute_group structures.
        gfs2: gfs2_create_inode: Keep glock across iput
        gfs2: Clean up glock work enqueuing
        gfs2: Protect gl->gl_object by spin lock
        gfs2: Get rid of flush_delayed_work in gfs2_evict_inode
        GFS2: Eliminate vestigial sd_log_flush_wrapped
        GFS2: Remove gl_list from glock structure
        GFS2: Withdraw when directory entry inconsistencies are detected
      c96e6dab
    • Linus Torvalds's avatar
      Merge branch 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 8c27cb35
      Linus Torvalds authored
      Pull btrfs updates from David Sterba:
       "The core updates improve error handling (mostly related to bios), with
        the usual incremental work on the GFP_NOFS (mis)use removal,
        refactoring or cleanups. Except the two top patches, all have been in
        for-next for an extensive amount of time.
      
        User visible changes:
      
         - statx support
      
         - quota override tunable
      
         - improved compression thresholds
      
         - obsoleted mount option alloc_start
      
        Core updates:
      
         - bio-related updates:
             - faster bio cloning
             - no allocation failures
             - preallocated flush bios
      
         - more kvzalloc use, memalloc_nofs protections, GFP_NOFS updates
      
         - prep work for btree_inode removal
      
         - dir-item validation
      
         - qgoup fixes and updates
      
         - cleanups:
             - removed unused struct members, unused code, refactoring
             - argument refactoring (fs_info/root, caller -> callee sink)
             - SEARCH_TREE ioctl docs"
      
      * 'for-4.13-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (115 commits)
        btrfs: Remove false alert when fiemap range is smaller than on-disk extent
        btrfs: Don't clear SGID when inheriting ACLs
        btrfs: fix integer overflow in calc_reclaim_items_nr
        btrfs: scrub: fix target device intialization while setting up scrub context
        btrfs: qgroup: Fix qgroup reserved space underflow by only freeing reserved ranges
        btrfs: qgroup: Introduce extent changeset for qgroup reserve functions
        btrfs: qgroup: Fix qgroup reserved space underflow caused by buffered write and quotas being enabled
        btrfs: qgroup: Return actually freed bytes for qgroup release or free data
        btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function
        btrfs: qgroup: Add quick exit for non-fs extents
        Btrfs: rework delayed ref total_bytes_pinned accounting
        Btrfs: return old and new total ref mods when adding delayed refs
        Btrfs: always account pinned bytes when dropping a tree block ref
        Btrfs: update total_bytes_pinned when pinning down extents
        Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT()
        Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64
        btrfs: fix validation of XATTR_ITEM dir items
        btrfs: Verify dir_item in iterate_object_props
        btrfs: Check name_len before in btrfs_del_root_ref
        btrfs: Check name_len before reading btrfs_get_name
        ...
      8c27cb35
    • Linus Torvalds's avatar
      Merge branch 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 7114f51f
      Linus Torvalds authored
      Pull memdup_user() conversions from Al Viro:
       "A fairly self-contained series - hunting down open-coded memdup_user()
        and memdup_user_nul() instances"
      
      * 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        bpf: don't open-code memdup_user()
        kimage_file_prepare_segments(): don't open-code memdup_user()
        ethtool: don't open-code memdup_user()
        do_ip_setsockopt(): don't open-code memdup_user()
        do_ipv6_setsockopt(): don't open-code memdup_user()
        irda: don't open-code memdup_user()
        xfrm_user_policy(): don't open-code memdup_user()
        ima_write_policy(): don't open-code memdup_user_nul()
        sel_write_validatetrans(): don't open-code memdup_user_nul()
      7114f51f
    • Linus Torvalds's avatar
      Merge branch 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · ea3b25e1
      Linus Torvalds authored
      Pull timer-related user access updates from Al Viro:
       "Continuation of timers-related stuff (there had been more, but my
        parts of that series are already merged via timers/core). This is more
        of y2038 work by Deepa Dinamani, partially disrupted by the
        unification of native and compat timers-related syscalls"
      
      * 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        posix_clocks: Use get_itimerspec64() and put_itimerspec64()
        timerfd: Use get_itimerspec64() and put_itimerspec64()
        nanosleep: Use get_timespec64() and put_timespec64()
        posix-timers: Use get_timespec64() and put_timespec64()
        posix-stubs: Conditionally include COMPAT_SYS_NI defines
        time: introduce {get,put}_itimerspec64
        time: add get_timespec64 and put_timespec64
      ea3b25e1
    • Linus Torvalds's avatar
      Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 89fbf538
      Linus Torvalds authored
      Pull read/write updates from Al Viro:
       "Christoph's fs/read_write.c series - consolidation and cleanups"
      
      * 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        nfsd: remove nfsd_vfs_read
        nfsd: use vfs_iter_read/write
        fs: implement vfs_iter_write using do_iter_write
        fs: implement vfs_iter_read using do_iter_read
        fs: move more code into do_iter_read/do_iter_write
        fs: remove __do_readv_writev
        fs: remove do_compat_readv_writev
        fs: remove do_readv_writev
      89fbf538
    • Linus Torvalds's avatar
      Merge branch 'work.sys_wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 4be95131
      Linus Torvalds authored
      Pull wait syscall updates from Al Viro:
       "Consolidating sys_wait* and compat counterparts.
      
        Gets rid of set_fs()/double-copy mess, simplifies the whole thing
        (lifting the copyouts to the syscalls means less headache in the part
        that does actual work - fewer failure exits, to start with), gets rid
        of the overhead of field-by-field __put_user()"
      
      * 'work.sys_wait' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        osf_wait4: switch to kernel_wait4()
        waitid(): switch copyout of siginfo to unsafe_put_user()
        wait_task_zombie: consolidate info logics
        kill wait_noreap_copyout()
        lift getrusage() from wait_noreap_copyout()
        waitid(2): leave copyout of siginfo to syscall itself
        kernel_wait4()/kernel_waitid(): delay copying status to userland
        wait4(2)/waitid(2): separate copying rusage to userland
        move compat wait4 and waitid next to native variants
      4be95131
    • Linus Torvalds's avatar
      Merge branch 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 3bad2f1c
      Linus Torvalds authored
      Pull misc user access cleanups from Al Viro:
       "The first pile is assorted getting rid of cargo-culted access_ok(),
        cargo-culted set_fs() and field-by-field copyouts.
      
        The same description applies to a lot of stuff in other branches -
        this is just the stuff that didn't fit into a more specific topical
        branch"
      
      * 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        Switch flock copyin/copyout primitives to copy_{from,to}_user()
        fs/fcntl: return -ESRCH in f_setown when pid/pgid can't be found
        fs/fcntl: f_setown, avoid undefined behaviour
        fs/fcntl: f_setown, allow returning error
        lpfc debugfs: get rid of pointless access_ok()
        adb: get rid of pointless access_ok()
        isdn: get rid of pointless access_ok()
        compat statfs: switch to copy_to_user()
        fs/locks: don't mess with the address limit in compat_fcntl64
        nfsd_readlink(): switch to vfs_get_link()
        drbd: ->sendpage() never needed set_fs()
        fs/locks: pass kernel struct flock to fcntl_getlk/setlk
        fs: locks: Fix some troubles at kernel-doc comments
      3bad2f1c
    • Linus Torvalds's avatar
      Cavium CNN55XX: fix broken default Kconfig entry · b4b8cbf6
      Linus Torvalds authored
      Every developer always thinks that _their_ code is so special and
      magical that it should be enabled by default.
      
      And most of them are completely and utterly wrong.  That's definitely
      the case when you write a specialty driver for a very unsual "security
      processor". It does *not* get to mark itself as "default m".
      
      If you solve world hunger, and make a driver that cures people of
      cancer, by all means enable it by default.  But afaik, the Cavium
      CNN55XX does neither.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4b8cbf6
    • Christoph Hellwig's avatar
      parisc: ->mapping_error · 227145eb
      Christoph Hellwig authored
      DMA_ERROR_CODE already went away in linux-next, but parisc unfortunately
      added a new instance of it without any review as far as I can tell.
      
      Move the two iommu drivers to report errors through ->mapping_error.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      227145eb