aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-05-08ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.David S. Miller2-17/+20
Operation order is now transposed, we first create the child socket then we try to hook up the route. Signed-off-by: David S. Miller <[email protected]>
2011-05-09IPVS: init and cleanup restructuringHans Schillstrom7-80/+206
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 <[email protected]> Acked-by: Julian Anastasov <[email protected]> [[email protected]: minor edit to changelog] Signed-off-by: Simon Horman <[email protected]>
2011-05-09IPVS: Change of socket usage to enable name space exit.Hans Schillstrom2-22/+38
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 <[email protected]> [[email protected]: minor edit to changelog] Signed-off-by: Simon Horman <[email protected]>
2011-05-08ipv4: Create inet_csk_route_child_sock().David S. Miller1-0/+33
This is just like inet_csk_route_req() except that it operates after we've created the new child socket. In this way we can use the new socket's cork flow for proper route key storage. This will be used by DCCP and TCP child socket creation handling. Signed-off-by: David S. Miller <[email protected]>
2011-05-08sctp: Store a flowi in transports to provide persistent keying.David S. Miller1-6/+3
Several future simplifications are possible now because of this. For example, the sctp_addr unions can simply refer directly to the flowi information. Signed-off-by: David S. Miller <[email protected]>
2011-05-08ipv4: Use cork flow in ip_queue_xmit()David S. Miller1-2/+3
All invokers of ip_queue_xmit() must make certain that the socket is locked. All of SCTP, TCP, DCCP, and L2TP now make sure this is the case. Therefore we can use the cork flow during output route lookup in ip_queue_xmit() when the socket route check fails. Signed-off-by: David S. Miller <[email protected]>
2011-05-08ipv4: Use cork flow in inet_sk_{reselect_saddr,rebuild_header}()David S. Miller1-5/+7
These two functions must be invoked only when the socket is locked (because socket identity modifications are made non-atomically). Therefore we can use the cork flow for output route lookups. Signed-off-by: David S. Miller <[email protected]>
2011-05-08ipv4: Lock socket and use cork flow in ip4_datagram_connect().David S. Miller1-8/+15
This is to make sure that an l2tp socket's inet cork flow is fully filled in, when it's encapsulated in UDP. Signed-off-by: David S. Miller <[email protected]>
2011-05-08l2tp: Use cork flow in l2tp_ip_connect() and l2tp_ip_sendmsg()David S. Miller1-7/+9
Now that the socket is consistently locked in these two routines, this transformation is legal. Signed-off-by: David S. Miller <[email protected]>
2011-05-08l2tp: Fix locking in l2tp_core.cDavid S. Miller1-0/+8
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 <[email protected]>
2011-05-08l2tp: Fix locking in l2tp_ip.cDavid S. Miller1-4/+15
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 <[email protected]>
2011-05-08tcp: Use cork flow in tcp_v4_connect()David S. Miller1-6/+7
Since this is invoked from inet_stream_connect() the socket is locked and therefore this usage is safe. Signed-off-by: David S. Miller <[email protected]>
2011-05-08dccp: Use cork flow in dccp_v4_connect()David S. Miller1-5/+6
Since this is invoked from inet_stream_connect() the socket is locked and therefore this usage is safe. Signed-off-by: David S. Miller <[email protected]>
2011-05-08ethtool: remove phys_id from ethtool_opsStephen Hemminger1-5/+1
After that all the upstream kernel drivers now use phys_id, and the old ethtool_ops interface (phys_id) can be removed. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-05-08batman-adv: remove duplicate code from function is_bidirectional_neigh()Daniele Furlan1-49/+25
In function is_bidirectional_neigh the code that find out the one hop neighbor is duplicated. Signed-off-by: Daniele Furlan <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: Remove multiline comments from line endingSven Eckelmann4-28/+29
It is slightly irritating that comments after a long line span over multiple lines without any code. It is easier to put them before the actual code and reduce the number of lines which the eye has to read. Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: rename everything from *hna* into *tt* (translation table)Antonio Quartulli18-325/+326
To be coherent, all the functions/variables/constants have been renamed to the TranslationTable style Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: Fix refcount imbalance in find_routerMarek Lindner1-5/+9
Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: Avoid deadlock between rtnl_lock and s_activeSven Eckelmann1-9/+9
The hard_if_event is called by the notifier with rtnl_lock and tries to remove sysfs entries when a NETDEV_UNREGISTER event is received. This will automatically take the s_active lock. The s_active lock is also used when a new interface is added to a meshif through sysfs. In that situation we cannot wait for the rntl_lock before creating the actual batman-adv interface to prevent a deadlock. It is still possible to try to get the rtnl_lock and immediately abort the current operation when the trylock call failed. Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: Remove unnecessary hardif_list_lockSven Eckelmann4-24/+13
hardif_list_lock is unneccessary because we already ensure that no multiple admin operations can take place through rtnl_lock. hardif_list_lock only adds additional overhead and complexity. Critical functions now check whether they are called with rtnl_lock using ASSERT_RTNL. It indirectly fixes the problem that orig_hash_del_if() expects that only one interface is deleted from hardif_list at a time, but hardif_remove_interfaces() removes all at once and then calls orig_hash_del_if(). Reported-by: Linus Lüssing <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: multi vlan support for bridge loop detectionMarek Lindner3-113/+298
The bridge loop detection for batman-adv allows the bat0 interface to be bridged into an ethernet segment which other batman-adv nodes are connected to. In order to also allow multiple VLANs on top of the bat0 interface to be bridged into the ethernet segment this patch extends the aforementioned bridge loop detection. Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-08batman-adv: remove misplaced commentMarek Lindner1-2/+0
Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]>
2011-05-07net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfreePaul E. McKenney1-6/+1
The RCU callback prl_entry_destroy_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney <[email protected]> Cc: Alexey Kuznetsov <[email protected]> Cc: "Pekka Savola (ipv6)" <[email protected]> Cc: James Morris <[email protected]> Cc: Hideaki YOSHIFUJI <[email protected]> Cc: Patrick McHardy <[email protected]> Acked-by: David S. Miller <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcuPaul E. McKenney1-9/+1
The RCU callback softif_neigh_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Simon Wunderlich <[email protected]> Acked-by: David S. Miller <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Sven Eckelmann <[email protected]>
2011-05-07batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()Paul E. McKenney1-9/+1
The RCU callback neigh_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Simon Wunderlich <[email protected]> Acked-by: David S. Miller <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Sven Eckelmann <[email protected]>
2011-05-07batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcuPaul E. McKenney1-9/+1
The RCU callback gw_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Simon Wunderlich <[email protected]> Acked-by: David S. Miller <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Sven Eckelmann <[email protected]>
2011-05-07net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()Lai Jiangshan1-11/+3
The rcu callback kfree_tid_tx() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(kfree_tid_tx). Signed-off-by: Lai Jiangshan <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: Johannes Berg <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: "David S. Miller" <[email protected]>
2011-05-07net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()Lai Jiangshan1-9/+2
The rcu callback xt_osf_finger_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(xt_osf_finger_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()Lai Jiangshan1-9/+1
The rcu callback work_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(work_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: "John W. Linville" <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()Lai Jiangshan1-10/+1
The rcu callback wq_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(wq_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()Lai Jiangshan1-9/+1
The rcu callback phonet_device_rcu_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(phonet_device_rcu_free). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()Lai Jiangshan1-7/+1
The rcu callback __nf_ct_ext_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__nf_ct_ext_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()Lai Jiangshan1-9/+1
The rcu callback net_generic_release() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(net_generic_release). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()Lai Jiangshan1-21/+1
The rcu callback netlbl_unlhsh_free_addr6() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(netlbl_unlhsh_free_addr6). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: Paul Moore <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()Lai Jiangshan1-19/+1
The rcu callback netlbl_unlhsh_free_addr4() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(netlbl_unlhsh_free_addr4). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Paul Moore <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()Lai Jiangshan1-10/+2
The rcu callback xps_dev_maps_release() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(xps_dev_maps_release). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()Lai Jiangshan1-9/+2
The rcu callback xps_map_release() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(xps_map_release). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()Lai Jiangshan1-9/+2
The rcu callback rps_map_release() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(rps_map_release). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(ipv6_mc_socklist_reclaim) to kfree_rcu()Lai Jiangshan1-6/+2
The rcu callback ipv6_mc_socklist_reclaim() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ipv6_mc_socklist_reclaim). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(free_dm_hw_stat) to kfree_rcu()Lai Jiangshan1-10/+2
The rcu callback free_dm_hw_stat() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(free_dm_hw_stat). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: Neil Horman <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(ip_mc_socklist_reclaim) to kfree_rcu()Lai Jiangshan1-10/+2
The rcu callback ip_mc_socklist_reclaim() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ip_mc_socklist_reclaim). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(ip_sf_socklist_reclaim) to kfree_rcu()Lai Jiangshan1-9/+3
The rcu callback ip_sf_socklist_reclaim() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ip_sf_socklist_reclaim). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(ip_mc_list_reclaim) to kfree_rcu()Lai Jiangshan1-7/+1
The rcu callback ip_mc_list_reclaim() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ip_mc_list_reclaim). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu()Lai Jiangshan1-8/+1
The rcu callback __gen_kill_estimator() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__gen_kill_estimator). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(__leaf_info_free_rcu) to kfree_rcu()Lai Jiangshan1-6/+1
The rcu callback __leaf_info_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__leaf_info_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(fc_rport_free_rcu) to kfree_rcu()Lai Jiangshan1-11/+1
The rcu callback fc_rport_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(fc_rport_free_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,act_police,rcu: remove rcu_barrier()Lai Jiangshan1-1/+0
There is no callback of this module maybe queued since we use kfree_rcu(), we can safely remove the rcu_barrier(). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(dn_dev_free_ifa_rcu) to kfree_rcu()Lai Jiangshan1-6/+1
The rcu callback dn_dev_free_ifa_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(dn_dev_free_ifa_rcu). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(ha_rcu_free) to kfree_rcu()Lai Jiangshan1-10/+2
The rcu callback ha_rcu_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ha_rcu_free). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-05-07net,rcu: convert call_rcu(sctp_local_addr_free) to kfree_rcu()Lai Jiangshan3-10/+3
The rcu callback sctp_local_addr_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(sctp_local_addr_free). Signed-off-by: Lai Jiangshan <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>