1. 30 Nov, 2012 10 commits
    • Tommi Rantala's avatar
      sctp: fix CONFIG_SCTP_DBG_MSG=y null pointer dereference in sctp_v6_get_dst() · ee3f34e8
      Tommi Rantala authored
      Trinity (the syscall fuzzer) triggered the following BUG, reproducible
      only when the kernel is configured with CONFIG_SCTP_DBG_MSG=y.
      
      When CONFIG_SCTP_DBG_MSG is not set, the null pointer is never
      dereferenced.
      
      ---[ end trace a4de0bfcb38a3642 ]---
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
      IP: [<ffffffff8136796e>] ip6_string+0x1e/0xa0
      PGD 4eead067 PUD 4e472067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in:
      CPU 3
      Pid: 21324, comm: trinity-child11 Tainted: G        W    3.7.0-rc7+ #61 ASUSTeK Computer INC. EB1012/EB1012
      RIP: 0010:[<ffffffff8136796e>]  [<ffffffff8136796e>] ip6_string+0x1e/0xa0
      RSP: 0018:ffff88004e4637a0  EFLAGS: 00010046
      RAX: ffff88004e4637da RBX: ffff88004e4637da RCX: 0000000000000000
      RDX: ffffffff8246e92a RSI: 0000000000000100 RDI: ffff88004e4637da
      RBP: ffff88004e4637a8 R08: 000000000000ffff R09: 000000000000ffff
      R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8289d600
      R13: ffffffff8289d230 R14: ffffffff8246e928 R15: ffffffff8289d600
      FS:  00007fed95153700(0000) GS:ffff88005fd80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000100 CR3: 000000004eeac000 CR4: 00000000000007e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process trinity-child11 (pid: 21324, threadinfo ffff88004e462000, task ffff8800524b0000)
      Stack:
       ffff88004e4637da ffff88004e463828 ffffffff81368eee 000000004e4637d8
       ffffffff0000ffff ffff88000000ffff 0000000000000000 000000004e4637f8
       ffffffff826285d8 ffff88004e4637f8 0000000000000000 ffff8800524b06b0
      Call Trace:
       [<ffffffff81368eee>] ip6_addr_string.isra.11+0x3e/0xa0
       [<ffffffff81369183>] pointer.isra.12+0x233/0x2d0
       [<ffffffff810a413a>] ? vprintk_emit+0x1ba/0x450
       [<ffffffff8110953d>] ? trace_hardirqs_on_caller+0x10d/0x1a0
       [<ffffffff81369757>] vsnprintf+0x187/0x5d0
       [<ffffffff81369c62>] vscnprintf+0x12/0x30
       [<ffffffff810a4028>] vprintk_emit+0xa8/0x450
       [<ffffffff81e5cb00>] printk+0x49/0x4b
       [<ffffffff81d17221>] sctp_v6_get_dst+0x731/0x780
       [<ffffffff81d16e15>] ? sctp_v6_get_dst+0x325/0x780
       [<ffffffff81d00a96>] sctp_transport_route+0x46/0x120
       [<ffffffff81cff0f1>] sctp_assoc_add_peer+0x161/0x350
       [<ffffffff81d0fd8d>] sctp_sendmsg+0x6cd/0xcb0
       [<ffffffff81b55bf0>] ? inet_create+0x670/0x670
       [<ffffffff81b55cfb>] inet_sendmsg+0x10b/0x220
       [<ffffffff81b55bf0>] ? inet_create+0x670/0x670
       [<ffffffff81a72a64>] ? sock_update_classid+0xa4/0x2b0
       [<ffffffff81a72ab0>] ? sock_update_classid+0xf0/0x2b0
       [<ffffffff81a6ac1c>] sock_sendmsg+0xdc/0xf0
       [<ffffffff8118e9e5>] ? might_fault+0x85/0x90
       [<ffffffff8118e99c>] ? might_fault+0x3c/0x90
       [<ffffffff81a6e12a>] sys_sendto+0xfa/0x130
       [<ffffffff810a9887>] ? do_setitimer+0x197/0x380
       [<ffffffff81e960d5>] ? sysret_check+0x22/0x5d
       [<ffffffff81e960a9>] system_call_fastpath+0x16/0x1b
      Code: 01 eb 89 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 f8 31 c9 48 89 e5 53 eb 12 0f 1f 40 00 48 83 c1 01 48 83 c0 04 48 83 f9 08 74 70 <0f> b6 3c 4e 89 fb 83 e7 0f c0 eb 04 41 89 d8 41 83 e0 0f 0f b6
      RIP  [<ffffffff8136796e>] ip6_string+0x1e/0xa0
       RSP <ffff88004e4637a0>
      CR2: 0000000000000100
      ---[ end trace a4de0bfcb38a3643 ]---
      Signed-off-by: default avatarTommi Rantala <tt.rantala@gmail.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee3f34e8
    • Alan Ott's avatar
      mac802154: use kfree_skb() instead of dev_kfree_skb() · 92a2ec72
      Alan Ott authored
      kfree_skb() indicates failure, which is where this is being used.
      Signed-off-by: default avatarAlan Ott <alan@signal11.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      92a2ec72
    • Alan Ott's avatar
      mac802154: fix memory leaks · fcefbe9f
      Alan Ott authored
      kfree_skb() was not getting called in the case of some failures.
      This was pointed out by Eric Dumazet.
      Signed-off-by: default avatarAlan Ott <alan@signal11.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcefbe9f
    • Alan Ott's avatar
      6lowpan: consider checksum bytes in fragmentation threshold · b333b7e6
      Alan Ott authored
      Change the threshold for framentation of a lowpan packet from
      using the MTU size to now use the MTU size minus the checksum length,
      which is added by the hardware. For IEEE 802.15.4, this effectively
      changes it from 127 bytes to 125 bytes.
      Signed-off-by: default avatarAlan Ott <alan@signal11.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b333b7e6
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next · fed2c6fd
      David S. Miller authored
      Marc Kleine-Budde says:
      
      ====================
      this pull request is for net-next/master. There is a patch by Alexander
      Stein fixing a reference counter problem which can make driver
      unloading impossible (stable Cc'ed). And several patches by me which
      remove an obsolete mechanism from several drivers, which is already
      handled at the infrastructure level.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fed2c6fd
    • Akinobu Mita's avatar
      mISDN: improve bitops usage · 481af03b
      Akinobu Mita authored
      This improves bitops usages in several points:
      
      - Convert u64 to a proper bitmap declaration.  This enables to remove
        superfluous typecasting from 'u64' to 'unsigned long *'.
      
      - Convert superfluous atomic bitops to non atomic bitops.  The bitmap
        is allocated on the stack and it is not accessed by any other threads,
        so using atomic bitops is not necessary.
      
      - Use find_next_zero_bit and find_next_zero_bit instead of calling
        test_bit() for each bit.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      481af03b
    • Yi Zou's avatar
      8021q: fix vlan device to inherit the unicast filtering capability flag · 6e22ce2c
      Yi Zou authored
      This bug is observed on running FCoE over a VLAN device associated w/
      a real device that has IFF_UNICAST_FLT set since FCoE would add unicast
      address such as FLOGI MAC to the VLAN interface that FCoE is on. Since
      currently, VLAN device is not inheriting the IFF_UNICAST_FLT flag from the
      parent real device even though the real device is capable of doing unicast
      filtering. This forces the VLAN device and its real device go to promiscuous
      mode unnecessarily even the added address is actually being added to the
      available unicast filter table in real device.
      Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
      Cc: devel@open-fcoe.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e22ce2c
    • Jiri Bohac's avatar
      bonding: delete migrated IP addresses from the rlb hash table · e53665c6
      Jiri Bohac authored
      Bonding in balance-alb mode records information from ARP packets
      passing through the bond in a hash table (rx_hashtbl).
      
      At certain situations (e.g. link change of a slave),
      rlb_update_rx_clients() will send out ARP packets to update ARP
      caches of other hosts on the network to achieve RX load
      balancing.
      
      The problem is that once an IP address is recorded in the hash
      table, it stays there indefinitely. If this IP address is
      migrated to a different host in the network, bonding still sends
      out ARP packets that poison other systems' ARP caches with
      invalid information.
      
      This patch solves this by looking at all incoming ARP packets,
      and checking if the source IP address is one of the source
      addresses stored in the rx_hashtbl. If it is, but the MAC
      addresses differ, the corresponding hash table entries are
      removed. Thus, when an IP address is migrated, the first ARP
      broadcast by its new owner will purge the offending entries of
      rx_hashtbl.
      
      The hash table is hashed by ip_dst. To be able to do the above
      check efficiently (not walking the whole hash table), we need a
      reverse mapping (by ip_src).
      
      I added three new members in struct rlb_client_info:
         rx_hashtbl[x].src_first will point to the start of a list of
            entries for which hash(ip_src) == x.
         The list is linked with src_next and src_prev.
      
      When an incoming ARP packet arrives at rlb_arp_recv()
      rlb_purge_src_ip() can quickly walk only the entries on the
      corresponding lists, i.e. the entries that are likely to contain
      the offending IP address.
      
      To avoid confusion, I renamed these existing fields of struct
      rlb_client_info:
      	next -> used_next
      	prev -> used_prev
      	rx_hashtbl_head -> rx_hashtbl_used_head
      
      (The current linked list is _not_ a list of hash table
      entries with colliding ip_dst. It's a list of entries that are
      being used; its purpose is to avoid walking the whole hash table
      when looking for used entries.)
      Signed-off-by: default avatarJiri Bohac <jbohac@suse.cz>
      Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e53665c6
    • zheng.li's avatar
      bonding: rlb mode of bond should not alter ARP originating via bridge · 567b871e
      zheng.li authored
      Do not modify or load balance ARP packets passing through balance-alb
      mode (wherein the ARP did not originate locally, and arrived via a bridge).
      
      Modifying pass-through ARP replies causes an incorrect MAC address
      to be placed into the ARP packet, rendering peers unable to communicate
      with the actual destination from which the ARP reply originated.
      
      Load balancing pass-through ARP requests causes an entry to be
      created for the peer in the rlb table, and bond_alb_monitor will
      occasionally issue ARP updates to all peers in the table instrucing them
      as to which MAC address they should communicate with; this occurs when
      some event sets rx_ntt.  In the bridged case, however, the MAC address
      used for the update would be the MAC of the slave, not the actual source
      MAC of the originating destination.  This would render peers unable to
      communicate with the destinations beyond the bridge.
      Signed-off-by: default avatarZheng Li <zheng.x.li@oracle.com>
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      567b871e
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch · e7165030
      David S. Miller authored
      Conflicts:
      	net/ipv6/exthdrs_core.c
      
      Jesse Gross says:
      
      ====================
      This series of improvements for 3.8/net-next contains four components:
       * Support for modifying IPv6 headers
       * Support for matching and setting skb->mark for better integration with
         things like iptables
       * Ability to recognize the EtherType for RARP packets
       * Two small performance enhancements
      
      The movement of ipv6_find_hdr() into exthdrs_core.c causes two small merge
      conflicts.  I left it as is but can do the merge if you want.  The conflicts
      are:
       * ipv6_find_hdr() and ipv6_find_tlv() were both moved to the bottom of
         exthdrs_core.c.  Both should stay.
       * A new use of ipv6_find_hdr() was added to net/netfilter/ipvs/ip_vs_core.c
         after this patch.  The IPVS user has two instances of the old constant
         name IP6T_FH_F_FRAG which has been renamed to IP6_FH_F_FRAG.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e7165030
  2. 29 Nov, 2012 10 commits
  3. 28 Nov, 2012 20 commits