13 Jan, 2012

1 commit

  • commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
    RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
    complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
    y).

    We miss needed barriers, even on x86, when y is not NULL.

    Signed-off-by: Eric Dumazet
    CC: Stephen Hemminger
    CC: Paul E. McKenney
    Signed-off-by: David S. Miller

    Eric Dumazet
     

10 Jan, 2012

1 commit

  • Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
    behavior on v3 query during v2-compatibility mode') added yet another
    case for query parsing, which can result in max_delay = 0. Substitute
    a value of 1, as in the usual v3 case.

    Reported-by: Simon McVittie
    References: http://bugs.debian.org/654876
    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

01 Dec, 2011

1 commit


27 Nov, 2011

1 commit


24 Nov, 2011

1 commit


19 Nov, 2011

1 commit

  • ipv4: Remove all uses of LL_ALLOCATED_SPACE

    The macro LL_ALLOCATED_SPACE was ill-conceived. It applies the
    alignment to the sum of needed_headroom and needed_tailroom. As
    the amount that is then reserved for head room is needed_headroom
    with alignment, this means that the tail room left may be too small.

    This patch replaces all uses of LL_ALLOCATED_SPACE in net/ipv4
    with the macro LL_RESERVED_SPACE and direct reference to
    needed_tailroom.

    This also fixes the problem with needed_headroom changing between
    allocating the skb and reserving the head room.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

25 Aug, 2011

1 commit


18 Aug, 2011

1 commit


08 Aug, 2011

1 commit


02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

01 Aug, 2011

1 commit

  • Convert array index from the loop bound to the loop index.

    A simplified version of the semantic patch that fixes this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression e1,e2,ar;
    @@

    for(e1 = 0; e1 < e2; e1++) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

25 May, 2011

1 commit

  • In igmp_group_dropped() we call ip_mc_clear_src(), which resets the number
    of source filters per mulitcast. However, igmp_group_dropped() is also
    called on NETDEV_DOWN, NETDEV_PRE_TYPE_CHANGE and NETDEV_UNREGISTER, which
    means that the group might get added back on NETDEV_UP, NETDEV_REGISTER and
    NETDEV_POST_TYPE_CHANGE respectively, leaving us with broken source
    filters.

    To fix that, we must clear the source filters only when there are no users
    in the ip_mc_list, i.e. in ip_mc_dec_group() and on device destroy.

    Acked-by: David L Stevens
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     

21 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     

08 May, 2011

3 commits


04 May, 2011

2 commits


28 Apr, 2011

1 commit

  • Output route resolution never returns a route with rt_src set to zero
    (which is INADDR_ANY).

    Even if the flow key for the output route lookup specifies INADDR_ANY
    for the source address, the output route resolution chooses a real
    source address to use in the final route.

    This test has existed forever in igmp_send_report() and David Stevens
    simply copied over the erroneous test when implementing support for
    IGMPv3.

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

    David S. Miller
     

13 Mar, 2011

1 commit


11 Mar, 2011

1 commit


03 Mar, 2011

1 commit


19 Nov, 2010

2 commits

  • IGMP allocates MTU sized skbs. This may fail for large MTU (order-2
    allocations), so add a fallback to try lower sizes.

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

    Eric Dumazet
     
  • Instead of iterating in_dev->mc_list from bonding driver, its better
    to call a helper function provided by igmp.c
    Details of implementation (locking) are private to igmp code.

    ip_mc_rejoin_group(struct ip_mc_list *im) becomes
    ip_mc_rejoin_groups(struct in_device *in_dev);

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

    Eric Dumazet
     

18 Nov, 2010

1 commit


16 Nov, 2010

1 commit

  • net/ipv4/igmp.c: In function 'ip_mc_inc_group':
    net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
    net/ipv4/igmp.c:1228: error: expected ';' before '{' token
    net/ipv4/igmp.c: In function 'ip_mc_unmap':
    net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
    ...

    Move for_each_pmc_rcu and for_each_pmc_rtnl macro definitions
    outside of multicast ifdef protection.

    Reported-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    David S. Miller
     

15 Nov, 2010

1 commit


13 Nov, 2010

