Linux 4.9.273
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.273 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/mips/lib/mips-atomic.c | 12 +- arch/powerpc/boot/dts/fsl/p1010si-post.dtsi | 8 + arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 16 +++ drivers/gpu/drm/drm_auth.c | 3 drivers/i2c/busses/i2c-mpc.c | 95 +++++++++++++++++++++- drivers/isdn/hardware/mISDN/netjet.c | 1 drivers/net/appletalk/cops.c | 4 drivers/net/bonding/bond_main.c | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 drivers/net/ethernet/cadence/macb.c | 3 drivers/net/ethernet/qlogic/qla3xxx.c | 2 drivers/net/phy/mdio_bus.c | 3 drivers/scsi/hosts.c | 25 +++-- drivers/scsi/qla2xxx/qla_target.c | 2 drivers/scsi/vmw_pvscsi.c | 8 + drivers/usb/dwc3/ep0.c | 3 drivers/usb/gadget/config.c | 8 + drivers/usb/gadget/function/f_ecm.c | 2 drivers/usb/gadget/function/f_eem.c | 6 - drivers/usb/gadget/function/f_loopback.c | 2 drivers/usb/gadget/function/f_ncm.c | 2 drivers/usb/gadget/function/f_printer.c | 3 drivers/usb/gadget/function/f_rndis.c | 2 drivers/usb/gadget/function/f_serial.c | 2 drivers/usb/gadget/function/f_sourcesink.c | 3 drivers/usb/gadget/function/f_subset.c | 2 drivers/usb/gadget/function/f_tcm.c | 3 drivers/usb/serial/ftdi_sio.c | 1 drivers/usb/serial/ftdi_sio_ids.h | 1 drivers/usb/serial/omninet.c | 2 drivers/usb/serial/quatech2.c | 6 - fs/btrfs/file.c | 4 fs/nfs/client.c | 2 fs/nfs/nfs4proc.c | 8 + fs/proc/base.c | 11 ++ include/linux/kvm_host.h | 11 ++ kernel/cgroup.c | 17 ++- kernel/events/core.c | 2 kernel/trace/ftrace.c | 8 + kernel/trace/trace.c | 2 kernel/workqueue.c | 12 ++ net/netlink/af_netlink.c | 6 - net/nfc/rawsock.c | 2 sound/soc/codecs/sti-sas.c | 1 tools/perf/util/session.c | 1 46 files changed, 261 insertions(+), 64 deletions(-)
Alexander Kuznetsov (1):
cgroup1: don't allow '\n' in renaming
Alexandre GRIVEAUX (1):
USB: serial: omninet: add device id for Zyxel Omni 56K Plus
Chris Packham (4):
powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers
i2c: mpc: Make use of i2c_recover_bus()
i2c: mpc: implement erratum A-004447 workaround
Dai Ngo (1):
NFSv4: nfs4_proc_set_acl needs to restore NFS_CAP_UIDGID_NOMAP on error.
Dan Carpenter (2):
net: mdiobus: get rid of a BUG_ON()
NFS: Fix a potential NULL dereference in nfs_get_client()
Desmond Cheong Zhi Xi (1):
drm: Lock pointer access in drm_master_release()
Dmitry Bogdanov (1):
scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal
George McCollister (1):
USB: serial: ftdi_sio: add NovaTech OrionMX product ID
Greg Kroah-Hartman (1):
Linux 4.9.273
Jeimon (1):
net/nfc/rawsock.c: fix a permission check bug
Jiapeng Chong (1):
bnx2x: Fix missing error code in bnx2x_iov_init_one()
Johan Hovold (1):
USB: serial: quatech2: fix control-request directions
Johannes Berg (2):
bonding: init notify_work earlier to avoid uninitialized use
netlink: disable IRQs for netlink_lock_table()
Kees Cook (1):
proc: Track /proc/$pid/attr/ opener mm_struct
Leo Yan (1):
perf session: Correct buffer copying when peeking events
Liangyan (1):
tracing: Correct the length check which causes memory corruption
Linus Torvalds (1):
proc: only require mm_struct for writing
Linyu Yuan (1):
usb: gadget: eem: fix wrong eem header operation
Maciej Żenczykowski (3):
USB: f_ncm: ncm_bitrate (speed) is unsigned
usb: fix various gadgets null ptr deref on 10gbps cabling.
usb: fix various gadget panics on 10gbps cabling
Marco Elver (1):
perf: Fix data race between pin_count increment/decrement
Marian-Cristian Rotariu (1):
usb: dwc3: ep0: fix NULL pointer exception
Matt Wang (1):
scsi: vmw_pvscsi: Set correct residual data length
Ming Lei (2):
scsi: core: Fix error handling of scsi_host_alloc()
scsi: core: Only put parent device if host state differs from SHOST_CREATED
Paolo Bonzini (2):
kvm: avoid speculation-based attacks from out-of-range memslot accesses
kvm: fix previous commit for 32-bit builds
Ritesh Harjani (1):
btrfs: return value from btrfs_mark_extent_written() in case of error
Saubhik Mukherjee (1):
net: appletalk: cops: Fix data race in cops_probe1
Sergey Senozhatsky (1):
wq: handle VM suspension in stall detection
Shakeel Butt (1):
cgroup: disable controllers at parse time
Steven Rostedt (VMware) (1):
ftrace: Do not blindly read the ip address in ftrace_bug()
Tiezhu Yang (1):
MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER
Zheyu Ma (2):
isdn: mISDN: netjet: Fix crash in nj_probe:
net/qla3xxx: fix schedule while atomic in ql_sem_spinlock
Zong Li (1):
net: macb: ensure the device is available before accessing GEMGXL control registers
Zou Wei (1):
ASoC: sti-sas: add missing MODULE_DEVICE_TABLE
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 272 +SUBLEVEL = 273 EXTRAVERSION = NAME = Roaring Lionus
arch/mips/lib/mips-atomic.c +6 -6
@@ -37,7 +37,7 @@*/ notrace void arch_local_irq_disable(void) { -preempt_disable (); +preempt_disable_notrace (); __asm__ __volatile__( " .set push \n"
@@ -53,7 +53,7 @@ notrace void arch_local_irq_disable(void) : /* no inputs */ : "memory"); -preempt_enable (); +preempt_enable_notrace (); }EXPORT_SYMBOL (arch_local_irq_disable);
@@ -61,7 +61,7 @@ notrace unsigned long arch_local_irq_save(void) {unsigned long flags; -preempt_disable (); +preempt_disable_notrace (); __asm__ __volatile__( " .set push \n"
@@ -78,7 +78,7 @@ notrace unsigned long arch_local_irq_save(void) : /* no inputs */ : "memory"); -preempt_enable (); +preempt_enable_notrace ();return flags; }
@@ -88,7 +88,7 @@ notrace void arch_local_irq_restore(unsigned long flags) {unsigned long __tmp1; -preempt_disable (); +preempt_disable_notrace (); __asm__ __volatile__( " .set push \n"
@@ -106,7 +106,7 @@ notrace void arch_local_irq_restore(unsigned long flags) : "0" (flags) : "memory"); -preempt_enable (); +preempt_enable_notrace (); }EXPORT_SYMBOL (arch_local_irq_restore);
arch/powerpc/boot/dts/fsl/p1010si-post.dtsi +8 -0
@@ -122,7 +122,15 @@ }; /include/ "pq3-i2c-0.dtsi" + i2c@3000 { + fsl,i2c-erratum-a004447; + }; + /include/ "pq3-i2c-1.dtsi" + i2c@3100 { + fsl,i2c-erratum-a004447; + }; + /include/ "pq3-duart-0.dtsi" /include/ "pq3-espi-0.dtsi" spi0: spi@7000 {
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi +16 -0
@@ -389,7 +389,23 @@ }; /include/ "qoriq-i2c-0.dtsi" + i2c@118000 { + fsl,i2c-erratum-a004447; + }; + + i2c@118100 { + fsl,i2c-erratum-a004447; + }; + /include/ "qoriq-i2c-1.dtsi" + i2c@119000 { + fsl,i2c-erratum-a004447; + }; + + i2c@119100 { + fsl,i2c-erratum-a004447; + }; + /include/ "qoriq-duart-0.dtsi" /include/ "qoriq-duart-1.dtsi" /include/ "qoriq-gpio-0.dtsi"
drivers/gpu/drm/drm_auth.c +2 -1
@@ -244,9 +244,10 @@ int drm_master_open(struct drm_file *file_priv)void drm_master_release (struct drm_file *file_priv) {struct drm_device *dev = file_priv->minor->dev; -struct drm_master *master = file_priv->master; +struct drm_master *master;mutex_lock (&dev->master_mutex); + master = file_priv->master;if (file_priv->magic)idr_remove (&file_priv->master->magic_map, file_priv->magic);
drivers/i2c/busses/i2c-mpc.c +93 -2
155 lines not on this page · raw message
drivers/isdn/hardware/mISDN/netjet.c +0 -1
@@ -1114,7 +1114,6 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) card->typ =NETJET_S_TJ300 ; card->base =pci_resource_start (pdev,0 ); - card->irq = pdev->irq;pci_set_drvdata (pdev, card); err =setup_instance (card);if (err)
drivers/net/appletalk/cops.c +2 -2
@@ -324,6 +324,8 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr)break ; } + dev->base_addr = ioaddr; +/* Reserve any actual interrupt. */ if (dev->irq) { retval =request_irq (dev->irq, cops_interrupt,0 , dev->name, dev);
@@ -331,8 +333,6 @@ static int __init cops_probe1(struct net_device *dev, int ioaddr) goto err_out; } - dev->base_addr = ioaddr; - lp =netdev_priv (dev);spin_lock_init (&lp->lock);
drivers/net/bonding/bond_main.c +1 -1
@@ -1280,6 +1280,7 @@ static struct slave *bond_alloc_slave(struct bonding *bond, slave->bond = bond; slave->dev = slave_dev; +INIT_DELAYED_WORK (&slave->notify_work, bond_netdev_notify_work);if (bond_kobj_init (slave))return NULL ;
@@ -1292,7 +1293,6 @@ static struct slave *bond_alloc_slave(struct bonding *bond,return NULL ; } } -INIT_DELAYED_WORK (&slave->notify_work, bond_netdev_notify_work);return slave; }
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +3 -1
@@ -1240,8 +1240,10 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, goto failed;/* SR-IOV capability was enabled but there are no VFs*/ -if (iov->total ==0 ) +if (iov->total ==0 ) { + err = -EINVAL ; goto failed; + } iov->nr_virtfn =min_t (u16, iov->total, num_vfs_param);
drivers/net/ethernet/cadence/macb.c +3 -0
@@ -2031,6 +2031,9 @@ static struct net_device_stats *gem_get_stats(struct macb *bp)struct gem_stats *hwstat = &bp->hw_stats.gem;struct net_device_stats *nstat = &bp->stats; +if (!netif_running (bp->dev)) +return nstat; +gem_update_stats (bp); nstat->rx_errors = (hwstat->rx_frame_check_sequence_errors +
drivers/net/ethernet/qlogic/qla3xxx.c +1 -1
@@ -115,7 +115,7 @@ static int ql_sem_spinlock(struct ql3_adapter *qdev, value =readl (&port_regs->CommonRegs.semaphoreReg);if ((value & (sem_mask >>16 )) == sem_bits)return 0 ; -ssleep (1 ); +mdelay (1000 ); }while (--seconds);return -1 ; }
drivers/net/phy/mdio_bus.c +2 -1
@@ -362,7 +362,8 @@ void mdiobus_unregister(struct mii_bus *bus)struct mdio_device *mdiodev;int i; -BUG_ON (bus->state !=MDIOBUS_REGISTERED ); +if (WARN_ON_ONCE (bus->state !=MDIOBUS_REGISTERED )) +return ; bus->state =MDIOBUS_UNREGISTERED ;for (i =0 ; i <PHY_MAX_ADDR ; i++) {
drivers/scsi/hosts.c +14 -11
@@ -368,7 +368,7 @@ static void scsi_host_dev_release(struct device *dev)ida_simple_remove (&host_index_ida, shost->host_no); -if (parent) +if (shost->shost_state !=SHOST_CREATED )put_device (parent);kfree (shost); }
@@ -421,8 +421,10 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)mutex_init (&shost->scan_mutex); index =ida_simple_get (&host_index_ida,0 ,0 ,GFP_KERNEL ); -if (index <0 ) - goto fail_kfree; +if (index <0 ) { +kfree (shost); +return NULL ; + } shost->host_no = index; shost->dma_channel =0xff ;
@@ -509,7 +511,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)shost_printk (KERN_WARNING , shost,"error handler thread failed to spawn, error = %ld\n" ,PTR_ERR (shost->ehandler)); - goto fail_index_remove; + goto fail; } shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d",
@@ -518,17 +520,18 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)if (!shost->tmf_work_q) {shost_printk (KERN_WARNING , shost,"failed to create tmf workq\n" ); - goto fail_kthread; + goto fail; }scsi_proc_hostdir_add (shost->hostt);return shost; + fail: +/* +* Host state is still SHOST_CREATED and that is enough to release +* ->shost_gendev. scsi_host_dev_release() will free +* dev_name(&shost->shost_dev). +*/ +put_device (&shost->shost_gendev); - fail_kthread: -kthread_stop (shost->ehandler); - fail_index_remove: -ida_simple_remove (&host_index_ida, shost->host_no); - fail_kfree: -kfree (shost);return NULL ; }EXPORT_SYMBOL (scsi_host_alloc);
drivers/scsi/qla2xxx/qla_target.c +2 -0
@@ -1224,6 +1224,7 @@ void qlt_stop_phase2(struct qla_tgt *tgt)"Waiting for %d IRQ commands to complete (tgt %p)" , tgt->irq_cmd_count, tgt); +mutex_lock (&tgt->ha->optrom_mutex);mutex_lock (&vha->vha_tgt.tgt_mutex);spin_lock_irqsave (&ha->hardware_lock, flags);while ((tgt->irq_cmd_count !=0 ) || (tgt->atio_irq_cmd_count !=0 )) {
@@ -1235,6 +1236,7 @@ void qlt_stop_phase2(struct qla_tgt *tgt) tgt->tgt_stopped =1 ;spin_unlock_irqrestore (&ha->hardware_lock, flags);mutex_unlock (&vha->vha_tgt.tgt_mutex); +mutex_unlock (&tgt->ha->optrom_mutex);ql_dbg (ql_dbg_tgt_mgt, vha,0xf00c ,"Stop of tgt %p finished" , tgt);
drivers/scsi/vmw_pvscsi.c +7 -1
@@ -577,7 +577,13 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,case BTSTAT_SUCCESS :case BTSTAT_LINKED_COMMAND_COMPLETED :case BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG : -/* If everything went fine, let's move on.. */ +/* +* Commands like INQUIRY may transfer less data than +* requested by the initiator via bufflen. Set residual +* count to make upper layer aware of the actual amount +* of data returned. +*/ +scsi_set_resid (cmd,scsi_bufflen (cmd) - e->dataLen); cmd->result = (DID_OK <<16 );break ;
drivers/usb/dwc3/ep0.c +3 -0
@@ -328,6 +328,9 @@ static struct dwc3_ep *dwc3_wIndex_to_dep(struct dwc3 *dwc, __le16 wIndex_le) epnum |=1 ; dep = dwc->eps[epnum]; +if (dep ==NULL ) +return NULL ; +if (dep->flags &DWC3_EP_ENABLED )return dep;
drivers/usb/gadget/config.c +8 -0
@@ -168,6 +168,14 @@ int usb_assign_descriptors(struct usb_function *f, {struct usb_gadget *g = f->config->cdev->gadget; +/* super-speed-plus descriptor falls back to super-speed one, +* if such a descriptor was provided, thus avoiding a NULL +* pointer dereference if a 5gbps capable gadget is used with +* a 10gbps capable config (device port + cable + host port) +*/ +if (!ssp) + ssp = ss; +if (fs) { f->fs_descriptors =usb_copy_descriptors (fs);if (!f->fs_descriptors)
drivers/usb/gadget/function/f_ecm.c +1 -1
@@ -793,7 +793,7 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f) fs_ecm_notify_desc.bEndpointAddress; status =usb_assign_descriptors (f, ecm_fs_function, ecm_hs_function, - ecm_ss_function,NULL ); + ecm_ss_function, ecm_ss_function);if (status) goto fail;
drivers/usb/gadget/function/f_eem.c +3 -3
@@ -309,7 +309,7 @@ static int eem_bind(struct usb_configuration *c, struct usb_function *f) eem_ss_out_desc.bEndpointAddress = eem_fs_out_desc.bEndpointAddress; status =usb_assign_descriptors (f, eem_fs_function, eem_hs_function, - eem_ss_function,NULL ); + eem_ss_function, eem_ss_function);if (status) goto fail;
@@ -502,7 +502,7 @@ static int eem_unwrap(struct gether *port, skb2 =skb_clone (skb,GFP_ATOMIC );if (unlikely (!skb2)) {DBG (cdev,"unable to unframe EEM packet\n" ); -continue ; + goto next; }skb_trim (skb2, len -ETH_FCS_LEN );
@@ -513,7 +513,7 @@ static int eem_unwrap(struct gether *port,if (unlikely (!skb3)) {DBG (cdev,"unable to realign EEM packet\n" );dev_kfree_skb_any (skb2); -continue ; + goto next; }dev_kfree_skb_any (skb2);skb_queue_tail (list, skb3);
drivers/usb/gadget/function/f_loopback.c +1 -1
@@ -211,7 +211,7 @@ static int loopback_bind(struct usb_configuration *c, struct usb_function *f) ss_loop_sink_desc.bEndpointAddress = fs_loop_sink_desc.bEndpointAddress; ret =usb_assign_descriptors (f, fs_loopback_descs, hs_loopback_descs, - ss_loopback_descs,NULL ); + ss_loopback_descs, ss_loopback_descs);if (ret)return ret;
drivers/usb/gadget/function/f_ncm.c +1 -1
@@ -588,7 +588,7 @@ static void ncm_do_notify(struct f_ncm *ncm) data[0 ] =cpu_to_le32 (ncm_bitrate (cdev->gadget)); data[1 ] = data[0 ]; -DBG (cdev,"notify speed %d\n" ,ncm_bitrate (cdev->gadget)); +DBG (cdev,"notify speed %u\n" ,ncm_bitrate (cdev->gadget)); ncm->notify_state =NCM_NOTIFY_CONNECT ;break ; }
drivers/usb/gadget/function/f_printer.c +2 -1
@@ -1057,7 +1057,8 @@ static int printer_func_bind(struct usb_configuration *c, ss_ep_out_desc.bEndpointAddress = fs_ep_out_desc.bEndpointAddress; ret =usb_assign_descriptors (f, fs_printer_function, - hs_printer_function, ss_printer_function,NULL ); + hs_printer_function, ss_printer_function, + ss_printer_function);if (ret)return ret;
drivers/usb/gadget/function/f_rndis.c +1 -1
@@ -789,7 +789,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) ss_notify_desc.bEndpointAddress = fs_notify_desc.bEndpointAddress; status =usb_assign_descriptors (f, eth_fs_function, eth_hs_function, - eth_ss_function,NULL ); + eth_ss_function, eth_ss_function);if (status) goto fail;
drivers/usb/gadget/function/f_serial.c +1 -1
@@ -236,7 +236,7 @@ static int gser_bind(struct usb_configuration *c, struct usb_function *f) gser_ss_out_desc.bEndpointAddress = gser_fs_out_desc.bEndpointAddress; status =usb_assign_descriptors (f, gser_fs_function, gser_hs_function, - gser_ss_function,NULL ); + gser_ss_function, gser_ss_function);if (status) goto fail; dev_dbg(&cdev->gadget->dev, "generic ttyGS%d: %s speed IN/%s OUT/%s\n",
drivers/usb/gadget/function/f_sourcesink.c +2 -1
@@ -435,7 +435,8 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f) ss_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress; ret =usb_assign_descriptors (f, fs_source_sink_descs, - hs_source_sink_descs, ss_source_sink_descs,NULL ); + hs_source_sink_descs, ss_source_sink_descs, + ss_source_sink_descs);if (ret)return ret;
drivers/usb/gadget/function/f_subset.c +1 -1
@@ -362,7 +362,7 @@ geth_bind(struct usb_configuration *c, struct usb_function *f) fs_subset_out_desc.bEndpointAddress; status =usb_assign_descriptors (f, fs_eth_function, hs_eth_function, - ss_eth_function,NULL ); + ss_eth_function, ss_eth_function);if (status) goto fail;
drivers/usb/gadget/function/f_tcm.c +2 -1
@@ -2071,7 +2071,8 @@ static int tcm_bind(struct usb_configuration *c, struct usb_function *f) uasp_fs_cmd_desc.bEndpointAddress = uasp_ss_cmd_desc.bEndpointAddress; ret =usb_assign_descriptors (f, uasp_fs_function_desc, - uasp_hs_function_desc, uasp_ss_function_desc,NULL ); + uasp_hs_function_desc, uasp_ss_function_desc, + uasp_ss_function_desc);if (ret) goto ep_fail;
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -606,6 +606,7 @@ static const struct usb_device_id id_table_combined[] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLX_PLUS_PID) }, { USB_DEVICE(FTDI_VID, FTDI_NT_ORION_IO_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONMX_PID) }, { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) },
drivers/usb/serial/ftdi_sio_ids.h +1 -0
@@ -580,6 +580,7 @@#define FTDI_NT_ORIONLXM_PID 0x7c90/* OrionLXm Substation Automation Platform */ #define FTDI_NT_ORIONLX_PLUS_PID 0x7c91/* OrionLX+ Substation Automation Platform */ #define FTDI_NT_ORION_IO_PID 0x7c92/* Orion I/O */ +#define FTDI_NT_ORIONMX_PID 0x7c93/* OrionMX */ /* * Synapse Wireless product ids (FTDI_VID)
drivers/usb/serial/omninet.c +2 -0
@@ -27,6 +27,7 @@#define ZYXEL_VENDOR_ID 0x0586#define ZYXEL_OMNINET_ID 0x1000 +#define ZYXEL_OMNI_56K_PLUS_ID 0x1500/* This one seems to be a re-branded ZyXEL device */ #define BT_IGNITIONPRO_ID 0x2000
@@ -44,6 +45,7 @@ static int omninet_port_remove(struct usb_serial_port *port);static const struct usb_device_id id_table[] = { {USB_DEVICE (ZYXEL_VENDOR_ID ,ZYXEL_OMNINET_ID ) }, + {USB_DEVICE (ZYXEL_VENDOR_ID ,ZYXEL_OMNI_56K_PLUS_ID ) }, {USB_DEVICE (ZYXEL_VENDOR_ID ,BT_IGNITIONPRO_ID ) }, { }/* Terminating entry */ };
drivers/usb/serial/quatech2.c +3 -3
@@ -419,7 +419,7 @@ static void qt2_close(struct usb_serial_port *port)/* flush the port transmit buffer */ i =usb_control_msg (serial->dev, -usb_rcvctrlpipe (serial->dev,0 ), +usb_sndctrlpipe (serial->dev,0 ),QT2_FLUSH_DEVICE ,0x40 ,1 , port_priv->device_port,NULL ,0 ,QT2_USB_TIMEOUT );
@@ -429,7 +429,7 @@ static void qt2_close(struct usb_serial_port *port)/* flush the port receive buffer */ i =usb_control_msg (serial->dev, -usb_rcvctrlpipe (serial->dev,0 ), +usb_sndctrlpipe (serial->dev,0 ),QT2_FLUSH_DEVICE ,0x40 ,0 , port_priv->device_port,NULL ,0 ,QT2_USB_TIMEOUT );
@@ -701,7 +701,7 @@ static int qt2_attach(struct usb_serial *serial)int status;/* power on unit */ - status =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), + status =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ),0xc2 ,0x40 ,0x8000 ,0 ,NULL ,0 ,QT2_USB_TIMEOUT );if (status <0 ) {
fs/btrfs/file.c +2 -2
@@ -1089,7 +1089,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,int del_nr =0 ;int del_slot =0 ;int recow; -int ret; +int ret =0 ;u64 ino =btrfs_ino (inode); path =btrfs_alloc_path ();
@@ -1309,7 +1309,7 @@ int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, } out:btrfs_free_path (path); -return 0 ; +return ret; }/*
fs/nfs/client.c +1 -1
@@ -379,7 +379,7 @@ nfs_get_client(const struct nfs_client_initdata *cl_init,if (cl_init->hostname ==NULL ) {WARN_ON (1 ); -return NULL ; +return ERR_PTR (-EINVAL ); } dprintk("--> nfs_get_client(%s,v%u)\n",
fs/nfs/nfs4proc.c +8 -0
@@ -5183,6 +5183,14 @@ static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflendo { err =__nfs4_proc_set_acl (inode, buf, buflen);trace_nfs4_set_acl (inode, err); +if (err == -NFS4ERR_BADOWNER || err == -NFS4ERR_BADNAME ) { +/* +* no need to retry since the kernel +* isn't involved in encoding the ACEs. +*/ + err = -EINVAL ; +break ; + } err =nfs4_handle_exception (NFS_SERVER (inode), err, &exception); }while (exception.retry);
fs/proc/base.c +10 -1
@@ -2493,6 +2493,13 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx, }#ifdef CONFIG_SECURITY +static int proc_pid_attr_open (struct inode *inode,struct file *file) +{ + file->private_data =NULL ; +__mem_open (inode, file,PTRACE_MODE_READ_FSCREDS ); +return 0 ; +} +static ssize_t proc_pid_attr_read (struct file * file,char __user * buf,size_t count,loff_t *ppos) {
@@ -2523,7 +2530,7 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,struct task_struct *task =get_proc_task (inode);/* A task may only write when it was the opener. */ -if (file->f_cred !=current_real_cred ()) +if (file->private_data != current->mm)return -EPERM ; length = -ESRCH ;
@@ -2561,9 +2568,11 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, }static const struct file_operations proc_pid_attr_operations = { + .open = proc_pid_attr_open, .read = proc_pid_attr_read, .write = proc_pid_attr_write, .llseek = generic_file_llseek, + .release = mem_release, };static const struct pid_entry attr_dir_stuff[] = {
include/linux/kvm_host.h +10 -1
@@ -26,6 +26,7 @@#include <linux/context_tracking.h> #include <linux/irqbypass.h> #include <linux/swait.h> +#include <linux/nospec.h> #include <asm/signal.h> #include <linux/kvm.h>
@@ -932,7 +933,15 @@ __gfn_to_memslot(struct kvm_memslots *slots, gfn_t gfn)static inline unsigned long __gfn_to_hva_memslot (struct kvm_memory_slot *slot,gfn_t gfn) { -return slot->userspace_addr + (gfn - slot->base_gfn) *PAGE_SIZE ; +/* +* The index was checked originally in search_memslots. To avoid +* that a malicious guest builds a Spectre gadget out of e.g. page +* table walks, do not let the processor speculate loads outside +* the guest's registered memslots. +*/ +unsigned long offset = gfn - slot->base_gfn; + offset =array_index_nospec (offset, slot->npages); +return slot->userspace_addr + offset *PAGE_SIZE ; }static inline int memslot_id (struct kvm *kvm,gfn_t gfn)
kernel/cgroup.c +9 -8
@@ -3598,6 +3598,10 @@ static int cgroup_rename(struct kernfs_node *kn, struct kernfs_node *new_parent,struct cgroup *cgrp = kn->priv;int ret; +/* do not accept '\n' to prevent making /proc/<pid>/cgroup unparsable */ +if (strchr (new_name_str,'\n' )) +return -EINVAL ; +if (kernfs_type (kn) !=KERNFS_DIR )return -ENOTDIR ;if (kn->parent != new_parent)
@@ -5636,8 +5640,6 @@ int __init cgroup_init_early(void)return 0 ; } -static u16 cgroup_disable_mask__initdata ; -/** * cgroup_init - cgroup initialization *
@@ -5695,12 +5697,8 @@ int __init cgroup_init(void)* disabled flag and cftype registration needs kmalloc, * both of which aren't available during early_init. */ -if (cgroup_disable_mask & (1 << ssid)) { -static_branch_disable (cgroup_subsys_enabled_key[ssid]); -printk (KERN_INFO "Disabling %s control group subsystem\n" , - ss->name); +if (!cgroup_ssid_enabled (ssid))continue ; - }if (cgroup_ssid_no_v1 (ssid)) printk(KERN_INFO "Disabling %s control group subsystem in v1 mounts\n",
@@ -6143,7 +6141,10 @@ static int __init cgroup_disable(char *str)if (strcmp (token, ss->name) &&strcmp (token, ss->legacy_name))continue ; - cgroup_disable_mask |=1 << i; + +static_branch_disable (cgroup_subsys_enabled_key[i]); +pr_info ("Disabling %s control group subsystem\n" , + ss->name); } }return 1 ;
kernel/events/core.c +2 -0
@@ -3782,7 +3782,9 @@ find_get_context(struct pmu *pmu, struct task_struct *task, cpuctx =per_cpu_ptr (pmu->pmu_cpu_context, cpu); ctx = &cpuctx->ctx;get_ctx (ctx); +raw_spin_lock_irqsave (&ctx->lock, flags); ++ctx->pin_count; +raw_spin_unlock_irqrestore (&ctx->lock, flags);return ctx; }
kernel/trace/ftrace.c +7 -1
@@ -1961,12 +1961,18 @@ static int ftrace_hash_ipmodify_update(struct ftrace_ops *ops,static void print_ip_ins (const char *fmt,const unsigned char *p) { +char ins[MCOUNT_INSN_SIZE ];int i; +if (probe_kernel_read (ins, p,MCOUNT_INSN_SIZE )) { +printk (KERN_CONT "%s[FAULT] %px\n" , fmt, p); +return ; + } +printk (KERN_CONT "%s" , fmt);for (i =0 ; i <MCOUNT_INSN_SIZE ; i++) -printk (KERN_CONT "%s%02x" , i ?":" :"" , p[i]); +printk (KERN_CONT "%s%02x" , i ?":" :"" , ins[i]); }enum ftrace_bug_type ftrace_bug_type;
kernel/trace/trace.c +1 -1
@@ -2083,7 +2083,7 @@ trace_event_buffer_lock_reserve(struct ring_buffer **current_rb, (entry = this_cpu_read(trace_buffered_event))) {/* Try to use the per cpu buffer first */ val =this_cpu_inc_return (trace_buffered_event_cnt); -if ((len < (PAGE_SIZE -sizeof (*entry))) && val ==1 ) { +if ((len < (PAGE_SIZE -sizeof (*entry) -sizeof (entry->array[0 ]))) && val ==1 ) {trace_event_setup (entry, type, flags, pc); entry->array[0 ] = len;return entry;
kernel/workqueue.c +10 -2
@@ -49,6 +49,7 @@#include <linux/moduleparam.h> #include <linux/uaccess.h> #include <linux/nmi.h> +#include <linux/kvm_para.h> #include "workqueue_internal.h"
@@ -5387,6 +5388,7 @@ static void wq_watchdog_timer_fn(unsigned long data) {unsigned long thresh =READ_ONCE (wq_watchdog_thresh) *HZ ;bool lockup_detected = false; +unsigned long now = jiffies;struct worker_pool *pool;int pi;
@@ -5401,6 +5403,12 @@ static void wq_watchdog_timer_fn(unsigned long data)if (list_empty (&pool->worklist))continue ; +/* +* If a virtual machine is stopped by the host it can look to +* the watchdog like a stall. +*/ +kvm_check_and_clear_guest_paused (); +/* get the latest of pool and touched timestamps */ pool_ts =READ_ONCE (pool->watchdog_ts); touched =READ_ONCE (wq_watchdog_touched);
@@ -5419,12 +5427,12 @@ static void wq_watchdog_timer_fn(unsigned long data) }/* did we stall? */ -if (time_after (jiffies, ts + thresh)) { +if (time_after (now, ts + thresh)) { lockup_detected = true;pr_emerg ("BUG: workqueue lockup - pool" );pr_cont_pool_info (pool);pr_cont (" stuck for %us!\n" , -jiffies_to_msecs (jiffies - pool_ts) /1000 ); +jiffies_to_msecs (now - pool_ts) /1000 ); } }
net/netlink/af_netlink.c +4 -2
@@ -436,11 +436,13 @@ void netlink_table_ungrab(void)static inline void netlink_lock_table (void ) { +unsigned long flags; +/* read_lock() synchronizes us to netlink_table_grab */ -read_lock (&nl_table_lock); +read_lock_irqsave (&nl_table_lock, flags);atomic_inc (&nl_table_users); -read_unlock (&nl_table_lock); +read_unlock_irqrestore (&nl_table_lock, flags); } static inline void
net/nfc/rawsock.c +1 -1
@@ -345,7 +345,7 @@ static int rawsock_create(struct net *net, struct socket *sock,return -ESOCKTNOSUPPORT ;if (sock->type ==SOCK_RAW ) { -if (!capable (CAP_NET_RAW )) +if (!ns_capable (net->user_ns,CAP_NET_RAW ))return -EPERM ; sock->ops = &rawsock_raw_ops; }else {
sound/soc/codecs/sti-sas.c +1 -0
@@ -542,6 +542,7 @@ static const struct of_device_id sti_sas_dev_match[] = { }, {}, }; +MODULE_DEVICE_TABLE (of, sti_sas_dev_match);static int sti_sas_driver_probe (struct platform_device *pdev) {
tools/perf/util/session.c +1 -0
@@ -1427,6 +1427,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,if (event->header.size < hdr_sz || event->header.size > buf_sz)return -1 ; + buf += hdr_sz; rest = event->header.size - hdr_sz;if (readn (fd, buf, rest) != (ssize_t )rest)