21 May, 2011

1 commit

  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 May, 2011

1 commit

  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits)
    Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
    net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
    batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
    batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()
    batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu
    net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()
    net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
    net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()
    perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
    perf,rcu: convert call_rcu(free_ctx) to kfree_rcu()
    net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()
    security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
    net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()
    net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()
    net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()
    ...

    Linus Torvalds
     

17 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Change netdev_fix_features messages loglevel
    vmxnet3: Fix inconsistent LRO state after initialization
    sfc: Fix oops in register dump after mapping change
    IPVS: fix netns if reading ip_vs_* procfs entries
    bridge: fix forwarding of IPv6

    Linus Torvalds
     
  • Those reduced to DEBUG can possibly be triggered by unprivileged processes
    and are nothing exceptional. Illegal checksum combinations can only be
    caused by driver bug, so promote those messages to WARN.

    Since GSO without SG will now only cause DEBUG message from
    netdev_fix_features(), remove the workaround from register_netdevice().

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     

15 May, 2011

2 commits

  • Without this patch every access to ip_vs in procfs will increase
    the netns count i.e. an unbalanced get_net()/put_net().
    (ipvsadm commands also use procfs.)
    The result is you can't exit a netns if reading ip_vs_* procfs entries.

    Signed-off-by: Hans Schillstrom
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     
  • The commit 6b1e960fdbd75dcd9bcc3ba5ff8898ff1ad30b6e
    bridge: Reset IPCB when entering IP stack on NF_FORWARD
    broke forwarding of IPV6 packets in bridge because it would
    call bp_parse_ip_options with an IPV6 packet.

    Reported-by: Noah Meyerhans
    Signed-off-by: Stephen Hemminger
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller
    Signed-off-by: Pablo Neira Ayuso

    Stephen Hemminger
     

14 May, 2011

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    bridge: fix forwarding of IPv6
    bonding,llc: Fix structure sizeof incompatibility for some PDUs
    ipv6: restore correct ECN handling on TCP xmit
    ne-h8300: Fix regression caused during net_device_ops conversion
    hydra: Fix regression caused during net_device_ops conversion
    zorro8390: Fix regression caused during net_device_ops conversion
    sfc: Always map MCDI shared memory as uncacheable
    ehea: Fix memory hotplug oops
    libertas: fix cmdpendingq locking
    iwlegacy: fix IBSS mode crashes
    ath9k: Fix a warning due to a queued work during S3 state
    mac80211: don't start the dynamic ps timer if not associated

    Linus Torvalds
     
  • The commit 6b1e960fdbd75dcd9bcc3ba5ff8898ff1ad30b6e
    bridge: Reset IPCB when entering IP stack on NF_FORWARD
    broke forwarding of IPV6 packets in bridge because it would
    call bp_parse_ip_options with an IPV6 packet.

    Reported-by: Noah Meyerhans
    Signed-off-by: Stephen Hemminger
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

13 May, 2011

1 commit

  • When p9pdu_readf() is called with "s" attribute, it allocates a pointer that
    will store a string. In p9dirent_read(), this pointer is not being released,
    leading to out of memory errors.
    This patch releases this pointer after string is copyed to dirent->d_name.

    Signed-off-by: Pedro Scarapicchia Junior
    Signed-off-by: Eric Van Hensbergen

    Pedro Scarapicchia Junior
     

12 May, 2011

2 commits


11 May, 2011

7 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
    slcan: fix ldisc->open retval
    net/usb: mark LG VL600 LTE modem ethernet interface as WWAN
    xfrm: Don't allow esn with disabled anti replay detection
    xfrm: Assign the inner mode output function to the dst entry
    net: dev_close() should check IFF_UP
    vlan: fix GVRP at dismantle time
    netfilter: revert a2361c8735e07322023aedc36e4938b35af31eb0
    netfilter: IPv6: fix DSCP mangle code
    netfilter: IPv6: initialize TOS field in REJECT target module
    IPVS: init and cleanup restructuring
    IPVS: Change of socket usage to enable name space exit.
    netfilter: ebtables: only call xt_compat_add_offset once per rule
    netfilter: fix ebtables compat support
    netfilter: ctnetlink: fix timestamp support for new conntracks
    pch_gbe: support ML7223 IOH
    PCH_GbE : Fixed the issue of checksum judgment
    PCH_GbE : Fixed the issue of collision detection
    NET: slip, fix ldisc->open retval
    be2net: Fixed bugs related to PVID.
    ehea: fix wrongly reported speed and port
    ...

    Linus Torvalds
     
  • David S. Miller
     
  • Unlike the standard case, disabled anti replay detection needs some
    nontrivial extra treatment on ESN. RFC 4303 states:

    Note: If a receiver chooses to not enable anti-replay for an SA, then
    the receiver SHOULD NOT negotiate ESN in an SA management protocol.
    Use of ESN creates a need for the receiver to manage the anti-replay
    window (in order to determine the correct value for the high-order
    bits of the ESN, which are employed in the ICV computation), which is
    generally contrary to the notion of disabling anti-replay for an SA.

    So return an error if an ESN state with disabled anti replay detection
    is inserted for now and add the extra treatment later if we need it.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • As it is, we assign the outer modes output function to the dst entry
    when we create the xfrm bundle. This leads to two problems on interfamily
    scenarios. We might insert ipv4 packets into ip6_fragment when called
    from xfrm6_output. The system crashes if we try to fragment an ipv4
    packet with ip6_fragment. This issue was introduced with git commit
    ad0081e4 (ipv6: Fragment locally generated tunnel-mode IPSec6 packets
    as needed). The second issue is, that we might insert ipv4 packets in
    netfilter6 and vice versa on interfamily scenarios.

    With this patch we assign the inner mode output function to the dst entry
    when we create the xfrm bundle. So xfrm4_output/xfrm6_output from the inner
    mode is used and the right fragmentation and netfilter functions are called.
    We switch then to outer mode with the output_finish functions.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • Commit 443457242beb (factorize sync-rcu call in
    unregister_netdevice_many) mistakenly removed one test from dev_close()

    Following actions trigger a BUG :

    modprobe bonding
    modprobe dummy
    ifconfig bond0 up
    ifenslave bond0 dummy0
    rmmod dummy

    dev_close() must not close a non IFF_UP device.

    With help from Frank Blaschka and Einar EL Lueck

    Reported-by: Frank Blaschka
    Reported-by: Einar EL Lueck
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • ip link add link eth2 eth2.103 type vlan id 103 gvrp on loose_binding on
    ip link set eth2.103 up
    rmmod tg3 # driver providing eth2

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] garp_request_leave+0x3e/0xc0 [garp]
    PGD 11d251067 PUD 11b9e0067 PMD 0
    Oops: 0000 [#1] SMP
    last sysfs file: /sys/devices/virtual/net/eth2.104/ifindex
    CPU 0
    Modules linked in: tg3(-) 8021q garp nfsd lockd auth_rpcgss sunrpc libphy sg [last unloaded: x_tables]

    Pid: 11494, comm: rmmod Tainted: G W 2.6.39-rc6-00261-gfd71257-dirty #580 HP ProLiant BL460c G6
    RIP: 0010:[] [] garp_request_leave+0x3e/0xc0 [garp]
    RSP: 0018:ffff88007a19bae8 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff88011b5e2000 RCX: 0000000000000002
    RDX: 0000000000000000 RSI: 0000000000000175 RDI: ffffffffa0030d5b
    RBP: ffff88007a19bb18 R08: 0000000000000001 R09: ffff88011bd64a00
    R10: ffff88011d34ec00 R11: 0000000000000000 R12: 0000000000000002
    R13: ffff88007a19bc48 R14: ffff88007a19bb88 R15: 0000000000000001
    FS: 0000000000000000(0000) GS:ffff88011fc00000(0063) knlGS:00000000f77d76c0
    CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
    CR2: 0000000000000000 CR3: 000000011a675000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process rmmod (pid: 11494, threadinfo ffff88007a19a000, task ffff8800798595c0)
    Stack:
    ffff88007a19bb36 ffff88011c84b800 ffff88011b5e2000 ffff88007a19bc48
    ffff88007a19bb88 0000000000000006 ffff88007a19bb38 ffffffffa003a5f6
    ffff88007a19bb38 670088007a19bba8 ffff88007a19bb58 ffffffffa00397e7
    Call Trace:
    [] vlan_gvrp_request_leave+0x46/0x50 [8021q]
    [] vlan_dev_stop+0xb7/0xc0 [8021q]
    [] __dev_close_many+0x87/0xe0
    [] dev_close_many+0x87/0x110
    [] rollback_registered_many+0xa0/0x240
    [] unregister_netdevice_many+0x19/0x60
    [] vlan_device_event+0x53b/0x550 [8021q]
    [] ? ip6mr_device_event+0xa8/0xd0
    [] notifier_call_chain+0x53/0x80
    [] __raw_notifier_call_chain+0x9/0x10
    [] raw_notifier_call_chain+0x11/0x20
    [] call_netdevice_notifiers+0x32/0x60
    [] rollback_registered_many+0x10f/0x240
    [] rollback_registered+0x2f/0x40
    [] unregister_netdevice_queue+0x58/0x90
    [] unregister_netdev+0x1b/0x30
    [] tg3_remove_one+0x6f/0x10b [tg3]

    We should call vlan_gvrp_request_leave() from unregister_vlan_dev(),
    not from vlan_dev_stop(), because vlan_gvrp_uninit_applicant()
    is called right after unregister_netdevice_queue(). In batch mode,
    unregister_netdevice_queue() doesn’t immediately call vlan_dev_stop().

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • When we are disconnecting, we set PS off, but this happens before we
    send the deauth/disassoc request. When the deauth/disassoc frames are
    sent, we trigger the dynamic ps timer, which then times out and turns
    PS back on. Thus, PS remains on after disconnecting, causing problems
    when associating again.

    This can be fixed by preventing the timer to start when we're not
    associated anymore.

    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho
     

10 May, 2011

9 commits

  • This patch reverts a2361c8735e07322023aedc36e4938b35af31eb0:
    "[PATCH] netfilter: xt_conntrack: warn about use in raw table"

    Florian Wesphal says:
    "... when the packet was sent from the local machine the skb
    already has ->nfct attached, and -m conntrack seems to do
    the right thing."

    Acked-by: Jan Engelhardt
    Reported-by: Florian Wesphal
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • The mask indicates the bits one wants to zero out, so it needs to be
    inverted before applying to the original TOS field.

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Pablo Neira Ayuso

    Fernando Luis Vazquez Cao
     
  • The IPv6 header is not zeroed out in alloc_skb so we must initialize
    it properly unless we want to see IPv6 packets with random TOS fields
    floating around. The current implementation resets the flow label
    but this could be changed if deemed necessary.

    We stumbled upon this issue when trying to apply a mangle rule to
    the RST packet generated by the REJECT target module.

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Pablo Neira Ayuso

    Fernando Luis Vazquez Cao
     
  • DESCRIPTION
    This patch tries to restore the initial init and cleanup
    sequences that was before namspace patch.
    Netns also requires action when net devices unregister
    which has never been implemented. I.e this patch also
    covers when a device moves into a network namespace,
    and has to be released.

    IMPLEMENTATION
    The number of calls to register_pernet_device have been
    reduced to one for the ip_vs.ko
    Schedulers still have their own calls.

    This patch adds a function __ip_vs_service_cleanup()
    and an enable flag for the netfilter hooks.

    The nf hooks will be enabled when the first service is loaded
    and never disabled again, except when a namespace exit starts.

    Signed-off-by: Hans Schillstrom
    Acked-by: Julian Anastasov
    [horms@verge.net.au: minor edit to changelog]
    Signed-off-by: Simon Horman

    Hans Schillstrom
     
  • If the sync daemons run in a name space while it crashes
    or get killed, there is no way to stop them except for a reboot.
    When all patches are there, ip_vs_core will handle register_pernet_(),
    i.e. ip_vs_sync_init() and ip_vs_sync_cleanup() will be removed.

    Kernel threads should not increment the use count of a socket.
    By calling sk_change_net() after creating a socket this is avoided.
    sock_release cant be used intead sk_release_kernel() should be used.

    Thanks Eric W Biederman for your advices.

    Signed-off-by: Hans Schillstrom
    [horms@verge.net.au: minor edit to changelog]
    Signed-off-by: Simon Horman

    Hans Schillstrom
     
  • The optimizations in commit 255d0dc34068a976
    (netfilter: x_table: speedup compat operations) assume that
    xt_compat_add_offset is called once per rule.

    ebtables however called it for each match/target found in a rule.

    The match/watcher/target parser already returns the needed delta, so it
    is sufficient to move the xt_compat_add_offset call to a more reasonable
    location.

    While at it, also get rid of the unused COMPAT iterator macros.

    Signed-off-by: Florian Westphal
    Signed-off-by: Patrick McHardy

    Florian Westphal
     
  • commit 255d0dc34068a976 (netfilter: x_table: speedup compat operations)
    made ebtables not working anymore.

    1) xt_compat_calc_jump() is not an exact match lookup
    2) compat_table_info() has a typo in xt_compat_init_offsets() call
    3) compat_do_replace() misses a xt_compat_init_offsets() call

    Reported-by: dann frazier
    Signed-off-by: Eric Dumazet
    Signed-off-by: Patrick McHardy

    Eric Dumazet
     
  • This patch fixes the missing initialization of the start time if
    the timestamp support is enabled.

    libnetfilter_conntrack/utils# conntrack -E &
    libnetfilter_conntrack/utils# ./conntrack_create
    tcp 6 109 ESTABLISHED src=1.1.1.1 dst=2.2.2.2 sport=1025 dport=21 packets=0 bytes=0 [UNREPLIED] src=2.2.2.2 dst=1.1.1.1 sport=21 dport=1025 packets=0 bytes=0 mark=0 delta-time=1303296401 use=2

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: Patrick McHardy

    Pablo Neira Ayuso
     
  • Use proper data type to handle get_user_pages_fast error condition. Also
    do not treat EFAULT error as fatal.

    Signed-off-by: M. Mohan Kumar
    Signed-off-by: Venkateswararao Jujjuri
    Signed-off-by: Eric Van Hensbergen

    M. Mohan Kumar
     

09 May, 2011

1 commit

  • TCP Cubic keeps a metric that estimates the amount of delayed
    acknowledgements to use in adjusting the window. If an abnormally
    large number of packets are acknowledged at once, then the update
    could wrap and reach zero. This kind of ACK could only
    happen when there was a large window and huge number of
    ACK's were lost.

    This patch limits the value of delayed ack ratio. The choice of 32
    is just a conservative value since normally it should be range of
    1 to 4 packets.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

08 May, 2011

12 commits