Linux 4.14.212
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.212 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/x86/include/asm/insn.h | 15 ++++++ arch/x86/kernel/uprobes.c | 10 ++-- drivers/i2c/busses/i2c-imx.c | 30 +++++++++++-- drivers/i2c/busses/i2c-qup.c | 3 - drivers/input/serio/i8042.c | 3 - drivers/iommu/amd_iommu_types.h | 2 drivers/pinctrl/intel/pinctrl-baytrail.c | 67 +++++++++++++++++++++++------- drivers/spi/spi-bcm-qspi.c | 34 +++++---------- drivers/spi/spi-bcm2835.c | 22 ++++----- drivers/spi/spi.c | 58 +++++++++++++++++++++++++ drivers/staging/speakup/spk_ttyio.c | 38 ++++++++++------- drivers/tty/tty_io.c | 7 ++- drivers/tty/tty_jobctrl.c | 44 +++++++++++++------ drivers/usb/gadget/function/f_fs.c | 6 +- drivers/usb/serial/ch341.c | 5 +- drivers/usb/serial/kl5kusb105.c | 10 +--- drivers/usb/serial/option.c | 10 ++-- fs/cifs/connect.c | 2 fs/gfs2/rgrp.c | 4 + include/linux/if_vlan.h | 29 +++++++++--- include/linux/spi/spi.h | 19 ++++++++ include/linux/tty.h | 4 + include/net/inet_ecn.h | 1 kernel/trace/ftrace.c | 22 +++++++++ kernel/trace/trace.c | 7 +-- kernel/trace/trace.h | 6 +- mm/swapfile.c | 4 + sound/pci/hda/hda_generic.c | 12 +++-- sound/pci/hda/hda_generic.h | 1 sound/pci/hda/patch_realtek.c | 2 tools/objtool/arch/x86/include/asm/insn.h | 15 ++++++ 32 files changed, 370 insertions(+), 124 deletions(-)
Bjørn Mork (1):
USB: serial: option: fix Quectel BG96 matching
Bob Peterson (1):
gfs2: check for empty rgrp tree in gfs2_ri_update
Christian Eggers (2):
i2c: imx: Fix reset of I2SR_IAL flag
i2c: imx: Check for I2SR_IAL after every byte
Giacinto Cifelli (1):
USB: serial: option: add support for Thales Cinterion EXS82
Greg Kroah-Hartman (1):
Linux 4.14.212
Hans de Goede (2):
pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output
pinctrl: baytrail: Fix pin being driven low for a while on gpiod_get(..., GPIOD_OUT_HIGH)
Jan-Niklas Burfeind (1):
USB: serial: ch341: add new Product ID for CH341A
Jann Horn (2):
tty: Fix ->pgrp locking in tiocspgrp()
tty: Fix ->session lockingJohan Hovold (2):
USB: serial: kl5kusb105: fix memleak on open
USB: serial: ch341: sort device-id entries
Kailang Yang (1):
ALSA: hda/realtek - Add new codec supported for ALC897
Lukas Wunner (3):
spi: Introduce device-managed SPI controller allocation
spi: bcm-qspi: Fix use-after-free on unbind
spi: bcm2835: Fix use-after-free on unbind
Luo Meng (1):
Input: i8042 - fix error return code in i8042_setup_aux()
Masami Hiramatsu (1):
x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes
Naveen N. Rao (1):
ftrace: Fix updating FTRACE_FL_TRAMP
Paulo Alcantara (1):
cifs: fix potential use-after-free in cifs_echo_request()
Peter Ujfalusi (1):
spi: bcm2835: Release the DMA channel if probe fails after dma_init
Qian Cai (1):
mm/swapfile: do not sleep with a spin lock held
Samuel Thibault (1):
speakup: Reject setting the speakup line discipline outside of speakup
Steven Rostedt (VMware) (1):
tracing: Fix userstacktrace option for instances
Suravee Suthikulpanit (1):
iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs
Takashi Iwai (1):
ALSA: hda/generic: Add option to enforce preferred_dacs pairs
Toke Høiland-Jørgensen (1):
vlan: consolidate VLAN parsing code and limit max parsing depth
Vamsi Krishna Samavedam (1):
usb: gadget: f_fs: Use local copy of descriptors for userspace copy
Vincent Palatin (1):
USB: serial: option: add Fibocom NL668 variants
Zhihao Cheng (1):
i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 211 +SUBLEVEL = 212 EXTRAVERSION = NAME = Petit Gorille
arch/x86/include/asm/insn.h +15 -0
@@ -208,6 +208,21 @@ static inline int insn_offset_immediate(struct insn *insn)return insn_offset_displacement (insn) + insn->displacement.nbytes; } +/** +* for_each_insn_prefix() -- Iterate prefixes in the instruction +* @insn: Pointer to struct insn. +* @idx: Index storage. +* @prefix: Prefix byte. +* +* Iterate prefix bytes of given @insn. Each prefix byte is stored in @prefix +* and the index is stored in @idx (note that this @idx is just for a cursor, +* do not change it.) +* Since prefixes.nbytes can be bigger than 4 if some prefixes +* are repeated, it cannot be used for looping over the prefixes. +*/ +#define for_each_insn_prefix (insn, idx, prefix) \ + for (idx = 0; idx < ARRAY_SIZE(insn->prefixes.bytes) && (prefix = insn->prefixes.bytes[idx]) != 0; idx++) +#define POP_SS_OPCODE 0x1f#define MOV_SREG_OPCODE 0x8e
arch/x86/kernel/uprobes.c +6 -4
@@ -268,10 +268,11 @@ static volatile u32 good_2byte_insns[256 / 32] = {static bool is_prefix_bad (struct insn *insn) { +insn_byte_t p;int i; -for (i =0 ; i < insn->prefixes.nbytes; i++) { -switch (insn->prefixes.bytes[i]) { +for_each_insn_prefix (insn, i, p) { +switch (p) {case 0x26 :/* INAT_PFX_ES */ case 0x2E :/* INAT_PFX_CS */ case 0x36 :/* INAT_PFX_DS */
@@ -711,6 +712,7 @@ static const struct uprobe_xol_ops branch_xol_ops = {static int branch_setup_xol_ops (struct arch_uprobe *auprobe,struct insn *insn) {u8 opc1 =OPCODE1 (insn); +insn_byte_t p;int i;switch (opc1) {
@@ -741,8 +743,8 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)* Intel and AMD behavior differ in 64-bit mode: Intel ignores 66 prefix. * No one uses these insns, reject any branch insns with such prefix. */ -for (i =0 ; i < insn->prefixes.nbytes; i++) { -if (insn->prefixes.bytes[i] ==0x66 ) +for_each_insn_prefix (insn, i, p) { +if (p ==0x66 )return -ENOTSUPP ; }
drivers/i2c/busses/i2c-imx.c +25 -5
@@ -413,6 +413,19 @@ static void i2c_imx_dma_free(struct imx_i2c_struct *i2c_imx) dma->chan_using =NULL ; } +static void i2c_imx_clear_irq (struct imx_i2c_struct *i2c_imx,unsigned int bits) +{ +unsigned int temp; + +/* +* i2sr_clr_opcode is the value to clear all interrupts. Here we want to +* clear only <bits>, so we write ~i2sr_clr_opcode with just <bits> +* toggled. This is required because i.MX needs W0C and Vybrid uses W1C. +*/ + temp = ~i2c_imx->hwdata->i2sr_clr_opcode ^ bits; +imx_i2c_write_reg (temp, i2c_imx,IMX_I2C_I2SR ); +} +static int i2c_imx_bus_busy (struct imx_i2c_struct *i2c_imx,int for_busy) {unsigned long orig_jiffies = jiffies;
@@ -425,8 +438,7 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)/* check for arbitration lost */ if (temp &I2SR_IAL ) { - temp &= ~I2SR_IAL ; -imx_i2c_write_reg (temp, i2c_imx,IMX_I2C_I2SR ); +i2c_imx_clear_irq (i2c_imx,I2SR_IAL );return -EAGAIN ; }
@@ -453,6 +465,16 @@ static int i2c_imx_trx_complete(struct imx_i2c_struct *i2c_imx)dev_dbg (&i2c_imx->adapter.dev,"<%s> Timeout\n" , __func__);return -ETIMEDOUT ; } + +/* check for arbitration lost */ +if (i2c_imx->i2csr &I2SR_IAL ) { +dev_dbg (&i2c_imx->adapter.dev,"<%s> Arbitration lost\n" , __func__); +i2c_imx_clear_irq (i2c_imx,I2SR_IAL ); + + i2c_imx->i2csr =0 ; +return -EAGAIN ; + } +dev_dbg (&i2c_imx->adapter.dev,"<%s> TRX complete\n" , __func__); i2c_imx->i2csr =0 ;return 0 ;
@@ -595,9 +617,7 @@ static irqreturn_t i2c_imx_isr(int irq, void *dev_id)if (temp &I2SR_IIF ) {/* save status register */ i2c_imx->i2csr = temp; - temp &= ~I2SR_IIF ; - temp |= (i2c_imx->hwdata->i2sr_clr_opcode &I2SR_IIF ); -imx_i2c_write_reg (temp, i2c_imx,IMX_I2C_I2SR ); +i2c_imx_clear_irq (i2c_imx,I2SR_IIF );wake_up (&i2c_imx->queue);return IRQ_HANDLED ; }
drivers/i2c/busses/i2c-qup.c +2 -1
@@ -846,7 +846,8 @@ static int qup_i2c_bam_do_xfer(struct qup_i2c_dev *qup, struct i2c_msg *msg,if (ret || qup->bus_err || qup->qup_err) {reinit_completion (&qup->xfer); -if (qup_i2c_change_state (qup,QUP_RUN_STATE )) { + ret =qup_i2c_change_state (qup,QUP_RUN_STATE ); +if (ret) {dev_err (qup->dev,"change to run state timed out" ); goto desc_err; }
drivers/input/serio/i8042.c +2 -1
@@ -1458,7 +1458,8 @@ static int __init i8042_setup_aux(void)if (error) goto err_free_ports; -if (aux_enable ()) + error =aux_enable (); +if (error) goto err_free_irq; i8042_aux_irq_registered = true;
drivers/iommu/amd_iommu_types.h +1 -1
@@ -255,7 +255,7 @@#define DTE_IRQ_REMAP_INTCTL_MASK (0x3ULL << 60)#define DTE_IRQ_TABLE_LEN_MASK (0xfULL << 1)#define DTE_IRQ_REMAP_INTCTL (2ULL << 60) -#define DTE_IRQ_TABLE_LEN (8ULL << 1) +#define DTE_IRQ_TABLE_LEN (9ULL << 1)#define DTE_IRQ_REMAP_ENABLE 1ULL#define PAGE_MODE_NONE 0x00
drivers/pinctrl/intel/pinctrl-baytrail.c +53 -14
99 lines not on this page · raw message
drivers/spi/spi-bcm-qspi.c +12 -22
@@ -1219,7 +1219,7 @@ int bcm_qspi_probe(struct platform_device *pdev,if (!of_match_node (bcm_qspi_of_match, dev->of_node))return -ENODEV ; - master =spi_alloc_master (dev,sizeof (struct bcm_qspi )); + master =devm_spi_alloc_master (dev,sizeof (struct bcm_qspi ));if (!master) {dev_err (dev,"error allocating spi_master\n" );return -ENOMEM ;
@@ -1253,21 +1253,17 @@ int bcm_qspi_probe(struct platform_device *pdev,if (res) { qspi->base[MSPI ] =devm_ioremap_resource (dev, res); -if (IS_ERR (qspi->base[MSPI ])) { - ret =PTR_ERR (qspi->base[MSPI ]); - goto qspi_resource_err; - } +if (IS_ERR (qspi->base[MSPI ])) +return PTR_ERR (qspi->base[MSPI ]); }else { - goto qspi_resource_err; +return 0 ; } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"bspi" );if (res) { qspi->base[BSPI ] =devm_ioremap_resource (dev, res); -if (IS_ERR (qspi->base[BSPI ])) { - ret =PTR_ERR (qspi->base[BSPI ]); - goto qspi_resource_err; - } +if (IS_ERR (qspi->base[BSPI ])) +return PTR_ERR (qspi->base[BSPI ]); qspi->bspi_mode = true; }else { qspi->bspi_mode = false;
@@ -1278,18 +1274,14 @@ int bcm_qspi_probe(struct platform_device *pdev, res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"cs_reg" );if (res) { qspi->base[CHIP_SELECT ] =devm_ioremap_resource (dev, res); -if (IS_ERR (qspi->base[CHIP_SELECT ])) { - ret =PTR_ERR (qspi->base[CHIP_SELECT ]); - goto qspi_resource_err; - } +if (IS_ERR (qspi->base[CHIP_SELECT ])) +return PTR_ERR (qspi->base[CHIP_SELECT ]); } qspi->dev_ids =kcalloc (num_irqs,sizeof (struct bcm_qspi_dev_id ),GFP_KERNEL ); -if (!qspi->dev_ids) { - ret = -ENOMEM ; - goto qspi_resource_err; - } +if (!qspi->dev_ids) +return -ENOMEM ;for (val =0 ; val < num_irqs; val++) { irq =-1 ;
@@ -1365,7 +1357,7 @@ int bcm_qspi_probe(struct platform_device *pdev, qspi->xfer_mode.addrlen =-1 ; qspi->xfer_mode.hp =-1 ; - ret =devm_spi_register_master (&pdev->dev, master); + ret =spi_register_master (master);if (ret <0 ) {dev_err (dev,"can't register master\n" ); goto qspi_reg_err;
@@ -1378,8 +1370,6 @@ int bcm_qspi_probe(struct platform_device *pdev,clk_disable_unprepare (qspi->clk); qspi_probe_err:kfree (qspi->dev_ids); -qspi_resource_err: -spi_master_put (master);return ret; }/* probe function to be called by SoC specific platform driver probe */
@@ -1389,10 +1379,10 @@ int bcm_qspi_remove(struct platform_device *pdev) {struct bcm_qspi *qspi =platform_get_drvdata (pdev); +spi_unregister_master (qspi->master);bcm_qspi_hw_uninit (qspi);clk_disable_unprepare (qspi->clk);kfree (qspi->dev_ids); -spi_unregister_master (qspi->master);return 0 ; }
drivers/spi/spi-bcm2835.c +9 -13
@@ -737,7 +737,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)struct resource *res;int err; - master =spi_alloc_master (&pdev->dev,sizeof (*bs)); + master =devm_spi_alloc_master (&pdev->dev,sizeof (*bs));if (!master) {dev_err (&pdev->dev,"spi_alloc_master() failed\n" );return -ENOMEM ;
@@ -759,23 +759,20 @@ static int bcm2835_spi_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); bs->regs =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (bs->regs)) { - err =PTR_ERR (bs->regs); - goto out_master_put; - } +if (IS_ERR (bs->regs)) +return PTR_ERR (bs->regs); bs->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (bs->clk)) { err =PTR_ERR (bs->clk);dev_err (&pdev->dev,"could not get clk: %d\n" , err); - goto out_master_put; +return err; } bs->irq =platform_get_irq (pdev,0 );if (bs->irq <=0 ) {dev_err (&pdev->dev,"could not get IRQ: %d\n" , bs->irq); - err = bs->irq ? bs->irq : -ENODEV ; - goto out_master_put; +return bs->irq ? bs->irq : -ENODEV ; }clk_prepare_enable (bs->clk);
@@ -790,21 +787,20 @@ static int bcm2835_spi_probe(struct platform_device *pdev) dev_name(&pdev->dev), master);if (err) {dev_err (&pdev->dev,"could not request IRQ: %d\n" , err); - goto out_clk_disable; + goto out_dma_release; } err =spi_register_master (master);if (err) {dev_err (&pdev->dev,"could not register SPI master: %d\n" , err); - goto out_clk_disable; + goto out_dma_release; }return 0 ; -out_clk_disable: +out_dma_release: +bcm2835_dma_release (master);clk_disable_unprepare (bs->clk); -out_master_put: -spi_master_put (master);return err; }
drivers/spi/spi.c +57 -1
76 lines not on this page · raw message
drivers/staging/speakup/spk_ttyio.c +23 -15
@@ -46,28 +46,20 @@ static int spk_ttyio_ldisc_open(struct tty_struct *tty) {struct spk_ldisc_data *ldisc_data; +if (tty != speakup_tty) +/* Somebody tried to use this line discipline outside speakup */ +return -ENODEV ; +if (tty->ops->write ==NULL )return -EOPNOTSUPP ; -mutex_lock (&speakup_tty_mutex); -if (speakup_tty) { -mutex_unlock (&speakup_tty_mutex); -return -EBUSY ; - } - speakup_tty = tty; - ldisc_data =kmalloc (sizeof (struct spk_ldisc_data ),GFP_KERNEL ); -if (!ldisc_data) { - speakup_tty =NULL ; -mutex_unlock (&speakup_tty_mutex); -pr_err ("speakup: Failed to allocate ldisc_data.\n" ); +if (!ldisc_data)return -ENOMEM ; - }sema_init (&ldisc_data->sem,0 ); ldisc_data->buf_free = true; - speakup_tty->disc_data = ldisc_data; -mutex_unlock (&speakup_tty_mutex); + tty->disc_data = ldisc_data;return 0 ; }
@@ -184,9 +176,25 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth)tty_unlock (tty); +mutex_lock (&speakup_tty_mutex); + speakup_tty = tty; ret =tty_set_ldisc (tty,N_SPEAKUP );if (ret) -pr_err ("speakup: Failed to set N_SPEAKUP on tty\n" ); + speakup_tty =NULL ; +mutex_unlock (&speakup_tty_mutex); + +if (!ret) +/* Success */ +return 0 ; + +pr_err ("speakup: Failed to set N_SPEAKUP on tty\n" ); + +tty_lock (tty); +if (tty->ops->close) + tty->ops->close (tty,NULL ); +tty_unlock (tty); + +tty_kclose (tty);return ret; }
drivers/tty/tty_io.c +6 -1
@@ -2739,10 +2739,14 @@ void __do_SAK(struct tty_struct *tty)struct task_struct *g, *p;struct pid *session;int i; +unsigned long flags;if (!tty)return ; - session = tty->session; + +spin_lock_irqsave (&tty->ctrl_lock, flags); + session =get_pid (tty->session); +spin_unlock_irqrestore (&tty->ctrl_lock, flags);tty_ldisc_flush (tty);
@@ -2774,6 +2778,7 @@ void __do_SAK(struct tty_struct *tty) task_unlock(p); }while_each_thread (g, p);read_unlock (&tasklist_lock); +put_pid (session);#endif }
drivers/tty/tty_jobctrl.c +31 -13
105 lines not on this page · raw message
drivers/usb/gadget/function/f_fs.c +4 -2
@@ -1244,7 +1244,7 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code,case FUNCTIONFS_ENDPOINT_DESC : {int desc_idx; -struct usb_endpoint_descriptor *desc; +struct usb_endpoint_descriptor desc1, *desc;switch (epfile->ffs->gadget->speed) {case USB_SPEED_SUPER :
@@ -1256,10 +1256,12 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code,default : desc_idx =0 ; } + desc = epfile->ep->descs[desc_idx]; +memcpy (&desc1, desc, desc->bLength);spin_unlock_irq (&epfile->ffs->eps_lock); - ret =copy_to_user ((void *)value, desc, desc->bLength); + ret =copy_to_user ((void *)value, &desc1, desc1.bLength);if (ret) ret = -EFAULT ;return ret;
drivers/usb/serial/ch341.c +3 -2
@@ -83,10 +83,11 @@#define CH341_LCR_CS5 0x00static const struct usb_device_id id_table[] = { - {USB_DEVICE (0x4348 ,0x5523 ) }, + {USB_DEVICE (0x1a86 ,0x5512 ) }, + {USB_DEVICE (0x1a86 ,0x5523 ) }, {USB_DEVICE (0x1a86 ,0x7522 ) }, {USB_DEVICE (0x1a86 ,0x7523 ) }, - {USB_DEVICE (0x1a86 ,0x5523 ) }, + {USB_DEVICE (0x4348 ,0x5523 ) }, { }, };MODULE_DEVICE_TABLE (usb, id_table);
drivers/usb/serial/kl5kusb105.c +4 -6
@@ -281,12 +281,12 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) priv->cfg.unknown2 = cfg->unknown2;spin_unlock_irqrestore (&priv->lock, flags); +kfree (cfg); +/* READ_ON and urb submission */ rc =usb_serial_generic_open (tty, port); -if (rc) { - retval = rc; - goto err_free_cfg; - } +if (rc) +return rc; rc = usb_control_msg(port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0),
@@ -329,8 +329,6 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) KLSI_TIMEOUT); err_generic_close:usb_serial_generic_close (port); -err_free_cfg: -kfree (cfg);return retval; }
drivers/usb/serial/option.c +6 -4
@@ -422,6 +422,7 @@ static void option_instat_callback(struct urb *urb);#define CINTERION_PRODUCT_PH8 0x0053#define CINTERION_PRODUCT_AHXX 0x0055#define CINTERION_PRODUCT_PLXX 0x0060 +#define CINTERION_PRODUCT_EXS82 0x006c#define CINTERION_PRODUCT_PH8_2RMNET 0x0082#define CINTERION_PRODUCT_PH8_AUDIO 0x0083#define CINTERION_PRODUCT_AHXX_2RMNET 0x0084
@@ -1108,9 +1109,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff), .driver_info = NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) }, - { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0xff, 0xff), - .driver_info = NUMEP2 }, - { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96, 0xff, 0, 0) }, + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), + .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
@@ -1905,6 +1905,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_AUDIO, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_CLS8, 0xff), .driver_info = RSVD(0) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EXS82, 0xff) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) },
@@ -2048,12 +2049,13 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, - { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 */ + { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ .driver_info = RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
fs/cifs/connect.c +2 -0
@@ -756,6 +756,8 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)list_del_init (&server->tcp_ses_list);spin_unlock (&cifs_tcp_ses_lock); +cancel_delayed_work_sync (&server->echo); +spin_lock (&GlobalMid_Lock); server->tcpStatus = CifsExiting;spin_unlock (&GlobalMid_Lock);
fs/gfs2/rgrp.c +4 -0
@@ -990,6 +990,10 @@ static int gfs2_ri_update(struct gfs2_inode *ip)if (error <0 )return error; +if (RB_EMPTY_ROOT (&sdp->sd_rindex_tree)) { +fs_err (sdp,"no resource groups found in the file system.\n" ); +return -ENOENT ; + }set_rgrp_preferences (sdp); sdp->sd_rindex_uptodate =1 ;
include/linux/if_vlan.h +22 -7
@@ -30,6 +30,8 @@#define VLAN_ETH_DATA_LEN 1500/* Max. octets in payload */ #define VLAN_ETH_FRAME_LEN 1518/* Max. octets in frame sans FCS */ +#define VLAN_MAX_DEPTH 8/* Max. number of nested VLAN tags parsed */ +/* * struct vlan_hdr - vlan header * @h_vlan_TCI: priority and VLAN ID
@@ -534,10 +536,10 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)* Returns the EtherType of the packet, regardless of whether it is * vlan encapsulated (normal or hardware accelerated) or not. */ -static inline __be16 __vlan_get_protocol (struct sk_buff *skb,__be16 type, +static inline __be16 __vlan_get_protocol (const struct sk_buff *skb,__be16 type,int *depth) { -unsigned int vlan_depth = skb->mac_len; +unsigned int vlan_depth = skb->mac_len, parse_depth =VLAN_MAX_DEPTH ;/* if type is 802.1Q/AD then the header should already be * present at mac_len - VLAN_HLEN (if mac_len > 0), or at
@@ -552,13 +554,12 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, vlan_depth =ETH_HLEN ; }do { -struct vlan_hdr *vh; +struct vlan_hdr vhdr, *vh; -if (unlikely (!pskb_may_pull (skb, - vlan_depth +VLAN_HLEN ))) + vh =skb_header_pointer (skb, vlan_depth,sizeof (vhdr), &vhdr); +if (unlikely (!vh || !--parse_depth))return 0 ; - vh = (struct vlan_hdr *)(skb->data + vlan_depth); type = vh->h_vlan_encapsulated_proto; vlan_depth +=VLAN_HLEN ; }while (eth_type_vlan (type));
@@ -577,11 +578,25 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type,* Returns the EtherType of the packet, regardless of whether it is * vlan encapsulated (normal or hardware accelerated) or not. */ -static inline __be16 vlan_get_protocol (struct sk_buff *skb) +static inline __be16 vlan_get_protocol (const struct sk_buff *skb) {return __vlan_get_protocol (skb, skb->protocol,NULL ); } +/* A getter for the SKB protocol field which will handle VLAN tags consistently +* whether VLAN acceleration is enabled or not. +*/ +static inline __be16 skb_protocol (const struct sk_buff *skb,bool skip_vlan) +{ +if (!skip_vlan) +/* VLAN acceleration strips the VLAN header from the skb and +* moves it to skb->vlan_proto +*/ +return skb_vlan_tag_present (skb) ? skb->vlan_proto : skb->protocol; + +return vlan_get_protocol (skb); +} +static inline void vlan_set_encap_proto (struct sk_buff *skb,struct vlan_hdr *vhdr) {
include/linux/spi/spi.h +19 -0
@@ -638,6 +638,25 @@ static inline struct spi_controller *spi_alloc_slave(struct device *host,return __spi_alloc_controller (host, size, true); } +struct spi_controller *__devm_spi_alloc_controller (struct device *dev, +unsigned int size, +bool slave); + +static inline struct spi_controller *devm_spi_alloc_master (struct device *dev, +unsigned int size) +{ +return __devm_spi_alloc_controller (dev, size, false); +} + +static inline struct spi_controller *devm_spi_alloc_slave (struct device *dev, +unsigned int size) +{ +if (!IS_ENABLED (CONFIG_SPI_SLAVE )) +return NULL ; + +return __devm_spi_alloc_controller (dev, size, true); +} +extern int spi_register_controller (struct spi_controller *ctlr);extern int devm_spi_register_controller (struct device *dev,struct spi_controller *ctlr);
include/linux/tty.h +4 -0
@@ -305,6 +305,10 @@ struct tty_struct {struct termiox *termiox;/* May be NULL for unsupported */ char name[64 ];struct pid *pgrp;/* Protected by ctrl lock */ +/* +* Writes protected by both ctrl lock and legacy mutex, readers must use +* at least one of them. +*/ struct pid *session;unsigned long flags;int count;
include/net/inet_ecn.h +1 -0
@@ -4,6 +4,7 @@#include <linux/ip.h> #include <linux/skbuff.h> +#include <linux/if_vlan.h> #include <net/inet_sock.h> #include <net/dsfield.h>
kernel/trace/ftrace.c +21 -1
@@ -1715,6 +1715,8 @@ static bool test_rec_ops_needs_regs(struct dyn_ftrace *rec)static struct ftrace_ops *ftrace_find_tramp_ops_any (struct dyn_ftrace *rec);static struct ftrace_ops * +ftrace_find_tramp_ops_any_other (struct dyn_ftrace *rec,struct ftrace_ops *op_exclude); +static struct ftrace_ops *ftrace_find_tramp_ops_next (struct dyn_ftrace *rec,struct ftrace_ops *ops); static bool __ftrace_hash_rec_update(struct ftrace_ops *ops,
@@ -1852,7 +1854,7 @@ static bool __ftrace_hash_rec_update(struct ftrace_ops *ops,* to it. */ if (ftrace_rec_count (rec) ==1 && -ftrace_find_tramp_ops_any (rec)) +ftrace_find_tramp_ops_any_other (rec, ops)) rec->flags |=FTRACE_FL_TRAMP ;else rec->flags &= ~FTRACE_FL_TRAMP ;
@@ -2280,6 +2282,24 @@ ftrace_find_tramp_ops_any(struct dyn_ftrace *rec)return NULL ; } +static struct ftrace_ops * +ftrace_find_tramp_ops_any_other (struct dyn_ftrace *rec,struct ftrace_ops *op_exclude) +{ +struct ftrace_ops *op; +unsigned long ip = rec->ip; + +do_for_each_ftrace_op (op, ftrace_ops_list) { + +if (op == op_exclude || !op->trampoline) +continue ; + +if (hash_contains_ip (ip, op->func_hash)) +return op; + }while_for_each_ftrace_op (op); + +return NULL ; +} +static struct ftrace_ops *ftrace_find_tramp_ops_next (struct dyn_ftrace *rec,struct ftrace_ops *op)
kernel/trace/trace.c +4 -3
@@ -2404,7 +2404,7 @@ void trace_buffer_unlock_commit_regs(struct trace_array *tr,* two. They are that meaningful. */ ftrace_trace_stack (tr, buffer, flags, regs ?0 :4 , pc, regs); -ftrace_trace_userstack (buffer, flags, pc); +ftrace_trace_userstack (tr, buffer, flags, pc); }/*
@@ -2734,14 +2734,15 @@ void trace_dump_stack(int skip) static DEFINE_PER_CPU(int, user_stack_count);void -ftrace_trace_userstack (struct ring_buffer *buffer,unsigned long flags,int pc) +ftrace_trace_userstack (struct trace_array *tr, +struct ring_buffer *buffer,unsigned long flags,int pc) {struct trace_event_call *call = &event_user_stack;struct ring_buffer_event *event;struct userstack_entry *entry;struct stack_trace trace; -if (!(global_trace.trace_flags &TRACE_ITER_USERSTACKTRACE )) +if (!(tr->trace_flags &TRACE_ITER_USERSTACKTRACE ))return ;/*
kernel/trace/trace.h +4 -2
@@ -739,13 +739,15 @@ void update_max_tr_single(struct trace_array *tr,#endif /* CONFIG_TRACER_MAX_TRACE */ #ifdef CONFIG_STACKTRACE -void ftrace_trace_userstack (struct ring_buffer *buffer,unsigned long flags, +void ftrace_trace_userstack (struct trace_array *tr, +struct ring_buffer *buffer,unsigned long flags,int pc);void __trace_stack (struct trace_array *tr,unsigned long flags,int skip,int pc);#else -static inline void ftrace_trace_userstack (struct ring_buffer *buffer, +static inline void ftrace_trace_userstack (struct trace_array *tr, +struct ring_buffer *buffer,unsigned long flags,int pc) { }
mm/swapfile.c +3 -1
@@ -2828,6 +2828,7 @@ late_initcall(max_swapfiles_check);static struct swap_info_struct *alloc_swap_info (void ) {struct swap_info_struct *p; +struct swap_info_struct *defer =NULL ;unsigned int type;int i;int size =sizeof (*p) + nr_node_ids *sizeof (struct plist_node );
@@ -2857,7 +2858,7 @@ static struct swap_info_struct *alloc_swap_info(void)smp_wmb (); nr_swapfiles++; }else { -kvfree (p); + defer = p; p = swap_info[type];/* * Do not memset this entry: a racing procfs swap_next()
@@ -2870,6 +2871,7 @@ static struct swap_info_struct *alloc_swap_info(void)plist_node_init (&p->avail_lists[i],0 ); p->flags =SWP_USED ;spin_unlock (&swap_lock); +kvfree (defer);spin_lock_init (&p->lock);spin_lock_init (&p->cont_lock);
sound/pci/hda/hda_generic.c +8 -4
@@ -1374,16 +1374,20 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,struct nid_path *path;hda_nid_t pin = pins[i]; - path =snd_hda_get_path_from_idx (codec, path_idx[i]); -if (path) { - badness +=assign_out_path_ctls (codec, path); -continue ; +if (!spec->obey_preferred_dacs) { + path =snd_hda_get_path_from_idx (codec, path_idx[i]); +if (path) { + badness +=assign_out_path_ctls (codec, path); +continue ; + } } dacs[i] =get_preferred_dac (codec, pin);if (dacs[i]) {if (is_dac_already_used (codec, dacs[i])) badness += bad->shared_primary; + }else if (spec->obey_preferred_dacs) { + badness +=BAD_NO_PRIMARY_DAC ; }if (!dacs[i])
sound/pci/hda/hda_generic.h +1 -0
@@ -230,6 +230,7 @@ struct hda_gen_spec { unsigned int power_down_unused:1; /* power down unused widgets */ unsigned int dac_min_mute:1; /* minimal = mute for DACs */ unsigned int suppress_vmaster:1; /* don't create vmaster kctls */ + unsigned int obey_preferred_dacs:1; /* obey preferred_dacs assignment *//* other internal flags */ unsigned int no_analog:1; /* digital I/O only */
sound/pci/hda/patch_realtek.c +2 -0
@@ -392,6 +392,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)alc_update_coef_idx (codec,0x7 ,1 <<5 ,0 );break ;case 0x10ec0892 : +case 0x10ec0897 :alc_update_coef_idx (codec,0x7 ,1 <<5 ,0 );break ;case 0x10ec0899 :
@@ -8443,6 +8444,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {HDA_CODEC_ENTRY (0x10ec0888 ,"ALC888" , patch_alc882),HDA_CODEC_ENTRY (0x10ec0889 ,"ALC889" , patch_alc882),HDA_CODEC_ENTRY (0x10ec0892 ,"ALC892" , patch_alc662), +HDA_CODEC_ENTRY (0x10ec0897 ,"ALC897" , patch_alc662),HDA_CODEC_ENTRY (0x10ec0899 ,"ALC898" , patch_alc882),HDA_CODEC_ENTRY (0x10ec0900 ,"ALC1150" , patch_alc882), HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
tools/objtool/arch/x86/include/asm/insn.h +15 -0
@@ -208,6 +208,21 @@ static inline int insn_offset_immediate(struct insn *insn)return insn_offset_displacement (insn) + insn->displacement.nbytes; } +/** +* for_each_insn_prefix() -- Iterate prefixes in the instruction +* @insn: Pointer to struct insn. +* @idx: Index storage. +* @prefix: Prefix byte. +* +* Iterate prefix bytes of given @insn. Each prefix byte is stored in @prefix +* and the index is stored in @idx (note that this @idx is just for a cursor, +* do not change it.) +* Since prefixes.nbytes can be bigger than 4 if some prefixes +* are repeated, it cannot be used for looping over the prefixes. +*/ +#define for_each_insn_prefix (insn, idx, prefix) \ + for (idx = 0; idx < ARRAY_SIZE(insn->prefixes.bytes) && (prefix = insn->prefixes.bytes[idx]) != 0; idx++) +#define POP_SS_OPCODE 0x1f#define MOV_SREG_OPCODE 0x8e