1. 19 Feb, 2017 16 commits
  2. 18 Feb, 2017 1 commit
  3. 17 Feb, 2017 23 commits
    • David S. Miller's avatar
      irda: Fix lockdep annotations in hashbin_delete(). · 4c03b862
      David S. Miller authored
      A nested lock depth was added to the hasbin_delete() code but it
      doesn't actually work some well and results in tons of lockdep splats.
      
      Fix the code instead to properly drop the lock around the operation
      and just keep peeking the head of the hashbin queue.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Tested-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c03b862
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 6dc39c50
      Linus Torvalds authored
      Pull block layer fix from Jens Axboe:
       "A single fix for a lockdep splat reported by Thomas and Gabriel"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        cfq-iosched: don't call wbt_disable_default() with IRQs disabled
      6dc39c50
    • Paolo Abeni's avatar
      vxlan: fix oops in dev_fill_metadata_dst · 22f0708a
      Paolo Abeni authored
      Since the commit 0c1d70af ("net: use dst_cache for vxlan device")
      vxlan_fill_metadata_dst() calls vxlan_get_route() passing a NULL
      dst_cache pointer, so the latter should explicitly check for
      valid dst_cache ptr. Unfortunately the commit d71785ff ("net: add
      dst_cache to ovs vxlan lwtunnel") removed said check.
      
      As a result is possible to trigger a null pointer access calling
      vxlan_fill_metadata_dst(), e.g. with:
      
      ovs-vsctl add-br ovs-br0
      ovs-vsctl add-port ovs-br0 vxlan0 -- set interface vxlan0 \
      	type=vxlan options:remote_ip=192.168.1.1 \
      	options:key=1234 options:dst_port=4789 ofport_request=10
      ip address add dev ovs-br0 172.16.1.2/24
      ovs-vsctl set Bridge ovs-br0 ipfix=@i -- --id=@i create IPFIX \
      	targets=\"172.16.1.1:1234\" sampling=1
      iperf -c 172.16.1.1 -u -l 1000 -b 10M -t 1 -p 1234
      
      This commit addresses the issue passing to vxlan_get_route() the
      dst_cache already available into the lwt info processed by
      vxlan_fill_metadata_dst().
      
      Fixes: d71785ff ("net: add dst_cache to ovs vxlan lwtunnel")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Acked-by: default avatarJiri Benc <jbenc@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22f0708a
    • Eric Dumazet's avatar
      tcp: use page_ref_inc() in tcp_sendmsg() · 4e33e346
      Eric Dumazet authored
      sk_page_frag_refill() allocates either a compound page or an order-0
      page. We can use page_ref_inc() which is slightly faster than get_page()
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e33e346
    • Cui, Cheng's avatar
      tcp: accommodate sequence number to a peer's shrunk receive window caused by... · a4ecb15a
      Cui, Cheng authored
      tcp: accommodate sequence number to a peer's shrunk receive window caused by precision loss in window scaling
      
      Prevent sending out a left-shifted sequence number from a Linux sender in
      response to a peer's shrunk receive-window caused by losing least significant
      bits in window-scaling.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Morris <jmorris@namei.org>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarCheng Cui <Cheng.Cui@netapp.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4ecb15a
    • David S. Miller's avatar
      Merge branch 'sfc-misc-fixes' · e606519e
      David S. Miller authored
      Edward Cree says:
      
      ====================
      sfc: misc. fixes
      
      Three largely unrelated fixes to increase robustness in rare edge cases.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e606519e
    • Peter Dunning's avatar
      sfc: do not device_attach if a reset is pending · 9c568fd8
      Peter Dunning authored
      efx_start_all can return without initialising queues as a reset is pending.
       This means that when netif_device_attach is called, the kernel can start
       sending traffic without having an initialised TX queue to send to.
      This patch avoids this by not calling netif_device_attach if there is a
       pending reset.
      
      Fixes: e283546c ("sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c568fd8
    • Bert Kenward's avatar
      sfc: forget filters from sw table if hw replies ENOENT on removing them · 105eac6c
      Bert Kenward authored
      If the hw doesn't think they exist, we should defer to its authority.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      105eac6c
    • Jon Cooper's avatar
      sfc: fix filter_id misinterpretation in edge case · 0ccb998b
      Jon Cooper authored
      On EF10, hardware filter IDs are 13 bits, but in some places we store
       32-bit "full filter IDs" in which higher order bits encode the filter
       match-priority.  This could cause a filter to have a full filter ID of
       0xffff, which is also the value EFX_EF10_FILTER_ID_INVALID which we use
       in 16-bit "short" filter IDs (without match-priority bits).  This would
       occur if the hardware filter ID was 0x1fff and the match-priority was 7.
      Unfortunately, some code that checks for EFX_EF10_FILTER_ID_INVALID can
       be called on full filter IDs, and will WARN_ON if this ever happens.
      So, since we have plenty of spare bits in the full filter ID, this patch
       shifts the priority bits left one bit when constructing the full filter
       IDs, ensuring that the 0x2000 bit of a full filter ID will always be 0
       and thus no full filter ID can ever equal EFX_EF10_FILTER_ID_INVALID.
      
      This patch also replaces open-coded full<->short filter ID conversions
       with calls to functions, thus keeping the definition of the full filter
       ID format in one place.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ccb998b
    • Arnd Bergmann's avatar
      vmxnet3: prevent building with 64K pages · fbdf0e28
      Arnd Bergmann authored
      I got a warning about broken code on ARM64 with 64K pages:
      
      drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_init':
      drivers/net/vmxnet3/vmxnet3_drv.c:1679:29: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
          rq->buf_info[0][i].len = PAGE_SIZE;
      
      'len' here is a 16-bit integer, so this clearly won't work. I don't think
      this driver is used much on anything other than x86, so there is no need
      to fix this properly and we can work around it with a Kconfig dependency
      to forbid known-broken configurations. qemu in theory supports it on
      other architectures too, but presumably only for compatibility with x86
      guests that also run on vmware.
      
      CONFIG_PAGE_SIZE_64KB is used on hexagon, mips, sh and tile, the other
      symbols are architecture-specific names for the same thing.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbdf0e28
    • Valentin Longchamp's avatar
      net/wan: add MODULE_LICENSE for fsl_ucc_hdlc · 74179d44
      Valentin Longchamp authored
      It is required to build it as a module.
      Signed-off-by: default avatarValentin Longchamp <valentin.longchamp@keymile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74179d44
    • Zhu Yanjun's avatar
      rds:Remove unnecessary ib_ring unalloc · d2c58294
      Zhu Yanjun authored
      In the function rds_ib_xmit_atomic, ib_ring is not allocated
      successfully. As such, it is not necessary to unalloc it.
      
      Cc: Joe Jin <joe.jin@oracle.com>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2c58294
    • Simon Horman's avatar
      nfp: Use PCI_DEVICE_ID_NETRONOME_NFP* defines · 3b473528
      Simon Horman authored
      Use PCI_DEVICE_ID_NETRONOME_NFP*, defined in linux/pci_ids.h,
      rather than replicating the same values in the NFP driver.
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b473528
    • Gao Feng's avatar
      pkt_sched: Remove useless qdisc_stab_lock · 806a8376
      Gao Feng authored
      The qdisc_stab_lock is used in qdisc_get_stab and qdisc_put_stab.
      These two functions are invoked in qdisc_create, qdisc_change, and
      qdisc_destroy which run fully under RTNL.
      
      So it already makes sure only one could access the qdisc_stab_list at
      the same time. Then it is unnecessary to use qdisc_stab_lock now.
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      806a8376
    • David Howells's avatar
      rxrpc: Change module filename to rxrpc.ko · 88c4845d
      David Howells authored
      Change module filename from af-rxrpc.ko to rxrpc.ko so as to be consistent
      with the other protocol drivers.
      
      Also adjust the documentation to reflect this.
      
      Further, there is no longer a standalone rxkad module, as it has been
      merged into the rxrpc core, so get rid of references to that.
      Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88c4845d
    • Simon Xiao's avatar
      netvsc: fix typo on statistics · b5124720
      Simon Xiao authored
      Return the correct tx_errors stats in netvsc.
      Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: default avatarSimon Xiao <sixiao@microsoft.com>
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5124720
    • Daniel Borkmann's avatar
      rtnl: don't account unused struct ifla_port_vsi in rtnl_port_size · 025331df
      Daniel Borkmann authored
      When allocating rtnl dump messages, struct ifla_port_vsi is never dumped,
      so we can save header plus payload in rtnl_port_size(). Infact, attribute
      IFLA_PORT_VSI_TYPE and struct ifla_port_vsi are not used anywhere in
      the kernel. We only need to keep the nla policy should applications in
      user space be filling this out. Same NLA_BINARY issue exists as was fixed
      in 364d5716 ("rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY")
      and others, but then again IFLA_PORT_VSI_TYPE is not used anywhere, so
      just add a comment that it's unused.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      025331df
    • Philippe Reynes's avatar
      net: qlogic: netxen: use new api ethtool_{get|set}_link_ksettings · 99f18f1d
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99f18f1d
    • Philippe Reynes's avatar
      net: hamachi: use new api ethtool_{get|set}_link_ksettings · 336f8a71
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      336f8a71
    • Roopa Prabhu's avatar
      bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries · eda7a5e8
      Roopa Prabhu authored
      added_by_external_learn fdb entries are added and expired by
      external entities like switchdev driver or external controllers.
      ageing is already disabled for such entries. Hence, don't
      indicate expiry for such fdb entries.
      
      CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Ido Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Tested-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eda7a5e8
    • David S. Miller's avatar
      Merge branch 'bpf-misc' · a2b4eb55
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      Misc BPF improvements
      
      This last series for this window adds various misc
      improvements to BPF, one is to mark registered map and
      prog types as __ro_after_init, another one for removing
      cBPF stubs in eBPF JITs and moving the stub to the core
      and last also improving JITs is to make generated images
      visible to the kernel and kallsyms, so they can be
      seen in traces. For details, please have a look at the
      individual patches.
      
      Thanks a lot!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2b4eb55
    • Daniel Borkmann's avatar
      bpf: make jited programs visible in traces · 74451e66
      Daniel Borkmann authored
      Long standing issue with JITed programs is that stack traces from
      function tracing check whether a given address is kernel code
      through {__,}kernel_text_address(), which checks for code in core
      kernel, modules and dynamically allocated ftrace trampolines. But
      what is still missing is BPF JITed programs (interpreted programs
      are not an issue as __bpf_prog_run() will be attributed to them),
      thus when a stack trace is triggered, the code walking the stack
      won't see any of the JITed ones. The same for address correlation
      done from user space via reading /proc/kallsyms. This is read by
      tools like perf, but the latter is also useful for permanent live
      tracing with eBPF itself in combination with stack maps when other
      eBPF types are part of the callchain. See offwaketime example on
      dumping stack from a map.
      
      This work tries to tackle that issue by making the addresses and
      symbols known to the kernel. The lookup from *kernel_text_address()
      is implemented through a latched RB tree that can be read under
      RCU in fast-path that is also shared for symbol/size/offset lookup
      for a specific given address in kallsyms. The slow-path iteration
      through all symbols in the seq file done via RCU list, which holds
      a tiny fraction of all exported ksyms, usually below 0.1 percent.
      Function symbols are exported as bpf_prog_<tag>, in order to aide
      debugging and attribution. This facility is currently enabled for
      root-only when bpf_jit_kallsyms is set to 1, and disabled if hardening
      is active in any mode. The rationale behind this is that still a lot
      of systems ship with world read permissions on kallsyms thus addresses
      should not get suddenly exposed for them. If that situation gets
      much better in future, we always have the option to change the
      default on this. Likewise, unprivileged programs are not allowed
      to add entries there either, but that is less of a concern as most
      such programs types relevant in this context are for root-only anyway.
      If enabled, call graphs and stack traces will then show a correct
      attribution; one example is illustrated below, where the trace is
      now visible in tooling such as perf script --kallsyms=/proc/kallsyms
      and friends.
      
      Before:
      
        7fff8166889d bpf_clone_redirect+0x80007f0020ed (/lib/modules/4.9.0-rc8+/build/vmlinux)
               f5d80 __sendmsg_nocancel+0xffff006451f1a007 (/usr/lib64/libc-2.18.so)
      
      After:
      
        7fff816688b7 bpf_clone_redirect+0x80007f002107 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fffa0575728 bpf_prog_33c45a467c9e061a+0x8000600020fb (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fffa07ef1fc cls_bpf_classify+0x8000600020dc (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff81678b68 tc_classify+0x80007f002078 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8164d40b __netif_receive_skb_core+0x80007f0025fb (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8164d718 __netif_receive_skb+0x80007f002018 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8164e565 process_backlog+0x80007f002095 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8164dc71 net_rx_action+0x80007f002231 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff81767461 __softirqentry_text_start+0x80007f0020d1 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff817658ac do_softirq_own_stack+0x80007f00201c (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff810a2c20 do_softirq+0x80007f002050 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff810a2cb5 __local_bh_enable_ip+0x80007f002085 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8168d452 ip_finish_output2+0x80007f002152 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8168ea3d ip_finish_output+0x80007f00217d (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff8168f2af ip_output+0x80007f00203f (/lib/modules/4.9.0-rc8+/build/vmlinux)
        [...]
        7fff81005854 do_syscall_64+0x80007f002054 (/lib/modules/4.9.0-rc8+/build/vmlinux)
        7fff817649eb return_from_SYSCALL_64+0x80007f002000 (/lib/modules/4.9.0-rc8+/build/vmlinux)
               f5d80 __sendmsg_nocancel+0xffff01c484812007 (/usr/lib64/libc-2.18.so)
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74451e66
    • Daniel Borkmann's avatar
      bpf: remove stubs for cBPF from arch code · 9383191d
      Daniel Borkmann authored
      Remove the dummy bpf_jit_compile() stubs for eBPF JITs and make
      that a single __weak function in the core that can be overridden
      similarly to the eBPF one. Also remove stale pr_err() mentions
      of bpf_jit_compile.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9383191d