1. 01 Jul, 2014 2 commits
    • Eric Dumazet's avatar
      bnx2x: fix possible panic under memory stress · 07b0f009
      Eric Dumazet authored
      While it is legal to kfree(NULL), it is not wise to use :
      put_page(virt_to_head_page(NULL))
      
       BUG: unable to handle kernel paging request at ffffeba400000000
       IP: [<ffffffffc01f5928>] virt_to_head_page+0x36/0x44 [bnx2x]
      Reported-by: default avatarMichel Lespinasse <walken@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ariel Elior <ariel.elior@qlogic.com>
      Fixes: d46d132c ("bnx2x: use netdev_alloc_frag()")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07b0f009
    • Eric Dumazet's avatar
      ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix · 7f502361
      Eric Dumazet authored
      We have two different ways to handle changes to sk->sk_dst
      
      First way (used by TCP) assumes socket lock is owned by caller, and use
      no extra lock : __sk_dst_set() & __sk_dst_reset()
      
      Another way (used by UDP) uses sk_dst_lock because socket lock is not
      always taken. Note that sk_dst_lock is not softirq safe.
      
      These ways are not inter changeable for a given socket type.
      
      ipv4_sk_update_pmtu(), added in linux-3.8, added a race, as it used
      the socket lock as synchronization, but users might be UDP sockets.
      
      Instead of converting sk_dst_lock to a softirq safe version, use xchg()
      as we did for sk_rx_dst in commit e47eb5df ("udp: ipv4: do not use
      sk_dst_lock from softirq context")
      
      In a follow up patch, we probably can remove sk_dst_lock, as it is
      only used in IPv6.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Fixes: 9cb3a50c ("ipv4: Invalidate the socket cached route on pmtu events if possible")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f502361
  2. 27 Jun, 2014 5 commits
  3. 26 Jun, 2014 6 commits
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · d7933ab7
      Linus Torvalds authored
      Pull CIFS fixes from Steve French:
       "Small set of misc cifs/smb3 fixes"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option
        cifs: revalidate mapping prior to satisfying read_iter request with cache=loose
        fs/cifs: fix regression in cifs_create_mf_symlink()
      d7933ab7
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 2a80ff86
      Linus Torvalds authored
      Pull hwmon fixes from Guenter Roeck:
       "Various minor fixes"
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (gpio-fan) Change name used in hwmon_device_register_with_groups
        hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig
        hwmon: (ntc_thermistor) Use the manufacturer name properly
        devicetree: bindings: Document murata vendor prefix
        hwmon: (w83l786ng) Report correct minimum fan speed
      2a80ff86
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f40ede39
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix crash in ipvs tot_stats estimator, from Julian Anastasov.
      
       2) Fix OOPS in nf_nat on netns removal, from Florian Westphal.
      
       3) Really really really fix locking issues in slip and slcan tty write
          wakeups, from Tyler Hall.
      
       4) Fix checksum offloading in fec driver, from Fugang Duan.
      
       5) Off by one in BPF instruction limit test, from Kees Cook.
      
       6) Need to clear all TSO capability flags when doing software TSO in
          tg3 driver, from Prashant Sreedharan.
      
       7) Fix memory leak in vlan_reorder_header() error path, from Li
          RongQing.
      
       8) Fix various bugs in xen-netfront and xen-netback multiqueue support,
          from David Vrabel and Wei Liu.
      
       9) Fix deadlock in cxgb4 driver, from Li RongQing.
      
      10) Prevent double free of no-cache DST entries, from Eric Dumazet.
      
      11) Bad csum_start handling in skb_segment() leads to crashes when
          forwarding, from Tom Herbert.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
        net: fix setting csum_start in skb_segment()
        ipv4: fix dst race in sk_dst_get()
        net: filter: Use kcalloc/kmalloc_array to allocate arrays
        trivial: net: filter: Change kerneldoc parameter order
        trivial: net: filter: Fix typo in comment
        net: allwinner: emac: Add missing free_irq
        cxgb4: use dev_port to identify ports
        xen-netback: bookkeep number of active queues in our own module
        tg3: Change nvram command timeout value to 50ms
        cxgb4: Not need to hold the adap_rcu_lock lock when read adap_rcu_list
        be2net: fix qnq mode detection on VFs
        of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
        at86rf230: fix irq setup
        net: phy: at803x: fix coccinelle warnings
        net/mlx4_core: Fix the error flow when probing with invalid VF configuration
        tulip: Poll link status more frequently for Comet chips
        net: huawei_cdc_ncm: increase command buffer size
        drivers: net: cpsw: fix dual EMAC stall when connected to same switch
        xen-netfront: recreate queues correctly when reconnecting
        xen-netfront: fix oops when disconnected from backend
        ...
      f40ede39
    • Tom Herbert's avatar
      net: fix setting csum_start in skb_segment() · de843723
      Tom Herbert authored
      Dave Jones reported that a crash is occurring in
      
      csum_partial
      tcp_gso_segment
      inet_gso_segment
      ? update_dl_migration
      skb_mac_gso_segment
      __skb_gso_segment
      dev_hard_start_xmit
      sch_direct_xmit
      __dev_queue_xmit
      ? dev_hard_start_xmit
      dev_queue_xmit
      ip_finish_output
      ? ip_output
      ip_output
      ip_forward_finish
      ip_forward
      ip_rcv_finish
      ip_rcv
      __netif_receive_skb_core
      ? __netif_receive_skb_core
      ? trace_hardirqs_on
      __netif_receive_skb
      netif_receive_skb_internal
      napi_gro_complete
      ? napi_gro_complete
      dev_gro_receive
      ? dev_gro_receive
      napi_gro_receive
      
      It looks like a likely culprit is that SKB_GSO_CB()->csum_start is
      not set correctly when doing non-scatter gather. We are using
      offset as opposed to doffset.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Tested-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: 7e2b10c1 ("net: Support for multiple checksums with gso")
      Acked-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de843723
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · ec71feae
      Linus Torvalds authored
      Pull NFS client fixes from Trond Myklebust:
       "Highlights include:
      
         - Stable fix for a data corruption case due to incorrect cache
           validation
         - Fix a couple of false positive cache invalidations
         - Fix NFSv4 security negotiation issues"
      
      * tag 'nfs-for-3.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support
        NFS Return -EPERM if no supported or matching SECINFO flavor
        NFS check the return of nfs4_negotiate_security in nfs4_submount
        NFS: Don't mark the data cache as invalid if it has been flushed
        NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
        nfs: Fix cache_validity check in nfs_write_pageuptodate()
      ec71feae
    • Eric Dumazet's avatar
      ipv4: fix dst race in sk_dst_get() · f8864972
      Eric Dumazet authored
      When IP route cache had been removed in linux-3.6, we broke assumption
      that dst entries were all freed after rcu grace period. DST_NOCACHE
      dst were supposed to be freed from dst_release(). But it appears
      we want to keep such dst around, either in UDP sockets or tunnels.
      
      In sk_dst_get() we need to make sure dst refcount is not 0
      before incrementing it, or else we might end up freeing a dst
      twice.
      
      DST_NOCACHE set on a dst does not mean this dst can not be attached
      to a socket or a tunnel.
      
      Then, before actual freeing, we need to observe a rcu grace period
      to make sure all other cpus can catch the fact the dst is no longer
      usable.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDormando <dormando@rydia.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8864972
  4. 25 Jun, 2014 27 commits