Linux 4.9.175
Greg KH
maintainerI'm announcing the release of the 4.9.175 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/arm/boot/compressed/efi-header.S | 3 +- arch/x86/events/intel/core.c | 2 - drivers/block/virtio_blk.c | 2 + drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 - drivers/infiniband/hw/hfi1/rc.c | 4 +- drivers/iommu/amd_iommu_init.c | 2 - drivers/scsi/csiostor/csio_scsi.c | 5 ++- drivers/scsi/libsas/sas_expander.c | 9 ++---- drivers/scsi/qla2xxx/qla_attr.c | 4 +- drivers/staging/greybus/power_supply.c | 2 - drivers/usb/dwc3/core.c | 2 - drivers/usb/serial/f81232.c | 39 ++++++++++++++++++++++++++ drivers/usb/storage/scsiglue.c | 26 ++++++++--------- drivers/usb/storage/uas.c | 35 ++++++++++++++--------- include/linux/kernel.h | 4 +- include/linux/mm.h | 9 ++++++ include/net/bluetooth/hci_core.h | 3 ++ kernel/irq/manage.c | 4 ++ kernel/time/timer_stats.c | 2 - lib/ubsan.c | 49 +++++++++++++++------------------ net/bluetooth/hci_conn.c | 8 +++++ net/bluetooth/hidp/sock.c | 1 sound/soc/codecs/cs4270.c | 1 sound/soc/codecs/nau8810.c | 4 +- sound/soc/codecs/tlv320aic32x4.c | 2 + sound/soc/intel/common/sst-firmware.c | 8 ++++- sound/soc/soc-pcm.c | 7 +++- 28 files changed, 161 insertions(+), 80 deletions(-)
Alan Stern (1):
usb-storage: Set virt_boundary_mask to avoid SG overflows
Andrew Vasquez (1):
scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
Andrey Ryabinin (1):
ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
Annaliese McDermond (1):
ASoC: tlv320aic32x4: Fix Common Pins
Ard Biesheuvel (1):
ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop
Ben Hutchings (1):
timer/debug: Change /proc/timer_stats from 0644 to 0600
Dan Carpenter (1):
drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
Daniel Mack (1):
ASoC: cs4270: Set auto-increment bit for register writes
Dongli Zhang (1):
virtio-blk: limit number of hw queues by nr_cpu_ids
Greg Kroah-Hartman (1):
Linux 4.9.175
Jann Horn (1):
linux/kernel.h: Use parentheses around argument in u64_to_user_ptr()
Jason Yan (1):
scsi: libsas: fix a race condition when smp task timeout
Ji-Ze Hong (Peter Hong) (1):
USB: serial: f81232: fix interrupt worker not stop
Joerg Roedel (1):
iommu/amd: Set exclusion range correctly
Johan Hovold (1):
staging: greybus: power_supply: fix prop-descriptor request size
John Hsu (1):
ASoC: nau8810: fix the issue of widget with prefixed name
Kaike Wan (1):
IB/hfi1: Eliminate opcode tests on mr deref
Linus Torvalds (1):
mm: add 'try_get_page()' helper function
Marcel Holtmann (1):
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections
Oliver Neukum (1):
UAS: fix alignment of scatter/gather segments
Prasad Sodagudi (1):
genirq: Prevent use-after-free and work list corruption
Rander Wang (1):
ASoC:soc-pcm:fix a codec fixup issue in TDM case
Ross Zwisler (1):
ASoC: Intel: avoid Oops if DMA setup fails
Stephane Eranian (1):
perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS
Thinh Nguyen (1):
usb: dwc3: Fix default lpm_nyet_threshold value
Varun Prakash (1):
scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
Wen Yang (1):
drm/mediatek: fix possible object reference leak
Young Xiao (1):
Bluetooth: hidp: fix buffer overflow
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 174 +SUBLEVEL = 175 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/compressed/efi-header.S +2 -1
@@ -17,7 +17,8 @@ @ there. .inst 'M' | ('Z' << 8) | (0x1310 << 16) @ tstne r0, #0x4d000 #else - W(mov) r0, r0 + AR_CLASS( mov r0, r0 ) + M_CLASS( nop.w ) #endif .endm
arch/x86/events/intel/core.c +1 -1
@@ -2867,7 +2867,7 @@ static int intel_pmu_hw_config(struct perf_event *event)return ret;if (event->attr.precise_ip) { -if (!event->attr.freq) { +if (!(event->attr.freq || event->attr.wakeup_events)) { event->hw.flags |=PERF_X86_EVENT_AUTO_RELOAD ;if (!(event->attr.sample_type & ~intel_pmu_free_running_flags (event)))
drivers/block/virtio_blk.c +2 -0
@@ -392,6 +392,8 @@ static int init_vq(struct virtio_blk *vblk)if (err) num_vqs =1 ; + num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs); + vblk->vqs =kmalloc_array (num_vqs,sizeof (*vblk->vqs),GFP_KERNEL );if (!vblk->vqs)return -ENOMEM ;
drivers/gpu/drm/mediatek/mtk_hdmi.c +1 -1
@@ -1473,7 +1473,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,if (IS_ERR (regmap)) ret =PTR_ERR (regmap);if (ret) { - ret =PTR_ERR (regmap);dev_err (dev,"Failed to get system configuration registers: %d\n" , ret);
@@ -1529,6 +1528,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,of_node_put (remote); hdmi->ddc_adpt =of_find_i2c_adapter_by_node (i2c_np); +of_node_put (i2c_np);if (!hdmi->ddc_adpt) {dev_err (dev,"Failed to get ddc i2c adapter by node\n" );return -EINVAL ;
drivers/infiniband/hw/hfi1/rc.c +2 -2
@@ -2394,7 +2394,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)update_ack_queue (qp, next); } e = &qp->s_ack_queue[qp->r_head_ack_queue]; -if (e->opcode ==OP (RDMA_READ_REQUEST ) && e->rdma_sge.mr) { +if (e->rdma_sge.mr) {rvt_put_mr (e->rdma_sge.mr); e->rdma_sge.mr =NULL ; }
@@ -2469,7 +2469,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)update_ack_queue (qp, next); } e = &qp->s_ack_queue[qp->r_head_ack_queue]; -if (e->opcode ==OP (RDMA_READ_REQUEST ) && e->rdma_sge.mr) { +if (e->rdma_sge.mr) {rvt_put_mr (e->rdma_sge.mr); e->rdma_sge.mr =NULL ; }
drivers/iommu/amd_iommu_init.c +1 -1
@@ -318,7 +318,7 @@ static void iommu_write_l2(struct amd_iommu *iommu, u8 address, u32 val)static void iommu_set_exclusion_range (struct amd_iommu *iommu) {u64 start = iommu->exclusion_start &PAGE_MASK ; -u64 limit = (start + iommu->exclusion_length) &PAGE_MASK ; +u64 limit = (start + iommu->exclusion_length -1 ) &PAGE_MASK ;u64 entry;if (!iommu->exclusion_start)
drivers/scsi/csiostor/csio_scsi.c +4 -1
@@ -1713,8 +1713,11 @@ csio_scsi_err_handler(struct csio_hw *hw, struct csio_ioreq *req) } out: -if (req->nsge >0 ) +if (req->nsge >0 ) {scsi_dma_unmap (cmnd); +if (req->dcopy && (host_status ==DID_OK )) + host_status =csio_scsi_copy_to_sgl (hw, req); + } cmnd->result = (((host_status) <<16 ) | scsi_status); cmnd->scsi_done (cmnd);
drivers/scsi/libsas/sas_expander.c +4 -5
@@ -47,17 +47,16 @@ static void smp_task_timedout(unsigned long _task)unsigned long flags;spin_lock_irqsave (&task->task_state_lock, flags); -if (!(task->task_state_flags &SAS_TASK_STATE_DONE )) +if (!(task->task_state_flags &SAS_TASK_STATE_DONE )) { task->task_state_flags |=SAS_TASK_STATE_ABORTED ; +complete (&task->slow_task->completion); + }spin_unlock_irqrestore (&task->task_state_lock, flags); - -complete (&task->slow_task->completion); }static void smp_task_done (struct sas_task *task) { -if (!del_timer (&task->slow_task->timer)) -return ; +del_timer (&task->slow_task->timer);complete (&task->slow_task->completion); }
drivers/scsi/qla2xxx/qla_attr.c +2 -2
@@ -345,7 +345,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, } ha->optrom_region_start = start; - ha->optrom_region_size = start + size; + ha->optrom_region_size = size; ha->optrom_state =QLA_SREADING ; ha->optrom_buffer =vmalloc (ha->optrom_region_size);
@@ -418,7 +418,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, } ha->optrom_region_start = start; - ha->optrom_region_size = start + size; + ha->optrom_region_size = size; ha->optrom_state =QLA_SWRITING ; ha->optrom_buffer =vmalloc (ha->optrom_region_size);
drivers/staging/greybus/power_supply.c +1 -1
@@ -521,7 +521,7 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy) op =gb_operation_create (connection,GB_POWER_SUPPLY_TYPE_GET_PROP_DESCRIPTORS , -sizeof (req),sizeof (*resp) + props_count * +sizeof (*req),sizeof (*resp) + props_count *sizeof (struct gb_power_supply_props_desc ),GFP_KERNEL );if (!op)
drivers/usb/dwc3/core.c +1 -1
@@ -991,7 +991,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc->regs_size =resource_size (res);/* default to highest possible threshold */ - lpm_nyet_threshold =0xff ; + lpm_nyet_threshold =0xf ;/* default to -3.5dB de-emphasis */ tx_de_emphasis =1 ;
drivers/usb/serial/f81232.c +39 -0
@@ -560,9 +560,12 @@ static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port)static void f81232_close (struct usb_serial_port *port) { +struct f81232_private *port_priv =usb_get_serial_port_data (port); +f81232_port_disable (port);usb_serial_generic_close (port);usb_kill_urb (port->interrupt_in_urb); +flush_work (&port_priv->interrupt_work); }static void f81232_dtr_rts (struct usb_serial_port *port,int on)
@@ -656,6 +659,40 @@ static int f81232_port_remove(struct usb_serial_port *port)return 0 ; } +static int f81232_suspend (struct usb_serial *serial,pm_message_t message) +{ +struct usb_serial_port *port = serial->port[0 ]; +struct f81232_private *port_priv =usb_get_serial_port_data (port); +int i; + +for (i =0 ; i <ARRAY_SIZE (port->read_urbs); ++i) +usb_kill_urb (port->read_urbs[i]); + +usb_kill_urb (port->interrupt_in_urb); + +if (port_priv) +flush_work (&port_priv->interrupt_work); + +return 0 ; +} + +static int f81232_resume (struct usb_serial *serial) +{ +struct usb_serial_port *port = serial->port[0 ]; +int result; + +if (tty_port_initialized (&port->port)) { + result =usb_submit_urb (port->interrupt_in_urb,GFP_NOIO ); +if (result) { +dev_err (&port->dev,"submit interrupt urb failed: %d\n" , + result); +return result; + } + } + +return usb_serial_generic_resume (serial); +} +static struct usb_serial_driver f81232_device = { .driver = { .owner =THIS_MODULE ,
@@ -679,6 +716,8 @@ static struct usb_serial_driver f81232_device = { .read_int_callback = f81232_read_int_callback, .port_probe = f81232_port_probe, .port_remove = f81232_port_remove, + .suspend = f81232_suspend, + .resume = f81232_resume, };static struct usb_serial_driver *const serial_drivers[] = {
drivers/usb/storage/scsiglue.c +12 -14
@@ -81,6 +81,7 @@ static const char* host_info(struct Scsi_Host *host)static int slave_alloc (struct scsi_device *sdev) {struct us_data *us =host_to_us (sdev->host); +int maxp;/* * Set the INQUIRY transfer length to 36. We don't use any of
@@ -90,20 +91,17 @@ static int slave_alloc (struct scsi_device *sdev) sdev->inquiry_len =36 ;/* -* USB has unusual DMA-alignment requirements: Although the -* starting address of each scatter-gather element doesn't matter, -* the length of each element except the last must be divisible -* by the Bulk maxpacket value. There's currently no way to -* express this by block-layer constraints, so we'll cop out -* and simply require addresses to be aligned at 512-byte -* boundaries. This is okay since most block I/O involves -* hardware sectors that are multiples of 512 bytes in length, -* and since host controllers up through USB 2.0 have maxpacket -* values no larger than 512. -* -* But it doesn't suffice for Wireless USB, where Bulk maxpacket -* values can be as large as 2048. To make that work properly -* will require changes to the block layer. +* USB has unusual scatter-gather requirements: the length of each +* scatterlist element except the last must be divisible by the +* Bulk maxpacket value. Fortunately this value is always a +* power of 2. Inform the block layer about this requirement. +*/ + maxp =usb_maxpacket (us->pusb_dev, us->recv_bulk_pipe,0 ); +blk_queue_virt_boundary (sdev->request_queue, maxp -1 ); + +/* +* Some host controllers may have alignment requirements. +* We'll play it safe by requiring 512-byte alignment always. */ blk_queue_update_dma_alignment (sdev->request_queue, (512 -1 ));
drivers/usb/storage/uas.c +22 -13
@@ -796,24 +796,33 @@ static int uas_slave_alloc(struct scsi_device *sdev) {struct uas_dev_info *devinfo = (struct uas_dev_info *)sdev->host->hostdata; +int maxp; sdev->hostdata = devinfo;/* -* USB has unusual DMA-alignment requirements: Although the -* starting address of each scatter-gather element doesn't matter, -* the length of each element except the last must be divisible -* by the Bulk maxpacket value. There's currently no way to -* express this by block-layer constraints, so we'll cop out -* and simply require addresses to be aligned at 512-byte -* boundaries. This is okay since most block I/O involves -* hardware sectors that are multiples of 512 bytes in length, -* and since host controllers up through USB 2.0 have maxpacket -* values no larger than 512. +* We have two requirements here. We must satisfy the requirements +* of the physical HC and the demands of the protocol, as we +* definitely want no additional memory allocation in this path +* ruling out using bounce buffers. * -* But it doesn't suffice for Wireless USB, where Bulk maxpacket -* values can be as large as 2048. To make that work properly -* will require changes to the block layer. +* For a transmission on USB to continue we must never send +* a package that is smaller than maxpacket. Hence the length of each +* scatterlist element except the last must be divisible by the +* Bulk maxpacket value. +* If the HC does not ensure that through SG, +* the upper layer must do that. We must assume nothing +* about the capabilities off the HC, so we use the most +* pessimistic requirement. +*/ + + maxp =usb_maxpacket (devinfo->udev, devinfo->data_in_pipe,0 ); +blk_queue_virt_boundary (sdev->request_queue, maxp -1 ); + +/* +* The protocol has no requirements on alignment in the strict sense. +* Controllers may or may not have alignment restrictions. +* As this is not exported, we use an extremely conservative guess. */ blk_queue_update_dma_alignment (sdev->request_queue, (512 -1 ));
include/linux/kernel.h +2 -2
@@ -55,8 +55,8 @@#define u64_to_user_ptr (x) ( \ { \ - typecheck(u64, x); \ - (void __user *)(uintptr_t)x; \ + typecheck(u64, (x)); \ + (void __user *)(uintptr_t)(x); \ } \ )
include/linux/mm.h +9 -0
@@ -777,6 +777,15 @@ static inline void get_page(struct page *page)get_zone_device_page (page); } +static inline __must_check bool try_get_page (struct page *page) +{ + page =compound_head (page); +if (WARN_ON_ONCE (page_ref_count (page) <=0 )) +return false; +page_ref_inc (page); +return true; +} +static inline void put_page (struct page *page) { page =compound_head (page);
include/net/bluetooth/hci_core.h +3 -0
@@ -176,6 +176,9 @@ struct adv_info {#define HCI_MAX_SHORT_NAME_LENGTH 10 +/* Min encryption key size to match with SMP */ +#define HCI_MIN_ENC_KEY_SIZE 7 +/* Default LE RPA expiry time, 15 minutes */ #define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
kernel/irq/manage.c +3 -1
@@ -332,8 +332,10 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) desc->affinity_notify = notify;raw_spin_unlock_irqrestore (&desc->lock, flags); -if (old_notify) +if (old_notify) { +cancel_work_sync (&old_notify->work);kref_put (&old_notify->kref, old_notify->release); + }return 0 ; }
kernel/time/timer_stats.c +1 -1
@@ -417,7 +417,7 @@ static int __init init_tstats_procfs(void) {struct proc_dir_entry *pe; - pe =proc_create ("timer_stats" ,0644 ,NULL , &tstats_fops); + pe =proc_create ("timer_stats" ,0600 ,NULL , &tstats_fops);if (!pe)return -ENOMEM ;return 0 ;
lib/ubsan.c +23 -26
158 lines not on this page · raw message
net/bluetooth/hci_conn.c +8 -0
@@ -1165,6 +1165,14 @@ int hci_conn_check_link_mode(struct hci_conn *conn) !test_bit(HCI_CONN_ENCRYPT, &conn->flags))return 0 ; +/* The minimum encryption key size needs to be enforced by the +* host stack before establishing any L2CAP connections. The +* specification in theory allows a minimum of 1, but to align +* BR/EDR and LE transports, a minimum of 7 is chosen. +*/ +if (conn->enc_key_size <HCI_MIN_ENC_KEY_SIZE ) +return 0 ; +return 1 ; }
net/bluetooth/hidp/sock.c +1 -0
@@ -76,6 +76,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned longsockfd_put (csock);return err; } + ca.name[sizeof (ca.name)-1 ] =0 ; err =hidp_connection_add (&ca, csock, isock);if (!err &©_to_user (argp, &ca,sizeof (ca)))
sound/soc/codecs/cs4270.c +1 -0
@@ -643,6 +643,7 @@ static const struct regmap_config cs4270_regmap = { .reg_defaults = cs4270_reg_defaults, .num_reg_defaults = ARRAY_SIZE(cs4270_reg_defaults), .cache_type = REGCACHE_RBTREE, + .write_flag_mask = CS4270_I2C_INCR, .readable_reg = cs4270_reg_is_readable, .volatile_reg = cs4270_reg_is_volatile,
sound/soc/codecs/nau8810.c +2 -2
@@ -414,9 +414,9 @@ static const struct snd_soc_dapm_widget nau8810_dapm_widgets[] = {SND_SOC_DAPM_MIXER ("Mono Mixer" ,NAU8810_REG_POWER3 ,NAU8810_MOUTMX_EN_SFT ,0 , &nau8810_mono_mixer_controls[0 ],ARRAY_SIZE (nau8810_mono_mixer_controls)), -SND_SOC_DAPM_DAC ("DAC" ,"HiFi Playback" ,NAU8810_REG_POWER3 , +SND_SOC_DAPM_DAC ("DAC" ,"Playback" ,NAU8810_REG_POWER3 ,NAU8810_DAC_EN_SFT ,0 ), -SND_SOC_DAPM_ADC ("ADC" ,"HiFi Capture" ,NAU8810_REG_POWER2 , +SND_SOC_DAPM_ADC ("ADC" ,"Capture" ,NAU8810_REG_POWER2 ,NAU8810_ADC_EN_SFT ,0 ),SND_SOC_DAPM_PGA ("SpkN Out" ,NAU8810_REG_POWER3 , NAU8810_NSPK_EN_SFT, 0, NULL, 0),
sound/soc/codecs/tlv320aic32x4.c +2 -0
@@ -316,6 +316,8 @@ static const struct snd_soc_dapm_widget aic32x4_dapm_widgets[] = {SND_SOC_DAPM_INPUT ("IN2_R" ),SND_SOC_DAPM_INPUT ("IN3_L" ),SND_SOC_DAPM_INPUT ("IN3_R" ), +SND_SOC_DAPM_INPUT ("CM_L" ), + SND_SOC_DAPM_INPUT("CM_R"), }; static const struct snd_soc_dapm_route aic32x4_dapm_routes[] = {
sound/soc/intel/common/sst-firmware.c +6 -2
@@ -1252,11 +1252,15 @@ struct sst_dsp *sst_dsp_new(struct device *dev, goto irq_err; err =sst_dma_new (sst); -if (err) -dev_warn (dev,"sst_dma_new failed %d\n" , err); +if (err) { +dev_err (dev,"sst_dma_new failed %d\n" , err); + goto dma_err; + }return sst; +dma_err: +free_irq (sst->irq, sst); irq_err:if (sst->ops->free) sst->ops->free (sst);
sound/soc/soc-pcm.c +5 -2
@@ -894,10 +894,13 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, codec_params = *params;/* fixup params based on TDM slot masks */ -if (codec_dai->tx_mask) +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK && + codec_dai->tx_mask)soc_pcm_codec_params_fixup (&codec_params, codec_dai->tx_mask); -if (codec_dai->rx_mask) + +if (substream->stream ==SNDRV_PCM_STREAM_CAPTURE && + codec_dai->rx_mask)soc_pcm_codec_params_fixup (&codec_params, codec_dai->rx_mask);