1 commit

  • in_dev->mc_list is protected by one rwlock (in_dev->mc_list_lock).

    This can easily be converted to a RCU protection.

    Writers hold RTNL, so mc_list_lock is removed, not replaced by a
    spinlock.

    Signed-off-by: Eric Dumazet
    Cc: Cypher Wu
    Cc: Américo Wang
    Signed-off-by: David S. Miller

    Eric Dumazet
     

12 Nov, 2010

1 commit


10 Nov, 2010

1 commit

  • commit 8723e1b4ad9be4444 (inet: RCU changes in inetdev_by_index())
    forgot one call site in ip_mc_drop_socket()

    We should not decrease idev refcount after inetdev_by_index() call,
    since refcount is not increased anymore.

    Reported-by: Markus Trippelsdorf
    Reported-by: Miles Lane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

19 Oct, 2010

2 commits


06 Oct, 2010

1 commit

  • The IGMP specs states that if the system receives a
    membership report, it shouldn't send another for the
    next minute. However, if a link failure happens right
    after that, the backup slave and the switch connected
    to this slave will not know about the multicast and
    the traffic will hang for about a minute.

    This patch fixes it to rejoin multicast groups immediately
    after a failover restoring the multicast traffic.

    Signed-off-by: Flavio Leitner
    Signed-off-by: David S. Miller

    Flavio Leitner
     

04 Oct, 2010

1 commit

  • A recent patch to allow IGMPv2 responses to IGMPv3 queries
    bypasses length checks for valid query lengths, incorrectly
    resets the v2_seen timer, and does not support IGMPv1.

    The following patch responds with a v2 report as required
    by IGMPv2 while correcting the other problems introduced
    by the patch.

    Signed-Off-By: David L Stevens

    Signed-off-by: David S. Miller

    David Stevens
     

14 Sep, 2010

1 commit

  • After all these years, it turns out that the
    /proc/sys/net/ipv4/conf/*/force_igmp_version
    parameter isn't fully implemented.

    *Symptom*:
    When set force_igmp_version to a value of 2, the kernel should only perform
    multicast IGMPv2 operations (IETF rfc2236). An host-initiated Join message
    will be sent as a IGMPv2 Join message. But if a IGMPv3 query message is
    received, the host responds with a IGMPv3 join message. Per rfc3376 and
    rfc2236, a IGMPv2 host should treat a IGMPv3 query as a IGMPv2 query and
    respond with an IGMPv2 Join message.

    *Consequences*:
    This is an issue when a IGMPv3 capable switch is the querier and will only
    issue IGMPv3 queries (which double as IGMPv2 querys) and there's an
    intermediate switch that is only IGMPv2 capable. The intermediate switch
    processes the initial v2 Join, but fails to recognize the IGMPv3 Join responses
    to the Query, resulting in a dropped connection when the intermediate v2-only
    switch times it out.

    *Identifying issue in the kernel source*:
    The issue is in this section of code (in net/ipv4/igmp.c), which is called when
    an IGMP query is received (from mainline 2.6.36-rc3 gitweb):
    ...
    A IGMPv3 query has a length >= 12 and no sources. This routine will exit after
    line 880, setting the general query timer (random timeout between 0 and query
    response time). This calls igmp_gq_timer_expire():
    ...
    .. which only sends a v3 response. So if a v3 query is received, the kernel
    always sends a v3 response.

    IGMP queries happen once every 60 sec (per vlan), so the traffic is low. A
    IGMPv3 query *is* a strict superset of a IGMPv2 query, so this patch properly
    short circuit's the v3 behaviour.

    One issue is that this does not address force_igmp_version=1. Then again, I've
    never seen any IGMPv1 multicast equipment in the wild. However there is a lot
    of v2-only equipment. If it's necessary to support the IGMPv1 case as well:

    837 if (len == 8 || IGMP_V2_SEEN(in_dev) || IGMP_V1_SEEN(in_dev)) {

    Signed-off-by: David S. Miller

    Bob Arendt
     

13 Jul, 2010

1 commit


11 Jun, 2010

1 commit


08 Jun, 2010

1 commit


01 Jun, 2010

1 commit