Linux 3.17.7
Greg KH
maintainerI'm announcing the release of the 3.17.7 kernel.
All users of the 3.17 kernel series must upgrade.
The updated 3.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.17.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 - arch/mips/net/bpf_jit.c | 4 +- arch/x86/boot/compressed/Makefile | 2 - drivers/acpi/ec.c | 4 +- drivers/ata/ahci.c | 4 ++ drivers/ata/sata_fsl.c | 2 - drivers/gpu/drm/i915/intel_display.c | 2 - drivers/gpu/drm/i915/intel_lvds.c | 22 +++++++-------- drivers/gpu/drm/nouveau/core/engine/device/nvc0.c | 1 drivers/gpu/drm/nouveau/nouveau_drm.c | 2 - drivers/gpu/drm/radeon/radeon_cs.c | 9 ++---- drivers/gpu/drm/radeon/radeon_kms.c | 2 + drivers/gpu/drm/radeon/radeon_object.c | 7 ++++ drivers/i2c/busses/i2c-cadence.c | 11 +++++++ drivers/i2c/busses/i2c-davinci.c | 8 ++--- drivers/i2c/busses/i2c-omap.c | 10 +++--- drivers/input/evdev.c | 2 - drivers/media/i2c/smiapp/smiapp-core.c | 2 - drivers/media/rc/ir-rc6-decoder.c | 2 - drivers/media/usb/s2255/s2255drv.c | 2 - drivers/net/bonding/bond_netlink.c | 7 ++++ drivers/net/ethernet/broadcom/tg3.c | 3 +- drivers/net/ethernet/marvell/mvneta.c | 5 ++- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 - drivers/net/vxlan.c | 14 +++------ drivers/net/xen-netfront.c | 8 ++--- drivers/of/fdt.c | 2 - fs/fat/namei_vfat.c | 20 +++++++------ include/net/inet_common.h | 2 + mm/frontswap.c | 4 ++ mm/memory.c | 26 +++++++++--------- mm/mmap.c | 10 ++++-- mm/rmap.c | 6 ++-- mm/slab.c | 2 - mm/vmpressure.c | 8 +++-- net/core/rtnetlink.c | 1 net/ipv4/af_inet.c | 11 +++++++ net/ipv4/gre_offload.c | 3 ++ net/ipv4/ip_vti.c | 1 net/ipv4/ping.c | 12 +------- net/ipv4/tcp.c | 2 - net/ipv6/ip6_gre.c | 4 +- net/ipv6/ip6_vti.c | 11 +++++++ net/netlink/af_netlink.c | 2 - net/sctp/output.c | 4 +- sound/pci/hda/patch_analog.c | 1 sound/pci/hda/patch_realtek.c | 1 sound/usb/midi.c | 2 + 48 files changed, 163 insertions(+), 111 deletions(-)
Al Viro (1):
fat: fix oops on corrupted vfat fs
Alexander Duyck (1):
vxlan: Fix boolean flip in VXLAN_F_UDP_ZERO_CSUM6_[TX|RX]
Alexander Kochetkov (2):
i2c: omap: fix NACK and Arbitration Lost irq handling
i2c: omap: fix i207 errata handling
Andrew Morton (2):
mm/vmpressure.c: fix race in vmpressure_work_fn() drivers/input/evdev.c: don't kfree() a vmalloc address
Chris Clayton (1):
x86: Use $(OBJDUMP) instead of plain objdump
Christian König (1):
drm/radeon: sync all BOs involved in a CS v2
Daniel Borkmann (2):
net: sctp: use MAX_HEADER for headroom reserve in output path
netlink: use jhash as hashfn for rhashtable
Daniel Forrest (1):
mm: fix anon_vma_clone() error treatment
Daniel Vetter (2):
drm/i915: More cautious with pch fifo underruns drm/i915: Unlock panel even when LVDS is disabled
Dave Airlie (1):
nouveau: move the hotplug ignore to correct place.
David Härdeman (1):
media: rc-core: fix toggle handling in the rc6 decoder
David Vrabel (1):
xen-netfront: use correct linear area after linearizing an skb
Denis Kirjanov (1):
mips: bpf: Fix broken BPF_MOD
Devin Ryles (1):
AHCI: Add DeviceIDs for Sunrise Point-LP SATA controller
Dmitry Torokhov (1):
sata_fsl: fix error handling of irq_of_parse_and_map
Eric Dumazet (1):
net: mvneta: fix race condition in mvneta_tx()
Greg Kroah-Hartman (2):
Revert: ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC Linux 3.17.7
Grygorii Strashko (1):
i2c: davinci: generate STP always when NACK is received
Hugh Dickins (1):
mm: fix swapoff hang after page migration and fork
Ian Campbell (1):
of/fdt: memblock_reserve /memreserve/ regions in the case of partial overlap
Ilia Mirkin (1):
drm/nouveau/gf116: remove copy1 engine
Jack Morgenstein (1):
net/mlx4_core: Limit count field to 24 bits in qp_alloc_res
Marcelo Leitner (1):
Fix race condition between vxlan_sock_add and vxlan_sock_release
Michel Dänzer (1):
drm/radeon: Ignore RADEON_GEM_GTT_WC on 32-bit x86
Nicolas Dichtel (1):
rtnetlink: release net refcnt on error in do_setlink()
Paul Mackerras (1):
slab: fix nodeid bounds check for non-contiguous node IDs
Petr Mladek (1):
drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6
Sakari Ailus (1):
media: smiapp: Only some selection targets are settable
Seth Forshee (1):
xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
Takashi Iwai (3):
ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
ALSA: hda - Fix built-in mic at resume on Lenovo Ideapad S210
ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery
Tejun Heo (1):
ahci: disable MSI on SAMSUNG 0xa800 SSD
Thadeu Lima de Souza Cascardo (1):
tg3: fix ring init when there are more TX than RX channels
Thomas Graf (1):
bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes
Tom Herbert (1):
gre: Set inner mac header in gro complete
Vishnu Motghare (1):
i2c: cadence: Set the hardware time-out register to maximum value
Weijie Yang (1):
mm: frontswap: invalidate expired data on a dup-store failure
Willem de Bruijn (1):
net-timestamp: make tcp_recvmsg call ipv6_recv_error for AF_INET6 socks
Yuri Chislov (1):
ipv6: gre: fix wrong skb->protocol in WCCP
lucien (1):
ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic
sensoray-dev (1):
media: s2255drv: fix payload size for JPG, MJPEG
willy tarreau (1):
net: mvneta: fix Tx interrupt delay
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 17 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Shuffling Zombie Juror
arch/mips/net/bpf_jit.c +2 -2
@@ -430,7 +430,7 @@ static inline void emit_mod(unsigned int dst, unsigned int src,u32 *p = &ctx->target[ctx->idx];uasm_i_divu (&p, dst, src); p = &ctx->target[ctx->idx +1 ]; -uasm_i_mflo (&p, dst); +uasm_i_mfhi (&p, dst); } ctx->idx +=2 ;/* 2 insts */ }
@@ -1006,7 +1006,7 @@ load_ind:break ;case BPF_ALU |BPF_MOD |BPF_K :/* A %= k */ -if (k ==1 ||optimize_div (&k)) { +if (k ==1 ) { ctx->flags |=SEEN_A ;emit_jit_reg_move (r_A, r_zero, ctx); }else {
arch/x86/boot/compressed/Makefile +1 -1
@@ -75,7 +75,7 @@ suffix-$(CONFIG_KERNEL_XZ) := xz suffix-$(CONFIG_KERNEL_LZO) := lzo suffix-$(CONFIG_KERNEL_LZ4) := lz4 -RUN_SIZE = $(shell objdump -h vmlinux | \ +RUN_SIZE = $(shell $(OBJDUMP) -h vmlinux | \ perl $(srctree)/arch/x86/tools/calc_run_size.pl) quiet_cmd_mkpiggy = MKPIGGY $@ cmd_mkpiggy = $(obj)/mkpiggy $< $(RUN_SIZE) > $@ || ( rm -f $@ ; false )
drivers/acpi/ec.c +2 -2
@@ -299,11 +299,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,/* following two actions should be kept atomic */ ec->curr = t;start_transaction (ec); -if (ec->curr->command ==ACPI_EC_COMMAND_QUERY ) -clear_bit (EC_FLAGS_QUERY_PENDING , &ec->flags);spin_unlock_irqrestore (&ec->lock, tmp); ret =ec_poll (ec);spin_lock_irqsave (&ec->lock, tmp); +if (ec->curr->command ==ACPI_EC_COMMAND_QUERY ) +clear_bit (EC_FLAGS_QUERY_PENDING , &ec->flags); ec->curr =NULL ;spin_unlock_irqrestore (&ec->lock, tmp);return ret;
drivers/ata/ahci.c +4 -0
@@ -321,6 +321,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series RAID */ { PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */ { PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series RAID */ + { PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */ + { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ + { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */
@@ -492,6 +495,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {* enabled. https://bugzilla.kernel.org/show_bug.cgi?id=60731 */ { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_nomsi }, + { PCI_VDEVICE(SAMSUNG, 0xa800), board_ahci_nomsi },/* Enmotus */ { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
drivers/ata/sata_fsl.c +1 -1
@@ -1488,7 +1488,7 @@ static int sata_fsl_probe(struct platform_device *ofdev) host_priv->csr_base = csr_base; irq =irq_of_parse_and_map (ofdev->dev.of_node,0 ); -if (irq <0 ) { +if (!irq) {dev_err (&ofdev->dev,"invalid irq from platform\n" ); goto error_exit_with_cleanup; }
drivers/gpu/drm/i915/intel_display.c +0 -2
@@ -4209,7 +4209,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)ironlake_fdi_disable (crtc);ironlake_disable_pch_transcoder (dev_priv, pipe); -intel_set_pch_fifo_underrun_reporting (dev, pipe, true);if (HAS_PCH_CPT (dev)) {/* disable TRANS_DP_CTL */
@@ -4274,7 +4273,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)if (intel_crtc->config.has_pch_encoder) {lpt_disable_pch_transcoder (dev_priv); -intel_set_pch_fifo_underrun_reporting (dev,TRANSCODER_A , true);intel_ddi_fdi_disable (crtc); }
drivers/gpu/drm/i915/intel_lvds.c +11 -11
@@ -900,6 +900,17 @@ void intel_lvds_init(struct drm_device *dev)int pipe;u8 pin; +/* +* Unlock registers and just leave them unlocked. Do this before +* checking quirk lists to avoid bogus WARNINGs. +*/ +if (HAS_PCH_SPLIT (dev)) { +I915_WRITE (PCH_PP_CONTROL , +I915_READ (PCH_PP_CONTROL ) |PANEL_UNLOCK_REGS ); + }else { +I915_WRITE (PP_CONTROL , +I915_READ (PP_CONTROL ) |PANEL_UNLOCK_REGS ); + }if (!intel_lvds_supported (dev))return ;
@@ -1098,17 +1109,6 @@ out: lvds_encoder->a3_power =I915_READ (lvds_encoder->reg) &LVDS_A3_POWER_MASK ; -/* -* Unlock registers and just -* leave them unlocked -*/ -if (HAS_PCH_SPLIT (dev)) { -I915_WRITE (PCH_PP_CONTROL , -I915_READ (PCH_PP_CONTROL ) |PANEL_UNLOCK_REGS ); - }else { -I915_WRITE (PP_CONTROL , -I915_READ (PP_CONTROL ) |PANEL_UNLOCK_REGS ); - } lvds_connector->lid_notifier.notifier_call = intel_lid_notify;if (acpi_lid_notifier_register (&lvds_connector->lid_notifier)) {DRM_DEBUG_KMS ("lid notifier registration failed\n" );
drivers/gpu/drm/nouveau/core/engine/device/nvc0.c +0 -1
@@ -212,7 +212,6 @@ nvc0_identify(struct nouveau_device *device) device->oclass[NVDEV_ENGINE_BSP ] = &nvc0_bsp_oclass; device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; device->oclass[NVDEV_ENGINE_COPY0 ] = &nvc0_copy0_oclass; - device->oclass[NVDEV_ENGINE_COPY1 ] = &nvc0_copy1_oclass; device->oclass[NVDEV_ENGINE_DISP ] = nva3_disp_oclass; device->oclass[NVDEV_ENGINE_PERFMON ] = &nvc0_perfmon_oclass;break ;
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
@@ -626,7 +626,6 @@ int nouveau_pmops_suspend(struct device *dev)pci_save_state (pdev);pci_disable_device (pdev); -pci_ignore_hotplug (pdev);pci_set_power_state (pdev, PCI_D3hot);return 0 ; }
@@ -930,6 +929,7 @@ static int nouveau_pmops_runtime_suspend(struct device *dev) ret =nouveau_do_suspend (drm_dev, true);pci_save_state (pdev);pci_disable_device (pdev); +pci_ignore_hotplug (pdev);pci_set_power_state (pdev, PCI_D3cold); drm_dev->switch_power_state =DRM_SWITCH_POWER_DYNAMIC_OFF ;return ret;
drivers/gpu/drm/radeon/radeon_cs.c +3 -6
@@ -226,14 +226,11 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 prioritystatic void radeon_cs_sync_rings (struct radeon_cs_parser *p) { -int i; - -for (i =0 ; i < p->nrelocs; i++) { -if (!p->relocs[i].robj) -continue ; +struct radeon_cs_reloc *reloc; +list_for_each_entry (reloc, &p->validated, tv.head) {radeon_semaphore_sync_to (p->ib.semaphore, - p->relocs[i].robj->tbo.sync_obj); + reloc->robj->tbo.sync_obj); } }
drivers/gpu/drm/radeon/radeon_kms.c +2 -0
@@ -795,6 +795,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,/* Get associated drm_crtc: */ drmcrtc = &rdev->mode_info.crtcs[crtc]->base; +if (!drmcrtc) +return -EINVAL ;/* Helper routine in DRM core does all the work: */ return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
drivers/gpu/drm/radeon/radeon_object.c +7 -0
@@ -187,6 +187,13 @@ int radeon_bo_create(struct radeon_device *rdev,if (!(rdev->flags &RADEON_IS_PCIE )) bo->flags &= ~(RADEON_GEM_GTT_WC |RADEON_GEM_GTT_UC ); +#ifdef CONFIG_X86_32 +/* XXX: Write-combined CPU mappings of GTT seem broken on 32-bit +* See https://bugs.freedesktop.org/show_bug.cgi?id=84627 +*/ + bo->flags &= ~RADEON_GEM_GTT_WC ; +#endif +radeon_ttm_placement_from_domain (bo, domain);/* Kernel allocation are uninterruptible */ down_read (&rdev->pm.mclk_lock);
drivers/i2c/busses/i2c-cadence.c +11 -0
@@ -111,6 +111,8 @@#define CDNS_I2C_DIVA_MAX 4#define CDNS_I2C_DIVB_MAX 64 +#define CDNS_I2C_TIMEOUT_MAX 0xFF +#define cdns_i2c_readreg (offset) readl_relaxed(id->membase + offset)#define cdns_i2c_writereg (val, offset) writel_relaxed(val, id->membase + offset)
@@ -852,6 +854,15 @@ static int cdns_i2c_probe(struct platform_device *pdev) goto err_clk_dis; } +/* +* Cadence I2C controller has a bug wherein it generates +* invalid read transaction after HW timeout in master receiver mode. +* HW timeout is not used by this driver and the interrupt is disabled. +* But the feature itself cannot be disabled. Hence maximum value +* is written to this register to reduce the chances of error. +*/ +cdns_i2c_writereg (CDNS_I2C_TIMEOUT_MAX ,CDNS_I2C_TIME_OUT_OFFSET ); +dev_info (&pdev->dev,"%u kHz mmio %08lx irq %d\n" , id->i2c_clk /1000 , (unsigned long )r_mem->start, id->irq);
drivers/i2c/busses/i2c-davinci.c +3 -5
@@ -411,11 +411,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)if (dev->cmd_err &DAVINCI_I2C_STR_NACK ) {if (msg->flags &I2C_M_IGNORE_NAK )return msg->len; -if (stop) { - w =davinci_i2c_read_reg (dev,DAVINCI_I2C_MDR_REG ); - w |=DAVINCI_I2C_MDR_STP ; -davinci_i2c_write_reg (dev,DAVINCI_I2C_MDR_REG , w); - } + w =davinci_i2c_read_reg (dev,DAVINCI_I2C_MDR_REG ); + w |=DAVINCI_I2C_MDR_STP ; +davinci_i2c_write_reg (dev,DAVINCI_I2C_MDR_REG , w);return -EREMOTEIO ; }return -EIO ;
drivers/i2c/busses/i2c-omap.c +5 -5
@@ -926,14 +926,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)if (stat &OMAP_I2C_STAT_NACK ) { err |=OMAP_I2C_STAT_NACK ;omap_i2c_ack_stat (dev,OMAP_I2C_STAT_NACK ); -break ; }if (stat &OMAP_I2C_STAT_AL ) {dev_err (dev->dev,"Arbitration lost\n" ); err |=OMAP_I2C_STAT_AL ;omap_i2c_ack_stat (dev,OMAP_I2C_STAT_AL ); -break ; }/*
@@ -958,11 +956,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)if (dev->fifo_size) num_bytes = dev->buf_len; -omap_i2c_receive_data (dev, num_bytes, true); - -if (dev->errata &I2C_OMAP_ERRATA_I207 ) +if (dev->errata &I2C_OMAP_ERRATA_I207 ) {i2c_omap_errata_i207 (dev, stat); + num_bytes = (omap_i2c_read_reg (dev, +OMAP_I2C_BUFSTAT_REG ) >>8 ) &0x3F ; + } +omap_i2c_receive_data (dev, num_bytes, true);omap_i2c_ack_stat (dev,OMAP_I2C_STAT_RDR );continue ; }
drivers/input/evdev.c +1 -1
@@ -421,7 +421,7 @@ static int evdev_open(struct inode *inode, struct file *file) err_free_client:evdev_detach_client (evdev, client); -kfree (client); +kvfree (client);return error; }
drivers/media/i2c/smiapp/smiapp-core.c +1 -1
@@ -2133,7 +2133,7 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev, ret =smiapp_set_compose (subdev, fh, sel);break ;default : -BUG (); + ret = -EINVAL ; }mutex_unlock (&sensor->mutex);
drivers/media/rc/ir-rc6-decoder.c +1 -1
@@ -259,8 +259,8 @@ again:case 32 :if ((scancode &RC6_6A_LCC_MASK ) ==RC6_6A_MCE_CC ) { protocol =RC_TYPE_RC6_MCE ; - scancode &= ~RC6_6A_MCE_TOGGLE_MASK ; toggle = !!(scancode &RC6_6A_MCE_TOGGLE_MASK ); + scancode &= ~RC6_6A_MCE_TOGGLE_MASK ; }else { protocol =RC_BIT_RC6_6A_32 ; toggle =0 ;
drivers/media/usb/s2255/s2255drv.c +1 -1
@@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc,break ;case V4L2_PIX_FMT_JPEG :case V4L2_PIX_FMT_MJPEG : - buf->vb.v4l2_buf.length = jpgsize; +vb2_set_plane_payload (&buf->vb,0 , jpgsize);memcpy (vbuf, tmpbuf, jpgsize);break ;case V4L2_PIX_FMT_YUV422P :
drivers/net/bonding/bond_netlink.c +6 -1
@@ -194,7 +194,12 @@ static int bond_changelink(struct net_device *bond_dev,bond_option_arp_ip_targets_clear (bond);nla_for_each_nested (attr, data[IFLA_BOND_ARP_IP_TARGET ], rem) { -__be32 target =nla_get_be32 (attr); +__be32 target; + +if (nla_len (attr) <sizeof (target)) +return -EINVAL ; + + target =nla_get_be32 (attr);bond_opt_initval (&newval, (__force u64 )target); err = __bond_opt_set(bond, BOND_OPT_ARP_TARGETS,
drivers/net/ethernet/broadcom/tg3.c +2 -1
@@ -8561,7 +8561,8 @@ static int tg3_init_rings(struct tg3 *tp)if (tnapi->rx_rcb)memset (tnapi->rx_rcb,0 ,TG3_RX_RCB_RING_BYTES (tp)); -if (tg3_rx_prodring_alloc (tp, &tnapi->prodring)) { +if (tnapi->prodring.rx_std && +tg3_rx_prodring_alloc (tp, &tnapi->prodring)) {tg3_free_rings (tp);return -ENOMEM ; }
drivers/net/ethernet/marvell/mvneta.c +3 -2
@@ -216,7 +216,7 @@/* Various constants */ /* Coalescing */ -#define MVNETA_TXDONE_COAL_PKTS 16 +#define MVNETA_TXDONE_COAL_PKTS 1#define MVNETA_RX_COAL_PKTS 32#define MVNETA_RX_COAL_USEC 100
@@ -1721,6 +1721,7 @@ static int mvneta_tx(struct sk_buff *skb, struct net_device *dev)u16 txq_id =skb_get_queue_mapping (skb);struct mvneta_tx_queue *txq = &pp->txqs[txq_id];struct mvneta_tx_desc *tx_desc; +int len = skb->len;int frags =0 ;u32 tx_cmd;
@@ -1788,7 +1789,7 @@ out:u64_stats_update_begin (&stats->syncp); stats->tx_packets++; - stats->tx_bytes += skb->len; + stats->tx_bytes += len;u64_stats_update_end (&stats->syncp); }else { dev->stats.tx_dropped++;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -1
@@ -1546,7 +1546,7 @@ static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd,switch (op) {case RES_OP_RESERVE : - count =get_param_l (&in_param); + count =get_param_l (&in_param) &0xffffff ; align =get_param_h (&in_param); err =mlx4_grant_resource (dev, slave,RES_QP , count,0 );if (err)
drivers/net/vxlan.c +5 -9
@@ -2050,9 +2050,8 @@ static int vxlan_init(struct net_device *dev)spin_lock (&vn->sock_lock); vs =vxlan_find_sock (vxlan->net, ipv6 ?AF_INET6 :AF_INET , vxlan->dst_port); -if (vs) { +if (vs &&atomic_add_unless (&vs->refcnt,1 ,0 )) {/* If we have a socket with same port already, reuse it */ -atomic_inc (&vs->refcnt);vxlan_vs_add_dev (vs, vxlan); }else {/* otherwise make new socket outside of RTNL */
@@ -2362,9 +2361,9 @@ static struct socket *vxlan_create_sock(struct net *net, bool ipv6,if (ipv6) { udp_conf.family =AF_INET6 ; udp_conf.use_udp6_tx_checksums = - !!(flags &VXLAN_F_UDP_ZERO_CSUM6_TX ); + !(flags &VXLAN_F_UDP_ZERO_CSUM6_TX ); udp_conf.use_udp6_rx_checksums = - !!(flags &VXLAN_F_UDP_ZERO_CSUM6_RX ); + !(flags &VXLAN_F_UDP_ZERO_CSUM6_RX ); }else { udp_conf.family =AF_INET ; udp_conf.local_ip.s_addr =INADDR_ANY ;
@@ -2459,12 +2458,9 @@ struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,spin_lock (&vn->sock_lock); vs =vxlan_find_sock (net, ipv6 ?AF_INET6 :AF_INET , port); -if (vs) { -if (vs->rcv == rcv) -atomic_inc (&vs->refcnt); -else +if (vs && ((vs->rcv != rcv) || + !atomic_add_unless (&vs->refcnt,1 ,0 ))) vs =ERR_PTR (-EBUSY ); - }spin_unlock (&vn->sock_lock);if (!vs)
drivers/net/xen-netfront.c +3 -5
@@ -496,9 +496,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct netfront_queue *queue, len =skb_frag_size (frag); offset = frag->page_offset; -/* Data must not cross a page boundary. */ -BUG_ON (len + offset >PAGE_SIZE <<compound_order (page)); -/* Skip unused frames from start of page */ page += offset >>PAGE_SHIFT ; offset &= ~PAGE_MASK ;
@@ -506,8 +503,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct netfront_queue *queue,while (len >0 ) {unsigned long bytes; -BUG_ON (offset >=PAGE_SIZE ); - bytes =PAGE_SIZE - offset;if (bytes > len) bytes = len;
@@ -632,6 +627,9 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) slots, skb->len);if (skb_linearize (skb)) goto drop; + data = skb->data; + offset =offset_in_page (data); + len =skb_headlen (skb); }spin_lock_irqsave (&queue->tx_lock, flags);
drivers/of/fdt.c +0 -2
@@ -964,8 +964,6 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)int __init __weak early_init_dt_reserve_memory_arch (phys_addr_t base,phys_addr_t size,bool nomap) { -if (memblock_is_region_reserved (base, size)) -return -EBUSY ;if (nomap)return memblock_remove (base, size);return memblock_reserve (base, size);
fs/fat/namei_vfat.c +11 -9
@@ -736,7 +736,12 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, } alias =d_find_alias (inode); -if (alias && !vfat_d_anon_disconn (alias)) { +/* +* Checking "alias->d_parent == dentry->d_parent" to make sure +* FS is not corrupted (especially double linked dir). +*/ +if (alias && alias->d_parent == dentry->d_parent && + !vfat_d_anon_disconn (alias)) {/* * This inode has non anonymous-DCACHE_DISCONNECTED * dentry. This means, the user did ->lookup() by an
@@ -755,12 +760,9 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry, out:mutex_unlock (&MSDOS_SB (sb)->s_lock); - dentry->d_time = dentry->d_parent->d_inode->i_version; - dentry =d_splice_alias (inode, dentry); -if (dentry) - dentry->d_time = dentry->d_parent->d_inode->i_version; -return dentry; - +if (!inode) + dentry->d_time = dir->i_version; +return d_splice_alias (inode, dentry); error:mutex_unlock (&MSDOS_SB (sb)->s_lock);return ERR_PTR (err);
@@ -793,7 +795,6 @@ static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, inode->i_mtime = inode->i_atime = inode->i_ctime = ts;/* timestamp is already written, so mark_inode_dirty() is unneeded. */ - dentry->d_time = dentry->d_parent->d_inode->i_version;d_instantiate (dentry, inode); out:mutex_unlock (&MSDOS_SB (sb)->s_lock);
@@ -824,6 +825,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry)clear_nlink (inode); inode->i_mtime = inode->i_atime =CURRENT_TIME_SEC ;fat_detach (inode); + dentry->d_time = dir->i_version; out:mutex_unlock (&MSDOS_SB (sb)->s_lock);
@@ -849,6 +851,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry)clear_nlink (inode); inode->i_mtime = inode->i_atime =CURRENT_TIME_SEC ;fat_detach (inode); + dentry->d_time = dir->i_version; out:mutex_unlock (&MSDOS_SB (sb)->s_lock);
@@ -889,7 +892,6 @@ static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) inode->i_mtime = inode->i_atime = inode->i_ctime = ts;/* timestamp is already written, so mark_inode_dirty() is unneeded. */ - dentry->d_time = dentry->d_parent->d_inode->i_version;d_instantiate (dentry, inode);mutex_unlock (&MSDOS_SB (sb)->s_lock);
include/net/inet_common.h +2 -0
@@ -37,6 +37,8 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);int inet_ctl_sock_create (struct sock **sk,unsigned short family,unsigned short type,unsigned char protocol,struct net *net); +int inet_recv_error (struct sock *sk,struct msghdr *msg,int len, +int *addr_len);static inline void inet_ctl_sock_destroy (struct sock *sk) {
mm/frontswap.c +3 -1
@@ -244,8 +244,10 @@ int __frontswap_store(struct page *page)the (older) page from frontswap */ inc_frontswap_failed_stores (); -if (dup) +if (dup) {__frontswap_clear (sis, offset); + frontswap_ops->invalidate_page (type, offset); + } }if (frontswap_writethrough_enabled)/* report failure so swap also writes to swap device */
mm/memory.c +13 -13
@@ -815,20 +815,20 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,if (!pte_file (pte)) {swp_entry_t entry =pte_to_swp_entry (pte); -if (swap_duplicate (entry) <0 ) -return entry.val; - -/* make sure dst_mm is on swapoff's mmlist. */ -if (unlikely (list_empty (&dst_mm->mmlist))) { -spin_lock (&mmlist_lock); -if (list_empty (&dst_mm->mmlist)) -list_add (&dst_mm->mmlist, - &src_mm->mmlist); -spin_unlock (&mmlist_lock); - } -if (likely (!non_swap_entry (entry))) +if (likely (!non_swap_entry (entry))) { +if (swap_duplicate (entry) <0 ) +return entry.val; + +/* make sure dst_mm is on swapoff's mmlist. */ +if (unlikely (list_empty (&dst_mm->mmlist))) { +spin_lock (&mmlist_lock); +if (list_empty (&dst_mm->mmlist)) +list_add (&dst_mm->mmlist, + &src_mm->mmlist); +spin_unlock (&mmlist_lock); + } rss[MM_SWAPENTS ]++; -else if (is_migration_entry (entry)) { + }else if (is_migration_entry (entry)) { page =migration_entry_to_page (entry);if (PageAnon (page))
mm/mmap.c +7 -3
@@ -752,8 +752,11 @@ again: remove_next = 1 + (end > next->vm_end);* shrinking vma had, to cover any anon pages imported. */ if (exporter && exporter->anon_vma && !importer->anon_vma) { -if (anon_vma_clone (importer, exporter)) -return -ENOMEM ; +int error; + + error =anon_vma_clone (importer, exporter); +if (error) +return error; importer->anon_vma = exporter->anon_vma; } }
@@ -2453,7 +2456,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,if (err) goto out_free_vma; -if (anon_vma_clone (new, vma)) + err =anon_vma_clone (new, vma); +if (err) goto out_free_mpol;if (new->vm_file)
mm/rmap.c +4 -2
@@ -274,6 +274,7 @@ int anon_vma_fork(struct vm_area_struct *vma, struct vm_area_struct *pvma) {struct anon_vma_chain *avc;struct anon_vma *anon_vma; +int error;/* Don't bother if the parent process has no anon_vma here. */ if (!pvma->anon_vma)
@@ -283,8 +284,9 @@ int anon_vma_fork(struct vm_area_struct *vma, struct vm_area_struct *pvma)* First, attach the new VMA to the parent VMA's anon_vmas, * so rmap can find non-COWed pages in child processes. */ -if (anon_vma_clone (vma, pvma)) -return -ENOMEM ; + error =anon_vma_clone (vma, pvma); +if (error) +return error;/* Then add our own anon_vma. */ anon_vma =anon_vma_alloc ();
mm/slab.c +1 -1
@@ -3108,7 +3108,7 @@ static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags,void *obj;int x; -VM_BUG_ON (nodeid >num_online_nodes ()); +VM_BUG_ON (nodeid <0 || nodeid >=MAX_NUMNODES ); n =get_node (cachep, nodeid);BUG_ON (!n);
mm/vmpressure.c +5 -3
@@ -165,6 +165,7 @@ static void vmpressure_work_fn(struct work_struct *work)unsigned long scanned;unsigned long reclaimed; +spin_lock (&vmpr->sr_lock);/* * Several contexts might be calling vmpressure(), so it is * possible that the work was rescheduled again before the old
@@ -173,11 +174,12 @@ static void vmpressure_work_fn(struct work_struct *work)* here. No need for any locks here since we don't care if * vmpr->reclaimed is in sync. */ -if (!vmpr->scanned) + scanned = vmpr->scanned; +if (!scanned) { +spin_unlock (&vmpr->sr_lock);return ; + } -spin_lock (&vmpr->sr_lock); - scanned = vmpr->scanned; reclaimed = vmpr->reclaimed; vmpr->scanned =0 ; vmpr->reclaimed =0 ;
net/core/rtnetlink.c +1 -0
@@ -1495,6 +1495,7 @@ static int do_setlink(const struct sk_buff *skb, goto errout; }if (!netlink_ns_capable (skb, net->user_ns,CAP_NET_ADMIN )) { +put_net (net); err = -EPERM ; goto errout; }
net/ipv4/af_inet.c +11 -0
@@ -1421,6 +1421,17 @@ out:return pp; } +int inet_recv_error (struct sock *sk,struct msghdr *msg,int len,int *addr_len) +{ +if (sk->sk_family ==AF_INET ) +return ip_recv_error (sk, msg, len, addr_len); +#if IS_ENABLED (CONFIG_IPV6 ) +if (sk->sk_family ==AF_INET6 ) +return pingv6_ops.ipv6_recv_error (sk, msg, len, addr_len); +#endif +return -EINVAL ; +} +static int inet_gro_complete (struct sk_buff *skb,int nhoff) {__be16 newlen =htons (skb->len - nhoff);
net/ipv4/gre_offload.c +3 -0
@@ -279,6 +279,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff) err = ptype->callbacks.gro_complete (skb, nhoff + grehlen);rcu_read_unlock (); + +skb_set_inner_mac_header (skb, nhoff + grehlen); +return err; }
net/ipv4/ip_vti.c +1 -0
@@ -528,6 +528,7 @@ static struct rtnl_link_ops vti_link_ops __read_mostly = { .validate = vti_tunnel_validate, .newlink = vti_newlink, .changelink = vti_changelink, + .dellink = ip_tunnel_dellink, .get_size = vti_get_size, .fill_info = vti_fill_info, };
net/ipv4/ping.c +2 -10
@@ -855,16 +855,8 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,if (flags &MSG_OOB ) goto out; -if (flags &MSG_ERRQUEUE ) { -if (family ==AF_INET ) { -return ip_recv_error (sk, msg, len, addr_len); -#if IS_ENABLED (CONFIG_IPV6 ) - } else if (family == AF_INET6) { -return pingv6_ops.ipv6_recv_error (sk, msg, len, - addr_len); -#endif - } - } +if (flags &MSG_ERRQUEUE ) +return inet_recv_error (sk, msg, len, addr_len); skb =skb_recv_datagram (sk, flags, noblock, &err);if (!skb)
net/ipv4/tcp.c +1 -1
@@ -1633,7 +1633,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,u32 urg_hole =0 ;if (unlikely (flags &MSG_ERRQUEUE )) -return ip_recv_error (sk, msg, len, addr_len); +return inet_recv_error (sk, msg, len, addr_len);if (sk_can_busy_loop (sk) &&skb_queue_empty (&sk->sk_receive_queue) && (sk->sk_state ==TCP_ESTABLISHED ))
net/ipv6/ip6_gre.c +2 -2
@@ -502,11 +502,11 @@ static int ip6gre_rcv(struct sk_buff *skb) skb->protocol = gre_proto;/* WCCP version 1 and 2 protocol decoding. -* - Change protocol to IP +* - Change protocol to IPv6 * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header */ if (flags ==0 && gre_proto ==htons (ETH_P_WCCP )) { - skb->protocol =htons (ETH_P_IP ); + skb->protocol =htons (ETH_P_IPV6 );if ((*(h + offset) &0xF0 ) !=0x40 ) offset +=4 ; }
net/ipv6/ip6_vti.c +11 -0
@@ -905,6 +905,15 @@ static int vti6_newlink(struct net *src_net, struct net_device *dev,return vti6_tnl_create2 (dev); } +static void vti6_dellink (struct net_device *dev,struct list_head *head) +{ +struct net *net =dev_net (dev); +struct vti6_net *ip6n =net_generic (net, vti6_net_id); + +if (dev != ip6n->fb_tnl_dev) +unregister_netdevice_queue (dev, head); +} +static int vti6_changelink (struct net_device *dev,struct nlattr *tb[],struct nlattr *data[]) {
@@ -980,6 +989,7 @@ static struct rtnl_link_ops vti6_link_ops __read_mostly = { .setup = vti6_dev_setup, .validate = vti6_validate, .newlink = vti6_newlink, + .dellink = vti6_dellink, .changelink = vti6_changelink, .get_size = vti6_get_size, .fill_info = vti6_fill_info,
@@ -1020,6 +1030,7 @@ static int __net_init vti6_init_net(struct net *net)if (!ip6n->fb_tnl_dev) goto err_alloc_dev;dev_net_set (ip6n->fb_tnl_dev, net); + ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops; err =vti6_fb_tnl_dev_init (ip6n->fb_tnl_dev);if (err <0 )
net/netlink/af_netlink.c +1 -1
@@ -3130,7 +3130,7 @@ static int __init netlink_proto_init(void) .head_offset = offsetof(struct netlink_sock, node), .key_offset = offsetof(struct netlink_sock, portid), .key_len = sizeof(u32), /* portid */ - .hashfn = arch_fast_hash, + .hashfn = jhash, .max_shift = 16, /* 64K */ .grow_decision = rht_grow_above_75, .shrink_decision = rht_shrink_below_30,
net/sctp/output.c +2 -2
@@ -401,12 +401,12 @@ int sctp_packet_transmit(struct sctp_packet *packet) sk = chunk->skb->sk;/* Allocate the new skb. */ - nskb =alloc_skb (packet->size +LL_MAX_HEADER ,GFP_ATOMIC ); + nskb =alloc_skb (packet->size +MAX_HEADER ,GFP_ATOMIC );if (!nskb) goto nomem;/* Make sure the outbound skb has enough header room reserved. */ -skb_reserve (nskb, packet->overhead +LL_MAX_HEADER ); +skb_reserve (nskb, packet->overhead +MAX_HEADER );/* Set the owning socket so that we know where to get the * destination IP address.
sound/pci/hda/patch_analog.c +1 -0
@@ -332,6 +332,7 @@ static const struct hda_fixup ad1986a_fixups[] = {static const struct snd_pci_quirk ad1986a_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x30af ,"HP B2800" ,AD1986A_FIXUP_LAPTOP_IMIC ), +SND_PCI_QUIRK (0x1043 ,0x1443 ,"ASUS Z99He" ,AD1986A_FIXUP_EAPD ),SND_PCI_QUIRK (0x1043 ,0x1447 ,"ASUS A8JN" ,AD1986A_FIXUP_EAPD ),SND_PCI_QUIRK_MASK (0x1043 ,0xff00 ,0x8100 ,"ASUS P5" ,AD1986A_FIXUP_3STACK ),SND_PCI_QUIRK_MASK (0x1043 ,0xff00 ,0x8200 ,"ASUS M2" ,AD1986A_FIXUP_3STACK ),
sound/pci/hda/patch_realtek.c +1 -0
@@ -5087,6 +5087,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x2212 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x17aa ,0x2214 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x17aa ,0x2215 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), +SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ),SND_PCI_QUIRK (0x17aa ,0x3978 ,"IdeaPad Y410P" ,ALC269_FIXUP_NO_SHUTUP ),SND_PCI_QUIRK (0x17aa ,0x5013 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
sound/usb/midi.c +2 -0
@@ -365,6 +365,8 @@ static void snd_usbmidi_error_timer(unsigned long data)if (in && in->error_resubmit) { in->error_resubmit =0 ;for (j =0 ; j <INPUT_URBS ; ++j) { +if (atomic_read (&in->urbs[j]->use_count)) +continue ; in->urbs[j]->dev = umidi->dev;snd_usbmidi_submit_urb (in->urbs[j],GFP_ATOMIC ); }