1. 25 Jan, 2016 10 commits
    • Sudip Mukherjee's avatar
      net: macb: fix build warning · 36df7455
      Sudip Mukherjee authored
      We are getting build warning about:
      macb.c:2889:13: warning: 'tx_clk' may be used uninitialized in this function
      macb.c:2888:11: warning: 'hclk' may be used uninitialized in this function
      
      In reality they are not used uninitialized as clk_init() will initialize
      them, this patch will just silence the warning.
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36df7455
    • Johannes Berg's avatar
      net: fec: make driver endian-safe · 5cfa3039
      Johannes Berg authored
      The driver treats the device descriptors as CPU-endian, which appears
      to be correct with the default endianness on both ARM (typically LE)
      and PowerPC (typically BE) SoCs, indicating that the hardware block
      is generated differently. Add endianness annotations and byteswaps as
      necessary.
      
      It's not clear that the ifdef there really is correct and shouldn't
      just be #ifdef CONFIG_ARM, but I also can't test on anything but the
      i.MX6 HummingBoard where this gets it working with a BE kernel.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5cfa3039
    • 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 3 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