-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1
 
 iQEcBAABAgAGBQJXjZGEAAoJEO8Ells5jWIR8z8H/0TDJyMKdRsq2STHKpyAyqyy
 LSeqP90hwoe9q9D0oeaQtmqxkETZl/vMIfJjS4wFnN0GJYXFQsZyq3MdiOL+4G46
 lgfIofSFogUG/wow+0Sklgm+KjeVFsbwGz2E+t45P4FEgy6HjzdWQ6jKAcpa4Bnr
 fd8DwlxCENteI2YeO9cyzYUNvnToJWsvI+dqKbctqPflzFMcVEehq+ExEVqgdqpk
 84MNcQtHIRGUpfahz8TGkqQsdclvPke6B3DLdOWwi9nun9OZ/RJEinS22sahBuIV
 3aG7IQaUoHjvnbwx6ItRTQlv7gXAiVWg9hUDYexsyX6rtMzzDKd751ACXqv4qWw=
 =sVRr
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging

# gpg: Signature made Tue 19 Jul 2016 03:33:40 BST
# gpg:                using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  e1000e: fix building without CONFIG_VMXNET3_PCI
  MAINTAINERS: release Scott from being a rocker maintainer
  tap: fix memory leak on failure to create a multiqueue tap device
  net: fix incorrect argument to iov_to_buf
  net: fix incorrect access to pointer
  e1000e: fix incorrect access to pointer

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-07-19 13:00:35 +01:00
commit d25321f210
5 changed files with 22 additions and 12 deletions

View File

@ -971,7 +971,6 @@ F: hw/net/vmxnet*
F: hw/scsi/vmw_pvscsi* F: hw/scsi/vmw_pvscsi*
Rocker Rocker
M: Scott Feldman <sfeldma@gmail.com>
M: Jiri Pirko <jiri@resnulli.us> M: Jiri Pirko <jiri@resnulli.us>
S: Maintained S: Maintained
F: hw/net/rocker/ F: hw/net/rocker/

View File

@ -7,6 +7,7 @@ common-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o
common-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o common-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o
common-obj-$(CONFIG_PCNET_COMMON) += pcnet.o common-obj-$(CONFIG_PCNET_COMMON) += pcnet.o
common-obj-$(CONFIG_E1000_PCI) += e1000.o e1000x_common.o common-obj-$(CONFIG_E1000_PCI) += e1000.o e1000x_common.o
common-obj-$(CONFIG_E1000E_PCI) += net_tx_pkt.o net_rx_pkt.o
common-obj-$(CONFIG_E1000E_PCI) += e1000e.o e1000e_core.o e1000x_common.o common-obj-$(CONFIG_E1000E_PCI) += e1000e.o e1000e_core.o e1000x_common.o
common-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o common-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
common-obj-$(CONFIG_VMXNET3_PCI) += net_tx_pkt.o net_rx_pkt.o common-obj-$(CONFIG_VMXNET3_PCI) += net_tx_pkt.o net_rx_pkt.o

View File

@ -281,7 +281,7 @@ e1000e_intrmgr_delay_rx_causes(E1000ECore *core, uint32_t *causes)
/* Check if delayed RX interrupts disabled by client /* Check if delayed RX interrupts disabled by client
or if there are causes that cannot be delayed */ or if there are causes that cannot be delayed */
if ((rdtr == 0) || (causes != 0)) { if ((rdtr == 0) || (*causes != 0)) {
return false; return false;
} }
@ -322,7 +322,7 @@ e1000e_intrmgr_delay_tx_causes(E1000ECore *core, uint32_t *causes)
*causes &= ~delayable_causes; *causes &= ~delayable_causes;
/* If there are causes that cannot be delayed */ /* If there are causes that cannot be delayed */
if (causes != 0) { if (*causes != 0) {
return false; return false;
} }

View File

