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: (33 commits)
af_unix: netns: fix problem of return value
IRDA: remove double inclusion of module.h
udp: multicast packets need to check namespace
net: add documentation for skb recycling
key: fix setkey(8) policy set breakage
bpa10x: free sk_buff with kfree_skb
xfrm: do not leak ESRCH to user space
net: Really remove all of LOOPBACK_TSO code.
netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys
net: delete excess kernel-doc notation
pppoe: Fix socket leak.
gianfar: Don't reset TBI<->SerDes link if it's already up
gianfar: Fix race in TBI/SerDes configuration
at91_ether: request/free GPIO for PHY interrupt
amd8111e: fix dma_free_coherent context
atl1: fix vlan tag regression
SMC91x: delete unused local variable "lp"
myri10ge: fix stop/go mmio ordering
bonding: fix panic when taking bond interface down before removing module
...

+241 -97
+2
MAINTAINERS
··· 743 743 M: mickflemm@gmail.com 744 744 P: Luis R. Rodriguez 745 745 M: mcgrof@gmail.com 746 + P: Bob Copeland 747 + M: me@bobcopeland.com 746 748 L: linux-wireless@vger.kernel.org 747 749 L: ath5k-devel@lists.ath5k.org 748 750 S: Maintained
+26
arch/powerpc/sysdev/fsl_soc.c
··· 223 223 if (ret) 224 224 return ret; 225 225 226 + /* The gianfar device will try to use the same ID created below to find 227 + * this bus, to coordinate register access (since they share). */ 226 228 mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", 227 229 res.start&0xfffff, &res, 1); 228 230 if (IS_ERR(mdio_dev)) ··· 394 392 395 393 of_node_put(phy); 396 394 of_node_put(mdio); 395 + } 396 + 397 + /* Get MDIO bus controlled by this eTSEC, if any. Normally only 398 + * eTSEC 1 will control an MDIO bus, not necessarily the same 399 + * bus that its PHY is on ('mdio' above), so we can't just use 400 + * that. What we do is look for a gianfar mdio device that has 401 + * overlapping registers with this device. That's really the 402 + * whole point, to find the device sharing our registers to 403 + * coordinate access with it. 404 + */ 405 + for_each_compatible_node(mdio, NULL, "fsl,gianfar-mdio") { 406 + if (of_address_to_resource(mdio, 0, &res)) 407 + continue; 408 + 409 + if (res.start >= r[0].start && res.end <= r[0].end) { 410 + /* Get the ID the mdio bus platform device was 411 + * registered with. gfar_data.bus_id is 412 + * different because it's for finding a PHY, 413 + * while this is for finding a MII bus. 414 + */ 415 + gfar_data.mdio_bus = res.start&0xfffff; 416 + of_node_put(mdio); 417 + break; 418 + } 397 419 } 398 420 399 421 ret =
+2 -2
drivers/bluetooth/bpa10x.c
··· 443 443 444 444 BT_DBG("%s", hdev->name); 445 445 446 - kfree(data->rx_skb[0]); 447 - kfree(data->rx_skb[1]); 446 + kfree_skb(data->rx_skb[0]); 447 + kfree_skb(data->rx_skb[1]); 448 448 kfree(data); 449 449 } 450 450
+4 -5
drivers/net/amd8111e.c
··· 644 644 */ 645 645 static void amd8111e_free_ring(struct amd8111e_priv* lp) 646 646 { 647 - 648 - /* Free transmit and receive skbs */ 649 - amd8111e_free_skbs(lp->amd8111e_net_dev); 650 - 651 647 /* Free transmit and receive descriptor rings */ 652 648 if(lp->rx_ring){ 653 649 pci_free_consistent(lp->pci_dev, ··· 1229 1233 1230 1234 amd8111e_disable_interrupt(lp); 1231 1235 amd8111e_stop_chip(lp); 1232 - amd8111e_free_ring(lp); 1236 + 1237 + /* Free transmit and receive skbs */ 1238 + amd8111e_free_skbs(lp->amd8111e_net_dev); 1233 1239 1234 1240 netif_carrier_off(lp->amd8111e_net_dev); 1235 1241 ··· 1241 1243 1242 1244 spin_unlock_irq(&lp->lock); 1243 1245 free_irq(dev->irq, dev); 1246 + amd8111e_free_ring(lp); 1244 1247 1245 1248 /* Update the statistics before closing */ 1246 1249 amd8111e_get_stats(dev);
+5 -1
drivers/net/arm/at91_ether.c
··· 1080 1080 init_timer(&lp->check_timer); 1081 1081 lp->check_timer.data = (unsigned long)dev; 1082 1082 lp->check_timer.function = at91ether_check_link; 1083 - } 1083 + } else if (lp->board_data.phy_irq_pin >= 32) 1084 + gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy"); 1084 1085 1085 1086 /* Display ethernet banner */ 1086 1087 printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n", ··· 1167 1166 { 1168 1167 struct net_device *dev = platform_get_drvdata(pdev); 1169 1168 struct at91_private *lp = netdev_priv(dev); 1169 + 1170 + if (lp->board_data.phy_irq_pin >= 32) 1171 + gpio_free(lp->board_data.phy_irq_pin); 1170 1172 1171 1173 unregister_netdev(dev); 1172 1174 free_irq(dev->irq, dev);
+4 -3
drivers/net/atlx/atl1.c
··· 2310 2310 if (tpd != ptpd) 2311 2311 memcpy(tpd, ptpd, sizeof(struct tx_packet_desc)); 2312 2312 tpd->buffer_addr = cpu_to_le64(buffer_info->dma); 2313 - tpd->word2 = (cpu_to_le16(buffer_info->length) & 2313 + tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT); 2314 + tpd->word2 |= (cpu_to_le16(buffer_info->length) & 2314 2315 TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT; 2315 2316 2316 2317 /* ··· 2410 2409 vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | 2411 2410 ((vlan_tag >> 9) & 0x8); 2412 2411 ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; 2413 - ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) << 2414 - TPD_VL_TAGGED_SHIFT; 2412 + ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) << 2413 + TPD_VLANTAG_SHIFT; 2415 2414 } 2416 2415 2417 2416 tso = atl1_tso(adapter, skb, ptpd);
+1 -1
drivers/net/atlx/atl1.h
··· 504 504 #define TPD_PKTNT_MASK 0x0001 505 505 #define TPD_PKTINT_SHIFT 15 506 506 #define TPD_VLANTAG_MASK 0xFFFF 507 - #define TPD_VLAN_SHIFT 16 507 + #define TPD_VLANTAG_SHIFT 16 508 508 509 509 /* tpd word 3 bits 0:13 */ 510 510 #define TPD_EOP_MASK 0x0001
+8 -5
drivers/net/bonding/bond_alb.c
··· 169 169 /* clear slave from tx_hashtbl */ 170 170 tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl; 171 171 172 - index = SLAVE_TLB_INFO(slave).head; 173 - while (index != TLB_NULL_INDEX) { 174 - u32 next_index = tx_hash_table[index].next; 175 - tlb_init_table_entry(&tx_hash_table[index], save_load); 176 - index = next_index; 172 + /* skip this if we've already freed the tx hash table */ 173 + if (tx_hash_table) { 174 + index = SLAVE_TLB_INFO(slave).head; 175 + while (index != TLB_NULL_INDEX) { 176 + u32 next_index = tx_hash_table[index].next; 177 + tlb_init_table_entry(&tx_hash_table[index], save_load); 178 + index = next_index; 179 + } 177 180 } 178 181 179 182 tlb_init_slave(slave);
+34 -18
drivers/net/bonding/bond_main.c
··· 1979 1979 unregister_netdevice(bond->dev); 1980 1980 } 1981 1981 1982 + static void bond_destructor(struct net_device *bond_dev) 1983 + { 1984 + struct bonding *bond = bond_dev->priv; 1985 + 1986 + if (bond->wq) 1987 + destroy_workqueue(bond->wq); 1988 + 1989 + netif_addr_lock_bh(bond_dev); 1990 + bond_mc_list_destroy(bond); 1991 + netif_addr_unlock_bh(bond_dev); 1992 + 1993 + free_netdev(bond_dev); 1994 + } 1995 + 1982 1996 /* 1983 1997 * First release a slave and than destroy the bond if no more slaves iare left. 1984 1998 * Must be under rtnl_lock when this function is called. ··· 2390 2376 continue; 2391 2377 2392 2378 case BOND_LINK_DOWN: 2379 + if (slave->link_failure_count < UINT_MAX) 2380 + slave->link_failure_count++; 2381 + 2393 2382 slave->link = BOND_LINK_DOWN; 2394 2383 2395 2384 if (bond->params.mode == BOND_MODE_ACTIVEBACKUP || ··· 4567 4550 4568 4551 bond_set_mode_ops(bond, bond->params.mode); 4569 4552 4570 - bond_dev->destructor = free_netdev; 4553 + bond_dev->destructor = bond_destructor; 4571 4554 4572 4555 /* Initialize the device options */ 4573 4556 bond_dev->tx_queue_len = 0; ··· 4606 4589 return 0; 4607 4590 } 4608 4591 4609 - /* De-initialize device specific data. 4610 - * Caller must hold rtnl_lock. 4611 - */ 4612 - static void bond_deinit(struct net_device *bond_dev) 4613 - { 4614 - struct bonding *bond = bond_dev->priv; 4615 - 4616 - list_del(&bond->bond_list); 4617 - 4618 - #ifdef CONFIG_PROC_FS 4619 - bond_remove_proc_entry(bond); 4620 - #endif 4621 - } 4622 - 4623 4592 static void bond_work_cancel_all(struct bonding *bond) 4624 4593 { 4625 4594 write_lock_bh(&bond->lock); ··· 4627 4624 cancel_delayed_work(&bond->ad_work); 4628 4625 } 4629 4626 4627 + /* De-initialize device specific data. 4628 + * Caller must hold rtnl_lock. 4629 + */ 4630 + static void bond_deinit(struct net_device *bond_dev) 4631 + { 4632 + struct bonding *bond = bond_dev->priv; 4633 + 4634 + list_del(&bond->bond_list); 4635 + 4636 + bond_work_cancel_all(bond); 4637 + 4638 + #ifdef CONFIG_PROC_FS 4639 + bond_remove_proc_entry(bond); 4640 + #endif 4641 + } 4642 + 4630 4643 /* Unregister and free all bond devices. 4631 4644 * Caller must hold rtnl_lock. 4632 4645 */ ··· 4654 4635 struct net_device *bond_dev = bond->dev; 4655 4636 4656 4637 bond_work_cancel_all(bond); 4657 - netif_addr_lock_bh(bond_dev); 4658 - bond_mc_list_destroy(bond); 4659 - netif_addr_unlock_bh(bond_dev); 4660 4638 /* Release the bonded slaves */ 4661 4639 bond_release_all(bond_dev); 4662 4640 bond_destroy(bond);
+16
drivers/net/gianfar.c
··· 586 586 struct gfar_mii __iomem *regs = 587 587 (void __iomem *)&priv->regs->gfar_mii_regs; 588 588 int tbipa = gfar_read(&priv->regs->tbipa); 589 + struct mii_bus *bus = gfar_get_miibus(priv); 590 + 591 + if (bus) 592 + mutex_lock(&bus->mdio_lock); 593 + 594 + /* If the link is already up, we must already be ok, and don't need to 595 + * configure and reset the TBI<->SerDes link. Maybe U-Boot configured 596 + * everything for us? Resetting it takes the link down and requires 597 + * several seconds for it to come back. 598 + */ 599 + if (gfar_local_mdio_read(regs, tbipa, MII_BMSR) & BMSR_LSTATUS) 600 + goto done; 589 601 590 602 /* Single clk mode, mii mode off(for serdes communication) */ 591 603 gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); ··· 608 596 609 597 gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | 610 598 BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); 599 + 600 + done: 601 + if (bus) 602 + mutex_unlock(&bus->mdio_lock); 611 603 } 612 604 613 605 static void init_registers(struct net_device *dev)
+21
drivers/net/gianfar_mii.c
··· 269 269 .remove = gfar_mdio_remove, 270 270 }; 271 271 272 + static int match_mdio_bus(struct device *dev, void *data) 273 + { 274 + const struct gfar_private *priv = data; 275 + const struct platform_device *pdev = to_platform_device(dev); 276 + 277 + return !strcmp(pdev->name, gianfar_mdio_driver.name) && 278 + pdev->id == priv->einfo->mdio_bus; 279 + } 280 + 281 + /* Given a gfar_priv structure, find the mii_bus controlled by this device (not 282 + * necessarily the same as the bus the gfar's PHY is on), if one exists. 283 + * Normally only the first gianfar controls a mii_bus. */ 284 + struct mii_bus *gfar_get_miibus(const struct gfar_private *priv) 285 + { 286 + /*const*/ struct device *d; 287 + 288 + d = bus_find_device(gianfar_mdio_driver.bus, NULL, (void *)priv, 289 + match_mdio_bus); 290 + return d ? dev_get_drvdata(d) : NULL; 291 + } 292 + 272 293 int __init gfar_mdio_init(void) 273 294 { 274 295 return driver_register(&gianfar_mdio_driver);
+3
drivers/net/gianfar_mii.h
··· 18 18 #ifndef __GIANFAR_MII_H 19 19 #define __GIANFAR_MII_H 20 20 21 + struct gfar_private; /* forward ref */ 22 + 21 23 #define MIIMIND_BUSY 0x00000001 22 24 #define MIIMIND_NOTVALID 0x00000004 23 25 ··· 46 44 int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, 47 45 int regnum, u16 value); 48 46 int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum); 47 + struct mii_bus *gfar_get_miibus(const struct gfar_private *priv); 49 48 int __init gfar_mdio_init(void); 50 49 void gfar_mdio_exit(void); 51 50 #endif /* GIANFAR_PHY_H */
-1
drivers/net/irda/ks959-sir.c
··· 118 118 #include <linux/errno.h> 119 119 #include <linux/init.h> 120 120 #include <linux/slab.h> 121 - #include <linux/module.h> 122 121 #include <linux/kref.h> 123 122 #include <linux/usb.h> 124 123 #include <linux/device.h>
-1
drivers/net/irda/ksdazzle-sir.c
··· 82 82 #include <linux/errno.h> 83 83 #include <linux/init.h> 84 84 #include <linux/slab.h> 85 - #include <linux/module.h> 86 85 #include <linux/kref.h> 87 86 #include <linux/usb.h> 88 87 #include <linux/device.h>
-9
drivers/net/loopback.c
··· 76 76 77 77 skb->protocol = eth_type_trans(skb,dev); 78 78 79 - #ifdef LOOPBACK_TSO 80 - if (skb_is_gso(skb)) { 81 - BUG_ON(skb->protocol != htons(ETH_P_IP)); 82 - BUG_ON(ip_hdr(skb)->protocol != IPPROTO_TCP); 83 - 84 - emulate_large_send_offload(skb); 85 - return 0; 86 - } 87 - #endif 88 79 dev->last_rx = jiffies; 89 80 90 81 /* it's OK to use per_cpu_ptr() because BHs are off */
+3 -1
drivers/net/myri10ge/myri10ge.c
··· 75 75 #include "myri10ge_mcp.h" 76 76 #include "myri10ge_mcp_gen_header.h" 77 77 78 - #define MYRI10GE_VERSION_STR "1.4.3-1.371" 78 + #define MYRI10GE_VERSION_STR "1.4.3-1.375" 79 79 80 80 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 81 81 MODULE_AUTHOR("Maintainer: help@myri.com"); ··· 1393 1393 if (tx->req == tx->done) { 1394 1394 tx->queue_active = 0; 1395 1395 put_be32(htonl(1), tx->send_stop); 1396 + mmiowb(); 1396 1397 } 1397 1398 __netif_tx_unlock(dev_queue); 1398 1399 } ··· 2865 2864 if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) { 2866 2865 tx->queue_active = 1; 2867 2866 put_be32(htonl(1), tx->send_go); 2867 + mmiowb(); 2868 2868 } 2869 2869 tx->pkt_start++; 2870 2870 if ((avail - count) < MXGEFW_MAX_SEND_DESC) {
+3 -3
drivers/net/pppoe.c
··· 399 399 if (skb->len < len) 400 400 goto drop; 401 401 402 - po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 403 - if (!po) 402 + if (pskb_trim_rcsum(skb, len)) 404 403 goto drop; 405 404 406 - if (pskb_trim_rcsum(skb, len)) 405 + po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 406 + if (!po) 407 407 goto drop; 408 408 409 409 return sk_receive_skb(sk_pppox(po), skb, 0);
-2
drivers/net/smc91x.c
··· 2060 2060 struct net_device *ndev) 2061 2061 { 2062 2062 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2063 - struct smc_local *lp = netdev_priv(ndev); 2064 2063 2065 2064 if (!res) 2066 2065 return 0; ··· 2074 2075 struct net_device *ndev) 2075 2076 { 2076 2077 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2077 - struct smc_local *lp = netdev_priv(ndev); 2078 2078 2079 2079 if (res) 2080 2080 release_mem_region(res->start, ATTRIB_SIZE);
-1
drivers/net/wan/z85230.c
··· 695 695 * z8530_interrupt - Handle an interrupt from a Z8530 696 696 * @irq: Interrupt number 697 697 * @dev_id: The Z8530 device that is interrupting. 698 - * @regs: unused 699 698 * 700 699 * A Z85[2]30 device has stuck its hand in the air for attention. 701 700 * We scan both the channels on the chip for events and then call
+1 -3
drivers/net/wireless/ath5k/base.c
··· 2942 2942 sc->opmode != NL80211_IFTYPE_MESH_POINT && 2943 2943 test_bit(ATH_STAT_PROMISC, sc->status)) 2944 2944 rfilt |= AR5K_RX_FILTER_PROM; 2945 - if (sc->opmode == NL80211_IFTYPE_STATION || 2946 - sc->opmode == NL80211_IFTYPE_ADHOC) { 2945 + if (sc->opmode == NL80211_IFTYPE_ADHOC) 2947 2946 rfilt |= AR5K_RX_FILTER_BEACON; 2948 - } 2949 2947 2950 2948 /* Set filters */ 2951 2949 ath5k_hw_set_rx_filter(ah,rfilt);
+1 -1
drivers/net/wireless/ath5k/debug.c
··· 339 339 { ATH5K_DEBUG_BEACON, "beacon", "beacon handling" }, 340 340 { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" }, 341 341 { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" }, 342 - { ATH5K_DEBUG_LED, "led", "LED mamagement" }, 342 + { ATH5K_DEBUG_LED, "led", "LED management" }, 343 343 { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" }, 344 344 { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, 345 345 { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" },
+2
drivers/net/wireless/ath5k/initvals.c
··· 806 806 { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, 807 807 { AR5K_PHY(642), 808 808 { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } }, 809 + { 0xa228, 810 + { 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5 } }, 809 811 { 0xa23c, 810 812 { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } }, 811 813 };
+6 -14
drivers/net/wireless/ath5k/reset.c
··· 537 537 mdelay(1); 538 538 539 539 /* 540 - * Write some more initial register settings 540 + * Write some more initial register settings for revised chips 541 541 */ 542 - if (ah->ah_version == AR5K_AR5212) { 542 + if (ah->ah_version == AR5K_AR5212 && 543 + ah->ah_phy_revision > 0x41) { 543 544 ath5k_hw_reg_write(ah, 0x0002a002, 0x982c); 544 545 545 546 if (channel->hw_value == CHANNEL_G) ··· 559 558 else 560 559 ath5k_hw_reg_write(ah, 0x00000000, 0x994c); 561 560 562 - /* Some bits are disabled here, we know nothing about 563 - * register 0xa228 yet, most of the times this ends up 564 - * with a value 0x9b5 -haven't seen any dump with 565 - * a different value- */ 566 - /* Got this from decompiling binary HAL */ 567 - data = ath5k_hw_reg_read(ah, 0xa228); 568 - data &= 0xfffffdff; 569 - ath5k_hw_reg_write(ah, data, 0xa228); 561 + /* Got this from legacy-hal */ 562 + AR5K_REG_DISABLE_BITS(ah, 0xa228, 0x200); 570 563 571 - data = ath5k_hw_reg_read(ah, 0xa228); 572 - data &= 0xfffe03ff; 573 - ath5k_hw_reg_write(ah, data, 0xa228); 574 - data = 0; 564 + AR5K_REG_MASKED_BITS(ah, 0xa228, 0x800, 0xfffe03ff); 575 565 576 566 /* Just write 0x9b5 ? */ 577 567 /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */
+1 -1
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 2090 2090 iwl4965_error_recovery(priv); 2091 2091 2092 2092 iwl_power_update_mode(priv, 1); 2093 - ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); 2094 2093 2095 2094 if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) 2096 2095 iwl4965_set_mode(priv, priv->iw_mode); ··· 2341 2342 mutex_lock(&priv->mutex); 2342 2343 iwl_alive_start(priv); 2343 2344 mutex_unlock(&priv->mutex); 2345 + ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC); 2344 2346 } 2345 2347 2346 2348 static void iwl4965_bg_rf_kill(struct work_struct *work)
+2 -2
drivers/net/wireless/libertas/cmd.c
··· 605 605 if (ret == 0) { 606 606 *curlevel = le16_to_cpu(cmd.curlevel); 607 607 if (minlevel) 608 - *minlevel = le16_to_cpu(cmd.minlevel); 608 + *minlevel = cmd.minlevel; 609 609 if (maxlevel) 610 - *maxlevel = le16_to_cpu(cmd.maxlevel); 610 + *maxlevel = cmd.maxlevel; 611 611 } 612 612 613 613 lbs_deb_leave(LBS_DEB_CMD);
+2 -2
drivers/net/wireless/libertas/scan.c
··· 598 598 599 599 switch (elem->id) { 600 600 case MFIE_TYPE_SSID: 601 - bss->ssid_len = elem->len; 602 - memcpy(bss->ssid, elem->data, elem->len); 601 + bss->ssid_len = min_t(int, 32, elem->len); 602 + memcpy(bss->ssid, elem->data, bss->ssid_len); 603 603 lbs_deb_scan("got SSID IE: '%s', len %u\n", 604 604 escape_essid(bss->ssid, bss->ssid_len), 605 605 bss->ssid_len);
+1 -1
drivers/net/wireless/rt2x00/Kconfig
··· 1 1 menuconfig RT2X00 2 - bool "Ralink driver support" 2 + tristate "Ralink driver support" 3 3 depends on MAC80211 && WLAN_80211 && EXPERIMENTAL 4 4 ---help--- 5 5 This will enable the experimental support for the Ralink drivers,
+2 -1
include/linux/fsl_devices.h
··· 49 49 u32 device_flags; 50 50 /* board specific information */ 51 51 u32 board_flags; 52 - char bus_id[MII_BUS_ID_SIZE]; 52 + int mdio_bus; /* Bus controlled by us */ 53 + char bus_id[MII_BUS_ID_SIZE]; /* Bus PHY is on */ 53 54 u32 phy_id; 54 55 u8 mac_addr[6]; 55 56 phy_interface_t interface;
-1
include/linux/netdevice.h
··· 1537 1537 /** 1538 1538 * netif_tx_lock - grab network device transmit lock 1539 1539 * @dev: network device 1540 - * @cpu: cpu number of lock owner 1541 1540 * 1542 1541 * Get network device transmit lock 1543 1542 */
+2
include/net/net_namespace.h
··· 214 214 215 215 extern int register_pernet_subsys(struct pernet_operations *); 216 216 extern void unregister_pernet_subsys(struct pernet_operations *); 217 + extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); 218 + extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *); 217 219 extern int register_pernet_device(struct pernet_operations *); 218 220 extern void unregister_pernet_device(struct pernet_operations *); 219 221 extern int register_pernet_gen_device(int *id, struct pernet_operations *);
-1
include/net/sock.h
··· 936 936 937 937 /** 938 938 * sk_filter_release: Release a socket filter 939 - * @sk: socket 940 939 * @fp: filter to remove 941 940 * 942 941 * Remove a filter from a socket and release its resources.
+32
net/core/net_namespace.c
··· 325 325 } 326 326 EXPORT_SYMBOL_GPL(unregister_pernet_subsys); 327 327 328 + int register_pernet_gen_subsys(int *id, struct pernet_operations *ops) 329 + { 330 + int rv; 331 + 332 + mutex_lock(&net_mutex); 333 + again: 334 + rv = ida_get_new_above(&net_generic_ids, 1, id); 335 + if (rv < 0) { 336 + if (rv == -EAGAIN) { 337 + ida_pre_get(&net_generic_ids, GFP_KERNEL); 338 + goto again; 339 + } 340 + goto out; 341 + } 342 + rv = register_pernet_operations(first_device, ops); 343 + if (rv < 0) 344 + ida_remove(&net_generic_ids, *id); 345 + mutex_unlock(&net_mutex); 346 + out: 347 + return rv; 348 + } 349 + EXPORT_SYMBOL_GPL(register_pernet_gen_subsys); 350 + 351 + void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops) 352 + { 353 + mutex_lock(&net_mutex); 354 + unregister_pernet_operations(ops); 355 + ida_remove(&net_generic_ids, id); 356 + mutex_unlock(&net_mutex); 357 + } 358 + EXPORT_SYMBOL_GPL(unregister_pernet_gen_subsys); 359 + 328 360 /** 329 361 * register_pernet_device - register a network namespace device 330 362 * @ops: pernet operations structure for the subsystem
+12
net/core/skbuff.c
··· 449 449 __kfree_skb(skb); 450 450 } 451 451 452 + /** 453 + * skb_recycle_check - check if skb can be reused for receive 454 + * @skb: buffer 455 + * @skb_size: minimum receive buffer size 456 + * 457 + * Checks that the skb passed in is not shared or cloned, and 458 + * that it is linear and its head portion at least as large as 459 + * skb_size so that it can be recycled as a receive buffer. 460 + * If these conditions are met, this function does any necessary 461 + * reference count dropping and cleans up the skbuff as if it 462 + * just came from __alloc_skb(). 463 + */ 452 464 int skb_recycle_check(struct sk_buff *skb, int skb_size) 453 465 { 454 466 struct skb_shared_info *shinfo;
+4 -3
net/ipv4/cipso_ipv4.c
··· 2063 2063 u32 opt_len; 2064 2064 int len_delta; 2065 2065 2066 - buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr); 2067 - if (buf_len < 0) 2068 - return buf_len; 2066 + ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr); 2067 + if (ret_val < 0) 2068 + return ret_val; 2069 + buf_len = ret_val; 2069 2070 opt_len = (buf_len + 3) & ~3; 2070 2071 2071 2072 /* we overwrite any existing options to ensure that we have enough
+7 -5
net/ipv4/udp.c
··· 284 284 } 285 285 EXPORT_SYMBOL_GPL(udp4_lib_lookup); 286 286 287 - static inline struct sock *udp_v4_mcast_next(struct sock *sk, 287 + static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk, 288 288 __be16 loc_port, __be32 loc_addr, 289 289 __be16 rmt_port, __be32 rmt_addr, 290 290 int dif) ··· 296 296 sk_for_each_from(s, node) { 297 297 struct inet_sock *inet = inet_sk(s); 298 298 299 - if (s->sk_hash != hnum || 299 + if (!net_eq(sock_net(s), net) || 300 + s->sk_hash != hnum || 300 301 (inet->daddr && inet->daddr != rmt_addr) || 301 302 (inet->dport != rmt_port && inet->dport) || 302 303 (inet->rcv_saddr && inet->rcv_saddr != loc_addr) || ··· 1080 1079 read_lock(&udp_hash_lock); 1081 1080 sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]); 1082 1081 dif = skb->dev->ifindex; 1083 - sk = udp_v4_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif); 1082 + sk = udp_v4_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif); 1084 1083 if (sk) { 1085 1084 struct sock *sknext = NULL; 1086 1085 1087 1086 do { 1088 1087 struct sk_buff *skb1 = skb; 1089 1088 1090 - sknext = udp_v4_mcast_next(sk_next(sk), uh->dest, daddr, 1091 - uh->source, saddr, dif); 1089 + sknext = udp_v4_mcast_next(net, sk_next(sk), uh->dest, 1090 + daddr, uh->source, saddr, 1091 + dif); 1092 1092 if (sknext) 1093 1093 skb1 = skb_clone(skb, GFP_ATOMIC); 1094 1094
+4 -4
net/ipv6/udp.c
··· 328 328 return -1; 329 329 } 330 330 331 - static struct sock *udp_v6_mcast_next(struct sock *sk, 331 + static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk, 332 332 __be16 loc_port, struct in6_addr *loc_addr, 333 333 __be16 rmt_port, struct in6_addr *rmt_addr, 334 334 int dif) ··· 340 340 sk_for_each_from(s, node) { 341 341 struct inet_sock *inet = inet_sk(s); 342 342 343 - if (sock_net(s) != sock_net(sk)) 343 + if (!net_eq(sock_net(s), net)) 344 344 continue; 345 345 346 346 if (s->sk_hash == num && s->sk_family == PF_INET6) { ··· 383 383 read_lock(&udp_hash_lock); 384 384 sk = sk_head(&udptable[udp_hashfn(net, ntohs(uh->dest))]); 385 385 dif = inet6_iif(skb); 386 - sk = udp_v6_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif); 386 + sk = udp_v6_mcast_next(net, sk, uh->dest, daddr, uh->source, saddr, dif); 387 387 if (!sk) { 388 388 kfree_skb(skb); 389 389 goto out; 390 390 } 391 391 392 392 sk2 = sk; 393 - while ((sk2 = udp_v6_mcast_next(sk_next(sk2), uh->dest, daddr, 393 + while ((sk2 = udp_v6_mcast_next(net, sk_next(sk2), uh->dest, daddr, 394 394 uh->source, saddr, dif))) { 395 395 struct sk_buff *buff = skb_clone(skb, GFP_ATOMIC); 396 396 if (buff) {
-1
net/key/af_key.c
··· 2075 2075 req_size += socklen * 2; 2076 2076 } else { 2077 2077 size -= 2*socklen; 2078 - socklen = 0; 2079 2078 } 2080 2079 rq = (void*)skb_put(skb, req_size); 2081 2080 pol->sadb_x_policy_len += req_size/8;
+2 -2
net/netfilter/nf_conntrack_proto_gre.c
··· 335 335 rv = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_gre4); 336 336 if (rv < 0) 337 337 return rv; 338 - rv = register_pernet_gen_device(&proto_gre_net_id, &proto_gre_net_ops); 338 + rv = register_pernet_gen_subsys(&proto_gre_net_id, &proto_gre_net_ops); 339 339 if (rv < 0) 340 340 nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4); 341 341 return rv; ··· 344 344 static void nf_ct_proto_gre_fini(void) 345 345 { 346 346 nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4); 347 - unregister_pernet_gen_device(proto_gre_net_id, &proto_gre_net_ops); 347 + unregister_pernet_gen_subsys(proto_gre_net_id, &proto_gre_net_ops); 348 348 } 349 349 350 350 module_init(nf_ct_proto_gre_init);
+2
net/netlabel/netlabel_addrlist.c
··· 315 315 * Audit Helper Functions 316 316 */ 317 317 318 + #ifdef CONFIG_AUDIT 318 319 /** 319 320 * netlbl_af4list_audit_addr - Audit an IPv4 address 320 321 * @audit_buf: audit buffer ··· 387 386 } 388 387 } 389 388 #endif /* IPv6 */ 389 + #endif /* CONFIG_AUDIT */
+22
net/netlabel/netlabel_addrlist.h
··· 120 120 struct netlbl_af4list *netlbl_af4list_search_exact(__be32 addr, 121 121 __be32 mask, 122 122 struct list_head *head); 123 + 124 + #ifdef CONFIG_AUDIT 123 125 void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, 124 126 int src, const char *dev, 125 127 __be32 addr, __be32 mask); 128 + #else 129 + static inline void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf, 130 + int src, const char *dev, 131 + __be32 addr, __be32 mask) 132 + { 133 + return; 134 + } 135 + #endif 126 136 127 137 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 128 138 ··· 189 179 struct netlbl_af6list *netlbl_af6list_search_exact(const struct in6_addr *addr, 190 180 const struct in6_addr *mask, 191 181 struct list_head *head); 182 + 183 + #ifdef CONFIG_AUDIT 192 184 void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, 193 185 int src, 194 186 const char *dev, 195 187 const struct in6_addr *addr, 196 188 const struct in6_addr *mask); 189 + #else 190 + static inline void netlbl_af6list_audit_addr(struct audit_buffer *audit_buf, 191 + int src, 192 + const char *dev, 193 + const struct in6_addr *addr, 194 + const struct in6_addr *mask) 195 + { 196 + return; 197 + } 198 + #endif 197 199 #endif /* IPV6 */ 198 200 199 201 #endif
+1 -1
net/netlabel/netlabel_mgmt.c
··· 265 265 static int netlbl_mgmt_listentry(struct sk_buff *skb, 266 266 struct netlbl_dom_map *entry) 267 267 { 268 - int ret_val; 268 + int ret_val = 0; 269 269 struct nlattr *nla_a; 270 270 struct nlattr *nla_b; 271 271 struct netlbl_af4list *iter4;
+1 -1
net/unix/af_unix.c
··· 2213 2213 #endif 2214 2214 error = 0; 2215 2215 out: 2216 - return 0; 2216 + return error; 2217 2217 } 2218 2218 2219 2219 static void unix_net_exit(struct net *net)
+2
net/xfrm/xfrm_policy.c
··· 1251 1251 -EINVAL : -EAGAIN); 1252 1252 xfrm_state_put(x); 1253 1253 } 1254 + else if (error == -ESRCH) 1255 + error = -EAGAIN; 1254 1256 1255 1257 if (!tmpl->optional) 1256 1258 goto fail;