1. 18 Nov, 2014 11 commits
  2. 16 Nov, 2014 9 commits
    • Daniel Borkmann's avatar
      ipv6: mld: fix add_grhead skb_over_panic for devs with large MTUs · feb91a02
      Daniel Borkmann authored
      It has been reported that generating an MLD listener report on
      devices with large MTUs (e.g. 9000) and a high number of IPv6
      addresses can trigger a skb_over_panic():
      
      skbuff: skb_over_panic: text:ffffffff80612a5d len:3776 put:20
      head:ffff88046d751000 data:ffff88046d751010 tail:0xed0 end:0xec0
      dev:port1
       ------------[ cut here ]------------
      kernel BUG at net/core/skbuff.c:100!
      invalid opcode: 0000 [#1] SMP
      Modules linked in: ixgbe(O)
      CPU: 3 PID: 0 Comm: swapper/3 Tainted: G O 3.14.23+ #4
      [...]
      Call Trace:
       <IRQ>
       [<ffffffff80578226>] ? skb_put+0x3a/0x3b
       [<ffffffff80612a5d>] ? add_grhead+0x45/0x8e
       [<ffffffff80612e3a>] ? add_grec+0x394/0x3d4
       [<ffffffff80613222>] ? mld_ifc_timer_expire+0x195/0x20d
       [<ffffffff8061308d>] ? mld_dad_timer_expire+0x45/0x45
       [<ffffffff80255b5d>] ? call_timer_fn.isra.29+0x12/0x68
       [<ffffffff80255d16>] ? run_timer_softirq+0x163/0x182
       [<ffffffff80250e6f>] ? __do_softirq+0xe0/0x21d
       [<ffffffff8025112b>] ? irq_exit+0x4e/0xd3
       [<ffffffff802214bb>] ? smp_apic_timer_interrupt+0x3b/0x46
       [<ffffffff8063f10a>] ? apic_timer_interrupt+0x6a/0x70
      
      mld_newpack() skb allocations are usually requested with dev->mtu
      in size, since commit 72e09ad1 ("ipv6: avoid high order allocations")
      we have changed the limit in order to be less likely to fail.
      
      However, in MLD/IGMP code, we have some rather ugly AVAILABLE(skb)
      macros, which determine if we may end up doing an skb_put() for
      adding another record. To avoid possible fragmentation, we check
      the skb's tailroom as skb->dev->mtu - skb->len, which is a wrong
      assumption as the actual max allocation size can be much smaller.
      
      The IGMP case doesn't have this issue as commit 57e1ab6e
      ("igmp: refine skb allocations") stores the allocation size in
      the cb[].
      
      Set a reserved_tailroom to make it fit into the MTU and use
      skb_availroom() helper instead. This also allows to get rid of
      igmp_skb_size().
      Reported-by: default avatarWei Liu <lw1a2.jing@gmail.com>
      Fixes: 72e09ad1 ("ipv6: avoid high order allocations")
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: David L Stevens <david.stevens@oracle.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      feb91a02
    • Martin Hauke's avatar
      qmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem · bb2bdeb8
      Martin Hauke authored
      Added the USB VID/PID for the HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e)
      Signed-off-by: default avatarMartin Hauke <mardnh@gmx.de>
      Acked-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb2bdeb8
    • David S. Miller's avatar
      Merge branch 'net_ovs' of git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch · c6ab766e
      David S. Miller authored
      Pravin B Shelar says:
      
      ====================
      Open vSwitch
      
      Following fixes are accumulated in ovs-repo.
      Three of them are related to protocol processing, one is
      related to memory leak in case of error and one is to
      fix race.
      Patch "Validate IPv6 flow key and mask values" has conflicts
      with net-next, Let me know if you want me to send the patch
      for net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6ab766e
    • Anish Bhatt's avatar
      dcbnl : Disable software interrupts before taking dcb_lock · 52cff74e
      Anish Bhatt authored
      Solves possible lockup issues that can be seen from firmware DCB agents calling
      into the DCB app api.
      
      DCB firmware event queues can be tied in with NAPI so that dcb events are
      generated in softIRQ context. This can results in calls to dcb_*app()
      functions which try to take the dcb_lock.
      
      If the the event triggers while we also have the dcb_lock because lldpad or
      some other agent happened to be issuing a  get/set command we could see a cpu
      lockup.
      
      This code was not originally written with firmware agents in mind, hence
      grabbing dcb_lock from softIRQ context was not considered.
      Signed-off-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52cff74e
    • Alexey Khoroshilov's avatar
      ieee802154: fix error handling in ieee802154fake_probe() · 8c2dd544
      Alexey Khoroshilov authored
      In case of any failure ieee802154fake_probe() just calls unregister_netdev().
      But it does not look safe to unregister netdevice before it was registered.
      
      The patch implements straightforward resource deallocation in case of
      failure in ieee802154fake_probe().
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c2dd544
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · f1227c5c
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS fixes for net
      
      The following patchset contains Netfilter updates for your net tree,
      they are:
      
      1) Fix missing initialization of the range structure (allocated in the
         stack) in nft_masq_{ipv4, ipv6}_eval, from Daniel Borkmann.
      
      2) Make sure the data we receive from userspace contains the req_version
         structure, otherwise return an error incomplete on truncated input.
         From Dan Carpenter.
      
      3) Fix handling og skb->sk which may cause incorrect handling
         of connections from a local process. Via Simon Horman, patch from
         Calvin Owens.
      
      4) Fix wrong netns in nft_compat when setting target and match params
         structure.
      
      5) Relax chain type validation in nft_compat that was recently included,
         this broke the matches that need to be run from the route chain type.
         Now iptables-test.py automated regression tests report success again
         and we avoid the only possible problematic case, which is the use of
         nat targets out of nat chain type.
      
      6) Use match->table to validate the tablename, instead of the match->name.
         Again patch for nft_compat.
      
      7) Restore the synchronous release of objects from the commit and abort
         path in nf_tables. This is causing two major problems: splats when using
         nft_compat, given that matches and targets may sleep and call_rcu is
         invoked from softirq context. Moreover Patrick reported possible event
         notification reordering when rules refer to anonymous sets.
      
      8) Fix race condition in between packets that are being confirmed by
         conntrack and the ctnetlink flush operation. This happens since the
         removal of the central spinlock. Thanks to Jesper D. Brouer to looking
         into this.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1227c5c
    • John Ogness's avatar
      drivers: net: cpsw: Fix TX_IN_SEL offset · 35717d8d
      John Ogness authored
      The TX_IN_SEL offset for the CPSW_PORT/TX_IN_CTL register was
      incorrect. This caused the Dual MAC mode to never get set when
      it should. It also caused possible unintentional setting of a
      bit in the CPSW_PORT/TX_BLKS_REM register.
      
      The purpose of setting the Dual MAC mode for this register is to:
      
          "... allow packets from both ethernet ports to be written into
           the FIFO without one port starving the other port."
      					- AM335x ARM TRM
      Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
      Reviewed-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      35717d8d
    • Hannes Frederic Sowa's avatar
      reciprocal_div: objects with exported symbols should be obj-y rather than lib-y · 9f458945
      Hannes Frederic Sowa authored
      Otherwise the exported symbols might be discarded because of no users
      in vmlinux.
      Reported-by: default avatarJim Davis <jim.epost@gmail.com>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f458945
    • Panu Matilainen's avatar
      ipv4: Fix incorrect error code when adding an unreachable route · 49dd18ba
      Panu Matilainen authored
      Trying to add an unreachable route incorrectly returns -ESRCH if
      if custom FIB rules are present:
      
      [root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
      RTNETLINK answers: Network is unreachable
      [root@localhost ~]# ip rule add to 55.66.77.88 table 200
      [root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
      RTNETLINK answers: No such process
      [root@localhost ~]#
      
      Commit 83886b6b ("[NET]: Change "not found"
      return value for rule lookup") changed fib_rules_lookup()
      to use -ESRCH as a "not found" code internally, but for user space it
      should be translated into -ENETUNREACH. Handle the translation centrally in
      ipv4-specific fib_lookup(), leaving the DECnet case alone.
      
      On a related note, commit b7a71b51
      ("ipv4: removed redundant conditional") removed a similar translation from
      ip_route_input_slow() prematurely AIUI.
      
      Fixes: b7a71b51 ("ipv4: removed redundant conditional")
      Signed-off-by: default avatarPanu Matilainen <pmatilai@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49dd18ba
  3. 14 Nov, 2014 20 commits