@ -211,7 +211,7 @@ void eth_get_protocols(const struct iovec *iov, int iovcnt,
*l4hdr_off, sizeof(l4hdr_info->hdr.tcp), *l4hdr_off, sizeof(l4hdr_info->hdr.tcp),
&l4hdr_info->hdr.tcp); &l4hdr_info->hdr.tcp);
if (istcp) { if (*istcp) {
*l5hdr_off = *l4hdr_off + *l5hdr_off = *l4hdr_off +
TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp); TCP_HEADER_DATA_OFFSET(&l4hdr_info->hdr.tcp);
@ -418,7 +418,7 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
bytes_read = iov_to_buf(pkt, pkt_frags, bytes_read = iov_to_buf(pkt, pkt_frags,
rthdr_offset + sizeof(*ext_hdr), rthdr_offset + sizeof(*ext_hdr),
dst_addr, sizeof(dst_addr)); dst_addr, sizeof(*dst_addr));
return bytes_read == sizeof(dst_addr); return bytes_read == sizeof(dst_addr);
} }
@ -467,7 +467,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags,
bytes_read = iov_to_buf(pkt, pkt_frags, bytes_read = iov_to_buf(pkt, pkt_frags,
opt_offset + sizeof(opthdr), opt_offset + sizeof(opthdr),
src_addr, sizeof(src_addr)); src_addr, sizeof(*src_addr));
return bytes_read == sizeof(src_addr); return bytes_read == sizeof(src_addr);
} }

View File

@ -787,8 +787,8 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
return -1; return -1;
} }
} else if (tap->has_fds) { } else if (tap->has_fds) {
char **fds = g_new(char *, MAX_TAP_QUEUES); char **fds = g_new0(char *, MAX_TAP_QUEUES);
char **vhost_fds = g_new(char *, MAX_TAP_QUEUES); char **vhost_fds = g_new0(char *, MAX_TAP_QUEUES);
int nfds, nvhosts; int nfds, nvhosts;
if (tap->has_ifname || tap->has_script || tap->has_downscript || if (tap->has_ifname || tap->has_script || tap->has_downscript ||
@ -806,7 +806,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
if (nfds != nvhosts) { if (nfds != nvhosts) {
error_setg(errp, "The number of fds passed does not match " error_setg(errp, "The number of fds passed does not match "
"the number of vhostfds passed"); "the number of vhostfds passed");
return -1; goto free_fail;
} }
} }
@ -814,7 +814,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
fd = monitor_fd_param(cur_mon, fds[i], &err); fd = monitor_fd_param(cur_mon, fds[i], &err);
if (fd == -1) { if (fd == -1) {
error_propagate(errp, err); error_propagate(errp, err);
return -1; goto free_fail;
} }
fcntl(fd, F_SETFL, O_NONBLOCK); fcntl(fd, F_SETFL, O_NONBLOCK);
@ -824,7 +824,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
} else if (vnet_hdr != tap_probe_vnet_hdr(fd)) { } else if (vnet_hdr != tap_probe_vnet_hdr(fd)) {
error_setg(errp, error_setg(errp,
"vnet_hdr not consistent across given tap fds"); "vnet_hdr not consistent across given tap fds");
return -1; goto free_fail;
} }
net_init_tap_one(tap, peer, "tap", name, ifname, net_init_tap_one(tap, peer, "tap", name, ifname,
@ -833,11 +833,21 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
vnet_hdr, fd, &err); vnet_hdr, fd, &err);
if (err) { if (err) {
error_propagate(errp, err); error_propagate(errp, err);
return -1; goto free_fail;
} }
} }
g_free(fds); g_free(fds);
g_free(vhost_fds); g_free(vhost_fds);
return 0;
free_fail:
for (i = 0; i < nfds; i++) {
g_free(fds[i]);
g_free(vhost_fds[i]);
}
g_free(fds);
g_free(vhost_fds);
return -1;
} else if (tap->has_helper) { } else if (tap->has_helper) {
if (tap->has_ifname || tap->has_script || tap->has_downscript || if (tap->has_ifname || tap->has_script || tap->has_downscript ||
tap->has_vnet_hdr || tap->has_queues || tap->has_vhostfds) { tap->has_vnet_hdr || tap->has_queues || tap->has_vhostfds) {