Linux 4.3.4
Greg KH
maintainerI'm announcing the release of the 4.3.4 kernel.
All users of the 4.3 kernel series must upgrade.
The updated 4.3.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.3.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 drivers/acpi/osl.c | 13 + drivers/acpi/sleep.c | 6 drivers/char/tpm/tpm.h | 7 drivers/char/tpm/tpm_crb.c | 32 +--- drivers/char/tpm/tpm_tis.c | 192 ++++++++++++++++++++---- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 drivers/net/ethernet/freescale/gianfar.c | 8 - drivers/net/ethernet/freescale/gianfar.h | 1 drivers/net/ethernet/qualcomm/qca_spi.c | 5 drivers/net/ethernet/renesas/sh_eth.c | 4 drivers/net/phy/micrel.c | 13 + drivers/net/ppp/pppoe.c | 14 + drivers/net/ppp/pptp.c | 6 drivers/net/usb/cdc_mbim.c | 26 +++ drivers/net/usb/cdc_ncm.c | 10 + drivers/net/usb/r8152.c | 21 -- drivers/net/vrf.c | 14 + drivers/platform/x86/toshiba_acpi.c | 1 drivers/usb/class/cdc-acm.c | 5 drivers/usb/core/config.c | 3 drivers/usb/core/hub.c | 22 +- drivers/usb/core/quirks.c | 6 drivers/usb/gadget/udc/pxa27x_udc.c | 3 drivers/usb/host/ohci-at91.c | 11 - drivers/usb/host/whci/qset.c | 4 drivers/usb/musb/Kconfig | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/usb-serial-simple.c | 1 drivers/usb/storage/uas.c | 4 drivers/usb/storage/unusual_devs.h | 2 drivers/usb/storage/unusual_uas.h | 2 include/linux/acpi.h | 6 include/linux/usb/quirks.h | 3 include/net/dst.h | 33 ++++ include/net/inetpeer.h | 1 include/net/sock.h | 5 include/net/vxlan.h | 2 include/uapi/linux/Kbuild | 1 lib/rhashtable.c | 25 +-- net/ax25/af_ax25.c | 3 net/bluetooth/sco.c | 3 net/core/skbuff.c | 6 net/core/sock.c | 5 net/decnet/af_decnet.c | 3 net/ipv4/af_inet.c | 3 net/ipv4/fou.c | 3 net/ipv4/tcp_ipv4.c | 5 net/ipv4/tcp_output.c | 23 +- net/ipv6/addrconf.c | 8 - net/ipv6/af_inet6.c | 3 net/ipv6/ip6_gre.c | 8 - net/ipv6/tcp_ipv6.c | 3 net/irda/af_irda.c | 3 net/openvswitch/conntrack.c | 16 +- net/sched/sch_api.c | 2 net/sctp/ipv6.c | 8 + net/sctp/sm_make_chunk.c | 4 net/sctp/socket.c | 4 net/socket.c | 1 net/tipc/udp_media.c | 2 net/unix/af_unix.c | 13 - security/keys/keyctl.c | 18 +- security/keys/process_keys.c | 1 64 files changed, 486 insertions(+), 186 deletions(-)
Alan Stern (1):
USB: add quirk for devices with broken LPM
Alexandre Belloni (1):
USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq
Alexey Khoroshilov (1):
USB: whci-hcd: add check for dma mapping error
Andrew Lunn (1):
phy: micrel: Fix finding PHY properties in MAC node.
Arnd Bergmann (1):
usb: musb: USB_TI_CPPI41_DMA requires dmaengine support
Azael Avalos (1):
toshiba_acpi: Initialize hotkey_event_type variable
Ben Hutchings (3):
Revert "vrf: fix double free and memory corruption on register_netdevice failure"
tipc: Fix kfree_skb() of uninitialised pointer
usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message
Bjørn Mork (2):
ipv6: keep existing flags when setting IFA_F_OPTIMISTIC
net: cdc_mbim: add "NDP to end" quirk for Huawei E3372
Chen Yu (3):
ACPI: Use correct IRQ when uninstalling ACPI interrupt handler
ACPI: Using correct irq when waiting for events
ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idle
David Howells (1):
KEYS: Fix race between read and revoke
David S. Miller (1):
bluetooth: Validate socket address length in sco_sock_bind().
Dmitry Katsubo (1):
usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron
Eric Dumazet (5):
ipv6: sctp: clone options to avoid use after free
net: fix IP early demux races
net_sched: make qdisc_tree_decrease_qlen() work for non mq
inet: tcp: fix inetpeer_set_addr_v4()
tcp: restore fastopen with no data in SYN packet
Felipe Balbi (1):
usb: gadget: pxa27x: fix suspend callback
Greg Kroah-Hartman (1):
Linux 4.3.4
Guillaume Nault (1):
pppoe: fix memory corruption in padt work structure
Hamish Martin (1):
gianfar: Don't enable RX Filer if not supported
Hannes Frederic Sowa (3):
net: add validation for the socket syscall protocol argument
ipv6: automatically enable stable privacy mode if stable_secret set
fou: clean up socket with kfree_rcu
Hans Yang (1):
usb: core : hub: Fix BOS 'NULL pointer' kernel panic
Herbert Xu (2):
rhashtable: Enforce minimum size on initial hash table
rhashtable: Fix walker list corruption
Jarkko Sakkinen (1):
tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0
Jiri Benc (1):
vxlan: fix incorrect RCO bit in VXLAN header
Joe Stringer (2):
openvswitch: Fix helper reference leak
openvswitch: Respect conntrack zone even if invalid
Jonas Jonsson (2):
USB: cdc_acm: Ignore Infineon Flash Loader utility
USB: serial: Another Infineon flash loader USB ID
Konstantin Shkolnyy (1):
USB: cp210x: Remove CP2110 ID from compatibility list
Marcelo Ricardo Leitner (3):
sctp: use the same clock as if sock source timestamps were on
sctp: update the netstamp_needed counter when copying sockets
sctp: also copy sk_tsflags when copying the socket
Nicolas Dichtel (1):
gre6: allow to update all parameters via rtnl
Nikolay Aleksandrov (1):
vrf: fix double free and memory corruption on register_netdevice failure
Pavel Machek (1):
atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation
Peter Wu (1):
r8152: fix lockup when runtime PM is enabled
Rainer Weikusat (1):
af_unix: Revert 'lock_interruptible' in stream receive code
Sergei Shtylyov (1):
sh_eth: fix kernel oops in skb_put()
Stefan Wahren (1):
net: qca_spi: fix transmit queue timeout handling
Vlad Yasevich (2):
vlan: Fix untag operations of stacked vlans with REORDER_HEADER off
skbuff: Fix offset error in skb_reorder_vlan_header
WANG Cong (2):
pptp: verify sockaddr_len in pptp_bind() and pptp_connect()
net: check both type and procotol for tcp sockets
Yevgeny Pats (1):
KEYS: Fix keyring ref leak in join_session_keyring()
stephen hemminger (1):
uapi: export ila.h
[email protected] (1):
net: fix uninitialized variable issue
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 3 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Blurry Fish Butt
drivers/acpi/osl.c +8 -5
@@ -81,6 +81,7 @@ static struct workqueue_struct *kacpid_wq;static struct workqueue_struct *kacpi_notify_wq;static struct workqueue_struct *kacpi_hotplug_wq;static bool acpi_os_initialized; +unsigned int acpi_sci_irq =INVALID_ACPI_IRQ ;/* * This list of permanent mappings is for memory that may be accessed from
@@ -856,17 +857,19 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, acpi_irq_handler =NULL ;return AE_NOT_ACQUIRED ; } + acpi_sci_irq = irq;return AE_OK ; } -acpi_status acpi_os_remove_interrupt_handler (u32 irq,acpi_osd_handler handler) +acpi_status acpi_os_remove_interrupt_handler (u32 gsi,acpi_osd_handler handler) { -if (irq != acpi_gbl_FADT.sci_interrupt) +if (gsi != acpi_gbl_FADT.sci_interrupt || !acpi_sci_irq_valid ())return AE_BAD_PARAMETER ; -free_irq (irq, acpi_irq); +free_irq (acpi_sci_irq, acpi_irq); acpi_irq_handler =NULL ; + acpi_sci_irq =INVALID_ACPI_IRQ ;return AE_OK ; }
@@ -1180,8 +1183,8 @@ void acpi_os_wait_events_complete(void)* Make sure the GPE handler or the fixed event handler is not used * on another CPU after removal. */ -if (acpi_irq_handler) -synchronize_hardirq (acpi_gbl_FADT.sci_interrupt); +if (acpi_sci_irq_valid ()) +synchronize_hardirq (acpi_sci_irq);flush_workqueue (kacpid_wq);flush_workqueue (kacpi_notify_wq); }
drivers/acpi/sleep.c +4 -2
@@ -632,14 +632,16 @@ static int acpi_freeze_prepare(void)acpi_enable_wakeup_devices (ACPI_STATE_S0 );acpi_enable_all_wakeup_gpes ();acpi_os_wait_events_complete (); -enable_irq_wake (acpi_gbl_FADT.sci_interrupt); +if (acpi_sci_irq_valid ()) +enable_irq_wake (acpi_sci_irq);return 0 ; }static void acpi_freeze_restore (void ) {acpi_disable_wakeup_devices (ACPI_STATE_S0 ); -disable_irq_wake (acpi_gbl_FADT.sci_interrupt); +if (acpi_sci_irq_valid ()) +disable_irq_wake (acpi_sci_irq);acpi_enable_all_runtime_gpes (); }
drivers/char/tpm/tpm.h +7 -0
@@ -115,6 +115,13 @@ enum tpm2_startup_types { TPM2_SU_STATE = 0x0001, }; +enum tpm2_start_method { +TPM2_START_ACPI =2 , +TPM2_START_FIFO =6 , +TPM2_START_CRB =7 , +TPM2_START_CRB_WITH_ACPI =8 , +}; +struct tpm_chip ;struct tpm_vendor_specific {
drivers/char/tpm/tpm_crb.c +11 -21
@@ -34,12 +34,6 @@ enum crb_defaults { CRB_ACPI_START_INDEX = 1, }; -enum crb_start_method { -CRB_SM_ACPI_START =2 , -CRB_SM_CRB =7 , -CRB_SM_CRB_WITH_ACPI_START =8 , -}; -struct acpi_tpm2 {struct acpi_table_header hdr;u16 platform_class;
@@ -220,12 +214,6 @@ static int crb_acpi_add(struct acpi_device *device)u64 pa;int rc; - chip =tpmm_chip_alloc (dev, &tpm_crb); -if (IS_ERR (chip)) -return PTR_ERR (chip); - - chip->flags =TPM_CHIP_FLAG_TPM2 ; - status =acpi_get_table (ACPI_SIG_TPM2 ,1 , (struct acpi_table_header **) &buf);if (ACPI_FAILURE (status)) {
@@ -233,13 +221,15 @@ static int crb_acpi_add(struct acpi_device *device)return -ENODEV ; } -/* At least some versions of AMI BIOS have a bug that TPM2 table has -* zero address for the control area and therefore we must fail. -*/ -if (!buf->control_area_pa) { -dev_err (dev,"TPM2 ACPI table has a zero address for the control area\n" ); -return -EINVAL ; - } +/* Should the FIFO driver handle this? */ +if (buf->start_method ==TPM2_START_FIFO ) +return -ENODEV ; + + chip =tpmm_chip_alloc (dev, &tpm_crb); +if (IS_ERR (chip)) +return PTR_ERR (chip); + + chip->flags =TPM_CHIP_FLAG_TPM2 ;if (buf->hdr.length <sizeof (struct acpi_tpm2 )) {dev_err (dev,"TPM2 ACPI table has wrong size" );
@@ -259,11 +249,11 @@ static int crb_acpi_add(struct acpi_device *device)* report only ACPI start but in practice seems to require both * ACPI start and CRB start. */ -if (sm ==CRB_SM_CRB || sm ==CRB_SM_CRB_WITH_ACPI_START || +if (sm ==TPM2_START_CRB || sm ==TPM2_START_FIFO || !strcmp (acpi_device_hid (device),"MSFT0101" )) priv->flags |=CRB_FL_CRB_START ; -if (sm ==CRB_SM_ACPI_START || sm ==CRB_SM_CRB_WITH_ACPI_START ) +if (sm ==TPM2_START_ACPI || sm ==TPM2_START_CRB_WITH_ACPI ) priv->flags |=CRB_FL_ACPI_START ; priv->cca = (struct crb_control_area __iomem *)
drivers/char/tpm/tpm_tis.c +163 -29
294 lines not on this page · raw message
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +3 -4
@@ -1016,13 +1016,12 @@ static int atl1c_setup_ring_resources(struct atl1c_adapter *adapter)sizeof (struct atl1c_recv_ret_status ) * rx_desc_count +8 *4 ; - ring_header->desc =pci_alloc_consistent (pdev, ring_header->size, - &ring_header->dma); + ring_header->desc =dma_zalloc_coherent (&pdev->dev, ring_header->size, + &ring_header->dma,GFP_KERNEL );if (unlikely (!ring_header->desc)) { -dev_err (&pdev->dev,"pci_alloc_consistend failed\n" ); +dev_err (&pdev->dev,"could not get memory for DMA buffer\n" ); goto err_nomem; } -memset (ring_header->desc,0 , ring_header->size);/* init TPD ring */ tpd_ring[0 ].dma =roundup (ring_header->dma,8 );
drivers/net/ethernet/freescale/gianfar.c +5 -3
@@ -894,7 +894,8 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)FSL_GIANFAR_DEV_HAS_VLAN |FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |FSL_GIANFAR_DEV_HAS_EXTENDED_HASH | -FSL_GIANFAR_DEV_HAS_TIMER ; +FSL_GIANFAR_DEV_HAS_TIMER | +FSL_GIANFAR_DEV_HAS_RX_FILER ; err =of_property_read_string (np,"phy-connection-type" , &ctype);
@@ -1393,8 +1394,9 @@ static int gfar_probe(struct platform_device *ofdev) priv->rx_queue[i]->rxic =DEFAULT_RXIC ; } -/* always enable rx filer */ - priv->rx_filer_enable =1 ; +/* Always enable rx filer if available */ + priv->rx_filer_enable = + (priv->device_flags &FSL_GIANFAR_DEV_HAS_RX_FILER ) ?1 :0 ;/* Enable most messages by default */ priv->msg_enable = (NETIF_MSG_IFUP <<1 ) -1 ;/* use pritority h/w tx queue scheduling for single queue devices */
drivers/net/ethernet/freescale/gianfar.h +1 -0
@@ -917,6 +917,7 @@ struct gfar {#define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200#define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400#define FSL_GIANFAR_DEV_HAS_TIMER 0x00000800 +#define FSL_GIANFAR_DEV_HAS_RX_FILER 0x00002000#if (MAXGROUPS ==2 )#define DEFAULT_MAPPING 0xAA
drivers/net/ethernet/qualcomm/qca_spi.c +2 -3
@@ -736,9 +736,8 @@ qcaspi_netdev_tx_timeout(struct net_device *dev)netdev_info (qca->net_dev,"Transmit timeout at %ld, latency %ld\n" , jiffies, jiffies - dev->trans_start); qca->net_dev->stats.tx_errors++; -/* wake the queue if there is room */ -if (qcaspi_tx_ring_has_space (&qca->txr)) -netif_wake_queue (dev); +/* Trigger tx queue flush and QCA7000 reset */ + qca->sync =QCASPI_SYNC_UNKNOWN ; } static int
drivers/net/ethernet/renesas/sh_eth.c +2 -2
@@ -1481,6 +1481,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)if (mdp->cd->shift_rd0) desc_status >>=16 ; + skb = mdp->rx_skbuff[entry];if (desc_status & (RD_RFS1 |RD_RFS2 |RD_RFS3 |RD_RFS4 |RD_RFS5 |RD_RFS6 |RD_RFS10 )) { ndev->stats.rx_errors++;
@@ -1496,12 +1497,11 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota) ndev->stats.rx_missed_errors++;if (desc_status &RD_RFS10 ) ndev->stats.rx_over_errors++; - }else { + }else if (skb) {if (!mdp->cd->hw_swap)sh_eth_soft_swap (phys_to_virt (ALIGN (rxdesc->addr,4 )), pkt_len +2 ); - skb = mdp->rx_skbuff[entry]; mdp->rx_skbuff[entry] =NULL ;if (mdp->cd->rpadir)skb_reserve (skb,NET_IP_ALIGN );
drivers/net/phy/micrel.c +11 -2
@@ -339,9 +339,18 @@ static int ksz9021_config_init(struct phy_device *phydev) {const struct device *dev = &phydev->dev;const struct device_node *of_node = dev->of_node; +const struct device *dev_walker; -if (!of_node && dev->parent->of_node) - of_node = dev->parent->of_node; +/* The Micrel driver has a deprecated option to place phy OF +* properties in the MAC node. Walk up the tree of devices to +* find a device with an OF node. +*/ + dev_walker = &phydev->dev; +do { + of_node = dev_walker->of_node; + dev_walker = dev_walker->parent; + + }while (!of_node && dev_walker);if (of_node) { ksz9021_load_values_from_of(phydev, of_node,
drivers/net/ppp/pppoe.c +10 -4
@@ -568,6 +568,9 @@ static int pppoe_create(struct net *net, struct socket *sock, int kern) sk->sk_family =PF_PPPOX ; sk->sk_protocol =PX_PROTO_OE ; +INIT_WORK (&pppox_sk (sk)->proto.pppoe.padt_work, + pppoe_unbind_sock_work); +return 0 ; }
@@ -632,8 +635,6 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,lock_sock (sk); -INIT_WORK (&po->proto.pppoe.padt_work, pppoe_unbind_sock_work); - error = -EINVAL ;if (sp->sa_protocol !=PX_PROTO_OE ) goto end;
@@ -663,8 +664,13 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr, po->pppoe_dev =NULL ; } -memset (sk_pppox (po) +1 ,0 , -sizeof (struct pppox_sock ) -sizeof (struct sock )); + po->pppoe_ifindex =0 ; +memset (&po->pppoe_pa,0 ,sizeof (po->pppoe_pa)); +memset (&po->pppoe_relay,0 ,sizeof (po->pppoe_relay)); +memset (&po->chan,0 ,sizeof (po->chan)); + po->next =NULL ; + po->num =0 ; + sk->sk_state =PPPOX_NONE ; }
drivers/net/ppp/pptp.c +6 -0
@@ -418,6 +418,9 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,struct pptp_opt *opt = &po->proto.pptp;int error =0 ; +if (sockaddr_len <sizeof (struct sockaddr_pppox )) +return -EINVAL ; +lock_sock (sk); opt->src_addr = sp->sa_addr.pptp;
@@ -439,6 +442,9 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,struct flowi4 fl4;int error =0 ; +if (sockaddr_len <sizeof (struct sockaddr_pppox )) +return -EINVAL ; +if (sp->sa_protocol !=PX_PROTO_PPTP )return -EINVAL ;
drivers/net/usb/cdc_mbim.c +25 -1
@@ -158,7 +158,7 @@ static int cdc_mbim_bind(struct usbnet *dev, struct usb_interface *intf)if (!cdc_ncm_comm_intf_is_mbim (intf->cur_altsetting)) goto err; - ret =cdc_ncm_bind_common (dev, intf, data_altsetting,0 ); + ret =cdc_ncm_bind_common (dev, intf, data_altsetting, dev->driver_info->data);if (ret) goto err;
@@ -582,6 +582,26 @@ static const struct driver_info cdc_mbim_info_zlp = { .tx_fixup = cdc_mbim_tx_fixup, }; +/* The spefication explicitly allows NDPs to be placed anywhere in the +* frame, but some devices fail unless the NDP is placed after the IP +* packets. Using the CDC_NCM_FLAG_NDP_TO_END flags to force this +* behaviour. +* +* Note: The current implementation of this feature restricts each NTB +* to a single NDP, implying that multiplexed sessions cannot share an +* NTB. This might affect performace for multiplexed sessions. +*/ +static const struct driver_info cdc_mbim_info_ndp_to_end = { + .description ="CDC MBIM" , + .flags =FLAG_NO_SETINT |FLAG_MULTI_PACKET |FLAG_WWAN , + .bind = cdc_mbim_bind, + .unbind = cdc_mbim_unbind, + .manage_power = cdc_mbim_manage_power, + .rx_fixup = cdc_mbim_rx_fixup, + .tx_fixup = cdc_mbim_tx_fixup, + .data =CDC_NCM_FLAG_NDP_TO_END , +}; +static const struct usb_device_id mbim_devs[] = {/* This duplicate NCM entry is intentional. MBIM devices can * be disguised as NCM by default, and this is necessary to
@@ -597,6 +617,10 @@ static const struct usb_device_id mbim_devs[] = { { USB_VENDOR_AND_INTERFACE_INFO(0x0bdb, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), .driver_info = (unsigned long )&cdc_mbim_info, }, + /* Huawei E3372 fails unless NDP comes after the IP packets */ + { USB_DEVICE_AND_INTERFACE_INFO(0x12d1, 0x157d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), + .driver_info = (unsigned long)&cdc_mbim_info_ndp_to_end, + }, /* default entry */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), .driver_info = (unsigned long)&cdc_mbim_info_zlp,
drivers/net/usb/cdc_ncm.c +9 -1
@@ -1006,10 +1006,18 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm_ndp(struct cdc_ncm_ctx *ctx, struct sk_* NTH16 header as we would normally do. NDP isn't written to the SKB yet, and * the wNdpIndex field in the header is actually not consistent with reality. It will be later. */ -if (ctx->drvflags &CDC_NCM_FLAG_NDP_TO_END ) +if (ctx->drvflags &CDC_NCM_FLAG_NDP_TO_END ) {if (ctx->delayed_ndp16->dwSignature == sign)return ctx->delayed_ndp16; +/* We can only push a single NDP to the end. Return +* NULL to send what we've already got and queue this +* skb for later. +*/ +else if (ctx->delayed_ndp16->dwSignature) +return NULL ; + } +/* follow the chain of NDPs, looking for a match */ while (ndpoffset) { ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb->data + ndpoffset);
drivers/net/usb/r8152.c +3 -18
@@ -3067,17 +3067,6 @@ static int rtl8152_open(struct net_device *netdev)mutex_lock (&tp->control); -/* The WORK_ENABLE may be set when autoresume occurs */ -if (test_bit (WORK_ENABLE , &tp->flags)) { -clear_bit (WORK_ENABLE , &tp->flags); -usb_kill_urb (tp->intr_urb); -cancel_delayed_work_sync (&tp->schedule); - -/* disable the tx/rx, if the workqueue has enabled them. */ -if (netif_carrier_ok (netdev)) - tp->rtl_ops.disable (tp); - } - tp->rtl_ops.up (tp); rtl8152_set_speed(tp, AUTONEG_ENABLE,
@@ -3124,12 +3113,6 @@ static int rtl8152_close(struct net_device *netdev) }else {mutex_lock (&tp->control); -/* The autosuspend may have been enabled and wouldn't -* be disable when autoresume occurs, because the -* netif_running() would be false. -*/ -rtl_runtime_suspend_enable (tp, false); - tp->rtl_ops.down (tp);mutex_unlock (&tp->control);
@@ -3512,7 +3495,7 @@ static int rtl8152_resume(struct usb_interface *intf)netif_device_attach (tp->netdev); } -if (netif_running (tp->netdev)) { +if (netif_running (tp->netdev) && tp->netdev->flags &IFF_UP ) {if (test_bit (SELECTIVE_SUSPEND , &tp->flags)) {rtl_runtime_suspend_enable (tp, false);clear_bit (SELECTIVE_SUSPEND , &tp->flags);
@@ -3532,6 +3515,8 @@ static int rtl8152_resume(struct usb_interface *intf) }usb_submit_urb (tp->intr_urb,GFP_KERNEL ); }else if (test_bit (SELECTIVE_SUSPEND , &tp->flags)) { +if (tp->netdev->flags &IFF_UP ) +rtl_runtime_suspend_enable (tp, false);clear_bit (SELECTIVE_SUSPEND , &tp->flags); }
drivers/net/vrf.c +12 -2
@@ -581,6 +581,7 @@ static int vrf_newlink(struct net *src_net, struct net_device *dev, {struct net_vrf *vrf =netdev_priv (dev);struct net_vrf_dev *vrf_ptr; +int err;if (!data || !data[IFLA_VRF_TABLE ])return -EINVAL ;
@@ -589,16 +590,25 @@ static int vrf_newlink(struct net *src_net, struct net_device *dev, dev->priv_flags |=IFF_VRF_MASTER ; + err = -ENOMEM ; vrf_ptr =kmalloc (sizeof (*dev->vrf_ptr),GFP_KERNEL );if (!vrf_ptr) -return -ENOMEM ; + goto out_fail; vrf_ptr->ifindex = dev->ifindex; vrf_ptr->tb_id = vrf->tb_id; + err =register_netdevice (dev); +if (err <0 ) + goto out_fail; +rcu_assign_pointer (dev->vrf_ptr, vrf_ptr); -return register_netdev (dev); +return 0 ; + +out_fail: +kfree (vrf_ptr); +return err; }static size_t vrf_nl_getsize (const struct net_device *dev)
drivers/platform/x86/toshiba_acpi.c +1 -0
@@ -2676,6 +2676,7 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev) ret =toshiba_function_keys_get (dev, &special_functions); dev->kbd_function_keys_supported = !ret; + dev->hotkey_event_type =0 ;if (toshiba_acpi_setup_keyboard (dev))pr_info ("Unable to activate hotkeys\n" );
drivers/usb/class/cdc-acm.c +5 -0
@@ -1838,6 +1838,11 @@ static const struct usb_device_id acm_ids[] = { },#endif +/* Exclude Infineon Flash Loader utility */ + { USB_DEVICE(0x058b, 0x0041), + .driver_info =IGNORE_DEVICE , + }, + /* control interfaces without any protocol set */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, USB_CDC_PROTO_NONE) },
drivers/usb/core/config.c +2 -1
@@ -115,7 +115,8 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, USB_SS_MULT(desc->bmAttributes) > 3) {dev_warn (ddev,"Isoc endpoint has Mult of %d in " "config %d interface %d altsetting %d ep %d: " -"setting to 3\n" , desc->bmAttributes +1 , +"setting to 3\n" , +USB_SS_MULT (desc->bmAttributes), cfgno, inum, asnum, ep->desc.bEndpointAddress); ep->ss_ep_comp.bmAttributes =2 ; }
drivers/usb/core/hub.c +14 -8
@@ -124,6 +124,10 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)int usb_device_supports_lpm (struct usb_device *udev) { +/* Some devices have trouble with LPM */ +if (udev->quirks &USB_QUIRK_NO_LPM ) +return 0 ; +/* USB 2.1 (and greater) devices indicate LPM support through * their USB 2.0 Extended Capabilities BOS descriptor. */
@@ -4503,6 +4507,8 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, goto fail; } +usb_detect_quirks (udev); +if (udev->wusb ==0 &&le16_to_cpu (udev->descriptor.bcdUSB) >=0x0201 ) { retval =usb_get_bos_descriptor (udev);if (!retval) {
@@ -4701,7 +4707,6 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,if (status <0 ) goto loop; -usb_detect_quirks (udev);if (udev->quirks &USB_QUIRK_DELAY_INIT )msleep (1000 );
@@ -5317,9 +5322,6 @@ static int usb_reset_and_verify_device(struct usb_device *udev)if (udev->usb2_hw_lpm_enabled ==1 )usb_set_usb2_hardware_lpm (udev,0 ); - bos = udev->bos; - udev->bos =NULL ; -/* Disable LPM and LTM while we reset the device and reinstall the alt * settings. Device-initiated LPM settings, and system exit latency * settings are cleared when the device is reset, so we have to set
@@ -5328,15 +5330,18 @@ static int usb_reset_and_verify_device(struct usb_device *udev) ret =usb_unlocked_disable_lpm (udev);if (ret) {dev_err (&udev->dev,"%s Failed to disable LPM\n." , __func__); - goto re_enumerate; + goto re_enumerate_no_bos; } ret =usb_disable_ltm (udev);if (ret) {dev_err (&udev->dev,"%s Failed to disable LTM\n." , __func__); - goto re_enumerate; + goto re_enumerate_no_bos; } + bos = udev->bos; + udev->bos =NULL ; +for (i =0 ; i <SET_CONFIG_TRIES ; ++i) {/* ep0 maxpacket size may change; let the HCD know about it.
@@ -5433,10 +5438,11 @@ done:return 0 ; re_enumerate: -/* LPM state doesn't matter when we're about to destroy the device. */ -hub_port_logical_disconnect (parent_hub, port1);usb_release_bos_descriptor (udev); udev->bos = bos; +re_enumerate_no_bos: +/* LPM state doesn't matter when we're about to destroy the device. */ +hub_port_logical_disconnect (parent_hub, port1);return -ENODEV ; }
drivers/usb/core/quirks.c +6 -0
@@ -199,6 +199,12 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x1a0a, 0x0200), .driver_info = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + /* Blackmagic Design Intensity Shuttle */ + { USB_DEVICE(0x1edb, 0xbd3b), .driver_info = USB_QUIRK_NO_LPM }, + + /* Blackmagic Design UltraStudio SDI */ + { USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM }, + { } /* terminating entry must be last */ };
drivers/usb/gadget/udc/pxa27x_udc.c +3 -0
@@ -2536,6 +2536,9 @@ static int pxa_udc_suspend(struct platform_device *_dev, pm_message_t state) udc->pullup_resume = udc->pullup_on;dplus_pullup (udc,0 ); +if (udc->driver) + udc->driver->disconnect (&udc->gadget); +return 0 ; }
drivers/usb/host/ohci-at91.c +5 -6
@@ -473,6 +473,8 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)if (!pdata)return -ENOMEM ; + pdev->dev.platform_data = pdata; +if (!of_property_read_u32 (np,"num-ports" , &ports)) pdata->ports = ports;
@@ -483,6 +485,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)*/ if (i >= pdata->ports) { pdata->vbus_pin[i] = -EINVAL ; + pdata->overcurrent_pin[i] = -EINVAL ;continue ; }
@@ -513,10 +516,8 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) }at91_for_each_port (i) { -if (i >= pdata->ports) { - pdata->overcurrent_pin[i] = -EINVAL ; -continue ; - } +if (i >= pdata->ports) +break ; pdata->overcurrent_pin[i] =of_get_named_gpio_flags (np,"atmel,oc-gpio" , i, &flags);
@@ -552,8 +553,6 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) } } - pdev->dev.platform_data = pdata; -device_init_wakeup (&pdev->dev,1 );return usb_hcd_at91_probe (&ohci_at91_hc_driver, pdev); }
drivers/usb/host/whci/qset.c +4 -0
@@ -377,6 +377,10 @@ static int qset_fill_page_list(struct whc *whc, struct whc_std *std, gfp_t mem_fif (std->pl_virt ==NULL )return -ENOMEM ; std->dma_addr =dma_map_single (whc->wusbhc.dev, std->pl_virt, pl_len,DMA_TO_DEVICE ); +if (dma_mapping_error (whc->wusbhc.dev, std->dma_addr)) { +kfree (std->pl_virt); +return -EFAULT ; + }for (p =0 ; p < std->num_pointers; p++) { std->pl_virt[p].buf_ptr =cpu_to_le64 (dma_addr);
drivers/usb/musb/Kconfig +1 -1
@@ -159,7 +159,7 @@ config USB_TI_CPPI_DMA config USB_TI_CPPI41_DMA bool 'TI CPPI 4.1 (AM335x)' - depends on ARCH_OMAP + depends on ARCH_OMAP && DMADEVICES select TI_CPPI41 config USB_TUSB_OMAP_DMA
drivers/usb/serial/cp210x.c +0 -1
@@ -132,7 +132,6 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ - { USB_DEVICE(0x10C4, 0xEA80) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
drivers/usb/serial/usb-serial-simple.c +1 -0
@@ -53,6 +53,7 @@ DEVICE(funsoft, FUNSOFT_IDS);/* Infineon Flashloader driver */ #define FLASHLOADER_IDS () \ + { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \ { USB_DEVICE(0x8087, 0x0716) }DEVICE (flashloader,FLASHLOADER_IDS );
drivers/usb/storage/uas.c +4 -0
@@ -796,6 +796,10 @@ static int uas_slave_configure(struct scsi_device *sdev)if (devinfo->flags &US_FL_NO_REPORT_OPCODES ) sdev->no_report_opcodes =1 ; +/* A few buggy USB-ATA bridges don't understand FUA */ +if (devinfo->flags &US_FL_BROKEN_FUA ) + sdev->broken_fua =1 ; +scsi_change_queue_depth (sdev, devinfo->qdepth -2 );return 0 ; }
drivers/usb/storage/unusual_devs.h +1 -1
@@ -1987,7 +1987,7 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, US_FL_IGNORE_RESIDUE ),/* Reported by Michael B�sch <[email protected]> */ -UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114, +UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, "JMicron", "USB to ATA/ATAPI Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL,
drivers/usb/storage/unusual_uas.h +1 -1
@@ -132,7 +132,7 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, "JMicron", "JMS567", USB_SC_DEVICE, USB_PR_DEVICE, NULL, - US_FL_NO_REPORT_OPCODES), + US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),/* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
include/linux/acpi.h +6 -0
@@ -193,6 +193,12 @@ int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base);void acpi_irq_stats_init (void );extern u32 acpi_irq_handled;extern u32 acpi_irq_not_handled; +extern unsigned int acpi_sci_irq; +#define INVALID_ACPI_IRQ ((unsigned)-1) +static inline bool acpi_sci_irq_valid (void ) +{ +return acpi_sci_irq !=INVALID_ACPI_IRQ ; +}extern int sbf_port;extern unsigned long acpi_realmode_flags;
include/linux/usb/quirks.h +3 -0
@@ -47,4 +47,7 @@/* device generates spurious wakeup, ignore remote wakeup capability */ #define USB_QUIRK_IGNORE_REMOTE_WAKEUP BIT(9) +/* device can't handle Link Power Management */ +#define USB_QUIRK_NO_LPM BIT(10) +#endif /* __LINUX_USB_QUIRKS_H */
include/net/dst.h +33 -0
@@ -322,6 +322,39 @@ static inline void skb_dst_force(struct sk_buff *skb) } } +/** +* dst_hold_safe - Take a reference on a dst if possible +* @dst: pointer to dst entry +* +* This helper returns false if it could not safely +* take a reference on a dst. +*/ +static inline bool dst_hold_safe (struct dst_entry *dst) +{ +if (dst->flags &DST_NOCACHE ) +return atomic_inc_not_zero (&dst->__refcnt); +dst_hold (dst); +return true; +} + +/** +* skb_dst_force_safe - makes sure skb dst is refcounted +* @skb: buffer +* +* If dst is not yet refcounted and not destroyed, grab a ref on it. +*/ +static inline void skb_dst_force_safe (struct sk_buff *skb) +{ +if (skb_dst_is_noref (skb)) { +struct dst_entry *dst =skb_dst (skb); + +if (!dst_hold_safe (dst)) + dst =NULL ; + + skb->_skb_refdst = (unsigned long )dst; + } +} +/** * __skb_tunnel_rx - prepare skb for rx reinsert
include/net/inetpeer.h +1 -0
@@ -78,6 +78,7 @@ void inet_initpeers(void) __init;static inline void inetpeer_set_addr_v4 (struct inetpeer_addr *iaddr,__be32 ip) { iaddr->a4.addr = ip; + iaddr->a4.vif =0 ; iaddr->family =AF_INET ; }
include/net/sock.h +4 -1
@@ -387,6 +387,7 @@ struct sock { sk_no_check_rx : 1, sk_userlocks : 4, sk_protocol : 8, +#define SK_PROTOCOL_MAX U8_MAX sk_type :16 ;kmemcheck_bitfield_end (flags);int sk_wmem_queued;
@@ -724,6 +725,8 @@ enum sock_flags { SOCK_SELECT_ERR_QUEUE, /* Wake select on error queue */ }; +#define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE)) +static inline void sock_copy_flags (struct sock *nsk,struct sock *osk) { nsk->sk_flags = osk->sk_flags;
@@ -798,7 +801,7 @@ void sk_stream_write_space(struct sock *sk);static inline void __sk_add_backlog (struct sock *sk,struct sk_buff *skb) {/* dont let skb dst not refcounted, we are going to leave rcu lock */ -skb_dst_force (skb); +skb_dst_force_safe (skb);if (!sk->sk_backlog.tail) sk->sk_backlog.head = skb;
include/net/vxlan.h +1 -1
@@ -79,7 +79,7 @@ struct vxlanhdr { };/* VXLAN header flags. */ -#define VXLAN_HF_RCO BIT(24) +#define VXLAN_HF_RCO BIT(21)#define VXLAN_HF_VNI BIT(27)#define VXLAN_HF_GBP BIT(31)
include/uapi/linux/Kbuild +1 -0
@@ -186,6 +186,7 @@ header-y += if_tunnel.h header-y += if_vlan.h header-y += if_x25.h header-y += igmp.h +header-y += ila.h header-y += in6.h header-y += inet_diag.h header-y += in.h
lib/rhashtable.c +12 -13
@@ -503,10 +503,11 @@ int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter)if (!iter->walker)return -ENOMEM ; -mutex_lock (&ht->mutex); - iter->walker->tbl =rht_dereference (ht->tbl, ht); +spin_lock (&ht->lock); + iter->walker->tbl = +rcu_dereference_protected (ht->tbl,lockdep_is_held (&ht->lock));list_add (&iter->walker->list, &iter->walker->tbl->walkers); -mutex_unlock (&ht->mutex); +spin_unlock (&ht->lock);return 0 ; }
@@ -520,10 +521,10 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_init);*/ void rhashtable_walk_exit (struct rhashtable_iter *iter) { -mutex_lock (&iter->ht->mutex); +spin_lock (&iter->ht->lock);if (iter->walker->tbl)list_del (&iter->walker->list); -mutex_unlock (&iter->ht->mutex); +spin_unlock (&iter->ht->lock);kfree (iter->walker); }EXPORT_SYMBOL_GPL (rhashtable_walk_exit);
@@ -547,14 +548,12 @@ int rhashtable_walk_start(struct rhashtable_iter *iter) {struct rhashtable *ht = iter->ht; -mutex_lock (&ht->mutex); +rcu_read_lock (); +spin_lock (&ht->lock);if (iter->walker->tbl)list_del (&iter->walker->list); - -rcu_read_lock (); - -mutex_unlock (&ht->mutex); +spin_unlock (&ht->lock);if (!iter->walker->tbl) { iter->walker->tbl =rht_dereference_rcu (ht->tbl, ht);
@@ -723,9 +722,6 @@ int rhashtable_init(struct rhashtable *ht,if (params->nulls_base && params->nulls_base < (1U <<RHT_BASE_SHIFT ))return -EINVAL ; -if (params->nelem_hint) - size =rounded_hashtable_size (params); -memset (ht,0 ,sizeof (*ht));mutex_init (&ht->mutex);spin_lock_init (&ht->lock);
@@ -745,6 +741,9 @@ int rhashtable_init(struct rhashtable *ht, ht->p.min_size =max (ht->p.min_size,HASH_MIN_SIZE ); +if (params->nelem_hint) + size =rounded_hashtable_size (&ht->p); +/* The maximum (not average) chain length grows with the * size of the hash table, at a rate of (log N)/(log log N). * The value of 16 is selected so that even if the hash
net/ax25/af_ax25.c +3 -0
@@ -805,6 +805,9 @@ static int ax25_create(struct net *net, struct socket *sock, int protocol,struct sock *sk;ax25_cb *ax25; +if (protocol <0 || protocol >SK_PROTOCOL_MAX ) +return -EINVAL ; +if (!net_eq (net, &init_net))return -EAFNOSUPPORT ;
net/bluetooth/sco.c +3 -0
@@ -519,6 +519,9 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_leif (!addr || addr->sa_family !=AF_BLUETOOTH )return -EINVAL ; +if (addr_len <sizeof (struct sockaddr_sco )) +return -EINVAL ; +lock_sock (sk);if (sk->sk_state !=BT_OPEN ) {
net/core/skbuff.c +4 -2
@@ -3643,7 +3643,8 @@ static void __skb_complete_tx_timestamp(struct sk_buff *skb, serr->ee.ee_info = tstype;if (sk->sk_tsflags &SOF_TIMESTAMPING_OPT_ID ) { serr->ee.ee_data =skb_shinfo (skb)->tskey; -if (sk->sk_protocol ==IPPROTO_TCP ) +if (sk->sk_protocol ==IPPROTO_TCP && + sk->sk_type ==SOCK_STREAM ) serr->ee.ee_data -= sk->sk_tskey; }
@@ -4268,7 +4269,8 @@ static struct sk_buff *skb_reorder_vlan_header(struct sk_buff *skb)return NULL ; } -memmove (skb->data -ETH_HLEN , skb->data -VLAN_ETH_HLEN ,2 *ETH_ALEN ); +memmove (skb->data -ETH_HLEN , skb->data - skb->mac_len -VLAN_HLEN , +2 *ETH_ALEN ); skb->mac_header +=VLAN_HLEN ;return skb; }
net/core/sock.c +2 -3
@@ -422,8 +422,6 @@ static void sock_warn_obsolete_bsdism(const char *name) } } -#define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE)) -static void sock_disable_timestamp (struct sock *sk,unsigned long flags) {if (sk->sk_flags & flags) {
@@ -862,7 +860,8 @@ set_rcvbuf:if (val &SOF_TIMESTAMPING_OPT_ID && !(sk->sk_tsflags &SOF_TIMESTAMPING_OPT_ID )) { -if (sk->sk_protocol ==IPPROTO_TCP ) { +if (sk->sk_protocol ==IPPROTO_TCP && + sk->sk_type ==SOCK_STREAM ) {if (sk->sk_state !=TCP_ESTABLISHED ) { ret = -EINVAL ;break ;
net/decnet/af_decnet.c +3 -0
@@ -678,6 +678,9 @@ static int dn_create(struct net *net, struct socket *sock, int protocol, {struct sock *sk; +if (protocol <0 || protocol >SK_PROTOCOL_MAX ) +return -EINVAL ; +if (!net_eq (net, &init_net))return -EAFNOSUPPORT ;
net/ipv4/af_inet.c +3 -0
@@ -261,6 +261,9 @@ static int inet_create(struct net *net, struct socket *sock, int protocol,int try_loading_module =0 ;int err; +if (protocol <0 || protocol >=IPPROTO_MAX ) +return -EINVAL ; + sock->state =SS_UNCONNECTED ;/* Look for the requested type/protocol pair. */
net/ipv4/fou.c +2 -1
@@ -24,6 +24,7 @@ struct fou {u16 type;struct udp_offload udp_offloads;struct list_head list; +struct rcu_head rcu; };#define FOU_F_REMCSUM_NOPARTIAL BIT(0)
@@ -417,7 +418,7 @@ static void fou_release(struct fou *fou)list_del (&fou->list);udp_tunnel_sock_release (sock); -kfree (fou); +kfree_rcu (fou, rcu); }static int fou_encap_init (struct sock *sk,struct fou *fou,struct fou_cfg *cfg)
net/ipv4/tcp_ipv4.c +2 -3
@@ -1509,7 +1509,7 @@ bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)if (likely (sk->sk_rx_dst))skb_dst_drop (skb);else -skb_dst_force (skb); +skb_dst_force_safe (skb);__skb_queue_tail (&tp->ucopy.prequeue, skb); tp->ucopy.memory += skb->truesize;
@@ -1710,8 +1710,7 @@ void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {struct dst_entry *dst =skb_dst (skb); -if (dst) { -dst_hold (dst); +if (dst &&dst_hold_safe (dst)) { sk->sk_rx_dst = dst;inet_sk (sk)->rx_dst_ifindex = skb->skb_iif; }
net/ipv4/tcp_output.c +12 -11
@@ -3147,7 +3147,7 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn) {struct tcp_sock *tp =tcp_sk (sk);struct tcp_fastopen_request *fo = tp->fastopen_req; -int syn_loss =0 , space, err =0 , copied; +int syn_loss =0 , space, err =0 ;unsigned long last_syn_loss =0 ;struct sk_buff *syn_data;
@@ -3185,17 +3185,18 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn) goto fallback; syn_data->ip_summed =CHECKSUM_PARTIAL ;memcpy (syn_data->cb, syn->cb,sizeof (syn->cb)); - copied =copy_from_iter (skb_put (syn_data, space), space, - &fo->data->msg_iter); -if (unlikely (!copied)) { -kfree_skb (syn_data); - goto fallback; - } -if (copied != space) { -skb_trim (syn_data, copied); - space = copied; +if (space) { +int copied =copy_from_iter (skb_put (syn_data, space), space, + &fo->data->msg_iter); +if (unlikely (!copied)) { +kfree_skb (syn_data); + goto fallback; + } +if (copied != space) { +skb_trim (syn_data, copied); + space = copied; + } } -/* No more data pending in inet_wait_for_connect() */ if (space == fo->size) fo->data =NULL ;
net/ipv6/addrconf.c +7 -1
@@ -349,6 +349,12 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)setup_timer (&ndev->rs_timer, addrconf_rs_timer, (unsigned long )ndev);memcpy (&ndev->cnf,dev_net (dev)->ipv6.devconf_dflt,sizeof (ndev->cnf)); + +if (ndev->cnf.stable_secret.initialized) + ndev->addr_gen_mode =IN6_ADDR_GEN_MODE_STABLE_PRIVACY ; +else + ndev->addr_gen_mode =IN6_ADDR_GEN_MODE_EUI64 ; + ndev->cnf.mtu6 = dev->mtu; ndev->cnf.sysctl =NULL ; ndev->nd_parms =neigh_parms_alloc (dev, &nd_tbl);
@@ -2453,7 +2459,7 @@ ok:#ifdef CONFIG_IPV6_OPTIMISTIC_DAD if (in6_dev->cnf.optimistic_dad && !net->ipv6.devconf_all->forwarding && sllao) - addr_flags =IFA_F_OPTIMISTIC ; + addr_flags |=IFA_F_OPTIMISTIC ;#endif /* Do not allow to create too much of autoconfigured
net/ipv6/af_inet6.c +3 -0
@@ -109,6 +109,9 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol,int try_loading_module =0 ;int err; +if (protocol <0 || protocol >=IPPROTO_MAX ) +return -EINVAL ; +/* Look for the requested type/protocol pair. */ lookup_protocol: err = -ESOCKTNOSUPPORT ;
net/ipv6/ip6_gre.c +3 -5
@@ -1571,13 +1571,11 @@ static int ip6gre_changelink(struct net_device *dev, struct nlattr *tb[],return -EEXIST ; }else { t = nt; - -ip6gre_tunnel_unlink (ign, t); -ip6gre_tnl_change (t, &p, !tb[IFLA_MTU ]); -ip6gre_tunnel_link (ign, t); -netdev_state_change (dev); } +ip6gre_tunnel_unlink (ign, t); +ip6gre_tnl_change (t, &p, !tb[IFLA_MTU ]); +ip6gre_tunnel_link (ign, t);return 0 ; }
net/ipv6/tcp_ipv6.c +1 -2
@@ -93,10 +93,9 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {struct dst_entry *dst =skb_dst (skb); -if (dst) { +if (dst &&dst_hold_safe (dst)) {const struct rt6_info *rt = (const struct rt6_info *)dst; -dst_hold (dst); sk->sk_rx_dst = dst;inet_sk (sk)->rx_dst_ifindex = skb->skb_iif;inet6_sk (sk)->rx_dst_cookie =rt6_get_cookie (rt);
net/irda/af_irda.c +3 -0
@@ -1086,6 +1086,9 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,struct sock *sk;struct irda_sock *self; +if (protocol <0 || protocol >SK_PROTOCOL_MAX ) +return -EINVAL ; +if (net != &init_net)return -EAFNOSUPPORT ;
net/openvswitch/conntrack.c +13 -3
@@ -53,6 +53,8 @@ struct ovs_conntrack_info {struct md_labels labels; }; +static void __ovs_ct_free_action (struct ovs_conntrack_info *ct_info); +static u16 key_to_nfproto (const struct sw_flow_key *key) {switch (ntohs (key->eth.type)) {
@@ -141,6 +143,7 @@ static void __ovs_ct_update_key(struct sw_flow_key *key, u8 state,* previously sent the packet to conntrack via the ct action. */ static void ovs_ct_update_key (const struct sk_buff *skb, +const struct ovs_conntrack_info *info,struct sw_flow_key *key,bool post_ct) {const struct nf_conntrack_zone *zone = &nf_ct_zone_dflt;
@@ -158,13 +161,15 @@ static void ovs_ct_update_key(const struct sk_buff *skb, zone =nf_ct_zone (ct); }else if (post_ct) { state =OVS_CS_F_TRACKED |OVS_CS_F_INVALID ; +if (info) + zone = &info->zone; }__ovs_ct_update_key (key, state, zone, ct); }void ovs_ct_fill_key (const struct sk_buff *skb,struct sw_flow_key *key) { -ovs_ct_update_key (skb, key, false); +ovs_ct_update_key (skb,NULL , key, false); }int ovs_ct_put_key (const struct sw_flow_key *key,struct sk_buff *skb)
@@ -418,7 +423,7 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key, } } -ovs_ct_update_key (skb, key, true); +ovs_ct_update_key (skb, info, key, true);return 0 ; }
@@ -708,7 +713,7 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,nf_conntrack_get (&ct_info.ct->ct_general);return 0 ; err_free_ct: -nf_conntrack_free (ct_info.ct); +__ovs_ct_free_action (&ct_info);return err; }
@@ -750,6 +755,11 @@ void ovs_ct_free_action(const struct nlattr *a) {struct ovs_conntrack_info *ct_info =nla_data (a); +__ovs_ct_free_action (ct_info); +} + +static void __ovs_ct_free_action (struct ovs_conntrack_info *ct_info) +{if (ct_info->helper)module_put (ct_info->helper->me);if (ct_info->ct)
net/sched/sch_api.c +1 -1
@@ -950,7 +950,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, }lockdep_set_class (qdisc_lock (sch), &qdisc_tx_lock);if (!netif_is_multiqueue (dev)) - sch->flags |=TCQ_F_ONETXQUEUE |TCQ_F_NOPARENT ; + sch->flags |=TCQ_F_ONETXQUEUE ; } sch->handle = handle;
net/sctp/ipv6.c +8 -0
@@ -635,6 +635,7 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,struct sock *newsk;struct ipv6_pinfo *newnp, *np =inet6_sk (sk);struct sctp6_sock *newsctp6sk; +struct ipv6_txoptions *opt; newsk =sk_alloc (sock_net (sk),PF_INET6 ,GFP_KERNEL , sk->sk_prot,0 );if (!newsk)
@@ -654,6 +655,13 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,memcpy (newnp, np,sizeof (struct ipv6_pinfo )); +rcu_read_lock (); + opt =rcu_dereference (np->opt); +if (opt) + opt =ipv6_dup_options (newsk, opt); +RCU_INIT_POINTER (newnp->opt, opt); +rcu_read_unlock (); +/* Initialize sk's sport, dport, rcv_saddr and daddr for getsockname() * and getpeername(). */
net/sctp/sm_make_chunk.c +2 -2
@@ -1652,7 +1652,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,/* Set an expiration time for the cookie. */ cookie->c.expiration =ktime_add (asoc->cookie_life, -ktime_get ()); +ktime_get_real ());/* Copy the peer's init packet. */ memcpy(&cookie->c.peer_init[0], init_chunk->chunk_hdr,
@@ -1780,7 +1780,7 @@ no_hmac:if (sock_flag (ep->base.sk,SOCK_TIMESTAMP )) kt =skb_get_ktime (skb);else - kt =ktime_get (); + kt =ktime_get_real ();if (!asoc &&ktime_before (bear_cookie->expiration, kt)) {/*
net/sctp/socket.c +4 -0
@@ -7163,6 +7163,7 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk, newsk->sk_type = sk->sk_type; newsk->sk_bound_dev_if = sk->sk_bound_dev_if; newsk->sk_flags = sk->sk_flags; + newsk->sk_tsflags = sk->sk_tsflags; newsk->sk_no_check_tx = sk->sk_no_check_tx; newsk->sk_no_check_rx = sk->sk_no_check_rx; newsk->sk_reuse = sk->sk_reuse;
@@ -7195,6 +7196,9 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk, newinet->mc_ttl =1 ; newinet->mc_index =0 ; newinet->mc_list =NULL ; + +if (newsk->sk_flags &SK_FLAGS_TIMESTAMP ) +net_enable_timestamp (); } static inline void sctp_copy_descendant(struct sock *sk_to,
net/socket.c +1 -0
@@ -1702,6 +1702,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, msg.msg_name = addr ? (struct sockaddr *)&address :NULL ;/* We assume all kernel code knows the size of sockaddr_storage */ msg.msg_namelen =0 ; + msg.msg_iocb =NULL ;if (sock->file->f_flags &O_NONBLOCK ) flags |=MSG_DONTWAIT ; err =sock_recvmsg (sock, &msg,iov_iter_count (&msg.msg_iter), flags);
net/tipc/udp_media.c +1 -1
@@ -162,7 +162,7 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,if (skb_headroom (skb) <UDP_MIN_HEADROOM ) { err =pskb_expand_head (skb,UDP_MIN_HEADROOM ,0 ,GFP_ATOMIC );if (err) - goto tx_error; +return err; } clone =skb_clone (skb,GFP_ATOMIC );
net/unix/af_unix.c +3 -10
@@ -2255,14 +2255,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state)/* Lock the socket to prevent queue disordering * while sleeps in memcpy_tomsg */ - err =mutex_lock_interruptible (&u->readlock); -if (unlikely (err)) { -/* recvmsg() in non blocking mode is supposed to return -EAGAIN -* sk_rcvtimeo is not honored by mutex_lock_interruptible() -*/ - err = noblock ? -EAGAIN : -ERESTARTSYS ; - goto out; - } +mutex_lock (&u->readlock);if (flags &MSG_PEEK ) skip =sk_peek_offset (sk, flags);
@@ -2306,12 +2299,12 @@ again: timeo =unix_stream_data_wait (sk, timeo, last, last_len); -if (signal_pending (current) || -mutex_lock_interruptible (&u->readlock)) { +if (signal_pending (current)) { err =sock_intr_errno (timeo); goto out; } +mutex_lock (&u->readlock);continue ; unlock:unix_state_unlock (sk);
security/keys/keyctl.c +9 -9
@@ -757,16 +757,16 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)/* the key is probably readable - now try to read it */ can_read_key: - ret =key_validate (key); -if (ret ==0 ) { - ret = -EOPNOTSUPP ; -if (key->type->read) { -/* read the data with the semaphore held (since we -* might sleep) */ -down_read (&key->sem); + ret = -EOPNOTSUPP ; +if (key->type->read) { +/* Read the data with the semaphore held (since we might sleep) +* to protect against the key being updated or revoked. +*/ +down_read (&key->sem); + ret =key_validate (key); +if (ret ==0 ) ret = key->type->read (key, buffer, buflen); -up_read (&key->sem); - } +up_read (&key->sem); } error2:
security/keys/process_keys.c +1 -0
@@ -794,6 +794,7 @@ long join_session_keyring(const char *name) ret =PTR_ERR (keyring); goto error2; }else if (keyring == new->session_keyring) { +key_put (keyring); ret =0 ; goto error2; }
Quoted 210 lines · Greg KH
I'm announcing the release of the 4.3.4 kernel.
All users of the 4.3 kernel series must upgrade.
The updated 4.3.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux-4.3.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
------------
Makefile | 2 drivers/acpi/osl.c | 13 + drivers/acpi/sleep.c | 6 drivers/char/tpm/tpm.h | 7 drivers/char/tpm/tpm_crb.c | 32 +--- drivers/char/tpm/tpm_tis.c | 192 ++++++++++++++++++++---- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 drivers/net/ethernet/freescale/gianfar.c | 8 - drivers/net/ethernet/freescale/gianfar.h | 1 drivers/net/ethernet/qualcomm/qca_spi.c | 5 drivers/net/ethernet/renesas/sh_eth.c | 4 drivers/net/phy/micrel.c | 13 + drivers/net/ppp/pppoe.c | 14 + drivers/net/ppp/pptp.c | 6 drivers/net/usb/cdc_mbim.c | 26 +++ drivers/net/usb/cdc_ncm.c | 10 + drivers/net/usb/r8152.c | 21 -- drivers/net/vrf.c | 14 + drivers/platform/x86/toshiba_acpi.c | 1 drivers/usb/class/cdc-acm.c | 5 drivers/usb/core/config.c | 3 drivers/usb/core/hub.c | 22 +- drivers/usb/core/quirks.c | 6 drivers/usb/gadget/udc/pxa27x_udc.c | 3 drivers/usb/host/ohci-at91.c | 11 - drivers/usb/host/whci/qset.c | 4 drivers/usb/musb/Kconfig | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/usb-serial-simple.c | 1 drivers/usb/storage/uas.c | 4 drivers/usb/storage/unusual_devs.h | 2 drivers/usb/storage/unusual_uas.h | 2 include/linux/acpi.h | 6 include/linux/usb/quirks.h | 3 include/net/dst.h | 33 ++++ include/net/inetpeer.h | 1 include/net/sock.h | 5 include/net/vxlan.h | 2 include/uapi/linux/Kbuild | 1 lib/rhashtable.c | 25 +-- net/ax25/af_ax25.c | 3 net/bluetooth/sco.c | 3 net/core/skbuff.c | 6 net/core/sock.c | 5 net/decnet/af_decnet.c | 3 net/ipv4/af_inet.c | 3 net/ipv4/fou.c | 3 net/ipv4/tcp_ipv4.c | 5 net/ipv4/tcp_output.c | 23 +- net/ipv6/addrconf.c | 8 - net/ipv6/af_inet6.c | 3 net/ipv6/ip6_gre.c | 8 - net/ipv6/tcp_ipv6.c | 3 net/irda/af_irda.c | 3 net/openvswitch/conntrack.c | 16 +- net/sched/sch_api.c | 2 net/sctp/ipv6.c | 8 + net/sctp/sm_make_chunk.c | 4 net/sctp/socket.c | 4 net/socket.c | 1 net/tipc/udp_media.c | 2 net/unix/af_unix.c | 13 - security/keys/keyctl.c | 18 +- security/keys/process_keys.c | 1 64 files changed, 486 insertions(+), 186 deletions(-)Alan Stern (1):
USB: add quirk for devices with broken LPMAlexandre Belloni (1):
USB: host: ohci-at91: fix a crash inohci_hcd_at91_overcurrent_irqAlexey Khoroshilov (1):
USB: whci-hcd: add check for dma mapping errorAndrew Lunn (1):
phy: micrel: Fix finding PHY properties in MAC node.Arnd Bergmann (1):
usb: musb:USB_TI_CPPI41_DMArequires dmaengine supportAzael Avalos (1):
toshiba_acpi: Initializehotkey_event_typevariableBen Hutchings (3):
Revert "vrf: fix double free and memory corruption onregister_netdevicefailure"
tipc: Fixkfree_skb()of uninitialised pointer
usb: Use theUSB_SS_MULT()macro to decode burst multiplier for log
messageBjørn Mork (2):
ipv6: keep existing flags when settingIFA_F_OPTIMISTIC
net:cdc_mbim: add "NDP to end" quirk for Huawei E3372Chen Yu (3):
ACPI: Use correct IRQ when uninstalling ACPI interrupt handler
ACPI: Using correct irq when waiting for events
ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idleDavid Howells (1):
KEYS: Fix race between read and revokeDavid S. Miller (1):
bluetooth: Validate socket address length insco_sock_bind().Dmitry Katsubo (1):
usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB
adapter JMicronEric Dumazet (5):
ipv6: sctp: clone options to avoid use after free
net: fix IP early demux races
net_sched: makeqdisc_tree_decrease_qlen()work for non mq
inet: tcp: fixinetpeer_set_addr_v4()
tcp: restore fastopen with no data in SYN packetFelipe Balbi (1):
usb: gadget: pxa27x: fix suspend callbackGreg Kroah-Hartman (1):
Linux 4.3.4Guillaume Nault (1):
pppoe: fix memory corruption in padt work structureHamish Martin (1):
gianfar: Don't enable RX Filer if not supportedHannes Frederic Sowa (3):
net: add validation for the socket syscall protocol argument
ipv6: automatically enable stable privacy mode ifstable_secretset
fou: clean up socket withkfree_rcuHans Yang (1):
usb: core : hub: Fix BOS 'NULL pointer' kernel panicHerbert Xu (2):
rhashtable: Enforce minimum size on initial hash table
rhashtable: Fix walker list corruptionJarkko Sakkinen (1):
tpm,tpm_tis: fixtpm_tisACPI detection issue with TPM 2.0Jiri Benc (1):
vxlan: fix incorrect RCO bit in VXLAN headerJoe Stringer (2):
openvswitch: Fix helper reference leak
openvswitch: Respect conntrack zone even if invalidJonas Jonsson (2):
USB:cdc_acm: Ignore Infineon Flash Loader utility
USB: serial: Another Infineon flash loader USB IDKonstantin Shkolnyy (1):
USB: cp210x: Remove CP2110 ID from compatibility listMarcelo Ricardo Leitner (3):
sctp: use the same clock as if sock source timestamps were on
sctp: update thenetstamp_neededcounter when copying sockets
sctp: also copysk_tsflagswhen copying the socketNicolas Dichtel (1):
gre6: allow to update all parameters via rtnlNikolay Aleksandrov (1):
vrf: fix double free and memory corruption onregister_netdevice
failurePavel Machek (1):
atl1c: Improve driver not to do order 4GFP_ATOMICallocationPeter Wu (1):
r8152: fix lockup when runtime PM is enabledRainer Weikusat (1):
af_unix: Revert 'lock_interruptible' in stream receive codeSergei Shtylyov (1):
sh_eth: fix kernel oops inskb_put()Stefan Wahren (1):
net:qca_spi: fix transmit queue timeout handlingVlad Yasevich (2):
vlan: Fix untag operations of stacked vlans withREORDER_HEADERoff
skbuff: Fix offset error inskb_reorder_vlan_headerWANG Cong (2):
pptp: verifysockaddr_leninpptp_bind()andpptp_connect()
net: check both type and procotol for tcp sockets
Quoted 10 lines
Yevgeny Pats (1):
KEYS: Fix keyring ref leak injoin_session_keyring()stephen hemminger (1):
uapi: exportila.h[email protected] (1):
net: fix uninitialized variable issue
Hi Greg,
Please see this commit in Linus' tree
https://github.com/torvalds/linux/commit/35a4933a895927990772ae96fdcfd2f806929ee2
You might want to merge that into your next stable series. WIthout it, the linux-stable versions are not completely stable.
:-)
Jeff
Greg KH
maintainerQuoted 6 lines · Jeff Merkey
Please see this commit in Linus' tree
https://github.com/torvalds/linux/commit/35a4933a895927990772ae96fdcfd2f806929ee2
You might want to merge that into your next stable series. WIthout it, the linux-stable versions are not completely stable.
I have to wait for it to hit a public release, like 4.5-rc1 first, before I can put it in a stable release. I also have over 500 patches left to queue up to make things "stable", so this patch is in good company :)
thanks,
greg k-h