Linux 4.9.162
Greg KH
maintainerI'm announcing the release of the 4.9.162 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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/include/asm/bitops.h | 6 - arch/powerpc/include/asm/epapr_hcalls.h | 12 +-- arch/x86/include/asm/uaccess.h | 7 + arch/x86/kvm/svm.c | 27 +++---- drivers/block/loop.c | 47 ++++++------- drivers/gpu/drm/msm/msm_rd.c | 7 + drivers/mmc/host/mmc_spi.c | 1 drivers/net/ethernet/altera/altera_tse_main.c | 4 - drivers/net/ethernet/ibm/ibmveth.c | 2 drivers/net/usb/asix_devices.c | 9 +- drivers/scsi/csiostor/csio_attr.c | 2 drivers/scsi/libsas/sas_expander.c | 2 drivers/thermal/int340x_thermal/processor_thermal_device.c | 30 ++++---- drivers/tty/serial/fsl_lpuart.c | 2 drivers/usb/dwc3/gadget.c | 3 drivers/usb/gadget/function/f_sourcesink.c | 2 fs/direct-io.c | 5 - kernel/locking/rwsem-xadd.c | 11 ++- mm/mmap.c | 7 - net/mac80211/cfg.c | 4 + net/mac80211/rx.c | 6 + net/wireless/reg.c | 4 - sound/core/compress_offload.c | 3 sound/soc/fsl/imx-audmux.c | 24 +++--- sound/soc/intel/boards/broadwell.c | 2 sound/soc/intel/boards/haswell.c | 2 sound/soc/soc-dapm.c | 10 +- 28 files changed, 138 insertions(+), 105 deletions(-)
Aaron Hill (1):
drivers: thermal: int340x_thermal: Fix sysfs race condition
Andy Lutomirski (1):
x86/uaccess: Don't leak the AC flag into __put_user() value evaluation
Atsushi Nemoto (1):
net: altera_tse: fix connect_local_phy error path
Balaji Pothunoori (1):
mac80211: don't initiate TDLS connection if station is not associated to AP
Bo He (1):
usb: dwc3: gadget: synchronize_irq dwc irq in suspend
Bob Copeland (1):
mac80211: fix miscounting of ttl-dropped frames
Chaitanya Tata (1):
cfg80211: extend range deviation for DMG
Dan Carpenter (3):
ALSA: compress: prevent potential divide by zero bugs
thermal: int340x_thermal: Fix a NULL vs IS_ERR() check
usb: gadget: Potential NULL dereference on allocation error
Ernesto A. Fernández (1):
direct-io: allow direct writes to empty inodes
Eugeniy Paltsev (1):
ARC: fix __ffs return value to avoid build warnings
Greg Kroah-Hartman (4):
Revert "loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()" Revert "loop: Get rid of loop_index_mutex"
Revert "loop: Fold __loop_release into loop_release"
Linux 4.9.162
Jann Horn (1):
mm: enforce min addr even if capable() in expand_downwards()
John Garry (1):
scsi: libsas: Fix rphy phy_identifier for PHYs with end devices attached
Jonathan Neuschäfer (1):
mmc: spi: Fix card detection during probe
Kristian H. Kristensen (1):
drm/msm: Unblock writer if reader closes file
Mathieu Malaterre (1):
mac80211: Add attribute aligned(2) to struct 'action'
Rander Wang (1):
ASoC: Intel: Haswell/Broadwell: fix setting for .dynamic field
Seth Forshee (1):
powerpc: Always initialize input array when calling epapr_hypercall()
Silvio Cesare (2):
ASoC: dapm: change snprintf to scnprintf for possible overflow
ASoC: imx-audmux: change snprintf to scnprintf for possible overflow
Suravee Suthikulpanit (1):
svm: Fix AVIC incomplete IPI emulation
Thomas Falcon (1):
ibmveth: Do not process frames after calling napi_reschedule
Tomonori Sakita (1):
serial: fsl_lpuart: fix maximum acceptable baud rate with over-sampling
Varun Prakash (1):
scsi: csiostor: fix NULL pointer dereference in csio_vport_set_state()
Vitaly Kuznetsov (1):
KVM: nSVM: clear events pending from svm_complete_interrupts() when exiting to L1
Xie Yongji (1):
locking/rwsem: Fix (possible) missed wakeup
Zeng Tao (1):
usb: dwc3: gadget: Fix the uninitialized link_state when udc starts
Zhang Run (1):
net: usb: asix: ax88772_bind return error when hw_reset fail
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 161 +SUBLEVEL = 162 EXTRAVERSION = NAME = Roaring Lionus
arch/arc/include/asm/bitops.h +3 -3
@@ -340,7 +340,7 @@ static inline __attribute__ ((const)) int __fls(unsigned long x)/* * __ffs: Similar to ffs, but zero based (0-31) */ -static inline __attribute__ ((const))int __ffs (unsigned long word) +static inline __attribute__ ((const))unsigned long __ffs (unsigned long word) {if (!word)return word;
@@ -400,9 +400,9 @@ static inline __attribute__ ((const)) int ffs(unsigned long x)/* * __ffs: Similar to ffs, but zero based (0-31) */ -static inline __attribute__ ((const))int __ffs (unsigned long x) +static inline __attribute__ ((const))unsigned long __ffs (unsigned long x) { -int n; +unsigned long n; asmvolatile ( " ffs.f %0, %1 \n" /* 0:31; 31(Z) if src 0 */
arch/powerpc/include/asm/epapr_hcalls.h +6 -6
@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in,static inline long epapr_hypercall0_1 (unsigned int nr,unsigned long *r2) { -unsigned long in[8 ]; +unsigned long in[8 ] = {0 };unsigned long out[8 ];unsigned long r;
@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2)static inline long epapr_hypercall0 (unsigned int nr) { -unsigned long in[8 ]; +unsigned long in[8 ] = {0 };unsigned long out[8 ];return epapr_hypercall (in, out, nr);
@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr)static inline long epapr_hypercall1 (unsigned int nr,unsigned long p1) { -unsigned long in[8 ]; +unsigned long in[8 ] = {0 };unsigned long out[8 ]; in[0 ] = p1;
@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1)static inline long epapr_hypercall2 (unsigned int nr,unsigned long p1,unsigned long p2) { -unsigned long in[8 ]; +unsigned long in[8 ] = {0 };unsigned long out[8 ]; in[0 ] = p1;
@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1,static inline long epapr_hypercall3 (unsigned int nr,unsigned long p1,unsigned long p2,unsigned long p3) { -unsigned long in[8 ]; +unsigned long in[8 ] = {0 };unsigned long out[8 ]; in[0 ] = p1;
@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1, unsigned long p2, unsigned long p3, unsigned long p4) { - unsigned long in[8]; + unsigned long in[8] = {0};unsigned long out[8 ]; in[0 ] = p1;
arch/x86/include/asm/uaccess.h +4 -3
@@ -292,8 +292,7 @@ do { \__put_user_asm (x, ptr, retval,"l" ,"k" ,"ir" , errret); \break ; \case 8 : \ -__put_user_asm_u64 ((__typeof__ (*ptr))(x), ptr, retval, \ - errret); \ +__put_user_asm_u64 (x, ptr, retval, errret); \break ; \default : \__put_user_bad (); \
@@ -427,8 +426,10 @@ do { \#define __put_user_nocheck (x, ptr, size) \ ({ \ int __pu_err; \ + __typeof__(*(ptr)) __pu_val; \ + __pu_val = x; \ __uaccess_begin(); \ - __put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \ + __put_user_size(__pu_val, (ptr), (size), __pu_err, -EFAULT);\ __uaccess_end(); \ __builtin_expect(__pu_err, 0); \ })
arch/x86/kvm/svm.c +12 -15
@@ -2862,6 +2862,14 @@ static int nested_svm_vmexit(struct vcpu_svm *svm)kvm_mmu_reset_context (&svm->vcpu);kvm_mmu_load (&svm->vcpu); +/* +* Drop what we picked up for L2 via svm_complete_interrupts() so it +* doesn't end up in L1. +*/ + svm->vcpu.arch.nmi_injected = false; +kvm_clear_exception_queue (&svm->vcpu); +kvm_clear_interrupt_queue (&svm->vcpu); +return 0 ; }
@@ -3932,25 +3940,14 @@ static int avic_incomplete_ipi_interception(struct vcpu_svm *svm)kvm_lapic_reg_write (apic,APIC_ICR , icrl);break ;case AVIC_IPI_FAILURE_TARGET_NOT_RUNNING : { -int i; -struct kvm_vcpu *vcpu; -struct kvm *kvm = svm->vcpu.kvm;struct kvm_lapic *apic = svm->vcpu.arch.apic;/* -* At this point, we expect that the AVIC HW has already -* set the appropriate IRR bits on the valid target -* vcpus. So, we just need to kick the appropriate vcpu. +* Update ICR high and low, then emulate sending IPI, +* which is handled when writing APIC_ICR. */ -kvm_for_each_vcpu (i, vcpu, kvm) { -bool m =kvm_apic_match_dest (vcpu, apic, - icrl &KVM_APIC_SHORT_MASK , -GET_APIC_DEST_FIELD (icrh), - icrl &KVM_APIC_DEST_MASK ); - -if (m && !avic_vcpu_is_running (vcpu)) -kvm_vcpu_wake_up (vcpu); - } +kvm_lapic_reg_write (apic,APIC_ICR2 , icrh); +kvm_lapic_reg_write (apic,APIC_ICR , icrl);break ; }case AVIC_IPI_FAILURE_INVALID_TARGET :
drivers/block/loop.c +25 -22
131 lines not on this page · raw message
drivers/gpu/drm/msm/msm_rd.c +6 -1
@@ -112,7 +112,9 @@ static void rd_write(struct msm_rd_state *rd, const void *buf, int sz)char *fptr = &fifo->buf[fifo->head];int n; -wait_event (rd->fifo_event,circ_space (&rd->fifo) >0 ); +wait_event (rd->fifo_event,circ_space (&rd->fifo) >0 || !rd->open); +if (!rd->open) +return ; n =min (sz,circ_space_to_end (&rd->fifo));memcpy (fptr, ptr, n);
@@ -202,7 +204,10 @@ static int rd_open(struct inode *inode, struct file *file)static int rd_release (struct inode *inode,struct file *file) {struct msm_rd_state *rd = inode->i_private; + rd->open = false; +wake_up_all (&rd->fifo_event); +return 0 ; }
drivers/mmc/host/mmc_spi.c +1 -0
@@ -1450,6 +1450,7 @@ static int mmc_spi_probe(struct spi_device *spi) mmc->caps &= ~MMC_CAP_NEEDS_POLL ;mmc_gpiod_request_cd_irq (mmc); } +mmc_detect_change (mmc,0 );if (host->pdata && host->pdata->flags &MMC_SPI_USE_RO_GPIO ) { has_ro = true;
drivers/net/ethernet/altera/altera_tse_main.c +3 -1
@@ -692,8 +692,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev) phydev =phy_connect (dev, phy_id_fmt, &altera_tse_adjust_link, priv->phy_iface); -if (IS_ERR (phydev)) +if (IS_ERR (phydev)) {netdev_err (dev,"Could not attach to PHY\n" ); + phydev =NULL ; + } }else {int ret;
drivers/net/ethernet/ibm/ibmveth.c +0 -2
@@ -1240,7 +1240,6 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)struct iphdr *iph;u16 mss =0 ; -restart_poll:while (frames_processed < budget) {if (!ibmveth_rxq_pending_buffer (adapter))break ;
@@ -1338,7 +1337,6 @@ static int ibmveth_poll(struct napi_struct *napi, int budget) napi_reschedule(napi)) { lpar_rc =h_vio_signal (adapter->vdev->unit_address,VIO_IRQ_DISABLE ); - goto restart_poll; } }
drivers/net/usb/asix_devices.c +7 -2
@@ -729,8 +729,13 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)asix_read_cmd (dev,AX_CMD_STATMNGSTS_REG ,0 ,0 ,1 , &chipcode,0 ); chipcode &=AX_CHIPCODE_MASK ; - (chipcode ==AX_AX88772_CHIPCODE ) ?ax88772_hw_reset (dev,0 ) : -ax88772a_hw_reset (dev,0 ); + ret = (chipcode ==AX_AX88772_CHIPCODE ) ?ax88772_hw_reset (dev,0 ) : +ax88772a_hw_reset (dev,0 ); + +if (ret <0 ) { +netdev_dbg (dev->net,"Failed to reset AX88772: %d\n" , ret); +return ret; + }/* Read PHYID register *AFTER* the PHY was reset properly */ phyid =asix_get_phyid (dev);
drivers/scsi/csiostor/csio_attr.c +1 -1
@@ -582,12 +582,12 @@ csio_vport_create(struct fc_vport *fc_vport, bool disable) }fc_vport_set_state (fc_vport,FC_VPORT_INITIALIZING ); + ln->fc_vport = fc_vport;if (csio_fcoe_alloc_vnp (hw, ln)) goto error; *(struct csio_lnode **)fc_vport->dd_data = ln; - ln->fc_vport = fc_vport;if (!fc_vport->node_name) fc_vport->node_name =wwn_to_u64 (csio_ln_wwnn (ln));if (!fc_vport->port_name)
drivers/scsi/libsas/sas_expander.c +2 -0
@@ -818,6 +818,7 @@ static struct domain_device *sas_ex_discover_end_dev( rphy =sas_end_device_alloc (phy->port);if (!rphy) goto out_free; + rphy->identify.phy_identifier = phy_id; child->rphy = rphy;get_device (&rphy->dev);
@@ -845,6 +846,7 @@ static struct domain_device *sas_ex_discover_end_dev( child->rphy = rphy;get_device (&rphy->dev); + rphy->identify.phy_identifier = phy_id;sas_fill_in_rphy (child, rphy);list_add_tail (&child->disco_list_node, &parent->port->disco_list);
drivers/thermal/int340x_thermal/processor_thermal_device.c +16 -14
@@ -77,7 +77,12 @@ static ssize_t power_limit_##index##_##suffix##_show(struct device *dev, \struct pci_dev *pci_dev; \struct platform_device *pdev; \struct proc_thermal_device *proc_dev; \ -\ + \ +if (proc_thermal_emum_mode ==PROC_THERMAL_NONE ) { \ +dev_warn (dev,"Attempted to get power limit before device was initialized!\n" ); \ +return 0 ; \ + } \ + \if (proc_thermal_emum_mode ==PROC_THERMAL_PLATFORM_DEV ) { \ pdev =to_platform_device (dev); \ proc_dev =platform_get_drvdata (pdev); \
@@ -291,11 +296,6 @@ static int proc_thermal_add(struct device *dev, *priv = proc_priv; ret =proc_thermal_read_ppcc (proc_priv); -if (!ret) { - ret =sysfs_create_group (&dev->kobj, - &power_limit_attribute_group); - - }if (ret)return ret;
@@ -309,8 +309,7 @@ static int proc_thermal_add(struct device *dev, proc_priv->int340x_zone =int340x_thermal_zone_add (adev, ops);if (IS_ERR (proc_priv->int340x_zone)) { - ret =PTR_ERR (proc_priv->int340x_zone); - goto remove_group; +return PTR_ERR (proc_priv->int340x_zone); }else ret =0 ;
@@ -324,9 +323,6 @@ static int proc_thermal_add(struct device *dev, remove_zone:int340x_thermal_zone_remove (proc_priv->int340x_zone); -remove_group: -sysfs_remove_group (&proc_priv->dev->kobj, - &power_limit_attribute_group);return ret; }
@@ -357,7 +353,10 @@ static int int3401_add(struct platform_device *pdev)platform_set_drvdata (pdev, proc_priv); proc_thermal_emum_mode =PROC_THERMAL_PLATFORM_DEV ; -return 0 ; +dev_info (&pdev->dev,"Creating sysfs group for PROC_THERMAL_PLATFORM_DEV\n" ); + +return sysfs_create_group (&pdev->dev.kobj, + &power_limit_attribute_group); }static int int3401_remove (struct platform_device *pdev)
@@ -416,7 +415,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, proc_priv->soc_dts =intel_soc_dts_iosf_init (INTEL_SOC_DTS_INTERRUPT_MSI ,2 ,0 ); -if (proc_priv->soc_dts && pdev->irq) { +if (!IS_ERR (proc_priv->soc_dts) && pdev->irq) { ret =pci_enable_msi (pdev);if (!ret) { ret = request_threaded_irq(pdev->irq, NULL,
@@ -434,7 +433,10 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev,dev_err (&pdev->dev,"No auxiliary DTSs enabled\n" ); } -return 0 ; +dev_info (&pdev->dev,"Creating sysfs group for PROC_THERMAL_PCI\n" ); + +return sysfs_create_group (&pdev->dev.kobj, + &power_limit_attribute_group); }static void proc_thermal_pci_remove (struct pci_dev *pdev)
drivers/tty/serial/fsl_lpuart.c +1 -1
@@ -1494,7 +1494,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, }/* ask the core to calculate the divisor */ - baud =uart_get_baud_rate (port, termios, old,50 , port->uartclk /16 ); + baud =uart_get_baud_rate (port, termios, old,50 , port->uartclk /4 );spin_lock_irqsave (&sport->port.lock, flags);
drivers/usb/dwc3/gadget.c +3 -0
@@ -1705,6 +1705,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)/* begin to receive SETUP packets */ dwc->ep0state =EP0_SETUP_PHASE ; + dwc->link_state =DWC3_LINK_STATE_SS_DIS ;dwc3_ep0_out_start (dwc);dwc3_gadget_enable_irq (dwc);
@@ -3096,6 +3097,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)dwc3_disconnect_gadget (dwc);__dwc3_gadget_stop (dwc); +synchronize_irq (dwc->irq_gadget); +return 0 ; }
drivers/usb/gadget/function/f_sourcesink.c +1 -1
@@ -842,7 +842,7 @@ static struct usb_function *source_sink_alloc_func( ss =kzalloc (sizeof (*ss),GFP_KERNEL );if (!ss) -return NULL ; +return ERR_PTR (-ENOMEM ); ss_opts = container_of(fi, struct f_ss_opts, func_inst);
fs/direct-io.c +3 -2
@@ -616,6 +616,7 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,unsigned long fs_count;/* Number of filesystem-sized blocks */ int create;unsigned int i_blkbits = sdio->blkbits + sdio->blkfactor; +loff_t i_size;/* * If there was a memory error and we've overwritten all the
@@ -645,8 +646,8 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,*/ create = dio->op ==REQ_OP_WRITE ;if (dio->flags &DIO_SKIP_HOLES ) { -if (fs_startblk <= ((i_size_read (dio->inode) -1 ) >> - i_blkbits)) + i_size =i_size_read (dio->inode); +if (i_size && fs_startblk <= (i_size -1 ) >> i_blkbits) create =0 ; }
kernel/locking/rwsem-xadd.c +9 -2
@@ -195,15 +195,22 @@ static void __rwsem_mark_wake(struct rw_semaphore *sem, woken++; tsk = waiter->task; -wake_q_add (wake_q, tsk); +get_task_struct (tsk);list_del (&waiter->list);/* -* Ensure that the last operation is setting the reader +* Ensure calling get_task_struct() before setting the reader * waiter to nil such that rwsem_down_read_failed() cannot * race with do_exit() by always holding a reference count * to the task to wakeup. */ smp_store_release (&waiter->task,NULL ); +/* +* Ensure issuing the wakeup (either by us or someone else) +* after setting the reader waiter to nil. +*/ +wake_q_add (wake_q, tsk); +/* wake_q_add() already take the task ref */ +put_task_struct (tsk); } adjustment = woken *RWSEM_ACTIVE_READ_BIAS - adjustment;
mm/mmap.c +3 -4
@@ -2345,12 +2345,11 @@ int expand_downwards(struct vm_area_struct *vma,struct mm_struct *mm = vma->vm_mm;struct vm_area_struct *prev;unsigned long gap_addr; -int error; +int error =0 ; address &=PAGE_MASK ; - error =security_mmap_addr (address); -if (error) -return error; +if (address < mmap_min_addr) +return -EPERM ;/* Enforce stack_guard_gap */ gap_addr = address - stack_guard_gap;
net/mac80211/cfg.c +4 -0
@@ -1425,6 +1425,10 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,if (params->sta_flags_set &BIT (NL80211_STA_FLAG_TDLS_PEER )) sta->sta.tdls = true; +if (sta->sta.tdls && sdata->vif.type ==NL80211_IFTYPE_STATION && + !sdata->u.mgd.associated) +return -EINVAL ; + err =sta_apply_parameters (local, sta, params);if (err) {sta_info_free (local, sta);
net/mac80211/rx.c +4 -2
@@ -217,7 +217,7 @@ static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata,struct ieee80211_hdr_3addr hdr;u8 category;u8 action_code; - }__packed action; + }__packed __aligned(2) action;if (!sdata)return ;
@@ -2510,7 +2510,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)skb_set_queue_mapping (skb, q);if (!--mesh_hdr->ttl) { -IEEE80211_IFSTA_MESH_CTR_INC (ifmsh, dropped_frames_ttl); +if (!is_multicast_ether_addr (hdr->addr1)) +IEEE80211_IFSTA_MESH_CTR_INC (ifmsh, + dropped_frames_ttl); goto out; }
net/wireless/reg.c +2 -2
@@ -773,7 +773,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,* definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), * however it is safe for now to assume that a frequency rule should not be * part of a frequency's band if the start freq or end freq are off by more -* than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the +* than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the * 60 GHz band. * This resolution can be lowered and should be considered as we add * regulatory rule support for other "bands".
@@ -788,7 +788,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range,* with the Channel starting frequency above 45 GHz. */ u32 limit = freq_khz >45 *ONE_GHZ_IN_KHZ ? -10 *ONE_GHZ_IN_KHZ :2 *ONE_GHZ_IN_KHZ ; +20 *ONE_GHZ_IN_KHZ :2 *ONE_GHZ_IN_KHZ ;if (abs (freq_khz - freq_range->start_freq_khz) <= limit)return true;if (abs (freq_khz - freq_range->end_freq_khz) <= limit)
sound/core/compress_offload.c +2 -1
@@ -529,7 +529,8 @@ static int snd_compress_check_input(struct snd_compr_params *params) {/* first let's check the buffer parameter's */ if (params->buffer.fragment_size ==0 || - params->buffer.fragments >INT_MAX / params->buffer.fragment_size) + params->buffer.fragments >INT_MAX / params->buffer.fragment_size || + params->buffer.fragments ==0 )return -EINVAL ;/* now codec parameters */
sound/soc/fsl/imx-audmux.c +12 -12
@@ -86,49 +86,49 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,if (!buf)return -ENOMEM ; - ret =snprintf (buf,PAGE_SIZE ,"PDCR: %08x\nPTCR: %08x\n" , + ret =scnprintf (buf,PAGE_SIZE ,"PDCR: %08x\nPTCR: %08x\n" , pdcr, ptcr);if (ptcr &IMX_AUDMUX_V2_PTCR_TFSDIR ) - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"TxFS output from %s, " ,audmux_port_string ((ptcr >>27 ) &0x7 ));else - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"TxFS input, " );if (ptcr &IMX_AUDMUX_V2_PTCR_TCLKDIR ) - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"TxClk output from %s" ,audmux_port_string ((ptcr >>22 ) &0x7 ));else - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"TxClk input" ); - ret +=snprintf (buf + ret,PAGE_SIZE - ret,"\n" ); + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"\n" );if (ptcr &IMX_AUDMUX_V2_PTCR_SYN ) { - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"Port is symmetric" ); }else {if (ptcr &IMX_AUDMUX_V2_PTCR_RFSDIR ) - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"RxFS output from %s, " ,audmux_port_string ((ptcr >>17 ) &0x7 ));else - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"RxFS input, " );if (ptcr &IMX_AUDMUX_V2_PTCR_RCLKDIR ) - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"RxClk output from %s" ,audmux_port_string ((ptcr >>12 ) &0x7 ));else - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"RxClk input" ); } - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"\nData received from %s\n" ,audmux_port_string ((pdcr >>13 ) &0x7 ));
sound/soc/intel/boards/broadwell.c +1 -1
@@ -191,7 +191,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { .stream_name = "Loopback", .cpu_dai_name = "Loopback Pin", .platform_name = "haswell-pcm-audio", - .dynamic = 0, + .dynamic = 1, .codec_name = "snd-soc-dummy", .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
sound/soc/intel/boards/haswell.c +1 -1
@@ -145,7 +145,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { .stream_name = "Loopback", .cpu_dai_name = "Loopback Pin", .platform_name = "haswell-pcm-audio", - .dynamic = 0, + .dynamic = 1, .codec_name = "snd-soc-dummy", .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
sound/soc/soc-dapm.c +5 -5
@@ -1976,19 +1976,19 @@ static ssize_t dapm_widget_power_read_file(struct file *file, out =is_connected_output_ep (w,NULL ,NULL ); } - ret =snprintf (buf,PAGE_SIZE ,"%s: %s%s in %d out %d" , + ret =scnprintf (buf,PAGE_SIZE ,"%s: %s%s in %d out %d" , w->name, w->power ?"On" :"Off" , w->force ?" (forced)" :"" , in, out);if (w->reg >=0 ) - ret +=snprintf (buf + ret,PAGE_SIZE - ret, + ret +=scnprintf (buf + ret,PAGE_SIZE - ret," - R%d(0x%x) mask 0x%x" , w->reg, w->reg, w->mask << w->shift); - ret +=snprintf (buf + ret,PAGE_SIZE - ret,"\n" ); + ret +=scnprintf (buf + ret,PAGE_SIZE - ret,"\n" );if (w->sname) - ret +=snprintf (buf + ret,PAGE_SIZE - ret," stream %s %s\n" , + ret +=scnprintf (buf + ret,PAGE_SIZE - ret," stream %s %s\n" , w->sname, w->active ?"active" :"inactive" );
@@ -2001,7 +2001,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,if (!p->connect)continue ; - ret += snprintf(buf + ret, PAGE_SIZE - ret, + ret += scnprintf(buf + ret, PAGE_SIZE - ret, " %s \"%s\" \"%s\"\n", (rdir == SND_SOC_DAPM_DIR_IN) ? "in" : "out", p->name ? p->name : "static",