Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
pktgen: make sure that pktgen_thread_worker has been executed
[VLAN]: Propagate selected feature bits to VLAN devices
drivers/atm/: remove CVS keywords
vlan: Correctly handle device notifications for layered VLAN devices
net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags()
net_sched: cls_api: fix return value for non-existant classifiers
ipsec: Use the correct ip_local_out function
ipv6 addrconf: Allow infinite prefix lifetime.
ipv6 route: Fix lifetime in netlink.
ipv6 addrconf: Fix route lifetime setting in corner case.
ndisc: Add missing strategies for per-device retrans timer/reachable time settings.
ipv6: Move <linux/in6.h> from header-y to unifdef-y.
l2tp: avoid skb truesize bug if headroom is increased
wireless: Create 'device' symlink in sysfs
wireless, airo: waitbusy() won't delay
libertas: fix command timeout after firmware failure
mac80211: Add RTNL version of ieee80211_iterate_active_interfaces
mac80211 : Association with 11n hidden ssid ap.
hostap: fix "registers" registration in procfs
isdn/capi: Return proper errnos on module init.
...

+235 -121
-1
drivers/atm/fore200e.h
··· 1 - /* $Id: fore200e.h,v 1.4 2000/04/14 10:10:34 davem Exp $ */ 2 1 #ifndef _FORE200E_H 3 2 #define _FORE200E_H 4 3
-2
drivers/atm/fore200e_mkfirm.c
··· 1 1 /* 2 - $Id: fore200e_mkfirm.c,v 1.1 2000/02/21 16:04:32 davem Exp $ 3 - 4 2 mkfirm.c: generates a C readable file from a binary firmware image 5 3 6 4 Christophe Lizzi (lizzi@{csti.fr, cnam.fr}), June 1999.
-2
drivers/atm/he.h
··· 1 - /* $Id: he.h,v 1.4 2003/05/06 22:48:00 chas Exp $ */ 2 - 3 1 /* 4 2 5 3 he.h
-7
drivers/atm/idt77252.c
··· 1 1 /******************************************************************* 2 - * ident "$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $" 3 - * 4 - * $Author: ecd $ 5 - * $Date: 2001/11/11 08:13:54 $ 6 2 * 7 3 * Copyright (c) 2000 ATecoM GmbH 8 4 * ··· 25 29 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 30 * 27 31 *******************************************************************/ 28 - static char const rcsid[] = 29 - "$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $"; 30 - 31 32 32 33 #include <linux/module.h> 33 34 #include <linux/pci.h>
-4
drivers/atm/idt77252.h
··· 1 1 /******************************************************************* 2 - * ident "$Id: idt77252.h,v 1.2 2001/11/11 08:13:54 ecd Exp $" 3 - * 4 - * $Author: ecd $ 5 - * $Date: 2001/11/11 08:13:54 $ 6 2 * 7 3 * Copyright (c) 2000 ATecoM GmbH 8 4 *
+2 -1
drivers/atm/iphase.h
··· 1025 1025 spinlock_t rx_lock, misc_lock; 1026 1026 struct atm_vcc **rx_open; /* list of all open VCs */ 1027 1027 u16 num_rx_desc, rx_buf_sz, rxing; 1028 - u32 rx_pkt_ram, rx_tmp_cnt, rx_tmp_jif; 1028 + u32 rx_pkt_ram, rx_tmp_cnt; 1029 + unsigned long rx_tmp_jif; 1029 1030 void __iomem *RX_DESC_BASE_ADDR; 1030 1031 u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt; 1031 1032 struct atm_dev *next_board; /* other iphase devices */
+1 -1
drivers/atm/nicstarmac.copyright
··· 13 13 * 14 14 * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only. 15 15 * 16 - * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997 $Revision: 1.1 $ $Date: 1999/08/20 11:00:11 $ 16 + * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997 17 17 * 18 18 * Linux driver for the IDT77201 NICStAR PCI ATM controller. 19 19 * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155;
+3 -5
drivers/base/core.c
··· 1291 1291 } 1292 1292 #else 1293 1293 if (dev->class) { 1294 - sysfs_remove_link(&dev->class->subsys.kobj, old_device_name); 1295 1294 error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj, 1296 1295 dev->bus_id); 1297 - if (error) { 1298 - dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n", 1299 - __func__, error); 1300 - } 1296 + if (error) 1297 + goto out; 1298 + sysfs_remove_link(&dev->class->subsys.kobj, old_device_name); 1301 1299 } 1302 1300 #endif 1303 1301
+3 -3
drivers/isdn/capi/capiutil.c
··· 948 948 { 949 949 g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); 950 950 if (!g_cmsg) 951 - return ENOMEM; 951 + return -ENOMEM; 952 952 g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); 953 953 if (!g_debbuf) { 954 954 kfree(g_cmsg); 955 - return ENOMEM; 955 + return -ENOMEM; 956 956 } 957 957 g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); 958 958 if (!g_debbuf->buf) { 959 959 kfree(g_cmsg); 960 960 kfree(g_debbuf); 961 - return ENOMEM;; 961 + return -ENOMEM;; 962 962 } 963 963 g_debbuf->size = CDEBUG_GSIZE; 964 964 g_debbuf->buf[0] = 0;
+1 -1
drivers/isdn/hysdn/Kconfig
··· 3 3 # 4 4 config HYSDN 5 5 tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" 6 - depends on m && PROC_FS && PCI && BROKEN_ON_SMP 6 + depends on m && PROC_FS && PCI 7 7 help 8 8 Say Y here if you have one of Hypercope's active PCI ISDN cards 9 9 Champ, Ergo and Metro. You will then get a module called hysdn.
+5 -9
drivers/isdn/hysdn/boardergo.c
··· 64 64 } /* ergo_interrupt */ 65 65 66 66 /******************************************************************************/ 67 - /* ergo_irq_bh is the function called by the immediate kernel task list after */ 68 - /* being activated with queue_task and no interrupts active. This task is the */ 69 - /* only one handling data transfer from or to the card after booting. The task */ 70 - /* may be queued from everywhere (interrupts included). */ 67 + /* ergo_irq_bh will be called as part of the kernel clearing its shared work */ 68 + /* queue sometime after a call to schedule_work has been made passing our */ 69 + /* work_struct. This task is the only one handling data transfer from or to */ 70 + /* the card after booting. The task may be queued from everywhere */ 71 + /* (interrupts included). */ 71 72 /******************************************************************************/ 72 73 static void 73 74 ergo_irq_bh(struct work_struct *ugli_api) ··· 91 90 card->hw_lock = 1; /* we now lock the hardware */ 92 91 93 92 do { 94 - sti(); /* reenable other ints */ 95 93 again = 0; /* assume loop not to be repeated */ 96 94 97 95 if (!dpr->ToHyFlag) { ··· 110 110 again = 1; /* restart loop */ 111 111 } 112 112 } /* a message has arrived for us */ 113 - cli(); /* no further ints */ 114 113 if (again) { 115 114 dpr->ToHyInt = 1; 116 115 dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ ··· 241 242 byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ 242 243 /* the interrupts are still masked */ 243 244 244 - sti(); 245 245 msleep_interruptible(20); /* Timeout 20ms */ 246 246 247 247 if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { ··· 274 276 dst = sp->Data; /* point to data in spool structure */ 275 277 buflen = sp->Len; /* maximum len of spooled data */ 276 278 wr_mirror = sp->WrPtr; /* only once read */ 277 - sti(); 278 279 279 280 /* try until all bytes written or error */ 280 281 i = 0x1000; /* timeout value */ ··· 377 380 #endif /* CONFIG_HYSDN_CAPI */ 378 381 return (0); /* success */ 379 382 } /* data has arrived */ 380 - sti(); 381 383 msleep_interruptible(50); /* Timeout 50ms */ 382 384 } /* wait until timeout */ 383 385
+10 -2
drivers/net/bonding/bond_sysfs.c
··· 1437 1437 * configure multiple bonding devices. 1438 1438 */ 1439 1439 if (ret == -EEXIST) { 1440 - netdev_class = NULL; 1441 - return 0; 1440 + /* Is someone being kinky and naming a device bonding_master? */ 1441 + if (__dev_get_by_name(&init_net, 1442 + class_attr_bonding_masters.attr.name)) 1443 + printk(KERN_ERR 1444 + "network device named %s already exists in sysfs", 1445 + class_attr_bonding_masters.attr.name); 1446 + else { 1447 + netdev_class = NULL; 1448 + return 0; 1449 + } 1442 1450 } 1443 1451 1444 1452 return ret;
+8 -5
drivers/net/pppol2tp.c
··· 980 980 __wsum csum = 0; 981 981 struct udphdr *uh; 982 982 unsigned int len; 983 + int old_headroom; 984 + int new_headroom; 983 985 984 986 if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) 985 987 goto abort; ··· 1003 1001 1004 1002 /* Check that there's enough headroom in the skb to insert IP, 1005 1003 * UDP and L2TP and PPP headers. If not enough, expand it to 1006 - * make room. Note that a new skb (or a clone) is 1007 - * allocated. If we return an error from this point on, make 1008 - * sure we free the new skb but do not free the original skb 1009 - * since that is done by the caller for the error case. 1004 + * make room. Adjust truesize. 1010 1005 */ 1011 1006 headroom = NET_SKB_PAD + sizeof(struct iphdr) + 1012 1007 sizeof(struct udphdr) + hdr_len + sizeof(ppph); 1008 + old_headroom = skb_headroom(skb); 1013 1009 if (skb_cow_head(skb, headroom)) 1014 1010 goto abort; 1011 + 1012 + new_headroom = skb_headroom(skb); 1013 + skb_orphan(skb); 1014 + skb->truesize += new_headroom - old_headroom; 1015 1015 1016 1016 /* Setup PPP header */ 1017 1017 __skb_push(skb, sizeof(ppph)); ··· 1069 1065 /* Get routing info from the tunnel socket */ 1070 1066 dst_release(skb->dst); 1071 1067 skb->dst = dst_clone(__sk_dst_get(sk_tun)); 1072 - skb_orphan(skb); 1073 1068 skb->sk = sk_tun; 1074 1069 1075 1070 /* Queue the packet to IP for output */
+2 -1
drivers/net/wireless/airo.c
··· 2668 2668 dev->irq = ethdev->irq; 2669 2669 dev->base_addr = ethdev->base_addr; 2670 2670 dev->wireless_data = ethdev->wireless_data; 2671 + SET_NETDEV_DEV(dev, ethdev->dev.parent); 2671 2672 memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); 2672 2673 err = register_netdev(dev); 2673 2674 if (err<0) { ··· 2905 2904 2906 2905 static int waitbusy (struct airo_info *ai) { 2907 2906 int delay = 0; 2908 - while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) & (delay < 10000)) { 2907 + while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { 2909 2908 udelay (10); 2910 2909 if ((++delay % 20) == 0) 2911 2910 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);
+4 -5
drivers/net/wireless/hostap/hostap_hw.c
··· 3276 3276 } 3277 3277 printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); 3278 3278 3279 - #ifndef PRISM2_NO_PROCFS_DEBUG 3280 - create_proc_read_entry("registers", 0, local->proc, 3281 - prism2_registers_proc_read, local); 3282 - #endif /* PRISM2_NO_PROCFS_DEBUG */ 3283 - 3284 3279 hostap_init_data(local); 3285 3280 return dev; 3286 3281 ··· 3302 3307 netif_carrier_off(local->ddev); 3303 3308 } 3304 3309 hostap_init_proc(local); 3310 + #ifndef PRISM2_NO_PROCFS_DEBUG 3311 + create_proc_read_entry("registers", 0, local->proc, 3312 + prism2_registers_proc_read, local); 3313 + #endif /* PRISM2_NO_PROCFS_DEBUG */ 3305 3314 hostap_init_ap_proc(local); 3306 3315 return 0; 3307 3316 }
+1
drivers/net/wireless/ipw2200.c
··· 11584 11584 priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; 11585 11585 11586 11586 priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; 11587 + SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); 11587 11588 11588 11589 rc = register_netdev(priv->prom_net_dev); 11589 11590 if (rc) {
+2
drivers/net/wireless/libertas/main.c
··· 756 756 priv->nr_retries = 0; 757 757 } else { 758 758 priv->cur_cmd = NULL; 759 + priv->dnld_sent = DNLD_RES_RECEIVED; 759 760 lbs_pr_info("requeueing command %x due to timeout (#%d)\n", 760 761 le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); 761 762 ··· 1565 1564 rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; 1566 1565 rtap_dev->set_multicast_list = lbs_set_multicast_list; 1567 1566 rtap_dev->priv = priv; 1567 + SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); 1568 1568 1569 1569 ret = register_netdev(rtap_dev); 1570 1570 if (ret) {
+1 -5
fs/sysfs/dir.c
··· 419 419 */ 420 420 int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd) 421 421 { 422 - if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) { 423 - printk(KERN_WARNING "sysfs: duplicate filename '%s' " 424 - "can not be created\n", sd->s_name); 425 - WARN_ON(1); 422 + if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) 426 423 return -EEXIST; 427 - } 428 424 429 425 sd->s_parent = sysfs_get(acxt->parent_sd); 430 426
+1 -1
include/linux/Kbuild
··· 92 92 header-y += if_strip.h 93 93 header-y += if_tun.h 94 94 header-y += if_tunnel.h 95 - header-y += in6.h 96 95 header-y += in_route.h 97 96 header-y += ioctl.h 98 97 header-y += ip6_tunnel.h ··· 235 236 unifdef-y += igmp.h 236 237 unifdef-y += inet_diag.h 237 238 unifdef-y += in.h 239 + unifdef-y += in6.h 238 240 unifdef-y += inotify.h 239 241 unifdef-y += input.h 240 242 unifdef-y += ip.h
+2 -5
include/linux/atm.h
··· 16 16 * documentation. Do not change them. 17 17 */ 18 18 19 - #ifdef __KERNEL__ 20 - #include <linux/socket.h> 21 - #include <linux/types.h> 22 - #endif 23 19 #include <linux/compiler.h> 24 20 #include <linux/atmapi.h> 25 21 #include <linux/atmsap.h> 26 22 #include <linux/atmioc.h> 23 + #include <linux/types.h> 27 24 28 25 29 26 /* general ATM constants */ ··· 209 212 char pub[ATM_E164_LEN+1]; /* public address (E.164) */ 210 213 /* unused addresses must be bzero'ed */ 211 214 char lij_type; /* role in LIJ call; one of ATM_LIJ* */ 212 - uint32_t lij_id; /* LIJ call identifier */ 215 + __u32 lij_id; /* LIJ call identifier */ 213 216 } sas_addr __ATM_API_ALIGN; /* SVC address */ 214 217 }; 215 218
+5 -7
include/linux/atm_tcp.h
··· 8 8 #define LINUX_ATM_TCP_H 9 9 10 10 #include <linux/atmapi.h> 11 - 12 - #ifdef __KERNEL__ 13 - #include <linux/types.h> 14 - #endif 11 + #include <linux/atm.h> 15 12 #include <linux/atmioc.h> 13 + #include <linux/types.h> 16 14 17 15 18 16 /* ··· 18 20 */ 19 21 20 22 struct atmtcp_hdr { 21 - uint16_t vpi; 22 - uint16_t vci; 23 - uint32_t length; /* ... of data part */ 23 + __u16 vpi; 24 + __u16 vci; 25 + __u32 length; /* ... of data part */ 24 26 }; 25 27 26 28 /*
+4 -2
include/linux/netdevice.h
··· 514 514 #define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */ 515 515 #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ 516 516 #define NETIF_F_LRO 32768 /* large receive offload */ 517 + #define NETIF_F_VLAN_TSO 65536 /* Supports TSO for VLANs */ 518 + #define NETIF_F_VLAN_CSUM 131072 /* Supports TX checksumming for VLANs */ 517 519 518 520 /* Segmentation offload features */ 519 - #define NETIF_F_GSO_SHIFT 16 520 - #define NETIF_F_GSO_MASK 0xffff0000 521 + #define NETIF_F_GSO_SHIFT 20 522 + #define NETIF_F_GSO_MASK 0xfff00000 521 523 #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) 522 524 #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) 523 525 #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
+23 -2
include/net/mac80211.h
··· 1594 1594 void ieee80211_scan_completed(struct ieee80211_hw *hw); 1595 1595 1596 1596 /** 1597 - * ieee80211_iterate_active_interfaces - iterate active interfaces 1597 + * ieee80211_iterate_active_interfaces- iterate active interfaces 1598 1598 * 1599 1599 * This function iterates over the interfaces associated with a given 1600 1600 * hardware that are currently active and calls the callback for them. 1601 + * This function allows the iterator function to sleep, when the iterator 1602 + * function is atomic @ieee80211_iterate_active_interfaces_atomic can 1603 + * be used. 1601 1604 * 1602 1605 * @hw: the hardware struct of which the interfaces should be iterated over 1603 - * @iterator: the iterator function to call, cannot sleep 1606 + * @iterator: the iterator function to call 1604 1607 * @data: first argument of the iterator function 1605 1608 */ 1606 1609 void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, 1607 1610 void (*iterator)(void *data, u8 *mac, 1608 1611 struct ieee80211_vif *vif), 1609 1612 void *data); 1613 + 1614 + /** 1615 + * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces 1616 + * 1617 + * This function iterates over the interfaces associated with a given 1618 + * hardware that are currently active and calls the callback for them. 1619 + * This function requires the iterator callback function to be atomic, 1620 + * if that is not desired, use @ieee80211_iterate_active_interfaces instead. 1621 + * 1622 + * @hw: the hardware struct of which the interfaces should be iterated over 1623 + * @iterator: the iterator function to call, cannot sleep 1624 + * @data: first argument of the iterator function 1625 + */ 1626 + void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, 1627 + void (*iterator)(void *data, 1628 + u8 *mac, 1629 + struct ieee80211_vif *vif), 1630 + void *data); 1610 1631 1611 1632 /** 1612 1633 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
+4
include/net/ndisc.h
··· 129 129 void __user *buffer, 130 130 size_t *lenp, 131 131 loff_t *ppos); 132 + int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, 133 + int nlen, void __user *oldval, 134 + size_t __user *oldlenp, 135 + void __user *newval, size_t newlen); 132 136 #endif 133 137 134 138 extern void inet6_ifinfo_notify(int event,
+31 -3
net/8021q/vlan.c
··· 382 382 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); 383 383 } 384 384 385 + static void vlan_transfer_features(struct net_device *dev, 386 + struct net_device *vlandev) 387 + { 388 + unsigned long old_features = vlandev->features; 389 + 390 + if (dev->features & NETIF_F_VLAN_TSO) { 391 + vlandev->features &= ~VLAN_TSO_FEATURES; 392 + vlandev->features |= dev->features & VLAN_TSO_FEATURES; 393 + } 394 + if (dev->features & NETIF_F_VLAN_CSUM) { 395 + vlandev->features &= ~NETIF_F_ALL_CSUM; 396 + vlandev->features |= dev->features & NETIF_F_ALL_CSUM; 397 + } 398 + 399 + if (old_features != vlandev->features) 400 + netdev_features_change(vlandev); 401 + } 402 + 385 403 static void __vlan_device_event(struct net_device *dev, unsigned long event) 386 404 { 387 405 switch (event) { ··· 428 410 int i, flgs; 429 411 struct net_device *vlandev; 430 412 431 - if (is_vlan_dev(dev)) { 413 + if (is_vlan_dev(dev)) 432 414 __vlan_device_event(dev, event); 433 - goto out; 434 - } 435 415 436 416 grp = __vlan_find_group(dev); 437 417 if (!grp) ··· 464 448 465 449 vlan_sync_address(dev, vlandev); 466 450 } 451 + break; 452 + 453 + case NETDEV_FEAT_CHANGE: 454 + /* Propagate device features to underlying device */ 455 + for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 456 + vlandev = vlan_group_get_device(grp, i); 457 + if (!vlandev) 458 + continue; 459 + 460 + vlan_transfer_features(dev, vlandev); 461 + } 462 + 467 463 break; 468 464 469 465 case NETDEV_DOWN:
+2
net/8021q/vlan.h
··· 7 7 #define VLAN_GRP_HASH_SIZE (1 << VLAN_GRP_HASH_SHIFT) 8 8 #define VLAN_GRP_HASH_MASK (VLAN_GRP_HASH_SIZE - 1) 9 9 10 + #define VLAN_TSO_FEATURES (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG) 11 + 10 12 /* Find a VLAN device by the MAC address of its Ethernet device, and 11 13 * it's VLAN ID. The default configuration is to have VLAN's scope 12 14 * to be box-wide, so the MAC will be ignored. The mac will only be
+5
net/8021q/vlan_dev.c
··· 663 663 (1<<__LINK_STATE_DORMANT))) | 664 664 (1<<__LINK_STATE_PRESENT); 665 665 666 + if (real_dev->features & NETIF_F_VLAN_TSO) 667 + dev->features |= real_dev->features & VLAN_TSO_FEATURES; 668 + if (real_dev->features & NETIF_F_VLAN_CSUM) 669 + dev->features |= real_dev->features & NETIF_F_ALL_CSUM; 670 + 666 671 /* ipv6 shared card related stuff */ 667 672 dev->dev_id = real_dev->dev_id; 668 673
+6 -2
net/core/dev.c
··· 903 903 strlcpy(dev->name, newname, IFNAMSIZ); 904 904 905 905 rollback: 906 - device_rename(&dev->dev, dev->name); 906 + err = device_rename(&dev->dev, dev->name); 907 + if (err) { 908 + memcpy(dev->name, oldname, IFNAMSIZ); 909 + return err; 910 + } 907 911 908 912 write_lock_bh(&dev_base_lock); 909 913 hlist_del(&dev->name_hlist); ··· 3141 3137 * Load in the correct multicast list now the flags have changed. 3142 3138 */ 3143 3139 3144 - if (dev->change_rx_flags && (dev->flags ^ flags) & IFF_MULTICAST) 3140 + if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST) 3145 3141 dev->change_rx_flags(dev, IFF_MULTICAST); 3146 3142 3147 3143 dev_set_rx_mode(dev);
+4
net/core/pktgen.c
··· 390 390 int cpu; 391 391 392 392 wait_queue_head_t queue; 393 + struct completion start_done; 393 394 }; 394 395 395 396 #define REMOVE 1 ··· 3415 3414 BUG_ON(smp_processor_id() != cpu); 3416 3415 3417 3416 init_waitqueue_head(&t->queue); 3417 + complete(&t->start_done); 3418 3418 3419 3419 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); 3420 3420 ··· 3617 3615 INIT_LIST_HEAD(&t->if_list); 3618 3616 3619 3617 list_add_tail(&t->th_list, &pktgen_threads); 3618 + init_completion(&t->start_done); 3620 3619 3621 3620 p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); 3622 3621 if (IS_ERR(p)) { ··· 3642 3639 } 3643 3640 3644 3641 wake_up_process(p); 3642 + wait_for_completion(&t->start_done); 3645 3643 3646 3644 return 0; 3647 3645 }
+1 -1
net/ipv4/route.c
··· 160 160 .negative_advice = ipv4_negative_advice, 161 161 .link_failure = ipv4_link_failure, 162 162 .update_pmtu = ip_rt_update_pmtu, 163 - .local_out = ip_local_out, 163 + .local_out = __ip_local_out, 164 164 .entry_size = sizeof(struct rtable), 165 165 .entries = ATOMIC_INIT(0), 166 166 };
+50 -25
net/ipv6/addrconf.c
··· 1764 1764 * 2) Configure prefixes with the auto flag set 1765 1765 */ 1766 1766 1767 - /* Avoid arithmetic overflow. Really, we could 1768 - save rt_expires in seconds, likely valid_lft, 1769 - but it would require division in fib gc, that it 1770 - not good. 1771 - */ 1772 - if (valid_lft >= 0x7FFFFFFF/HZ) 1767 + if (valid_lft == INFINITY_LIFE_TIME) 1768 + rt_expires = ~0UL; 1769 + else if (valid_lft >= 0x7FFFFFFF/HZ) { 1770 + /* Avoid arithmetic overflow. Really, we could 1771 + * save rt_expires in seconds, likely valid_lft, 1772 + * but it would require division in fib gc, that it 1773 + * not good. 1774 + */ 1773 1775 rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); 1774 - else 1776 + } else 1775 1777 rt_expires = valid_lft * HZ; 1776 1778 1777 1779 /* ··· 1781 1779 * Avoid arithmetic overflow there as well. 1782 1780 * Overflow can happen only if HZ < USER_HZ. 1783 1781 */ 1784 - if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) 1782 + if (HZ < USER_HZ && ~rt_expires && rt_expires > 0x7FFFFFFF / USER_HZ) 1785 1783 rt_expires = 0x7FFFFFFF / USER_HZ; 1786 1784 1787 1785 if (pinfo->onlink) { ··· 1790 1788 dev->ifindex, 1); 1791 1789 1792 1790 if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { 1793 - if (rt->rt6i_flags&RTF_EXPIRES) { 1794 - if (valid_lft == 0) { 1795 - ip6_del_rt(rt); 1796 - rt = NULL; 1797 - } else { 1798 - rt->rt6i_expires = jiffies + rt_expires; 1799 - } 1791 + /* Autoconf prefix route */ 1792 + if (valid_lft == 0) { 1793 + ip6_del_rt(rt); 1794 + rt = NULL; 1795 + } else if (~rt_expires) { 1796 + /* not infinity */ 1797 + rt->rt6i_expires = jiffies + rt_expires; 1798 + rt->rt6i_flags |= RTF_EXPIRES; 1799 + } else { 1800 + rt->rt6i_flags &= ~RTF_EXPIRES; 1801 + rt->rt6i_expires = 0; 1800 1802 } 1801 1803 } else if (valid_lft) { 1804 + int flags = RTF_ADDRCONF | RTF_PREFIX_RT; 1805 + clock_t expires = 0; 1806 + if (~rt_expires) { 1807 + /* not infinity */ 1808 + flags |= RTF_EXPIRES; 1809 + expires = jiffies_to_clock_t(rt_expires); 1810 + } 1802 1811 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, 1803 - dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1812 + dev, expires, flags); 1804 1813 } 1805 1814 if (rt) 1806 1815 dst_release(&rt->u.dst); ··· 2034 2021 struct inet6_dev *idev; 2035 2022 struct net_device *dev; 2036 2023 int scope; 2037 - u32 flags = RTF_EXPIRES; 2024 + u32 flags; 2025 + clock_t expires; 2038 2026 2039 2027 ASSERT_RTNL(); 2040 2028 ··· 2055 2041 if (valid_lft == INFINITY_LIFE_TIME) { 2056 2042 ifa_flags |= IFA_F_PERMANENT; 2057 2043 flags = 0; 2058 - } else if (valid_lft >= 0x7FFFFFFF/HZ) 2059 - valid_lft = 0x7FFFFFFF/HZ; 2044 + expires = 0; 2045 + } else { 2046 + if (valid_lft >= 0x7FFFFFFF/HZ) 2047 + valid_lft = 0x7FFFFFFF/HZ; 2048 + flags = RTF_EXPIRES; 2049 + expires = jiffies_to_clock_t(valid_lft * HZ); 2050 + } 2060 2051 2061 2052 if (prefered_lft == 0) 2062 2053 ifa_flags |= IFA_F_DEPRECATED; ··· 2079 2060 spin_unlock_bh(&ifp->lock); 2080 2061 2081 2062 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, 2082 - jiffies_to_clock_t(valid_lft * HZ), flags); 2063 + expires, flags); 2083 2064 /* 2084 2065 * Note that section 3.1 of RFC 4429 indicates 2085 2066 * that the Optimistic flag should not be set for ··· 3167 3148 static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, 3168 3149 u32 prefered_lft, u32 valid_lft) 3169 3150 { 3170 - u32 flags = RTF_EXPIRES; 3151 + u32 flags; 3152 + clock_t expires; 3171 3153 3172 3154 if (!valid_lft || (prefered_lft > valid_lft)) 3173 3155 return -EINVAL; ··· 3176 3156 if (valid_lft == INFINITY_LIFE_TIME) { 3177 3157 ifa_flags |= IFA_F_PERMANENT; 3178 3158 flags = 0; 3179 - } else if (valid_lft >= 0x7FFFFFFF/HZ) 3180 - valid_lft = 0x7FFFFFFF/HZ; 3159 + expires = 0; 3160 + } else { 3161 + if (valid_lft >= 0x7FFFFFFF/HZ) 3162 + valid_lft = 0x7FFFFFFF/HZ; 3163 + flags = RTF_EXPIRES; 3164 + expires = jiffies_to_clock_t(valid_lft * HZ); 3165 + } 3181 3166 3182 3167 if (prefered_lft == 0) 3183 3168 ifa_flags |= IFA_F_DEPRECATED; ··· 3201 3176 ipv6_ifa_notify(0, ifp); 3202 3177 3203 3178 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, 3204 - jiffies_to_clock_t(valid_lft * HZ), flags); 3179 + expires, flags); 3205 3180 addrconf_verify(0); 3206 3181 3207 3182 return 0; ··· 4267 4242 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, 4268 4243 NET_IPV6_NEIGH, "ipv6", 4269 4244 &ndisc_ifinfo_sysctl_change, 4270 - NULL); 4245 + ndisc_ifinfo_sysctl_strategy); 4271 4246 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, 4272 4247 idev->dev->ifindex, idev, &idev->cnf); 4273 4248 }
+4 -4
net/ipv6/ndisc.c
··· 1727 1727 return ret; 1728 1728 } 1729 1729 1730 - static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, 1731 - int nlen, void __user *oldval, 1732 - size_t __user *oldlenp, 1733 - void __user *newval, size_t newlen) 1730 + int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, 1731 + int nlen, void __user *oldval, 1732 + size_t __user *oldlenp, 1733 + void __user *newval, size_t newlen) 1734 1734 { 1735 1735 struct net_device *dev = ctl->extra1; 1736 1736 struct inet6_dev *idev;
+8 -4
net/ipv6/route.c
··· 109 109 .negative_advice = ip6_negative_advice, 110 110 .link_failure = ip6_link_failure, 111 111 .update_pmtu = ip6_rt_update_pmtu, 112 - .local_out = ip6_local_out, 112 + .local_out = __ip6_local_out, 113 113 .entry_size = sizeof(struct rt6_info), 114 114 .entries = ATOMIC_INIT(0), 115 115 }; ··· 475 475 lifetime = ntohl(rinfo->lifetime); 476 476 if (lifetime == 0xffffffff) { 477 477 /* infinity */ 478 - } else if (lifetime > 0x7fffffff/HZ) { 478 + } else if (lifetime > 0x7fffffff/HZ - 1) { 479 479 /* Avoid arithmetic overflow */ 480 480 lifetime = 0x7fffffff/HZ - 1; 481 481 } ··· 1106 1106 } 1107 1107 1108 1108 rt->u.dst.obsolete = -1; 1109 - rt->rt6i_expires = jiffies + clock_t_to_jiffies(cfg->fc_expires); 1109 + rt->rt6i_expires = (cfg->fc_flags & RTF_EXPIRES) ? 1110 + jiffies + clock_t_to_jiffies(cfg->fc_expires) : 1111 + 0; 1110 1112 1111 1113 if (cfg->fc_protocol == RTPROT_UNSPEC) 1112 1114 cfg->fc_protocol = RTPROT_BOOT; ··· 2202 2200 2203 2201 NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); 2204 2202 2205 - expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0; 2203 + expires = (rt->rt6i_flags & RTF_EXPIRES) ? 2204 + rt->rt6i_expires - jiffies : 0; 2205 + 2206 2206 if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, 2207 2207 expires, rt->u.dst.error) < 0) 2208 2208 goto nla_put_failure;
+5 -9
net/mac80211/mlme.c
··· 3446 3446 struct ieee80211_sta_bss *bss, *selected = NULL; 3447 3447 int top_rssi = 0, freq; 3448 3448 3449 - if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | 3450 - IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { 3451 - ifsta->state = IEEE80211_AUTHENTICATE; 3452 - ieee80211_sta_reset_auth(dev, ifsta); 3453 - return 0; 3454 - } 3455 - 3456 3449 spin_lock_bh(&local->sta_bss_lock); 3457 3450 freq = local->oper_channel->center_freq; 3458 3451 list_for_each_entry(bss, &local->sta_bss_list, list) { 3459 3452 if (!(bss->capability & WLAN_CAPABILITY_ESS)) 3460 3453 continue; 3461 3454 3462 - if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ 3463 - !!sdata->default_key) 3455 + if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | 3456 + IEEE80211_STA_AUTO_BSSID_SEL | 3457 + IEEE80211_STA_AUTO_CHANNEL_SEL)) && 3458 + (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ 3459 + !!sdata->default_key)) 3464 3460 continue; 3465 3461 3466 3462 if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) &&
+36 -1
net/mac80211/util.c
··· 389 389 struct ieee80211_local *local = hw_to_local(hw); 390 390 struct ieee80211_sub_if_data *sdata; 391 391 392 + rtnl_lock(); 393 + 394 + list_for_each_entry(sdata, &local->interfaces, list) { 395 + switch (sdata->vif.type) { 396 + case IEEE80211_IF_TYPE_INVALID: 397 + case IEEE80211_IF_TYPE_MNTR: 398 + case IEEE80211_IF_TYPE_VLAN: 399 + continue; 400 + case IEEE80211_IF_TYPE_AP: 401 + case IEEE80211_IF_TYPE_STA: 402 + case IEEE80211_IF_TYPE_IBSS: 403 + case IEEE80211_IF_TYPE_WDS: 404 + case IEEE80211_IF_TYPE_MESH_POINT: 405 + break; 406 + } 407 + if (sdata->dev == local->mdev) 408 + continue; 409 + if (netif_running(sdata->dev)) 410 + iterator(data, sdata->dev->dev_addr, 411 + &sdata->vif); 412 + } 413 + 414 + rtnl_unlock(); 415 + } 416 + EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); 417 + 418 + void ieee80211_iterate_active_interfaces_atomic( 419 + struct ieee80211_hw *hw, 420 + void (*iterator)(void *data, u8 *mac, 421 + struct ieee80211_vif *vif), 422 + void *data) 423 + { 424 + struct ieee80211_local *local = hw_to_local(hw); 425 + struct ieee80211_sub_if_data *sdata; 426 + 392 427 rcu_read_lock(); 393 428 394 429 list_for_each_entry_rcu(sdata, &local->interfaces, list) { ··· 448 413 449 414 rcu_read_unlock(); 450 415 } 451 - EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); 416 + EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
+1 -1
net/sched/cls_api.c
··· 220 220 tp = kzalloc(sizeof(*tp), GFP_KERNEL); 221 221 if (tp == NULL) 222 222 goto errout; 223 - err = -EINVAL; 223 + err = -ENOENT; 224 224 tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); 225 225 if (tp_ops == NULL) { 226 226 #ifdef CONFIG_KMOD