1. 30 Aug, 2013 2 commits
    • Phil Oester's avatar
      tcp: tcp_make_synack() should use sock_wmalloc · eb8895de
      Phil Oester authored
      In commit 90ba9b19 (tcp: tcp_make_synack() can use alloc_skb()), Eric changed
      the call to sock_wmalloc in tcp_make_synack to alloc_skb.  In doing so,
      the netfilter owner match lost its ability to block the SYNACK packet on
      outbound listening sockets.  Revert the change, restoring the owner match
      functionality.
      
      This closes netfilter bugzilla #847.
      Signed-off-by: default avatarPhil Oester <kernel@linuxace.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb8895de
    • Linus Lüssing's avatar
      bridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones · cc0fdd80
      Linus Lüssing authored
      Currently we would still potentially suffer multicast packet loss if there
      is just either an IGMP or an MLD querier: For the former case, we would
      possibly drop IPv6 multicast packets, for the latter IPv4 ones. This is
      because we are currently assuming that if either an IGMP or MLD querier
      is present that the other one is present, too.
      
      This patch makes the behaviour and fix added in
      "bridge: disable snooping if there is no querier" (b00589af)
      to also work if there is either just an IGMP or an MLD querier on the
      link: It refines the deactivation of the snooping to be protocol
      specific by using separate timers for the snooped IGMP and MLD queries
      as well as separate timers for our internal IGMP and MLD queriers.
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@web.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc0fdd80
  2. 29 Aug, 2013 5 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec · 79f9ab7e
      David S. Miller authored
      Steffen Klassert says:
      
      ====================
      This pull request fixes some issues that arise when 6in4 or 4in6 tunnels
      are used in combination with IPsec, all from Hannes Frederic Sowa and a
      null pointer dereference when queueing packets to the policy hold queue.
      
      1) We might access the local error handler of the wrong address family if
         6in4 or 4in6 tunnel is protected by ipsec. Fix this by addind a pointer
         to the correct local_error to xfrm_state_afinet.
      
      2) Add a helper function to always refer to the correct interpretation
         of skb->sk.
      
      3) Call skb_reset_inner_headers to record the position of the inner headers
         when adding a new one in various ipv6 tunnels. This is needed to identify
         the addresses where to send back errors in the xfrm layer.
      
      4) Dereference inner ipv6 header if encapsulated to always call the
         right error handler.
      
      5) Choose protocol family by skb protocol to not call the wrong
         xfrm{4,6}_local_error handler in case an ipv6 sockets is used
         in ipv4 mode.
      
      6) Partly revert "xfrm: introduce helper for safe determination of mtu"
         because this introduced pmtu discovery problems.
      
      7) Set skb->protocol on tcp, raw and ip6_append_data genereated skbs.
         We need this to get the correct mtu informations in xfrm.
      
      8) Fix null pointer dereference in xdst_queue_output.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79f9ab7e
    • Thomas Graf's avatar
      ipv6: Don't depend on per socket memory for neighbour discovery messages · 1f324e38
      Thomas Graf authored
      Allocating skbs when sending out neighbour discovery messages
      currently uses sock_alloc_send_skb() based on a per net namespace
      socket and thus share a socket wmem buffer space.
      
      If a netdevice is temporarily unable to transmit due to carrier
      loss or for other reasons, the queued up ndisc messages will cosnume
      all of the wmem space and will thus prevent from any more skbs to
      be allocated even for netdevices that are able to transmit packets.
      
      The number of neighbour discovery messages sent is very limited,
      simply use alloc_skb() and don't depend on any socket wmem space any
      longer.
      
      This patch has orginally been posted by Eric Dumazet in a modified
      form.
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f324e38
    • Chris Clark's avatar
      ipv4: sendto/hdrincl: don't use destination address found in header · c27c9322
      Chris Clark authored
      ipv4: raw_sendmsg: don't use header's destination address
      
      A sendto() regression was bisected and found to start with commit
      f8126f1d (ipv4: Adjust semantics of rt->rt_gateway.)
      
      The problem is that it tries to ARP-lookup the constructed packet's
      destination address rather than the explicitly provided address.
      
      Fix this using FLOWI_FLAG_KNOWN_NH so that given nexthop is used.
      
      cf. commit 2ad5b9e4Reported-by: default avatarChris Clark <chris.clark@alcatel-lucent.com>
      Bisected-by: default avatarChris Clark <chris.clark@alcatel-lucent.com>
      Tested-by: default avatarChris Clark <chris.clark@alcatel-lucent.com>
      Suggested-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarChris Clark <chris.clark@alcatel-lucent.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c27c9322
    • Andrew Vagin's avatar
      tcp: don't apply tsoffset if rcv_tsecr is zero · e3e12028
      Andrew Vagin authored
      The zero value means that tsecr is not valid, so it's a special case.
      
      tsoffset is used to customize tcp_time_stamp for one socket.
      tsoffset is usually zero, it's used when a socket was moved from one
      host to another host.
      
      Currently this issue affects logic of tcp_rcv_rtt_measure_ts. Due to
      incorrect value of rcv_tsecr, tcp_rcv_rtt_measure_ts sets rto to
      TCP_RTO_MAX.
      
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Morris <jmorris@namei.org>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Reported-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3e12028
    • Andrew Vagin's avatar
      tcp: initialize rcv_tstamp for restored sockets · c7781a6e
      Andrew Vagin authored
      u32 rcv_tstamp;     /* timestamp of last received ACK */
      
      Its value used in tcp_retransmit_timer, which closes socket
      if the last ack was received more then TCP_RTO_MAX ago.
      
      Currently rcv_tstamp is initialized to zero and if tcp_retransmit_timer
      is called before receiving a first ack, the connection is closed.
      
      This patch initializes rcv_tstamp to a timestamp, when a socket was
      restored.
      
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Morris <jmorris@namei.org>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Reported-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7781a6e
  3. 28 Aug, 2013 12 commits
  4. 27 Aug, 2013 6 commits
  5. 26 Aug, 2013 3 commits
  6. 23 Aug, 2013 11 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 41a00f79
      Linus Torvalds authored
      Merge networking fixes from David Miller:
      
       1) Revert Johannes Berg's genetlink locking fix, because it causes
          regressions.
      
          Johannes and Pravin Shelar are working on fixing things properly.
      
       2) Do not drop ipv6 ICMP messages without a redirected header option,
          they are legal.  From Duan Jiong.
      
       3) Missing error return propagation in probing of via-ircc driver.
          From Alexey Khoroshilov.
      
       4) Do not clear out broadcast/multicast/unicast/WOL bits in r8169 when
          initializing, from Peter Wu.
      
       5) realtek phy driver programs wrong interrupt status bit, from
          Giuseppe CAVALLARO.
      
       6) Fix statistics regression in AF_PACKET code, from Willem de Bruijn.
      
       7) Bridge code uses wrong bitmap length, from Toshiaki Makita.
      
       8) SFC driver uses wrong indexes to look up MAC filters, from Ben
          Hutchings.
      
       9) Don't pass stack buffers into usb control operations in hso driver,
          from Daniel Gimpelevich.
      
      10) Multiple ipv6 fragmentation headers in one packet is illegal and
          such packets should be dropped, from Hannes Frederic Sowa.
      
      11) When TCP sockets are "repaired" as part of checkpoint/restart, the
          timestamp field of SKBs need to be refreshed otherwise RTOs can be
          wildly off.  From Andrey Vagin.
      
      12) Fix memcpy args (uses 'address of pointer' instead of 'pointer') in
          hostp driver.  From Dan Carpenter.
      
      13) nl80211hdr_put() doesn't return an ERR_PTR, but some code believes
          it does.  From Dan Carpenter.
      
      14) Fix regression in wireless SME disconnects, from Johannes Berg.
      
      15) Don't use a stack buffer for DMA in zd1201 USB wireless driver, from
          Jussi Kivilinna.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
        ipv4: expose IPV4_DEVCONF
        ipv6: handle Redirect ICMP Message with no Redirected Header option
        be2net: fix disabling TX in be_close()
        Revert "genetlink: fix family dump race"
        hso: Fix stack corruption on some architectures
        hso: Earlier catch of error condition
        sfc: Fix lookup of default RX MAC filters when steered using ethtool
        bridge: Use the correct bit length for bitmap functions in the VLAN code
        packet: restore packet statistics tp_packets to include drops
        net: phy: rtl8211: fix interrupt on status link change
        r8169: remember WOL preferences on driver load
        via-ircc: don't return zero if via_ircc_open() failed
        macvtap: Ignore tap features when VNET_HDR is off
        macvtap: Correctly set tap features when IFF_VNET_HDR is disabled.
        macvtap: simplify usage of tap_features
        tcp: set timestamps for restored skb-s
        bnx2x: set VF DMAE when first function has 0 supported VFs
        bnx2x: Protect against VFs' ndos when SR-IOV is disabled
        bnx2x: prevent VF benign attentions
        bnx2x: Consider DCBX remote error
        ...
      41a00f79
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew Morton) · 3db0d4de
      Linus Torvalds authored
      Merge fixes from Andrew Morton:
       "A few fixes.  One is a licensing change and I don't do licensing, so
        please eyeball that one"
      
      Licensing eye-balled.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        lib/lz4: correct the LZ4 license
        memcg: get rid of swapaccount leftovers
        nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection
        nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
        drivers/platform/olpc/olpc-ec.c: initialise earlier
      3db0d4de
    • Richard Laager's avatar
      lib/lz4: correct the LZ4 license · ee8a99bd
      Richard Laager authored
      The LZ4 code is listed as using the "BSD 2-Clause License".
      Signed-off-by: default avatarRichard Laager <rlaager@wiktel.com>
      Acked-by: default avatarKyungsik Lee <kyungsik.lee@lge.com>
      Cc: Chanho Min <chanho.min@lge.com>
      Cc: Richard Yao <ryao@gentoo.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      [ The 2-clause BSD can be just converted into GPL, but that's rude and
        pointless, so don't do it   - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ee8a99bd
    • Michal Hocko's avatar
      memcg: get rid of swapaccount leftovers · 07555ac1
      Michal Hocko authored
      The swapaccount kernel parameter without any values has been removed by
      commit a2c8990a ("memsw: remove noswapaccount kernel parameter") but
      it seems that we didn't get rid of all the left overs.
      
      Make sure that menuconfig help text and kernel-parameters.txt are clear
      about value for the paramter and remove the stalled comment which is not
      very much useful on its own.
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Reported-by: default avatarGergely Risko <gergely@risko.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      07555ac1
    • Vyacheslav Dubeyko's avatar
      nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection · 4bf93b50
      Vyacheslav Dubeyko authored
      Fix the issue with improper counting number of flying bio requests for
      BIO_EOPNOTSUPP error detection case.
      
      The sb_nbio must be incremented exactly the same number of times as
      complete() function was called (or will be called) because
      nilfs_segbuf_wait() will call wail_for_completion() for the number of
      times set to sb_nbio:
      
        do {
            wait_for_completion(&segbuf->sb_bio_event);
        } while (--segbuf->sb_nbio > 0);
      
      Two functions complete() and wait_for_completion() must be called the
      same number of times for the same sb_bio_event.  Otherwise,
      wait_for_completion() will hang or leak.
      Signed-off-by: default avatarVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Tested-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4bf93b50
    • Vyacheslav Dubeyko's avatar
      nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error · 2df37a19
      Vyacheslav Dubeyko authored
      Remove double call of bio_put() in nilfs_end_bio_write() for the case of
      BIO_EOPNOTSUPP error detection.  The issue was found by Dan Carpenter
      and he suggests first version of the fix too.
      Signed-off-by: default avatarVyacheslav Dubeyko <slava@dubeyko.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Tested-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2df37a19
    • Daniel Drake's avatar
      drivers/platform/olpc/olpc-ec.c: initialise earlier · 93dbc1b3
      Daniel Drake authored
      Being a low-level component, various drivers (e.g.  olpc-battery) assume
      that it is ok to communicate with the OLPC Embedded Controller during
      probe.  Therefore the OLPC EC driver must be initialised before other
      drivers try to use it.  This was the case until it was recently moved
      out of arch/x86 and restructured around commits ac250415 ("Platform:
      OLPC: turn EC driver into a platform_driver") and 85f90cf6 ("x86:
      OLPC: switch over to using new EC driver on x86").
      
      Use arch_initcall so that olpc-ec is readied earlier, matching the
      previous behaviour.
      
      Fixes a regression introduced in Linux-3.6 where various drivers such as
      olpc-battery and olpc-xo1-sci failed to load due to an inability to
      communicate with the EC.  The user-visible effect was a lack of battery
      monitoring, missing ebook/lid switch input devices, etc.
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Cc: Andres Salomon <dilinger@queued.net>
      Cc: Paul Fox <pgf@laptop.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93dbc1b3
    • John W. Linville's avatar
      Merge branch 'master' of... · 81ca2ff9
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      81ca2ff9
    • stephen hemminger's avatar
      ipv4: expose IPV4_DEVCONF · 4a5a8aa6
      stephen hemminger authored
      IP sends device configuration (see inet_fill_link_af) as an array
      in the netlink information, but the indices in that array are not
      exposed to userspace through any current santized header file.
      
      It was available back in 2.6.32 (in /usr/include/linux/sysctl.h)
      but was broken by:
        commit 02291680
        Author: Eric W. Biederman <ebiederm@xmission.com>
        Date:   Sun Feb 14 03:25:51 2010 +0000
      
          net ipv4: Decouple ipv4 interface parameters from binary sysctl numbers
      
      Eric was solving the sysctl problem but then the indices were re-exposed
      by a later addition of devconf support for IPV4
      
        commit 9f0f7272
        Author: Thomas Graf <tgraf@infradead.org>
        Date:   Tue Nov 16 04:32:48 2010 +0000
      
          ipv4: AF_INET link address family
      
      Putting them in /usr/include/linux/ip.h seemed the logical match
      for the DEVCONF_ definitions for IPV6 in /usr/include/linux/ip6.h
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a5a8aa6
    • Duan Jiong's avatar
      ipv6: handle Redirect ICMP Message with no Redirected Header option · c92a59ec
      Duan Jiong authored
      rfc 4861 says the Redirected Header option is optional, so
      the kernel should not drop the Redirect Message that has no
      Redirected Header option. In this patch, the function
      ip6_redirect_no_header() is introduced to deal with that
      condition.
      Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      c92a59ec
    • Sathya Perla's avatar
      be2net: fix disabling TX in be_close() · 6e1f9975
      Sathya Perla authored
      commit fba87559 ("disable TX in be_close()") disabled TX in be_close()
      to protect be_xmit() from touching freed up queues in the AER recovery
      flow.  But, TX must be disabled *before* cleaning up TX completions in
      the close() path, not after. This allows be_tx_compl_clean() to free up
      all TX-req skbs that were notified to the HW.
      Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e1f9975
  7. 22 Aug, 2013 1 commit