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.
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
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
-
Now that the socket is consistently locked in these two routines,
this transformation is legal.Signed-off-by: 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
-
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
04 May, 2011
1 commit
-
Signed-off-by: David S. Miller
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_dstSigned-off-by: 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_srcSigned-off-by: 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 -
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
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
27 Apr, 2011
1 commit
-
These changes were incorrectly fixed by codespell. They were now
manually corrected.Signed-off-by: Lucas De Marchi
18 Apr, 2011
1 commit
-
The variable 'ret' is set but unused in l2tp_nl_register_ops().
This was obviously meant to maintain error codes which are
returned to the caller, make it so.Signed-off-by: David S. Miller
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/0x1bSigned-off-by: James Chapman
Signed-off-by: David S. Miller
13 Mar, 2011
1 commit
-
The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.Signed-off-by: David S. Miller
03 Mar, 2011
1 commit
-
Instead of on the stack.
Signed-off-by: David S. Miller
02 Mar, 2011
3 commits
-
This boolean state is now available in the flow flags.
Signed-off-by: David S. Miller
-
Since that is what the current vague "flags" argument means.
Signed-off-by: David S. Miller
-
Since that's what the current vague "flags" thing means.
Signed-off-by: David S. Miller
09 Dec, 2010
2 commits
-
Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
net/llc/af_llc.c -
Using the SOCK_DGRAM enum results in
"net-pf-2-proto-SOCK_DGRAM-type-115", so use the numeric value like it
is done in net/dccp.Signed-off-by: Michal Marek
Signed-off-by: David S. Miller
18 Nov, 2010
1 commit
-
Use the macros defined for the members of flowi to clean the code up.
Signed-off-by: Changli Gao
Signed-off-by: David S. Miller
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
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 conflictSigned-off-by: Stephen Rothwell
Signed-off-by: David S. Miller -
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
21 Oct, 2010
1 commit
-
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
22 Sep, 2010
1 commit
-
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
10 Sep, 2010
1 commit
-
Conflicts:
net/mac80211/main.c
03 Sep, 2010
1 commit
-
Kill last_rx use in l2tp and two net drivers
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
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
05 Aug, 2010
1 commit
-
The PPP channel ops structure should be const.
Cleanup the declarations to use standard C99 format.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
11 Jun, 2010
1 commit
-
remove useless union keyword in rtable, rt6_info and dn_route.
Since there is only one member in a union, the union keyword isn't useful.
Signed-off-by: Changli Gao
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
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 -
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
16 Apr, 2010
2 commits
-
As Herbert Xu said: we should be able to simply replace ipfragok
with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
has droped ipfragok and set local_df value properly.The patch kills the ipfragok parameter of .queue_xmit().
Signed-off-by: Shan Wei
Signed-off-by: David S. Miller -
Signed-off-by: Joe Perches
Acked-by: James Chapman
Signed-off-by: David S. Miller
04 Apr, 2010
3 commits
-
Followup to commit 789a4a2c
(l2tp: Add support for static unmanaged L2TPv3 tunnels)One missing init in l2tp_tunnel_sock_create() could access random kernel
memory, and a bit field should be unsigned.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
We have to check CONFIG_L2TP_DEBUGFS_MODULE as well as
CONFIG_L2TP_DEBUGFS.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller