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

Configure Feed

Select the types of activity you want to include in your feed.

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:
ariadne: remove redundant NULL check
ip6ip6: autoload ip6 tunnel
net: bridge builtin vs. ipv6 modular
ipv6: Don't create clones of host routes.
pktgen: fix errata in show results
ipv4: Fix erroneous uses of ifa_address.
vxge: update MAINTAINERS
r6040: bump to version 0.27 and date 23Feb2011
r6040: fix multicast operations
rds: prevent BUG_ON triggering on congestion map updates
bonding 802.3ad: Rename rx_machine_lock to state_machine_lock
bonding 802.3ad: Fix the state machine locking v2
drivers/net/macvtap: fix error check
net: fix multithreaded signal handling in unix recv routines
net: Enter net/ipv6/ even if CONFIG_IPV6=n
net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem
bnx2x: fix MaxBW configuration
bnx2x: (NPAR) prevent HW access in D3 state
bnx2x: fix link notification
bnx2x: fix non-pmf device load flow

Doing my first --no-ff merge here, to get the explicit merge commit.

David did a back-merge in order to get commit 8909c9ad8ff0 ("net: don't
allow CAP_NET_ADMIN to load non-netdev kernel modules") so that we can
add Stephen Hemminger's fix to handle ip6 tunnels as well, which uses
the MODULE_ALIAS_NETDEV() macro created by that change.

+185 -113
+1 -4
MAINTAINERS
··· 4292 4292 F: net/sched/sch_netem.c 4293 4293 4294 4294 NETERION 10GbE DRIVERS (s2io/vxge) 4295 - M: Ramkrishna Vepa <ramkrishna.vepa@exar.com> 4296 - M: Sivakumar Subramani <sivakumar.subramani@exar.com> 4297 - M: Sreenivasa Honnur <sreenivasa.honnur@exar.com> 4298 - M: Jon Mason <jon.mason@exar.com> 4295 + M: Jon Mason <jdmason@kudzu.us> 4299 4296 L: netdev@vger.kernel.org 4300 4297 W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous 4301 4298 W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
-5
drivers/net/ariadne.c
··· 425 425 int csr0, boguscnt; 426 426 int handled = 0; 427 427 428 - if (dev == NULL) { 429 - printk(KERN_WARNING "ariadne_interrupt(): irq for unknown device.\n"); 430 - return IRQ_NONE; 431 - } 432 - 433 428 lance->RAP = CSR0; /* PCnet-ISA Controller Status */ 434 429 435 430 if (!(lance->RDP & INTR)) /* Check if any interrupt has been */
+3 -2
drivers/net/bnx2x/bnx2x.h
··· 1211 1211 /* DCBX Negotation results */ 1212 1212 struct dcbx_features dcbx_local_feat; 1213 1213 u32 dcbx_error; 1214 + u32 pending_max; 1214 1215 }; 1215 1216 1216 1217 /** ··· 1617 1616 /* CMNG constants, as derived from system spec calculations */ 1618 1617 /* default MIN rate in case VNIC min rate is configured to zero - 100Mbps */ 1619 1618 #define DEF_MIN_RATE 100 1620 - /* resolution of the rate shaping timer - 100 usec */ 1621 - #define RS_PERIODIC_TIMEOUT_USEC 100 1619 + /* resolution of the rate shaping timer - 400 usec */ 1620 + #define RS_PERIODIC_TIMEOUT_USEC 400 1622 1621 /* number of bytes in single QM arbitration cycle - 1623 1622 * coefficient for calculating the fairness timer */ 1624 1623 #define QM_ARB_BYTES 160000
+22
drivers/net/bnx2x/bnx2x_cmn.c
··· 996 996 bnx2x_free_rx_skbs(bp); 997 997 } 998 998 999 + void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value) 1000 + { 1001 + /* load old values */ 1002 + u32 mf_cfg = bp->mf_config[BP_VN(bp)]; 1003 + 1004 + if (value != bnx2x_extract_max_cfg(bp, mf_cfg)) { 1005 + /* leave all but MAX value */ 1006 + mf_cfg &= ~FUNC_MF_CFG_MAX_BW_MASK; 1007 + 1008 + /* set new MAX value */ 1009 + mf_cfg |= (value << FUNC_MF_CFG_MAX_BW_SHIFT) 1010 + & FUNC_MF_CFG_MAX_BW_MASK; 1011 + 1012 + bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW, mf_cfg); 1013 + } 1014 + } 1015 + 999 1016 static void bnx2x_free_msix_irqs(struct bnx2x *bp) 1000 1017 { 1001 1018 int i, offset = 1; ··· 1480 1463 #endif 1481 1464 1482 1465 bnx2x_set_eth_mac(bp, 1); 1466 + 1467 + if (bp->pending_max) { 1468 + bnx2x_update_max_mf_config(bp, bp->pending_max); 1469 + bp->pending_max = 0; 1470 + } 1483 1471 1484 1472 if (bp->port.pmf) 1485 1473 bnx2x_initial_phy_init(bp, load_mode);
+9
drivers/net/bnx2x/bnx2x_cmn.h
··· 341 341 */ 342 342 int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state); 343 343 344 + /** 345 + * Updates MAX part of MF configuration in HW 346 + * (if required) 347 + * 348 + * @param bp 349 + * @param value 350 + */ 351 + void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value); 352 + 344 353 /* dev_close main block */ 345 354 int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode); 346 355
+8 -10
drivers/net/bnx2x/bnx2x_ethtool.c
··· 238 238 speed |= (cmd->speed_hi << 16); 239 239 240 240 if (IS_MF_SI(bp)) { 241 - u32 param = 0, part; 241 + u32 part; 242 242 u32 line_speed = bp->link_vars.line_speed; 243 243 244 244 /* use 10G if no link detected */ ··· 251 251 REQ_BC_VER_4_SET_MF_BW); 252 252 return -EINVAL; 253 253 } 254 + 254 255 part = (speed * 100) / line_speed; 256 + 255 257 if (line_speed < speed || !part) { 256 258 BNX2X_DEV_INFO("Speed setting should be in a range " 257 259 "from 1%% to 100%% " 258 260 "of actual line speed\n"); 259 261 return -EINVAL; 260 262 } 261 - /* load old values */ 262 - param = bp->mf_config[BP_VN(bp)]; 263 263 264 - /* leave only MIN value */ 265 - param &= FUNC_MF_CFG_MIN_BW_MASK; 264 + if (bp->state != BNX2X_STATE_OPEN) 265 + /* store value for following "load" */ 266 + bp->pending_max = part; 267 + else 268 + bnx2x_update_max_mf_config(bp, part); 266 269 267 - /* set new MAX value */ 268 - param |= (part << FUNC_MF_CFG_MAX_BW_SHIFT) 269 - & FUNC_MF_CFG_MAX_BW_MASK; 270 - 271 - bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW, param); 272 270 return 0; 273 271 } 274 272
+10 -9
drivers/net/bnx2x/bnx2x_main.c
··· 2092 2092 bnx2x_calc_vn_weight_sum(bp); 2093 2093 2094 2094 /* calculate and set min-max rate for each vn */ 2095 - for (vn = VN_0; vn < E1HVN_MAX; vn++) 2096 - bnx2x_init_vn_minmax(bp, vn); 2095 + if (bp->port.pmf) 2096 + for (vn = VN_0; vn < E1HVN_MAX; vn++) 2097 + bnx2x_init_vn_minmax(bp, vn); 2097 2098 2098 2099 /* always enable rate shaping and fairness */ 2099 2100 bp->cmng.flags.cmng_enables |= ··· 2163 2162 bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP); 2164 2163 } 2165 2164 2166 - /* indicate link status only if link status actually changed */ 2167 - if (prev_link_status != bp->link_vars.link_status) 2168 - bnx2x_link_report(bp); 2169 - 2170 - if (IS_MF(bp)) 2171 - bnx2x_link_sync_notify(bp); 2172 - 2173 2165 if (bp->link_vars.link_up && bp->link_vars.line_speed) { 2174 2166 int cmng_fns = bnx2x_get_cmng_fns_mode(bp); 2175 2167 ··· 2174 2180 DP(NETIF_MSG_IFUP, 2175 2181 "single function mode without fairness\n"); 2176 2182 } 2183 + 2184 + if (IS_MF(bp)) 2185 + bnx2x_link_sync_notify(bp); 2186 + 2187 + /* indicate link status only if link status actually changed */ 2188 + if (prev_link_status != bp->link_vars.link_status) 2189 + bnx2x_link_report(bp); 2177 2190 } 2178 2191 2179 2192 void bnx2x__link_status_update(struct bnx2x *bp)
+19 -13
drivers/net/bonding/bond_3ad.c
··· 281 281 } 282 282 283 283 /** 284 - * __get_rx_machine_lock - lock the port's RX machine 284 + * __get_state_machine_lock - lock the port's state machines 285 285 * @port: the port we're looking at 286 286 * 287 287 */ 288 - static inline void __get_rx_machine_lock(struct port *port) 288 + static inline void __get_state_machine_lock(struct port *port) 289 289 { 290 - spin_lock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock)); 290 + spin_lock_bh(&(SLAVE_AD_INFO(port->slave).state_machine_lock)); 291 291 } 292 292 293 293 /** 294 - * __release_rx_machine_lock - unlock the port's RX machine 294 + * __release_state_machine_lock - unlock the port's state machines 295 295 * @port: the port we're looking at 296 296 * 297 297 */ 298 - static inline void __release_rx_machine_lock(struct port *port) 298 + static inline void __release_state_machine_lock(struct port *port) 299 299 { 300 - spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).rx_machine_lock)); 300 + spin_unlock_bh(&(SLAVE_AD_INFO(port->slave).state_machine_lock)); 301 301 } 302 302 303 303 /** ··· 388 388 } 389 389 390 390 /** 391 - * __initialize_port_locks - initialize a port's RX machine spinlock 391 + * __initialize_port_locks - initialize a port's STATE machine spinlock 392 392 * @port: the port we're looking at 393 393 * 394 394 */ 395 395 static inline void __initialize_port_locks(struct port *port) 396 396 { 397 397 // make sure it isn't called twice 398 - spin_lock_init(&(SLAVE_AD_INFO(port->slave).rx_machine_lock)); 398 + spin_lock_init(&(SLAVE_AD_INFO(port->slave).state_machine_lock)); 399 399 } 400 400 401 401 //conversions ··· 1025 1025 { 1026 1026 rx_states_t last_state; 1027 1027 1028 - // Lock to prevent 2 instances of this function to run simultaneously(rx interrupt and periodic machine callback) 1029 - __get_rx_machine_lock(port); 1030 - 1031 1028 // keep current State Machine state to compare later if it was changed 1032 1029 last_state = port->sm_rx_state; 1033 1030 ··· 1130 1133 pr_err("%s: An illegal loopback occurred on adapter (%s).\n" 1131 1134 "Check the configuration to verify that all adapters are connected to 802.3ad compliant switch ports\n", 1132 1135 port->slave->dev->master->name, port->slave->dev->name); 1133 - __release_rx_machine_lock(port); 1134 1136 return; 1135 1137 } 1136 1138 __update_selected(lacpdu, port); ··· 1149 1153 break; 1150 1154 } 1151 1155 } 1152 - __release_rx_machine_lock(port); 1153 1156 } 1154 1157 1155 1158 /** ··· 2150 2155 goto re_arm; 2151 2156 } 2152 2157 2158 + /* Lock around state machines to protect data accessed 2159 + * by all (e.g., port->sm_vars). ad_rx_machine may run 2160 + * concurrently due to incoming LACPDU. 2161 + */ 2162 + __get_state_machine_lock(port); 2163 + 2153 2164 ad_rx_machine(NULL, port); 2154 2165 ad_periodic_machine(port); 2155 2166 ad_port_selection_logic(port); ··· 2165 2164 // turn off the BEGIN bit, since we already handled it 2166 2165 if (port->sm_vars & AD_PORT_BEGIN) 2167 2166 port->sm_vars &= ~AD_PORT_BEGIN; 2167 + 2168 + __release_state_machine_lock(port); 2168 2169 } 2169 2170 2170 2171 re_arm: ··· 2203 2200 case AD_TYPE_LACPDU: 2204 2201 pr_debug("Received LACPDU on port %d\n", 2205 2202 port->actor_port_number); 2203 + /* Protect against concurrent state machines */ 2204 + __get_state_machine_lock(port); 2206 2205 ad_rx_machine(lacpdu, port); 2206 + __release_state_machine_lock(port); 2207 2207 break; 2208 2208 2209 2209 case AD_TYPE_MARKER:
+2 -1
drivers/net/bonding/bond_3ad.h
··· 264 264 struct ad_slave_info { 265 265 struct aggregator aggregator; // 802.3ad aggregator structure 266 266 struct port port; // 802.3ad port structure 267 - spinlock_t rx_machine_lock; // To avoid race condition between callback and receive interrupt 267 + spinlock_t state_machine_lock; /* mutex state machines vs. 268 + incoming LACPDU */ 268 269 u16 id; 269 270 }; 270 271
+2 -1
drivers/net/macvtap.c
··· 528 528 vnet_hdr_len = q->vnet_hdr_sz; 529 529 530 530 err = -EINVAL; 531 - if ((len -= vnet_hdr_len) < 0) 531 + if (len < vnet_hdr_len) 532 532 goto err; 533 + len -= vnet_hdr_len; 533 534 534 535 err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0, 535 536 sizeof(vnet_hdr));
+69 -52
drivers/net/r6040.c
··· 49 49 #include <asm/processor.h> 50 50 51 51 #define DRV_NAME "r6040" 52 - #define DRV_VERSION "0.26" 53 - #define DRV_RELDATE "30May2010" 52 + #define DRV_VERSION "0.27" 53 + #define DRV_RELDATE "23Feb2011" 54 54 55 55 /* PHY CHIP Address */ 56 56 #define PHY1_ADDR 1 /* For MAC1 */ ··· 69 69 70 70 /* MAC registers */ 71 71 #define MCR0 0x00 /* Control register 0 */ 72 + #define MCR0_PROMISC 0x0020 /* Promiscuous mode */ 73 + #define MCR0_HASH_EN 0x0100 /* Enable multicast hash table function */ 72 74 #define MCR1 0x04 /* Control register 1 */ 73 75 #define MAC_RST 0x0001 /* Reset the MAC */ 74 76 #define MBCR 0x08 /* Bus control */ ··· 853 851 { 854 852 struct r6040_private *lp = netdev_priv(dev); 855 853 void __iomem *ioaddr = lp->base; 856 - u16 *adrp; 857 - u16 reg; 858 854 unsigned long flags; 859 855 struct netdev_hw_addr *ha; 860 856 int i; 857 + u16 *adrp; 858 + u16 hash_table[4] = { 0 }; 861 859 862 - /* MAC Address */ 860 + spin_lock_irqsave(&lp->lock, flags); 861 + 862 + /* Keep our MAC Address */ 863 863 adrp = (u16 *)dev->dev_addr; 864 864 iowrite16(adrp[0], ioaddr + MID_0L); 865 865 iowrite16(adrp[1], ioaddr + MID_0M); 866 866 iowrite16(adrp[2], ioaddr + MID_0H); 867 867 868 - /* Promiscous Mode */ 869 - spin_lock_irqsave(&lp->lock, flags); 870 - 871 868 /* Clear AMCP & PROM bits */ 872 - reg = ioread16(ioaddr) & ~0x0120; 873 - if (dev->flags & IFF_PROMISC) { 874 - reg |= 0x0020; 875 - lp->mcr0 |= 0x0020; 876 - } 877 - /* Too many multicast addresses 878 - * accept all traffic */ 879 - else if ((netdev_mc_count(dev) > MCAST_MAX) || 880 - (dev->flags & IFF_ALLMULTI)) 881 - reg |= 0x0020; 869 + lp->mcr0 = ioread16(ioaddr + MCR0) & ~(MCR0_PROMISC | MCR0_HASH_EN); 882 870 883 - iowrite16(reg, ioaddr); 884 - spin_unlock_irqrestore(&lp->lock, flags); 871 + /* Promiscuous mode */ 872 + if (dev->flags & IFF_PROMISC) 873 + lp->mcr0 |= MCR0_PROMISC; 885 874 886 - /* Build the hash table */ 887 - if (netdev_mc_count(dev) > MCAST_MAX) { 888 - u16 hash_table[4]; 889 - u32 crc; 875 + /* Enable multicast hash table function to 876 + * receive all multicast packets. */ 877 + else if (dev->flags & IFF_ALLMULTI) { 878 + lp->mcr0 |= MCR0_HASH_EN; 879 + 880 + for (i = 0; i < MCAST_MAX ; i++) { 881 + iowrite16(0, ioaddr + MID_1L + 8 * i); 882 + iowrite16(0, ioaddr + MID_1M + 8 * i); 883 + iowrite16(0, ioaddr + MID_1H + 8 * i); 884 + } 890 885 891 886 for (i = 0; i < 4; i++) 892 - hash_table[i] = 0; 893 - 887 + hash_table[i] = 0xffff; 888 + } 889 + /* Use internal multicast address registers if the number of 890 + * multicast addresses is not greater than MCAST_MAX. */ 891 + else if (netdev_mc_count(dev) <= MCAST_MAX) { 892 + i = 0; 894 893 netdev_for_each_mc_addr(ha, dev) { 895 - char *addrs = ha->addr; 896 - 897 - if (!(*addrs & 1)) 898 - continue; 899 - 900 - crc = ether_crc_le(6, addrs); 901 - crc >>= 26; 902 - hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf)); 894 + u16 *adrp = (u16 *) ha->addr; 895 + iowrite16(adrp[0], ioaddr + MID_1L + 8 * i); 896 + iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); 897 + iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); 898 + i++; 903 899 } 904 - /* Fill the MAC hash tables with their values */ 900 + while (i < MCAST_MAX) { 901 + iowrite16(0, ioaddr + MID_1L + 8 * i); 902 + iowrite16(0, ioaddr + MID_1M + 8 * i); 903 + iowrite16(0, ioaddr + MID_1H + 8 * i); 904 + i++; 905 + } 906 + } 907 + /* Otherwise, Enable multicast hash table function. */ 908 + else { 909 + u32 crc; 910 + 911 + lp->mcr0 |= MCR0_HASH_EN; 912 + 913 + for (i = 0; i < MCAST_MAX ; i++) { 914 + iowrite16(0, ioaddr + MID_1L + 8 * i); 915 + iowrite16(0, ioaddr + MID_1M + 8 * i); 916 + iowrite16(0, ioaddr + MID_1H + 8 * i); 917 + } 918 + 919 + /* Build multicast hash table */ 920 + netdev_for_each_mc_addr(ha, dev) { 921 + u8 *addrs = ha->addr; 922 + 923 + crc = ether_crc(ETH_ALEN, addrs); 924 + crc >>= 26; 925 + hash_table[crc >> 4] |= 1 << (crc & 0xf); 926 + } 927 + } 928 + 929 + iowrite16(lp->mcr0, ioaddr + MCR0); 930 + 931 + /* Fill the MAC hash tables with their values */ 932 + if (lp->mcr0 && MCR0_HASH_EN) { 905 933 iowrite16(hash_table[0], ioaddr + MAR0); 906 934 iowrite16(hash_table[1], ioaddr + MAR1); 907 935 iowrite16(hash_table[2], ioaddr + MAR2); 908 936 iowrite16(hash_table[3], ioaddr + MAR3); 909 937 } 910 - /* Multicast Address 1~4 case */ 911 - i = 0; 912 - netdev_for_each_mc_addr(ha, dev) { 913 - if (i >= MCAST_MAX) 914 - break; 915 - adrp = (u16 *) ha->addr; 916 - iowrite16(adrp[0], ioaddr + MID_1L + 8 * i); 917 - iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); 918 - iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); 919 - i++; 920 - } 921 - while (i < MCAST_MAX) { 922 - iowrite16(0xffff, ioaddr + MID_1L + 8 * i); 923 - iowrite16(0xffff, ioaddr + MID_1M + 8 * i); 924 - iowrite16(0xffff, ioaddr + MID_1H + 8 * i); 925 - i++; 926 - } 938 + 939 + spin_unlock_irqrestore(&lp->lock, flags); 927 940 } 928 941 929 942 static void netdev_get_drvinfo(struct net_device *dev,
+5
drivers/net/smsc911x.c
··· 1178 1178 smsc911x_reg_write(pdata, HW_CFG, 0x00050000); 1179 1179 smsc911x_reg_write(pdata, AFC_CFG, 0x006E3740); 1180 1180 1181 + /* Increase the legal frame size of VLAN tagged frames to 1522 bytes */ 1182 + spin_lock_irq(&pdata->mac_lock); 1183 + smsc911x_mac_write(pdata, VLAN1, ETH_P_8021Q); 1184 + spin_unlock_irq(&pdata->mac_lock); 1185 + 1181 1186 /* Make sure EEPROM has finished loading before setting GPIO_CFG */ 1182 1187 timeout = 50; 1183 1188 while ((smsc911x_reg_read(pdata, E2P_CMD) & E2P_CMD_EPC_BUSY_) &&
+1 -3
net/Makefile
··· 19 19 obj-$(CONFIG_INET) += ipv4/ 20 20 obj-$(CONFIG_XFRM) += xfrm/ 21 21 obj-$(CONFIG_UNIX) += unix/ 22 - ifneq ($(CONFIG_IPV6),) 23 - obj-y += ipv6/ 24 - endif 22 + obj-$(CONFIG_NET) += ipv6/ 25 23 obj-$(CONFIG_PACKET) += packet/ 26 24 obj-$(CONFIG_NET_KEY) += key/ 27 25 obj-$(CONFIG_BRIDGE) += bridge/
+1
net/bridge/Kconfig
··· 6 6 tristate "802.1d Ethernet Bridging" 7 7 select LLC 8 8 select STP 9 + depends on IPV6 || IPV6=n 9 10 ---help--- 10 11 If you say Y here, then your Linux box will be able to act as an 11 12 Ethernet bridge, which means that the different Ethernet segments it
+1 -1
net/core/pktgen.c
··· 3321 3321 pkt_dev->started_at); 3322 3322 ktime_t idle = ns_to_ktime(pkt_dev->idle_acc); 3323 3323 3324 - p += sprintf(p, "OK: %llu(c%llu+d%llu) nsec, %llu (%dbyte,%dfrags)\n", 3324 + p += sprintf(p, "OK: %llu(c%llu+d%llu) usec, %llu (%dbyte,%dfrags)\n", 3325 3325 (unsigned long long)ktime_to_us(elapsed), 3326 3326 (unsigned long long)ktime_to_us(ktime_sub(elapsed, idle)), 3327 3327 (unsigned long long)ktime_to_us(idle),
+3 -3
net/ipv4/devinet.c
··· 670 670 ifap = &ifa->ifa_next) { 671 671 if (!strcmp(ifr.ifr_name, ifa->ifa_label) && 672 672 sin_orig.sin_addr.s_addr == 673 - ifa->ifa_address) { 673 + ifa->ifa_local) { 674 674 break; /* found */ 675 675 } 676 676 } ··· 1040 1040 return; 1041 1041 1042 1042 arp_send(ARPOP_REQUEST, ETH_P_ARP, 1043 - ifa->ifa_address, dev, 1044 - ifa->ifa_address, NULL, 1043 + ifa->ifa_local, dev, 1044 + ifa->ifa_local, NULL, 1045 1045 dev->dev_addr, NULL); 1046 1046 } 1047 1047
+1
net/ipv6/ip6_tunnel.c
··· 57 57 MODULE_AUTHOR("Ville Nuorvala"); 58 58 MODULE_DESCRIPTION("IPv6 tunneling device"); 59 59 MODULE_LICENSE("GPL"); 60 + MODULE_ALIAS_NETDEV("ip6tnl0"); 60 61 61 62 #ifdef IP6_TNL_DEBUG 62 63 #define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __func__)
+3 -1
net/ipv6/route.c
··· 739 739 740 740 if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) 741 741 nrt = rt6_alloc_cow(rt, &fl->fl6_dst, &fl->fl6_src); 742 - else 742 + else if (!(rt->dst.flags & DST_HOST)) 743 743 nrt = rt6_alloc_clone(rt, &fl->fl6_dst); 744 + else 745 + goto out2; 744 746 745 747 dst_release(&rt->dst); 746 748 rt = nrt ? : net->ipv6.ip6_null_entry;
+4 -1
net/rds/ib_send.c
··· 551 551 if (conn->c_loopback 552 552 && rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) { 553 553 rds_cong_map_updated(conn->c_fcong, ~(u64) 0); 554 - return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; 554 + scat = &rm->data.op_sg[sg]; 555 + ret = sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; 556 + ret = min_t(int, ret, scat->length - conn->c_xmit_data_off); 557 + return ret; 555 558 } 556 559 557 560 /* FIXME we may overallocate here */
+8 -3
net/rds/loop.c
··· 61 61 unsigned int hdr_off, unsigned int sg, 62 62 unsigned int off) 63 63 { 64 + struct scatterlist *sgp = &rm->data.op_sg[sg]; 65 + int ret = sizeof(struct rds_header) + 66 + be32_to_cpu(rm->m_inc.i_hdr.h_len); 67 + 64 68 /* Do not send cong updates to loopback */ 65 69 if (rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) { 66 70 rds_cong_map_updated(conn->c_fcong, ~(u64) 0); 67 - return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; 71 + ret = min_t(int, ret, sgp->length - conn->c_xmit_data_off); 72 + goto out; 68 73 } 69 74 70 75 BUG_ON(hdr_off || sg || off); ··· 85 80 NULL); 86 81 87 82 rds_inc_put(&rm->m_inc); 88 - 89 - return sizeof(struct rds_header) + be32_to_cpu(rm->m_inc.i_hdr.h_len); 83 + out: 84 + return ret; 90 85 } 91 86 92 87 /*
+13 -4
net/unix/af_unix.c
··· 1724 1724 1725 1725 msg->msg_namelen = 0; 1726 1726 1727 - mutex_lock(&u->readlock); 1727 + err = mutex_lock_interruptible(&u->readlock); 1728 + if (err) { 1729 + err = sock_intr_errno(sock_rcvtimeo(sk, noblock)); 1730 + goto out; 1731 + } 1728 1732 1729 1733 skb = skb_recv_datagram(sk, flags, noblock, &err); 1730 1734 if (!skb) { ··· 1868 1864 memset(&tmp_scm, 0, sizeof(tmp_scm)); 1869 1865 } 1870 1866 1871 - mutex_lock(&u->readlock); 1867 + err = mutex_lock_interruptible(&u->readlock); 1868 + if (err) { 1869 + err = sock_intr_errno(timeo); 1870 + goto out; 1871 + } 1872 1872 1873 1873 do { 1874 1874 int chunk; ··· 1903 1895 1904 1896 timeo = unix_stream_data_wait(sk, timeo); 1905 1897 1906 - if (signal_pending(current)) { 1898 + if (signal_pending(current) 1899 + || mutex_lock_interruptible(&u->readlock)) { 1907 1900 err = sock_intr_errno(timeo); 1908 1901 goto out; 1909 1902 } 1910 - mutex_lock(&u->readlock); 1903 + 1911 1904 continue; 1912 1905 unlock: 1913 1906 unix_state_unlock(sk);