1. 27 May, 2013 1 commit
  2. 23 May, 2013 1 commit
  3. 14 May, 2013 2 commits
  4. 13 May, 2013 19 commits
  5. 12 May, 2013 7 commits
    • Cong Wang's avatar
      xfrm6: release dev before returning error · 84c4a9df
      Cong Wang authored
      We forget to call dev_put() on error path in xfrm6_fill_dst(),
      its caller doesn't handle this.
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84c4a9df
    • Amerigo Wang's avatar
      ipv6,gre: do not leak info to user-space · 5dbd5068
      Amerigo Wang authored
      There is a hole in struct ip6_tnl_parm2, so we have to
      zero the struct on stack before copying it to user-space.
      
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dbd5068
    • Amerigo Wang's avatar
      virtio_net: use default napi weight by default · d34710e3
      Amerigo Wang authored
      Since commit 82dc3c63 ("net: introduce NAPI_POLL_WEIGHT")
      we warn drivers when they use napi weight higher than NAPI_POLL_WEIGHT,
      but virtio_net still uses 128 by default. This patch makes its default
      value to NAPI_POLL_WEIGHT.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d34710e3
    • Petri Gynther's avatar
      emac: Fix EMAC soft reset on 460EX/GT · 23fbb5a8
      Petri Gynther authored
      Fix EMAC soft reset on 460EX/GT to select the right PHY clock source
      before and after the soft reset.
      
      EMAC with PHY should use the clock from PHY during soft reset.
      EMAC without PHY should use the internal clock during soft reset.
      
      PPC460EX/GT Embedded Processor Advanced User's Manual
      section 28.10.1 Mode Register 0 (EMACx_MR0) states:
      Note: The PHY must provide a TX Clk in order to perform a soft reset
      of the EMAC. If none is present, select the internal clock
      (SDR0_ETH_CFG[EMACx_PHY_CLK] = 1).
      After a soft reset, select the external clock.
      
      Without the fix, 460EX/GT-based boards with RGMII PHYs attached to
      EMACs experience EMAC interrupt storm and system watchdog reset when
      issuing "ifconfig eth0 down" + "ifconfig eth0 up" a few times.
      The system enters endless loop of serving emac_irq() with EMACx_ISR
      register stuck at value 0x10000000 (Rx parity error).
      
      With the fix, the above issue is no longer observed.
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      23fbb5a8
    • Sergei Shtylyov's avatar
      3c59x: fix PCI resource management · 4b264a16
      Sergei Shtylyov authored
      The driver wrongly claimed I/O ports at an address returned by pci_iomap() --
      even if it was passed an MMIO address.  Fix this by claiming/releasing all PCI
      resources in the PCI driver's probe()/remove() methods instead and get rid of
      'must_free_region' flag weirdness (why would Cardbus claim anything for us?).
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b264a16
    • Linus Torvalds's avatar
      Linux 3.10-rc1 · f722406f
      Linus Torvalds authored
      f722406f
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 26b840ae
      Linus Torvalds authored
      Pull tracing/kprobes update from Steven Rostedt:
       "The majority of these changes are from Masami Hiramatsu bringing
        kprobes up to par with the latest changes to ftrace (multi buffering
        and the new function probes).
      
        He also discovered and fixed some bugs in doing so.  When pulling in
        his patches, I also found a few minor bugs as well and fixed them.
      
        This also includes a compile fix for some archs that select the ring
        buffer but not tracing.
      
        I based this off of the last patch you took from me that fixed the
        merge conflict error, as that was the commit that had all the changes
        I needed for this set of changes."
      
      * tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing/kprobes: Support soft-mode disabling
        tracing/kprobes: Support ftrace_event_file base multibuffer
        tracing/kprobes: Pass trace_probe directly from dispatcher
        tracing/kprobes: Increment probe hit-count even if it is used by perf
        tracing/kprobes: Use bool for retprobe checker
        ftrace: Fix function probe when more than one probe is added
        ftrace: Fix the output of enabled_functions debug file
        ftrace: Fix locking in register_ftrace_function_probe()
        tracing: Add helper function trace_create_new_event() to remove duplicate code
        tracing: Modify soft-mode only if there's no other referrer
        tracing: Indicate enabled soft-mode in enable file
        tracing/kprobes: Fix to increment return event probe hit-count
        ftrace: Cleanup regex_lock and ftrace_lock around hash updating
        ftrace, kprobes: Fix a deadlock on ftrace_regex_lock
        ftrace: Have ftrace_regex_write() return either read or error
        tracing: Return error if register_ftrace_function_probe() fails for event_enable_func()
        tracing: Don't succeed if event_enable_func did not register anything
        ring-buffer: Select IRQ_WORK
      26b840ae
  6. 11 May, 2013 10 commits
    • Geert Uytterhoeven's avatar
      caif: CAIF_VIRTIO should depend on HAS_DMA · 79e0c19e
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `cfv_destroy_genpool':
      drivers/net/caif/caif_virtio.c:364: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `cfv_create_genpool':
      drivers/net/caif/caif_virtio.c:397: undefined reference to `dma_alloc_coherent'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79e0c19e
    • Geert Uytterhoeven's avatar
      net/ethernet: MACB should depend on HAS_DMA · 822bc329
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `macb_free_consistent':
      drivers/net/ethernet/cadence/macb.c:878: undefined reference to `dma_free_coherent'
      drivers/net/ethernet/cadence/macb.c:883: undefined reference to `dma_free_coherent'
      drivers/net/ethernet/cadence/macb.c:888: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `macb_alloc_consistent':
      drivers/net/ethernet/cadence/macb.c:905: undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `macb_tx_interrupt':
      drivers/net/ethernet/cadence/macb.c:515: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `macb_tx_error_task':
      drivers/net/ethernet/cadence/macb.c:457: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `macb_start_xmit':
      drivers/net/ethernet/cadence/macb.c:838: undefined reference to `dma_map_single'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      822bc329
    • Geert Uytterhoeven's avatar
      net/ethernet: ARM_AT91_ETHER should depend on HAS_DMA · d914ae80
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `at91ether_start':
      drivers/net/ethernet/cadence/at91_ether.c:49: undefined reference to `dma_alloc_coherent'
      drivers/net/ethernet/cadence/at91_ether.c:60: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `at91ether_interrupt':
      drivers/net/ethernet/cadence/at91_ether.c:250: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `at91ether_start_xmit':
      drivers/net/ethernet/cadence/at91_ether.c:169: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `at91ether_close':
      drivers/net/ethernet/cadence/at91_ether.c:145: undefined reference to `dma_free_coherent'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d914ae80
    • Geert Uytterhoeven's avatar
      net/wireless: ATH9K should depend on HAS_DMA · 4837ef42
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `ath9k_beacon_generate':
      drivers/net/wireless/ath/ath9k/beacon.c:146: undefined reference to `dma_unmap_single'
      drivers/net/wireless/ath/ath9k/beacon.c:174: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/beacon.c:176: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath9k_beacon_remove_slot':
      drivers/net/wireless/ath/ath9k/beacon.c:252: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_descdma_setup':
      drivers/net/wireless/ath/ath9k/init.c:382: undefined reference to `dmam_alloc_coherent'
      drivers/built-in.o: In function `ath_edma_get_buffers':
      drivers/net/wireless/ath/ath9k/recv.c:616: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_get_next_rx_buf':
      drivers/net/wireless/ath/ath9k/recv.c:740: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_rx_edma_cleanup':
      drivers/net/wireless/ath/ath9k/recv.c:176: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_cleanup':
      drivers/net/wireless/ath/ath9k/recv.c:340: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_edma_buf_link':
      drivers/net/wireless/ath/ath9k/recv.c:122: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_rx_tasklet':
      drivers/net/wireless/ath/ath9k/recv.c:1275: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:1277: undefined reference to `dma_mapping_error'
      drivers/net/wireless/ath/ath9k/recv.c:1283: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_edma_init':
      drivers/net/wireless/ath/ath9k/recv.c:226: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:229: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath_rx_init':
      drivers/net/wireless/ath/ath9k/recv.c:303: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:306: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath_tx_complete_buf':
      drivers/net/wireless/ath/ath9k/xmit.c:2088: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_txstatus_setup':
      drivers/net/wireless/ath/ath9k/xmit.c:2344: undefined reference to `dmam_alloc_coherent'
      drivers/built-in.o: In function `ath_tx_set_retry':
      drivers/net/wireless/ath/ath9k/xmit.c:307: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_tx_setup_buffer':
      drivers/net/wireless/ath/ath9k/xmit.c:1887: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/xmit.c:1889: undefined reference to `dma_mapping_error'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
      Cc: John W. Linville <linville@tuxdriver.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4837ef42
    • Geert Uytterhoeven's avatar
      net/ethernet: STMMAC_ETH should depend on HAS_DMA · fd1eb9e6
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `dma_free_tx_skbufs':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1141: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `dma_free_rx_skbufs':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1120: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `free_dma_desc_resources':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1159: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `stmmac_init_rx_buffers':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:980: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `init_dma_desc_rings':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1015: undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `stmmac_tx_clean':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1250: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `stmmac_rx':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2044: undefined reference to `dma_unmap_single'
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2082: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `stmmac_rx_refill':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1967: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `stmmac_xmit':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1845: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `skb_frag_dma_map':
      include/linux/skbuff.h:2184: undefined reference to `dma_map_page'
      drivers/built-in.o: In function `stmmac_jumbo_frm':
      drivers/net/ethernet/stmicro/stmmac/ring_mode.c:40: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `stmmac_jumbo_frm':
      drivers/net/ethernet/stmicro/stmmac/chain_mode.c:48: undefined reference to `dma_map_single'
      drivers/net/ethernet/stmicro/stmmac/chain_mode.c:55: undefined reference to `dma_map_single'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd1eb9e6
    • Geert Uytterhoeven's avatar
      net/ethernet: NET_CALXEDA_XGMAC should depend on HAS_DMA · 3b76b3c3
      Geert Uytterhoeven authored
      If NO_DMA=y:
      
      drivers/built-in.o: In function `xgmac_xmit':
      drivers/net/ethernet/calxeda/xgmac.c:1102: undefined reference to `dma_mapping_error'
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b76b3c3
    • Eric Dumazet's avatar
      ipv6: do not clear pinet6 field · f77d6021
      Eric Dumazet authored
      We have seen multiple NULL dereferences in __inet6_lookup_established()
      
      After analysis, I found that inet6_sk() could be NULL while the
      check for sk_family == AF_INET6 was true.
      
      Bug was added in linux-2.6.29 when RCU lookups were introduced in UDP
      and TCP stacks.
      
      Once an IPv6 socket, using SLAB_DESTROY_BY_RCU is inserted in a hash
      table, we no longer can clear pinet6 field.
      
      This patch extends logic used in commit fcbdf09d
      ("net: fix nulls list corruptions in sk_prot_alloc")
      
      TCP/UDP/UDPLite IPv6 protocols provide their own .clear_sk() method
      to make sure we do not clear pinet6 field.
      
      At socket clone phase, we do not really care, as cloning the parent (non
      NULL) pinet6 is not adding a fatal race.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f77d6021
    • Jiri Pirko's avatar
      macvlan: fix passthru mode race between dev removal and rx path · 233c7df0
      Jiri Pirko authored
      Currently, if macvlan in passthru mode is created and data are rxed and
      you remove this device, following panic happens:
      
      NULL pointer dereference at 0000000000000198
      IP: [<ffffffffa0196058>] macvlan_handle_frame+0x153/0x1f7 [macvlan]
      
      I'm using following script to trigger this:
      <script>
      while [ 1 ]
      do
      	ip link add link e1 name macvtap0 type macvtap mode passthru
      	ip link set e1 up
      	ip link set macvtap0 up
      	IFINDEX=`ip link |grep macvtap0 | cut -f 1 -d ':'`
      	cat /dev/tap$IFINDEX  >/dev/null &
      	ip link del dev macvtap0
      done
      </script>
      
      I run this script while "ping -f" is running on another machine to send
      packets to e1 rx.
      
      Reason of the panic is that list_first_entry() is blindly called in
      macvlan_handle_frame() even if the list was empty. vlan is set to
      incorrect pointer which leads to the crash.
      
      I'm fixing this by protecting port->vlans list by rcu and by preventing
      from getting incorrect pointer in case the list is empty.
      
      Introduced by: commit eb06acdc "macvlan: Introduce 'passthru' mode to takeover the underlying device"
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      233c7df0
    • David S. Miller's avatar
      Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge · fb863b8b
      David S. Miller authored
      Included changes:
      - fix parsing of user typed protocol string to avoid random memory access in
        some cases
      - check pskb_trim_rcsum() return value
      - prevent DAT from sending ARP replies when not needed
      - reorder the main clean up routine to prevent race conditions
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb863b8b
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.10-rc0-tag-two' of... · 607eeb0b
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull Xen bug-fixes from Konrad Rzeszutek Wilk:
       - More fixes in the vCPU PVHVM hotplug path.
       - Add more documentation.
       - Fix various ARM related issues in the Xen generic drivers.
       - Updates in the xen-pciback driver per Bjorn's updates.
       - Mask the x2APIC feature for PV guests.
      
      * tag 'stable/for-linus-3.10-rc0-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/pci: Used cached MSI-X capability offset
        xen/pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
        xen: clear IRQ_NOAUTOEN and IRQ_NOREQUEST
        xen: mask x2APIC feature in PV
        xen: SWIOTLB is only used on x86
        xen/spinlock: Fix check from greater than to be also be greater or equal to.
        xen/smp/pvhvm: Don't point per_cpu(xen_vpcu, 33 and larger) to shared_info
        xen/vcpu: Document the xen_vcpu_info and xen_vcpu
        xen/vcpu/pvhvm: Fix vcpu hotplugging hanging.
      607eeb0b