1. 25 Jan, 2016 8 commits
    • Russell King's avatar
      net: dsa: fix mv88e6xxx switches · db0e51af
      Russell King authored
      Since commit 76e398a6 ("net: dsa: use switchdev obj for VLAN add/del
      ops"), the Marvell 88E6xxx switch has been unable to pass traffic
      between ports - any received traffic is discarded by the switch.
      Taking a port out of bridge mode and configuring a vlan on it also the
      port to start passing traffic.
      
      With the debugfs files re-instated to allow debug of this issue by
      comparing the register settings between the working and non-working
      case, the reason becomes clear:
      
           GLOBAL GLOBAL2 SERDES   0    1    2    3    4    5    6
      - 7:  1111    707f    2001     2    2    2    2    2    0    2
      + 7:  1111    707f    2001     1    1    1    1    1    0    1
      
      Register 7 for the ports is the default vlan tag register, and in the
      non-working setup, it has been set to 2, despite vlan 2 not being
      configured.  This causes the switch to drop all packets coming in to
      these ports.  The working setup has the default vlan tag register set
      to 1, which is the default vlan when none is configured.
      
      Inspection of the code reveals why.  The code prior to this commit
      was:
      
      -		for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
      ...
      -			if (!err && vlan->flags & BRIDGE_VLAN_INFO_PVID)
      -				err = ds->drv->port_pvid_set(ds, p->port, vid);
      
      but the new code is:
      
      +	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
      ...
      +	}
      ...
      +	if (pvid)
      +		err = _mv88e6xxx_port_pvid_set(ds, port, vid);
      
      This causes the new code to always set the default vlan to one higher
      than the old code.
      
      Fix this.
      
      Fixes: 76e398a6 ("net: dsa: use switchdev obj for VLAN add/del ops")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db0e51af
    • Martin Roth's avatar
      82xx: FCC: Fixing a bug causing to FCC port lock-up (second try) · 426f0468
      Martin Roth authored
      This is an additional patch to the one already submitted recently.
      The previous patch was not complete, and the FCC port lock-up scenario
      has been reproduced in lab.
      I had an opportunity to check the current patch in lab and the FCC
      port lock no longer freezes, while the previous patch still locks-up the
      FCC port.
      The current patch fixes a pointer arithmetic bug (second bug in the same
      line), which leads FCC port lock-up during underrun/collision handling.
      Within the tx_startup() function in mac-fcc.c, the address of last BD is
      not calculated correctly. As a result of wrong calculation of the last BD
      address, the next transmitted BD may be set to an area out of the transmit
      BD ring. This actually causes to port lock-up and it is not recoverable.
      Signed-off-by: default avatarMartin Roth <martin.roth@motorolasolutions.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      426f0468
    • Thomas Egerer's avatar
      ipv4+ipv6: Make INET*_ESP select CRYPTO_ECHAINIV · 32b6170c
      Thomas Egerer authored
      The ESP algorithms using CBC mode require echainiv. Hence INET*_ESP have
      to select CRYPTO_ECHAINIV in order to work properly. This solves the
      issues caused by a misconfiguration as described in [1].
      The original approach, patching crypto/Kconfig was turned down by
      Herbert Xu [2].
      
      [1] https://lists.strongswan.org/pipermail/users/2015-December/009074.html
      [2] http://marc.info/?l=linux-crypto-vger&m=145224655809562&w=2Signed-off-by: default avatarThomas Egerer <hakke_007@gmx.de>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32b6170c
    • Marcelo Ricardo Leitner's avatar
      sctp: allow setting SCTP_SACK_IMMEDIATELY by the application · 27f7ed2b
      Marcelo Ricardo Leitner authored
      This patch extends commit b93d6471 ("sctp: implement the sender side
      for SACK-IMMEDIATELY extension") as it didn't white list
      SCTP_SACK_IMMEDIATELY on sctp_msghdr_parse(), causing it to be
      understood as an invalid flag and returning -EINVAL to the application.
      
      Note that the actual handling of the flag is already there in
      sctp_datamsg_from_user().
      
      https://tools.ietf.org/html/rfc7053#section-7
      
      Fixes: b93d6471 ("sctp: implement the sender side for SACK-IMMEDIATELY extension")
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27f7ed2b
    • Arnd Bergmann's avatar
      net: simplify napi_synchronize() to avoid warnings · facc432f
      Arnd Bergmann authored
      The napi_synchronize() function is defined twice: The definition
      for SMP builds waits for other CPUs to be done, while the uniprocessor
      variant just contains a barrier and ignores its argument.
      
      In the mvneta driver, this leads to a warning about an unused variable
      when we lookup the NAPI struct of another CPU and then don't use it:
      
      ethernet/marvell/mvneta.c: In function 'mvneta_percpu_notifier':
      ethernet/marvell/mvneta.c:2910:30: error: unused variable 'other_port' [-Werror=unused-variable]
      
      There are no other CPUs on a UP build, so that code never runs, but
      gcc does not know this.
      
      The nicest solution seems to be to turn the napi_synchronize() helper
      into an inline function for the UP case as well, as that leads gcc to
      not complain about the argument being unused. Once we do that, we can
      also combine the two cases into a single function definition and use
      if(IS_ENABLED()) rather than #ifdef to make it look a bit nicer.
      
      The warning first came up in linux-4.4, but I failed to catch it
      earlier.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: f8642885 ("net: mvneta: Statically assign queues to CPUs")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      facc432f
    • Hannes Frederic Sowa's avatar
      pptp: fix illegal memory access caused by multiple bind()s · 9a368aff
      Hannes Frederic Sowa authored
      Several times already this has been reported as kasan reports caused by
      syzkaller and trinity and people always looked at RCU races, but it is
      much more simple. :)
      
      In case we bind a pptp socket multiple times, we simply add it to
      the callid_sock list but don't remove the old binding. Thus the old
      socket stays in the bucket with unused call_id indexes and doesn't get
      cleaned up. This causes various forms of kasan reports which were hard
      to pinpoint.
      
      Simply don't allow multiple binds and correct error handling in
      pptp_bind. Also keep sk_state bits in place in pptp_connect.
      
      Fixes: 00959ade ("PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)")
      Cc: Dmitry Kozlov <xeb@mail.ru>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a368aff
    • Iyappan Subramanian's avatar
      drivers: net: xgene: fix extra IRQ issue · b5d7a069
      Iyappan Subramanian authored
      For interrupt controller that doesn't support irq_disable and hardware
      with level interrupt, an extra interrupt may be pending. This patch fixes
      the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line,
      as suggested by,
      
      'commit e9849777 ("genirq: Add flag to force mask in
      		       disable_irq[_nosync]()")'
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Tested-by: default avatarToan Le <toanle@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5d7a069
    • Eric Dumazet's avatar
      af_unix: fix struct pid memory leak · fa0dc04d
      Eric Dumazet authored
      Dmitry reported a struct pid leak detected by a syzkaller program.
      
      Bug happens in unix_stream_recvmsg() when we break the loop when a
      signal is pending, without properly releasing scm.
      
      Fixes: b3ca9b02 ("net: fix multithreaded signal handling in unix recv routines")
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Rainer Weikusat <rweikusat@mobileactivedefense.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa0dc04d
  2. 21 Jan, 2016 21 commits
  3. 20 Jan, 2016 1 commit
  4. 19 Jan, 2016 5 commits
  5. 18 Jan, 2016 5 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · d05d82f7
      Linus Torvalds authored
      Pull arch/tile updates from Chris Metcalf:
       "This is a grab bag of changes that includes some NOHZ and
        context-tracking related changes, some debugging improvements,
        JUMP_LABEL support, and some fixes for tilepro allmodconfig support.
      
        We also remove the now-unused node_has_online_mem() definitions both
        for tile's asm/topology.h as well as in linux/topology.h itself"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        numa: remove stale node_has_online_mem() define
        arch/tile: move user_exit() to early kernel entry sequence
        tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry
        tile: fix tilepro casts for readl, writel, etc
        tile: fix a -Wframe-larger-than warning
        tile: include the syscall number in the backtrace
        MAINTAINERS: add git URL for tile
        arch/tile: adopt prepare_exit_to_usermode() model from x86
        tile/jump_label: add jump label support for TILE-Gx
        tile: define a macro ktext_writable_addr to get writable kernel text address
      d05d82f7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 · d90f351a
      Linus Torvalds authored
      Pull AVR32 updates from Hans-Christian Noren Egtvedt.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
        mmc: atmel: get rid of struct mci_dma_data
        mmc: atmel-mci: restore dma on AVR32
        avr32: wire up missing syscalls
        avr32: wire up accept4 syscall
      d90f351a
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · c1a198d9
      Linus Torvalds authored
      Pull btrfs updates from Chris Mason:
       "This has our usual assortment of fixes and cleanups, but the biggest
        change included is Omar Sandoval's free space tree.  It's not the
        default yet, mounting -o space_cache=v2 enables it and sets a readonly
        compat bit.  The tree can actually be deleted and regenerated if there
        are any problems, but it has held up really well in testing so far.
      
        For very large filesystems (30T+) our existing free space caching code
        can end up taking a huge amount of time during commits.  The new tree
        based code is faster and less work overall to update as the commit
        progresses.
      
        Omar worked on this during the summer and we'll hammer on it in
        production here at FB over the next few months"
      
      * 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (73 commits)
        Btrfs: fix fitrim discarding device area reserved for boot loader's use
        Btrfs: Check metadata redundancy on balance
        btrfs: statfs: report zero available if metadata are exhausted
        btrfs: preallocate path for snapshot creation at ioctl time
        btrfs: allocate root item at snapshot ioctl time
        btrfs: do an allocation earlier during snapshot creation
        btrfs: use smaller type for btrfs_path locks
        btrfs: use smaller type for btrfs_path lowest_level
        btrfs: use smaller type for btrfs_path reada
        btrfs: cleanup, use enum values for btrfs_path reada
        btrfs: constify static arrays
        btrfs: constify remaining structs with function pointers
        btrfs tests: replace whole ops structure for free space tests
        btrfs: use list_for_each_entry* in backref.c
        btrfs: use list_for_each_entry_safe in free-space-cache.c
        btrfs: use list_for_each_entry* in check-integrity.c
        Btrfs: use linux/sizes.h to represent constants
        btrfs: cleanup, remove stray return statements
        btrfs: zero out delayed node upon allocation
        btrfs: pass proper enum type to start_transaction()
        ...
      c1a198d9
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 48f58ba9
      Linus Torvalds authored
      Pull more networking fixes from David Miller:
      
       1) Fix brcmfmac build with older gcc, from Arend van Spriel.
      
       2) IRQ values unintentionally truncated to u8 in mlx5 driver, from
          Doron Tsur.
      
       3) Fix build warnings wrt tcp cgroup changes, from Geert Uytterhoeven.
      
       4) Limit deep recursion in ovs stack, from Hannes Frederic Sowa.
      
       5) at803x phy driver bug fixes from, Martin Blumenstingl.
      
       6) Fix TSO handling in hns driver, from Daode Huang
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits)
        ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack
        team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
        net: hns: bug fix about hisilicon TSO BD mode
        brcmfmac: fix BRCMF_FW_NVRAM_DEF macro for older gcc compilers
        net: phy: at803x: Add the interrupt register bit definitions
        net: phy: at803x: Clean up duplicate register definitions
        net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode
        net: phy: at803x: Don't set gbit features for the AR8030 phy
        arm64: bpf: add extra pass to handle faulty codegen
        arm64: insn: remove BUG_ON from codegen
        sctp: the temp asoc's transports should not be hashed/unhashed
        net/mlx5_core: Fix trimming down IRQ number
        tcp_memcontrol: Forward declare cgroup_subsys and mem_cgroup stucts
        batman-adv: Drop immediate orig_node free function
        batman-adv: Drop immediate batadv_hard_iface free function
        batman-adv: Drop immediate neigh_ifinfo free function
        batman-adv: Drop immediate batadv_hardif_neigh_node free function
        batman-adv: Drop immediate batadv_neigh_node free function
        batman-adv: Drop immediate batadv_orig_ifinfo free function
        batman-adv: Avoid recursive call_rcu for batadv_nc_node
        ...
      48f58ba9
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · 7f36f1b2
      Linus Torvalds authored
      Pull IDE updates from David Miller:
       "Just a few small changes this merge window, marking ops const, printf
        string type fixes, etc"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        drivers/ide: make ide-scan-pci.c driver explicitly non-modular
        ide: constify ide_dma_ops structures
        ide: silence some underflow warnings
      7f36f1b2