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
     

13 May, 2011

1 commit

  • While trying to remove useless synchronize_rcu() calls, I found l2tp is
    indeed incorrectly using two of such calls, but also bumps tunnel
    refcount after list insertion.

    tunnel refcount must be incremented before being made publically visible
    by rcu readers.

    This fix can be applied to 2.6.35+ and might need a backport for older
    kernels, since things were shuffled in commit fd558d186df2c
    (l2tp: Split pppol2tp patch into separate l2tp and ppp parts)

    Signed-off-by: Eric Dumazet
    CC: Paul E. McKenney
    CC: James Chapman
    Reviewed-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Eric Dumazet
     

09 May, 2011

4 commits

  • This allows us to acquire the exact route keying information from the
    protocol, however that might be managed.

    It handles all of the possibilities, from the simplest case of storing
    the key in inet->cork.fl to the more complex setup SCTP has where
    individual transports determine the flow.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Now that the socket is consistently locked in these two routines,
    this transformation is legal.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • l2tp_xmit_skb() must take the socket lock. It makes use of ip_queue_xmit()
    which expects to execute in a socket atomic context.

    Since we execute this function in software interrupts, we cannot use the
    usual lock_sock()/release_sock() sequence, instead we have to use
    bh_lock_sock() and see if a user has the socket locked, and if so drop
    the packet.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Both l2tp_ip_connect() and l2tp_ip_sendmsg() must take the socket
    lock. They both modify socket state non-atomically, and in particular
    l2tp_ip_sendmsg() increments socket private counters without using
    atomic operations.
    Signed-off-by: David S. Miller

    David S. Miller
     

04 May, 2011

1 commit


29 Apr, 2011

4 commits

  • Now that output route lookups update the flow with
    destination address selection, we can fetch it from
    fl4->daddr instead of rt->rt_dst

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Now that output route lookups update the flow with
    source address selection, we can fetch it from
    fl4->saddr instead of rt->rt_src

    Signed-off-by: David S. Miller

    David S. Miller
     
  • We don't actually hold the socket lock at this point, so the
    rcu_dereference_protected() isn't' correct. Thanks to Eric
    Dumazet for pointing this out.

    Thankfully, we're only interested in fetching the faddr value
    if srr is enabled, so we can simply make this an RCU sequence
    and use plain rcu_dereference().

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

    David S. Miller
     
  • We lack proper synchronization to manipulate inet->opt ip_options

    Problem is ip_make_skb() calls ip_setup_cork() and
    ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
    without any protection against another thread manipulating inet->opt.

    Another thread can change inet->opt pointer and free old one under us.

    Use RCU to protect inet->opt (changed to inet->inet_opt).

    Instead of handling atomic refcounts, just copy ip_options when
    necessary, to avoid cache line dirtying.

    We cant insert an rcu_head in struct ip_options since its included in
    skb->cb[], so this patch is large because I had to introduce a new
    ip_options_rcu structure.

    Signed-off-by: Eric Dumazet
    Cc: Herbert Xu
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Apr, 2011

1 commit

  • These functions are used together as a unit for route resolution
    during connect(). They address the chicken-and-egg problem that
    exists when ports need to be allocated during connect() processing,
    yet such port allocations require addressing information from the
    routing code.

    It's currently more heavy handed than it needs to be, and in
    particular we allocate and initialize a flow object twice.

    Let the callers provide the on-stack flow object. That way we only
    need to initialize it once in the ip_route_connect() call.

    Later, if ip_route_newports() needs to do anything, it re-uses that
    flow object as-is except for the ports which it updates before the
    route re-lookup.

    Also, describe why this set of facilities are needed and how it works
    in a big comment.

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

    David S. Miller
     

27 Apr, 2011

1 commit


18 Apr, 2011

1 commit


22 Mar, 2011

1 commit

  • A struct used in the l2tp_eth driver for registering network namespace
    ops was incorrectly marked as __net_initdata, leading to oops when
    module unloaded.

    BUG: unable to handle kernel paging request at ffffffffa00ec098
    IP: [] ops_exit_list+0x7/0x4b
    PGD 142d067 PUD 1431063 PMD 195da8067 PTE 0
    Oops: 0000 [#1] SMP
    last sysfs file: /sys/module/l2tp_eth/refcnt
    Call Trace:
    [] ? unregister_pernet_operations+0x32/0x93
    [] ? unregister_pernet_device+0x2b/0x38
    [] ? sys_delete_module+0x1b8/0x222
    [] ? do_munmap+0x254/0x318
    [] ? page_fault+0x25/0x30
    [] ? system_call_fastpath+0x16/0x1b

    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller

    James Chapman
     

13 Mar, 2011

1 commit


03 Mar, 2011

1 commit


02 Mar, 2011

3 commits


09 Dec, 2010

2 commits


18 Nov, 2010

1 commit


01 Nov, 2010

1 commit

  • 'sparse' spotted that the parameters to kzalloc in l2tp_dfs_seq_open
    were swapped.

    Tested on current git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    at 1792f17b7210280a3d7ff29da9614ba779cfcedb build, boots and I can see that directory,
    but there again I could see /sys/kernel/debug/l2tp with it swapped; I don't have
    any l2tp in use.

    Signed-off-by: Dr. David Alan Gilbert
    Signed-off-by: David S. Miller

    Dr. David Alan Gilbert
     

25 Oct, 2010

2 commits

  • Causes these build failures on PowerPC:

    net/l2tp/l2tp_core.c:1228: error: __ksymtab_l2tp_tunnel_closeall causes a section type conflict
    net/l2tp/l2tp_core.c:1228: error: __ksymtab_l2tp_tunnel_closeall causes a section type conflict
    net/l2tp/l2tp_core.c:1006: error: __ksymtab_l2tp_xmit_core causes a section type conflict
    net/l2tp/l2tp_core.c:1006: error: __ksymtab_l2tp_xmit_core causes a section type conflict
    net/l2tp/l2tp_core.c:847: error: __ksymtab_l2tp_udp_recv_core causes a section type conflict
    net/l2tp/l2tp_core.c:847: error: __ksymtab_l2tp_udp_recv_core causes a section type conflict

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

    Stephen Rothwell
     
  • Also moved the refcound inlines from l2tp_core.h to l2tp_core.c
    since only used in that one file.

    Signed-off-by: Stephen Hemminger
    Acked-by: James Chapman
    Signed-off-by: David S. Miller

    stephen hemminger
     

21 Oct, 2010

1 commit


22 Sep, 2010

1 commit


10 Sep, 2010

1 commit


03 Sep, 2010

1 commit


27 Aug, 2010

1 commit

  • close https://bugzilla.kernel.org/show_bug.cgi?id=16529

    Before calling dev_forward_skb(), we should make sure skb head contains
    at least an ethernet header, even if length included in upper layer said
    so. Use pskb_may_pull() to make sure this ethernet header is present in
    skb head.

    Reported-by: Thomas Heil
    Reported-by: Ian Campbell
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

05 Aug, 2010

1 commit


11 Jun, 2010

1 commit


24 Apr, 2010

2 commits

  • Since .size is set properly in "struct pernet_operations l2tp_eth_net_ops",
    allocating space for "struct l2tp_eth_net" by hand is not correct, even causes
    memory leakage.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • Since .size is set properly in "struct pernet_operations l2tp_net_ops",
    allocating space for "struct l2tp_net" by hand is not correct, even causes
    memory leakage.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

16 Apr, 2010

2 commits


04 Apr, 2010

3 commits