diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-29 00:54:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-29 00:54:07 -0500 |
commit | e9296e89b85604862bd9ec2d54dc43edad775c0d (patch) | |
tree | 5379a58a740674e1f740008e36cb1c4fbe2011b9 /drivers | |
parent | 4b05a1c74d1cfae37cf6ff293ee928350f031418 (diff) | |
parent | a45085f6a7801f95cd5682290195224e268627fd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Some more fixes trickled in over the past few days:
1) PIM device names can overflow the IFNAMSIZ buffer unless we
properly limit the allowed indexes, fix from Eric Dumazet.
2) Under heavy load we can OOPS in icmp reply processing due to an
unchecked inet_putpeer() call. Fix from Neal Cardwell.
3) SCTP round trip calculations need to use 64-bit math to avoid
overflows, fix from Schoch Christian.
4) Fix a memory leak and an error return flub in SCTP and IRDA
triggerable by userspace. Fix from Tommi Rantala and found by the
syscall fuzzer (trinity).
5) MLX4 driver gives bogus size to memcpy() call, fix from Amir
Vadai.
6) Fix length calculation in VHOST descriptor translation, from
Michael S Tsirkin.
7) Ambassador ATM driver loops forever while loading firmware, fix
from Dan Carpenter.
8) Over MTU packets in openvswitch warn about wrong device, fix from
Jesse Gross.
9) Netfilter IPSET's netlink code can overrun a string buffer because
it's not properly limited to IFNAMSIZ. Fix from Florian Westphal.
10) PCAN USB driver sets wrong timestamp in SKB, from Oliver Hartkopp.
11) Make sure the RX ifindex always has a valid value in the CAN BCM
driver, even if we haven't received a frame yet. Fix also from
Oliver Hartkopp."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
team: fix hw_features setup
atm: forever loop loading ambassador firmware
vhost: fix length for cross region descriptor
irda: irttp: fix memory leak in irttp_open_tsap() error path
net: qmi_wwan: add Huawei E173
net/mlx4_en: Can set maxrate only for TC0
sctp: Error in calculation of RTTvar
sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall
sctp: fix memory leak in sctp_datamsg_from_user() when copy from user space fails
net: ipmr: limit MRT_TABLE identifiers
ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()
can: bcm: initialize ifindex for timeouts without previous frame reception
can: peak_usb: fix hwtstamp assignment
netfilter: ipset: fix netiface set name overflow
openvswitch: Store flow key len if ARP opcode is not request or reply.
openvswitch: Print device when warning about over MTU packets.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/ambassador.c | 1 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb.c | 8 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 2 | ||||
-rw-r--r-- | drivers/net/team/team.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/qmi_wwan.c | 1 | ||||
-rw-r--r-- | drivers/vhost/vhost.c | 2 |
7 files changed, 19 insertions, 7 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 89b30f32ba68..ff7bb8a42ed6 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -1961,6 +1961,7 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { | |||
1961 | res = loader_verify(lb, dev, rec); | 1961 | res = loader_verify(lb, dev, rec); |
1962 | if (res) | 1962 | if (res) |
1963 | break; | 1963 | break; |
1964 | rec = ihex_next_binrec(rec); | ||
1964 | } | 1965 | } |
1965 | release_firmware(fw); | 1966 | release_firmware(fw); |
1966 | if (!res) | 1967 | if (!res) |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c index 86f26a1ede4c..25723d8ee201 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c | |||
@@ -519,8 +519,10 @@ static int pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n, | |||
519 | mc->pdev->dev.can.state = new_state; | 519 | mc->pdev->dev.can.state = new_state; |
520 | 520 | ||
521 | if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) { | 521 | if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) { |
522 | struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb); | ||
523 | |||
522 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); | 524 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); |
523 | skb->tstamp = timeval_to_ktime(tv); | 525 | hwts->hwtstamp = timeval_to_ktime(tv); |
524 | } | 526 | } |
525 | 527 | ||
526 | netif_rx(skb); | 528 | netif_rx(skb); |
@@ -605,6 +607,7 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len) | |||
605 | struct sk_buff *skb; | 607 | struct sk_buff *skb; |
606 | struct can_frame *cf; | 608 | struct can_frame *cf; |
607 | struct timeval tv; | 609 | struct timeval tv; |
610 | struct skb_shared_hwtstamps *hwts; | ||
608 | 611 | ||
609 | skb = alloc_can_skb(mc->netdev, &cf); | 612 | skb = alloc_can_skb(mc->netdev, &cf); |
610 | if (!skb) | 613 | if (!skb) |
@@ -652,7 +655,8 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len) | |||
652 | 655 | ||
653 | /* convert timestamp into kernel time */ | 656 | /* convert timestamp into kernel time */ |
654 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); | 657 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); |
655 | skb->tstamp = timeval_to_ktime(tv); | 658 | hwts = skb_hwtstamps(skb); |
659 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
656 | 660 | ||
657 | /* push the skb */ | 661 | /* push the skb */ |
658 | netif_rx(skb); | 662 | netif_rx(skb); |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c index e1626d92511a..30d79bfa5b10 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c | |||
@@ -532,6 +532,7 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if, | |||
532 | struct can_frame *can_frame; | 532 | struct can_frame *can_frame; |
533 | struct sk_buff *skb; | 533 | struct sk_buff *skb; |
534 | struct timeval tv; | 534 | struct timeval tv; |
535 | struct skb_shared_hwtstamps *hwts; | ||
535 | 536 | ||
536 | skb = alloc_can_skb(netdev, &can_frame); | 537 | skb = alloc_can_skb(netdev, &can_frame); |
537 | if (!skb) | 538 | if (!skb) |
@@ -549,7 +550,8 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if, | |||
549 | memcpy(can_frame->data, rx->data, can_frame->can_dlc); | 550 | memcpy(can_frame->data, rx->data, can_frame->can_dlc); |
550 | 551 | ||
551 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv); | 552 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv); |
552 | skb->tstamp = timeval_to_ktime(tv); | 553 | hwts = skb_hwtstamps(skb); |
554 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
553 | 555 | ||
554 | netif_rx(skb); | 556 | netif_rx(skb); |
555 | netdev->stats.rx_packets++; | 557 | netdev->stats.rx_packets++; |
@@ -570,6 +572,7 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if, | |||
570 | u8 err_mask = 0; | 572 | u8 err_mask = 0; |
571 | struct sk_buff *skb; | 573 | struct sk_buff *skb; |
572 | struct timeval tv; | 574 | struct timeval tv; |
575 | struct skb_shared_hwtstamps *hwts; | ||
573 | 576 | ||
574 | /* nothing should be sent while in BUS_OFF state */ | 577 | /* nothing should be sent while in BUS_OFF state */ |
575 | if (dev->can.state == CAN_STATE_BUS_OFF) | 578 | if (dev->can.state == CAN_STATE_BUS_OFF) |
@@ -664,7 +667,8 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if, | |||
664 | dev->can.state = new_state; | 667 | dev->can.state = new_state; |
665 | 668 | ||
666 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv); | 669 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv); |
667 | skb->tstamp = timeval_to_ktime(tv); | 670 | hwts = skb_hwtstamps(skb); |
671 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
668 | netif_rx(skb); | 672 | netif_rx(skb); |
669 | netdev->stats.rx_packets++; | 673 | netdev->stats.rx_packets++; |
670 | netdev->stats.rx_bytes += can_frame->can_dlc; | 674 | netdev->stats.rx_bytes += can_frame->can_dlc; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c index 5d36795877cb..b799ab12a291 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | |||
@@ -237,7 +237,7 @@ static int mlx4_en_dcbnl_ieee_setmaxrate(struct net_device *dev, | |||
237 | if (err) | 237 | if (err) |
238 | return err; | 238 | return err; |
239 | 239 | ||
240 | memcpy(priv->maxrate, tmp, sizeof(*priv->maxrate)); | 240 | memcpy(priv->maxrate, tmp, sizeof(priv->maxrate)); |
241 | 241 | ||
242 | return 0; | 242 | return 0; |
243 | } | 243 | } |
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index d44cca327588..ad86660fb8f9 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -1794,10 +1794,12 @@ static void team_setup(struct net_device *dev) | |||
1794 | 1794 | ||
1795 | dev->features |= NETIF_F_LLTX; | 1795 | dev->features |= NETIF_F_LLTX; |
1796 | dev->features |= NETIF_F_GRO; | 1796 | dev->features |= NETIF_F_GRO; |
1797 | dev->hw_features = NETIF_F_HW_VLAN_TX | | 1797 | dev->hw_features = TEAM_VLAN_FEATURES | |
1798 | NETIF_F_HW_VLAN_TX | | ||
1798 | NETIF_F_HW_VLAN_RX | | 1799 | NETIF_F_HW_VLAN_RX | |
1799 | NETIF_F_HW_VLAN_FILTER; | 1800 | NETIF_F_HW_VLAN_FILTER; |
1800 | 1801 | ||
1802 | dev->hw_features &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_HW_CSUM); | ||
1801 | dev->features |= dev->hw_features; | 1803 | dev->features |= dev->hw_features; |
1802 | } | 1804 | } |
1803 | 1805 | ||
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 3b566fa0f8e6..1ea91f4237f0 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -385,6 +385,7 @@ static const struct usb_device_id products[] = { | |||
385 | }, | 385 | }, |
386 | 386 | ||
387 | /* 3. Combined interface devices matching on interface number */ | 387 | /* 3. Combined interface devices matching on interface number */ |
388 | {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ | ||
388 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, | 389 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, |
389 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, | 390 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, |
390 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, | 391 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 99ac2cb08b43..dedaf81d8f36 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1076,7 +1076,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len, | |||
1076 | } | 1076 | } |
1077 | _iov = iov + ret; | 1077 | _iov = iov + ret; |
1078 | size = reg->memory_size - addr + reg->guest_phys_addr; | 1078 | size = reg->memory_size - addr + reg->guest_phys_addr; |
1079 | _iov->iov_len = min((u64)len, size); | 1079 | _iov->iov_len = min((u64)len - s, size); |
1080 | _iov->iov_base = (void __user *)(unsigned long) | 1080 | _iov->iov_base = (void __user *)(unsigned long) |
1081 | (reg->userspace_addr + addr - reg->guest_phys_addr); | 1081 | (reg->userspace_addr + addr - reg->guest_phys_addr); |
1082 | s += size; | 1082 | s += size; |