1. 29 May, 2013 4 commits
    • John W. Linville's avatar
      Merge branch 'master' of... · 50cc1cab
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      50cc1cab
    • Jason Wang's avatar
      tuntap: forbid changing mq flag for persistent device · 8e6d91ae
      Jason Wang authored
      We currently allow changing the mq flag (IFF_MULTI_QUEUE) for a persistent
      device. This will result a mismatch between the number the queues in netdev and
      tuntap. This is because we only allocate a 1q netdevice when IFF_MULTI_QUEUE was
      not specified, so when we set the IFF_MULTI_QUEUE and try to attach more queues
      later, netif_set_real_num_tx_queues() may fail which result a single queue
      netdevice with multiple sockets attached.
      
      Solve this by disallowing changing the mq flag for persistent device.
      
      Bug was introduced by commit edfb6a14
      (tuntap: reduce memory using of queues).
      Reported-by: default avatarSriram Narasimhan <sriram.narasimhan@hp.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e6d91ae
    • Federico Vaga's avatar
      net/core/sock.c: add missing VSOCK string in af_family_*_key_strings · 456db6a4
      Federico Vaga authored
      The three arrays of strings: af_family_key_strings,
      af_family_slock_key_strings and af_family_clock_key_strings have not
      VSOCK's string
      Signed-off-by: default avatarFederico Vaga <federico.vaga@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      456db6a4
    • Andy Lutomirski's avatar
      net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg · 1be374a0
      Andy Lutomirski authored
      To: linux-kernel@vger.kernel.org
      Cc: x86@kernel.org, trinity@vger.kernel.org, Andy Lutomirski <luto@amacapital.net>, netdev@vger.kernel.org, "David S.
      	Miller" <davem@davemloft.net>
      Subject: [PATCH 5/5] net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg
      
      MSG_CMSG_COMPAT is (AFAIK) not intended to be part of the API --
      it's a hack that steals a bit to indicate to other networking code
      that a compat entry was used.  So don't allow it from a non-compat
      syscall.
      
      This prevents an oops when running this code:
      
      int main()
      {
      	int s;
      	struct sockaddr_in addr;
      	struct msghdr *hdr;
      
      	char *highpage = mmap((void*)(TASK_SIZE_MAX - 4096), 4096,
      	                      PROT_READ | PROT_WRITE,
      	                      MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
      	if (highpage == MAP_FAILED)
      		err(1, "mmap");
      
      	s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
      	if (s == -1)
      		err(1, "socket");
      
              addr.sin_family = AF_INET;
              addr.sin_port = htons(1);
              addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
      	if (connect(s, (struct sockaddr*)&addr, sizeof(addr)) != 0)
      		err(1, "connect");
      
      	void *evil = highpage + 4096 - COMPAT_MSGHDR_SIZE;
      	printf("Evil address is %p\n", evil);
      
      	if (syscall(__NR_sendmmsg, s, evil, 1, MSG_CMSG_COMPAT) < 0)
      		err(1, "sendmmsg");
      
      	return 0;
      }
      
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1be374a0
  2. 28 May, 2013 12 commits
  3. 27 May, 2013 4 commits
  4. 26 May, 2013 3 commits
  5. 24 May, 2013 17 commits
    • Felix Fietkau's avatar
      ath9k_hw: improve performance for AR934x v1.3+ · 86c157b3
      Felix Fietkau authored
      AR934x v1.3 no longer needs the DCU backoff reduction workaround for
      preventing rx overruns, but in turn needs the number of usable Tx
      buffers to be reduced slightly.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      86c157b3
    • Felix Fietkau's avatar
      ath9k_hw: fix host interface reset on AR934x · a37a9910
      Felix Fietkau authored
      If a local bus timeout has been detected, the host interface needs to be
      reset to clear the errors. AR934x uses a different synchronous interrupt
      bit to indicate this, so the check needs to be fixed.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a37a9910
    • Felix Fietkau's avatar
      ath9k_hw: fix spur mitigation issues on AR934x · 23dd9b2a
      Felix Fietkau authored
      Do not subtract spur power from noise floor on this chip, as it can lead
      to packet loss and other connectivity issues.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      23dd9b2a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes · 0e255f1c
      Linus Torvalds authored
      Pull gfs2 fixes from Steven Whitehouse:
       "This time there are just four fixes.  There are a couple of minor
        updates to the quota code, a fix for KConfig to ensure that only valid
        combinations including GFS2 can be built, and a fix for a typo
        affecting end i/o processing when writing the journal.
      
        Also, there is a temporary fix for a performance regression relating
        to block reservations and directories.  A longer fix will be applied
        in due course, but this deals with the most immediate problem for now"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
        GFS2: Fix typo in gfs2_log_end_write loop
        GFS2: fix DLM depends to fix build errors
        GFS2: Use single-block reservations for directories
        GFS2: two minor quota fixups
      0e255f1c
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · d4c2456a
      Linus Torvalds authored
      Pull powerpc fixes from Benjamin Herrenschmidt:
       "Some more P8 related bits, a bunch of fixes for our P7+/P8 HW crypto
        drivers, some added workarounds for those radeons that don't do proper
        64-bit MSIs and a couple of other trivialities by myself."
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
        powerpc/powernv: Build a zImage.epapr
        powerpc: Make radeon 32-bit MSI quirk work on powernv
        powerpc: Context switch more PMU related SPRs
        powerpc/powernv: Fix condition for when to invalidate the TCE cache
        powerpc/pci: Fix bogus message at boot about empty memory resources
        powerpc: Fix TLB cleanup at boot on POWER8
        drivers/crypto/nx: Fixes for multiple races and issues
      d4c2456a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · eb3d3390
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "It's been a while since my last pull request so quite a few fixes have
        piled up."
      
      Indeed.
      
       1) Fix nf_{log,queue} compilation with PROC_FS disabled, from Pablo
          Neira Ayuso.
      
       2) Fix data corruption on some tg3 chips with TSO enabled, from Michael
          Chan.
      
       3) Fix double insertion of VLAN tags in be2net driver, from Sarveshwar
          Bandi.
      
       4) Don't have TCP's MD5 support pass > PAGE_SIZE page offsets in
          scatter-gather entries into the crypto layer, the crypto layer can't
          handle that.  From Eric Dumazet.
      
       5) Fix lockdep splat in 802.1Q MRP code, also from Eric Dumazet.
      
       6) Fix OOPS in netfilter log module when called from conntrack, from
          Hans Schillstrom.
      
       7) FEC driver needs to use netif_tx_{lock,unlock}_bh() rather than the
          non-BH disabling variants.  From Fabio Estevam.
      
       8) TCP GSO can generate out-of-order packets, fix from Eric Dumazet.
      
       9) vxlan driver doesn't update 'used' field of fdb entries when it
          should, from Sridhar Samudrala.
      
      10) ipv6 should use kzalloc() to allocate inet6 socket cork options,
          otherwise we can OOPS in ip6_cork_release().  From Eric Dumazet.
      
      11) Fix races in bonding set mode, from Nikolay Aleksandrov.
      
      12) Fix checksum generation regression added by "r8169: fix 8168evl
          frame padding.", from Francois Romieu.
      
      13) ip_gre can look at stale SKB data pointer, fix from Eric Dumazet.
      
      14) Fix checksum handling when GSO is enabled in bnx2x driver with
          certain chips, from Yuval Mintz.
      
      15) Fix double free in batman-adv, from Martin Hundebøll.
      
      16) Fix device startup synchronization with firmware in tg3 driver, from
          Nithin Sujit.
      
      17) perf networking dropmonitor doesn't work at all due to mixed up
          trace parameter ordering, from Ben Hutchings.
      
      18) Fix proportional rate reduction handling in tcp_ack(), from Nandita
          Dukkipati.
      
      19) IPSEC layer doesn't return an error when a valid state is detected,
          causing an OOPS.  Fix from Timo Teräs.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
        be2net: bug fix on returning an invalid nic descriptor
        tcp: xps: fix reordering issues
        net: Revert unused variable changes.
        xfrm: properly handle invalid states as an error
        virtio_net: enable napi for all possible queues during open
        tcp: bug fix in proportional rate reduction.
        net: ethernet: sun: drop unused variable
        net: ethernet: korina: drop unused variable
        net: ethernet: apple: drop unused variable
        qmi_wwan: Added support for Cinterion's PLxx WWAN Interface
        perf: net_dropmonitor: Remove progress indicator
        perf: net_dropmonitor: Use bisection in symbol lookup
        perf: net_dropmonitor: Do not assume ordering of dictionaries
        perf: net_dropmonitor: Fix symbol-relative addresses
        perf: net_dropmonitor: Fix trace parameter order
        net: fec: use a more proper compatible string for MVF type device
        qlcnic: Fix updating netdev->features
        qlcnic: remove netdev->trans_start updates within the driver
        qlcnic: Return proper error codes from probe failure paths
        tg3: Update version to 3.132
        ...
      eb3d3390
    • Steven Whitehouse's avatar
      GFS2: Fix typo in gfs2_log_end_write loop · e97e548b
      Steven Whitehouse authored
      There was a missing _all in this loop iterator
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      e97e548b
    • Randy Dunlap's avatar
      GFS2: fix DLM depends to fix build errors · 75f96ce6
      Randy Dunlap authored
      Fix build errors by correcting DLM dependencies in GFS2.
      Build errors happen when CONFIG_GFS2_FS_LOCKING_DLM=y and CONFIG_DLM=m:
      
      fs/built-in.o: In function `gfs2_lock':
      file.c:(.text+0xc7abd): undefined reference to `dlm_posix_get'
      file.c:(.text+0xc7ad0): undefined reference to `dlm_posix_unlock'
      file.c:(.text+0xc7ad9): undefined reference to `dlm_posix_lock'
      fs/built-in.o: In function `gdlm_unmount':
      lock_dlm.c:(.text+0xd6e5b): undefined reference to `dlm_release_lockspace'
      fs/built-in.o: In function `sync_unlock':
      lock_dlm.c:(.text+0xd6e9e): undefined reference to `dlm_unlock'
      fs/built-in.o: In function `sync_lock':
      lock_dlm.c:(.text+0xd6fb6): undefined reference to `dlm_lock'
      fs/built-in.o: In function `gdlm_put_lock':
      lock_dlm.c:(.text+0xd7238): undefined reference to `dlm_unlock'
      fs/built-in.o: In function `gdlm_mount':
      lock_dlm.c:(.text+0xd753e): undefined reference to `dlm_new_lockspace'
      lock_dlm.c:(.text+0xd79d3): undefined reference to `dlm_release_lockspace'
      fs/built-in.o: In function `gdlm_lock':
      lock_dlm.c:(.text+0xd8179): undefined reference to `dlm_lock'
      fs/built-in.o: In function `gdlm_cancel':
      lock_dlm.c:(.text+0xd6b22): undefined reference to `dlm_unlock'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      75f96ce6
    • Bob Peterson's avatar
      GFS2: Use single-block reservations for directories · af21ca8e
      Bob Peterson authored
      This patch changes the multi-block allocation code, such that
      directory inodes only get a single block reserved in the bitmap.
      That way, the bitmaps are more tightly packed together, and there
      are fewer spans of free blocks for in-use block reservations.
      This means it takes less time to find a free span of blocks in the
      bitmap, which speeds things up. This increases the performance of
      some workloads by almost 2X. In Nate's mockup.py script (which does
      (1) create dir, (2) create dir in dir, (3) create file in that dir)
      the test executes in 23 steps rather than 43 steps, a 47%
      performance improvement.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      af21ca8e
    • Bob Peterson's avatar
      GFS2: two minor quota fixups · 37f71577
      Bob Peterson authored
      This patch fixes two regression problems that Abhi found in the
      GFS2 quota code.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      37f71577
    • Brian King's avatar
      powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support · f1dd1531
      Brian King authored
      Recent commit e61133dd added support
      for a new firmware feature to force an adapter to use 32 bit MSIs.
      However, this firmware is not available for all systems. The hack below
      allows devices needing 32 bit MSIs to work on these systems as well.
      It is careful to only enable this on Gen2 slots, which should limit
      this to configurations where this hack is needed and tested to work.
      
      [Small change to factor out the hack into a separate function -- BenH]
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f1dd1531
    • Benjamin Herrenschmidt's avatar
      powerpc/powernv: Build a zImage.epapr · 83920c49
      Benjamin Herrenschmidt authored
      The zImage.epapr wrapper allows to use zImages when booting via a flat
      device-tree which can be used on powernv.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      83920c49
    • Benjamin Herrenschmidt's avatar
      powerpc: Make radeon 32-bit MSI quirk work on powernv · b72c1f65
      Benjamin Herrenschmidt authored
      This moves the quirk itself to pci_64.c as to get built on all ppc64
      platforms (the only ones with a pci_dn), factors the two implementations
      of get_pdn() into a single pci_get_dn() and use the quirk to do 32-bit
      MSIs on IODA based powernv platforms.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b72c1f65
    • Michael Ellerman's avatar
      powerpc: Context switch more PMU related SPRs · 59affcd3
      Michael Ellerman authored
      In commit 9353374b "Context switch the new EBB SPRs" we added support for
      context switching some new EBB SPRs. However despite four of us signing
      off on that patch we missed some. To be fair these are not actually new
      SPRs, but they are now potentially user accessible so need to be context
      switched.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      59affcd3
    • Benjamin Herrenschmidt's avatar
      powerpc/powernv: Fix condition for when to invalidate the TCE cache · 605e44d6
      Benjamin Herrenschmidt authored
      We use two flags, one to indicate an invalidation is needed after
      creating a new entry and one to indicate an invalidation is needed
      after removing an entry. However we were testing the wrong flag
      in the remove case.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      605e44d6
    • Benjamin Herrenschmidt's avatar
      powerpc/pci: Fix bogus message at boot about empty memory resources · bee7dd9c
      Benjamin Herrenschmidt authored
      The message is only meant to be displayed if resource 0 is empty,
      but was displayed if any is.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bee7dd9c
    • Benjamin Herrenschmidt's avatar
      powerpc: Fix TLB cleanup at boot on POWER8 · 8fc1f5d7
      Benjamin Herrenschmidt authored
      The TLB has 512 congruence classes (2048 entries 4 way set associative)
      while P7 had 128
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8fc1f5d7