Linux 4.9.324
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.324 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
------------
Documentation/networking/ip-sysctl.txt | 4 ++-- Makefile | 2 +- arch/arm/mm/proc-v7-bugs.c | 9 ++++----- arch/arm64/kernel/entry.S | 1 + arch/x86/kernel/head64.c | 2 ++ drivers/cpufreq/pmac32-cpufreq.c | 4 ++++ drivers/net/can/m_can/m_can.c | 5 +++-- drivers/net/dsa/bcm_sf2.c | 19 +++++++++++++++++++ drivers/net/ethernet/sfc/ef10.c | 3 +++ drivers/net/ethernet/sfc/ef10_sriov.c | 10 +++++++--- drivers/net/xen-netback/rx.c | 1 + drivers/nfc/nxp-nci/i2c.c | 8 ++++++-- drivers/tty/serial/8250/8250_port.c | 4 +++- drivers/tty/serial/samsung.c | 5 ++--- drivers/usb/dwc3/gadget.c | 4 +++- drivers/usb/serial/ftdi_sio.c | 3 +++ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ drivers/virtio/virtio_mmio.c | 26 ++++++++++++++++++++++++++ fs/nilfs2/nilfs.h | 3 +++ include/trace/events/sock.h | 6 ++++-- kernel/signal.c | 8 ++++---- mm/memory.c | 9 +++++++-- net/ipv4/af_inet.c | 4 ++-- net/ipv4/cipso_ipv4.c | 12 +++++++----- net/ipv4/icmp.c | 5 +++-- net/tipc/socket.c | 1 + sound/pci/hda/patch_realtek.c | 1 + sound/soc/codecs/wm5110.c | 8 ++++++-- sound/soc/soc-ops.c | 4 ++-- 29 files changed, 136 insertions(+), 41 deletions(-)
Ard Biesheuvel (1):
ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle
Chanho Park (1):
tty: serial: samsung_tty: set dma burst_size to 1
Charles Keepax (1):
ASoC: wm5110: Fix DRE control
Dmitry Osipenko (1):
ARM: 9213/1: Print message about disabled Spectre workarounds only once
Doug Berger (1):
net: dsa: bcm_sf2: force pause link settings
Greg Kroah-Hartman (1):
Linux 4.9.324
Hangyu Hua (1):
net: tipc: fix possible refcount leak in tipc_sk_create()
James Morse (1):
arm64: entry: Restore tramp_map_kernel ISB
Juergen Gross (2):
xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue
x86: Clear .brk area at early boot
Kuniyuki Iwashima (3):
cipso: Fix data-races around sysctl.
icmp: Fix data-races around sysctl.
ipv4: Fix data-races around sysctl_ip_dynaddr.
Liang He (1):
cpufreq: pmac32-cpufreq: Fix refcount leak bug
Linus Torvalds (1):
signal handling: don't use BUG_ON() for debugging
Lucien Buchmann (1):
USB: serial: ftdi_sio: add Belimo device ids
Marc Kleine-Budde (1):
can: m_can: m_can_tx_handler(): fix use after free of skb
Mark Brown (1):
ASoC: ops: Fix off by one in range control validation
Meng Tang (1):
ALSA: hda - Add fixup for Dell Latitidue E5430
Michael Walle (1):
NFC: nxp-nci: don't print header length mismatch on i2c error
Rik van Riel (1):
mm: invalidate hwpoison page cache page in fault path
Ryusuke Konishi (1):
nilfs2: fix incorrect masking of permission flags for symlinks
Stephan Gerhold (2):
virtio_mmio: Add missing PM calls to freeze/restore
virtio_mmio: Restore guest page size on resume
Steven Rostedt (Google) (1):
net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer
Thinh Nguyen (1):
usb: dwc3: gadget: Fix event pending check
Yi Yang (1):
serial: 8250: fix return error code in serial8250_request_std_resource()
Íñigo Huguet (2):
sfc: fix use after free when disabling sriov
sfc: fix kernel panic when creating VF
Greg Kroah-Hartman
maintainerDocumentation/networking/ip-sysctl.txt +2 -2
@@ -781,7 +781,7 @@ cipso_cache_enable - BOOLEAN cipso_cache_bucket_size - INTEGER The CIPSO label cache consists of a fixed size hash table with each hash bucket containing a number of cache entries. This variable limits - the number of entries in each hash bucket; the larger the value the + the number of entries in each hash bucket; the larger the value is, the more CIPSO label mappings that can be cached. When the number of entries in a given hash bucket reaches this limit adding new entries causes the oldest entry in the bucket to be removed to make room.
@@ -849,7 +849,7 @@ ip_nonlocal_bind - BOOLEAN which can be quite useful - but may break some applications. Default: 0 -ip_dynaddr - BOOLEAN +ip_dynaddr - INTEGER If set non-zero, enables support for dynamic addresses. If set to a non-zero value larger than 1, a kernel log message will be printed when dynamic address rewriting
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 323 +SUBLEVEL = 324 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/mm/proc-v7-bugs.c +4 -5
@@ -110,8 +110,7 @@ static unsigned int spectre_v2_install_workaround(unsigned int method)#else static unsigned int spectre_v2_install_workaround (unsigned int method) { -pr_info ("CPU%u: Spectre V2: workarounds disabled by configuration\n" , -smp_processor_id ()); +pr_info_once ("Spectre V2: workarounds disabled by configuration\n" );return SPECTRE_VULNERABLE ; }
@@ -218,10 +217,10 @@ static int spectre_bhb_install_workaround(int method)return SPECTRE_VULNERABLE ; spectre_bhb_method = method; - } -pr_info ("CPU%u: Spectre BHB: using %s workaround\n" , -smp_processor_id (),spectre_bhb_method_name (method)); +pr_info ("CPU%u: Spectre BHB: enabling %s workaround for all CPUs\n" , +smp_processor_id (),spectre_bhb_method_name (method)); + }return SPECTRE_MITIGATED ; }
arch/arm64/kernel/entry.S +1 -0
@@ -964,6 +964,7 @@ __ni_sys_trace: b . 2: tramp_map_kernel x30 + isb tramp_data_read_var x30, vectors prfm plil1strm, [x30, #(1b - \vector_start)] msr vbar_el1, x30
arch/x86/kernel/head64.c +2 -0
@@ -106,6 +106,8 @@ static void __init clear_bss(void) {memset (__bss_start,0 , (unsigned long ) __bss_stop - (unsigned long ) __bss_start); +memset (__brk_base,0 , + (unsigned long ) __brk_limit - (unsigned long ) __brk_base); }static unsigned long get_cmd_line_ptr (void )
drivers/cpufreq/pmac32-cpufreq.c +4 -0
@@ -473,6 +473,10 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)if (slew_done_gpio_np) slew_done_gpio =read_gpio (slew_done_gpio_np); +of_node_put (volt_gpio_np); +of_node_put (freq_gpio_np); +of_node_put (slew_done_gpio_np); +/* If we use the frequency GPIOs, calculate the min/max speeds based * on the bus frequencies */
drivers/net/can/m_can/m_can.c +3 -2
@@ -1068,8 +1068,6 @@ static netdev_tx_t m_can_start_xmit(struct sk_buff *skb,m_can_fifo_write (priv,0 ,M_CAN_FIFO_DATA (i /4 ), *(u32 *)(cf->data + i)); -can_put_echo_skb (skb, dev,0 ); -if (priv->can.ctrlmode &CAN_CTRLMODE_FD ) { cccr =m_can_read (priv,M_CAN_CCCR ); cccr &= ~(CCCR_CMR_MASK <<CCCR_CMR_SHIFT );
@@ -1086,6 +1084,9 @@ static netdev_tx_t m_can_start_xmit(struct sk_buff *skb,/* enable first TX buffer to start transfer */ m_can_write (priv,M_CAN_TXBTIE ,0x1 ); + +can_put_echo_skb (skb, dev,0 ); +m_can_write (priv,M_CAN_TXBAR ,0x1 );return NETDEV_TX_OK ;
drivers/net/dsa/bcm_sf2.c +19 -0
@@ -600,7 +600,9 @@ static void bcm_sf2_sw_adjust_link(struct dsa_switch *ds, int port,struct bcm_sf2_priv *priv =bcm_sf2_to_priv (ds);struct ethtool_eee *p = &priv->port_sts[port].eee;u32 id_mode_dis =0 , port_mode; +u16 lcl_adv =0 , rmt_adv =0 ;const char *str =NULL ; +u8 flowctrl =0 ;u32 reg;switch (phydev->interface) {
@@ -667,10 +669,27 @@ static void bcm_sf2_sw_adjust_link(struct dsa_switch *ds, int port,break ; } +if (phydev->duplex ==DUPLEX_FULL && + phydev->autoneg ==AUTONEG_ENABLE ) { +if (phydev->pause) + rmt_adv =LPA_PAUSE_CAP ; +if (phydev->asym_pause) + rmt_adv |=LPA_PAUSE_ASYM ; +if (phydev->advertising & ADVERTISED_Pause) + lcl_adv =ADVERTISE_PAUSE_CAP ; +if (phydev->advertising & ADVERTISED_Asym_Pause) + lcl_adv |=ADVERTISE_PAUSE_ASYM ; + flowctrl =mii_resolve_flowctrl_fdx (lcl_adv, rmt_adv); + } +if (phydev->link) reg |=LINK_STS ;if (phydev->duplex ==DUPLEX_FULL ) reg |=DUPLX_MODE ; +if (flowctrl &FLOW_CTRL_TX ) + reg |=TXFLOW_CNTL ; +if (flowctrl &FLOW_CTRL_RX ) + reg |=RXFLOW_CNTL ;core_writel (priv, reg,CORE_STS_OVERRIDE_GMIIP_PORT (port));
drivers/net/ethernet/sfc/ef10.c +3 -0
@@ -1830,7 +1830,10 @@ static int efx_ef10_try_update_nic_stats_vf(struct efx_nic *efx)efx_update_sw_stats (efx, stats); out: +/* releasing a DMA coherent buffer with BH disabled can panic */ +spin_unlock_bh (&efx->stats_lock);efx_nic_free_buffer (efx, &stats_buf); +spin_lock_bh (&efx->stats_lock);return rc; }
drivers/net/ethernet/sfc/ef10_sriov.c +7 -3
@@ -414,8 +414,9 @@ static int efx_ef10_pci_sriov_enable(struct efx_nic *efx, int num_vfs)static int efx_ef10_pci_sriov_disable (struct efx_nic *efx,bool force) {struct pci_dev *dev = efx->pci_dev; +struct efx_ef10_nic_data *nic_data = efx->nic_data;unsigned int vfs_assigned =pci_vfs_assigned (dev); -int rc =0 ; +int i, rc =0 ;if (vfs_assigned && !force) { netif_info(efx, drv, efx->net_dev, "VFs are assigned to guests; "
@@ -423,10 +424,13 @@ static int efx_ef10_pci_sriov_disable(struct efx_nic *efx, bool force)return -EBUSY ; } -if (!vfs_assigned) +if (!vfs_assigned) { +for (i =0 ; i < efx->vf_count; i++) + nic_data->vf[i].pci_dev =NULL ;pci_disable_sriov (dev); -else + }else { rc = -EBUSY ; + }efx_ef10_sriov_free_vf_vswitching (efx); efx->vf_count =0 ;
drivers/net/xen-netback/rx.c +1 -0
@@ -482,6 +482,7 @@ void xenvif_rx_action(struct xenvif_queue *queue) queue->rx_copy.completed = &completed_skbs;while (xenvif_rx_ring_slots_available (queue) && + !skb_queue_empty (&queue->rx_queue) && work_done <RX_BATCH_SIZE ) {xenvif_rx_skb (queue); work_done++;
drivers/nfc/nxp-nci/i2c.c +6 -2
@@ -139,7 +139,9 @@ static int nxp_nci_i2c_fw_read(struct nxp_nci_i2c_phy *phy,memcpy (skb_put (*skb,NXP_NCI_FW_HDR_LEN ), &header,NXP_NCI_FW_HDR_LEN ); r =i2c_master_recv (client,skb_put (*skb, frame_len), frame_len); -if (r != frame_len) { +if (r <0 ) { + goto fw_read_exit_free_skb; + }else if (r != frame_len) {nfc_err (&client->dev,"Invalid frame length: %u (expected %zu)\n" , r, frame_len);
@@ -184,7 +186,9 @@ static int nxp_nci_i2c_nci_read(struct nxp_nci_i2c_phy *phy,return 0 ; r =i2c_master_recv (client,skb_put (*skb, header.plen), header.plen); -if (r != header.plen) { +if (r <0 ) { + goto nci_read_exit_free_skb; + }else if (r != header.plen) {nfc_err (&client->dev,"Invalid frame payload length: %u (expected %u)\n" , r, header.plen);
drivers/tty/serial/8250/8250_port.c +3 -1
@@ -2789,8 +2789,10 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)case UPIO_MEM32BE :case UPIO_MEM16 :case UPIO_MEM : -if (!port->mapbase) +if (!port->mapbase) { + ret = -EINVAL ;break ; + }if (!request_mem_region (port->mapbase, size,"serial" )) { ret = -EBUSY ;
drivers/tty/serial/samsung.c +2 -3
@@ -241,8 +241,7 @@ static void enable_tx_dma(struct s3c24xx_uart_port *ourport)/* Enable tx dma mode */ ucon =rd_regl (port,S3C2410_UCON ); ucon &= ~(S3C64XX_UCON_TXBURST_MASK |S3C64XX_UCON_TXMODE_MASK ); - ucon |= (dma_get_cache_alignment () >=16 ) ? -S3C64XX_UCON_TXBURST_16 :S3C64XX_UCON_TXBURST_1 ; + ucon |=S3C64XX_UCON_TXBURST_1 ; ucon |=S3C64XX_UCON_TXMODE_DMA ;wr_regl (port,S3C2410_UCON , ucon);
@@ -515,7 +514,7 @@ static void enable_rx_dma(struct s3c24xx_uart_port *ourport)S3C64XX_UCON_DMASUS_EN |S3C64XX_UCON_TIMEOUT_EN | S3C64XX_UCON_RXMODE_MASK); - ucon |=S3C64XX_UCON_RXBURST_16 | + ucon |=S3C64XX_UCON_RXBURST_1 |0xf <<S3C64XX_UCON_TIMEOUT_SHIFT |S3C64XX_UCON_EMPTYINT_EN | S3C64XX_UCON_TIMEOUT_EN |
drivers/usb/dwc3/gadget.c +3 -1
@@ -2886,7 +2886,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt) } evt->count =0 ; - evt->flags &= ~DWC3_EVENT_PENDING ; ret =IRQ_HANDLED ;/* Unmask interrupt */
@@ -2894,6 +2893,9 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt) reg &= ~DWC3_GEVNTSIZ_INTMASK ;dwc3_writel (dwc->regs,DWC3_GEVNTSIZ (0 ), reg); +/* Keep the clearing of DWC3_EVENT_PENDING at the end */ + evt->flags &= ~DWC3_EVENT_PENDING ; +return ret; }
drivers/usb/serial/ftdi_sio.c +3 -0
@@ -1018,6 +1018,9 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_DISPLAY_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_LITE_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_ANALOG_PID) }, +/* Belimo Automation devices */ + { USB_DEVICE(FTDI_VID, BELIMO_ZTH_PID) }, + { USB_DEVICE(FTDI_VID, BELIMO_ZIP_PID) },/* ICP DAS I-756xU devices */ { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) },
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -1567,6 +1567,12 @@#define CHETCO_SEASMART_LITE_PID 0xA5AE/* SeaSmart Lite USB Adapter */ #define CHETCO_SEASMART_ANALOG_PID 0xA5AF/* SeaSmart Analog Adapter */ +/* +* Belimo Automation +*/ +#define BELIMO_ZTH_PID 0x8050 +#define BELIMO_ZIP_PID 0xC811 +/* * Unjo AB */
drivers/virtio/virtio_mmio.c +26 -0
@@ -66,6 +66,7 @@#include <linux/list.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/pm.h> #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/virtio.h>
@@ -489,6 +490,28 @@ static const struct virtio_config_ops virtio_mmio_config_ops = { .bus_name = vm_bus_name, }; +#ifdef CONFIG_PM_SLEEP +static int virtio_mmio_freeze (struct device *dev) +{ +struct virtio_mmio_device *vm_dev =dev_get_drvdata (dev); + +return virtio_device_freeze (&vm_dev->vdev); +} + +static int virtio_mmio_restore (struct device *dev) +{ +struct virtio_mmio_device *vm_dev =dev_get_drvdata (dev); + +if (vm_dev->version ==1 ) +writel (PAGE_SIZE , vm_dev->base +VIRTIO_MMIO_GUEST_PAGE_SIZE ); + +return virtio_device_restore (&vm_dev->vdev); +} + +static const struct dev_pm_ops virtio_mmio_pm_ops = { +SET_SYSTEM_SLEEP_PM_OPS (virtio_mmio_freeze, virtio_mmio_restore) +}; +#endif /* Platform device */
@@ -730,6 +753,9 @@ static struct platform_driver virtio_mmio_driver = { .name = "virtio-mmio", .of_match_table = virtio_mmio_match, .acpi_match_table = ACPI_PTR(virtio_mmio_acpi_match), +#ifdef CONFIG_PM_SLEEP + .pm = &virtio_mmio_pm_ops, +#endif }, };
fs/nilfs2/nilfs.h +3 -0
@@ -212,6 +212,9 @@ static inline int nilfs_acl_chmod(struct inode *inode)static inline int nilfs_init_acl (struct inode *inode,struct inode *dir) { +if (S_ISLNK (inode->i_mode)) +return 0 ; + inode->i_mode &= ~current_umask ();return 0 ; }
include/trace/events/sock.h +4 -2
@@ -37,7 +37,7 @@ TRACE_EVENT(sock_exceed_buf_limit,TP_STRUCT__entry ( __array(char, name, 32) - __field(long *, sysctl_mem) + __array(long, sysctl_mem, 3) __field(long, allocated) __field(int, sysctl_rmem) __field(int, rmem_alloc)
@@ -45,7 +45,9 @@ TRACE_EVENT(sock_exceed_buf_limit,TP_fast_assign ( strncpy(__entry->name, prot->name, 32); - __entry->sysctl_mem = prot->sysctl_mem; + __entry->sysctl_mem[0 ] =READ_ONCE (prot->sysctl_mem[0 ]); + __entry->sysctl_mem[1 ] =READ_ONCE (prot->sysctl_mem[1 ]); + __entry->sysctl_mem[2 ] =READ_ONCE (prot->sysctl_mem[2 ]); __entry->allocated = allocated; __entry->sysctl_rmem = prot->sysctl_rmem[0 ]; __entry->rmem_alloc =atomic_read (&sk->sk_rmem_alloc);
kernel/signal.c +4 -4
@@ -1647,12 +1647,12 @@ bool do_notify_parent(struct task_struct *tsk, int sig)bool autoreap = false;cputime_t utime, stime; -BUG_ON (sig ==-1 ); +WARN_ON_ONCE (sig ==-1 ); -/* do_notify_parent_cldstop should have been called instead. */ -BUG_ON (task_is_stopped_or_traced (tsk)); +/* do_notify_parent_cldstop should have been called instead. */ +WARN_ON_ONCE (task_is_stopped_or_traced (tsk)); -BUG_ON (!tsk->ptrace && +WARN_ON_ONCE (!tsk->ptrace && (tsk->group_leader != tsk || !thread_group_empty (tsk)));if (sig !=SIGCHLD ) {
mm/memory.c +7 -2
@@ -2891,10 +2891,15 @@ static int __do_fault(struct fault_env *fe, pgoff_t pgoff, }if (unlikely (PageHWPoison (vmf.page))) { -if (ret &VM_FAULT_LOCKED ) +int poisonret =VM_FAULT_HWPOISON ; +if (ret &VM_FAULT_LOCKED ) { +/* Retry if a clean page was removed from the cache. */ +if (invalidate_inode_page (vmf.page)) + poisonret =0 ;unlock_page (vmf.page); + }put_page (vmf.page); -return VM_FAULT_HWPOISON ; +return poisonret; }if (unlikely (!(ret &VM_FAULT_LOCKED )))
net/ipv4/af_inet.c +2 -2
@@ -1122,7 +1122,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)if (new_saddr == old_saddr)return 0 ; -if (sock_net (sk)->ipv4.sysctl_ip_dynaddr >1 ) { +if (READ_ONCE (sock_net (sk)->ipv4.sysctl_ip_dynaddr) >1 ) {pr_info ("%s(): shifting inet->saddr from %pI4 to %pI4\n" , __func__, &old_saddr, &new_saddr); }
@@ -1177,7 +1177,7 @@ int inet_sk_rebuild_header(struct sock *sk)* Other protocols have to map its equivalent state to TCP_SYN_SENT. * DCCP maps its DCCP_REQUESTING state to TCP_SYN_SENT. -acme */ -if (!sock_net (sk)->ipv4.sysctl_ip_dynaddr || +if (!READ_ONCE (sock_net (sk)->ipv4.sysctl_ip_dynaddr) || sk->sk_state !=TCP_SYN_SENT || (sk->sk_userlocks &SOCK_BINDADDR_LOCK ) || (err =inet_sk_reselect_saddr (sk)) !=0 )
net/ipv4/cipso_ipv4.c +7 -5
@@ -254,7 +254,7 @@ static int cipso_v4_cache_check(const unsigned char *key,struct cipso_v4_map_cache_entry *prev_entry =NULL ;u32 hash; -if (!cipso_v4_cache_enabled) +if (!READ_ONCE (cipso_v4_cache_enabled))return -ENOENT ; hash =cipso_v4_map_cache_hash (key, key_len);
@@ -311,13 +311,14 @@ static int cipso_v4_cache_check(const unsigned char *key,int cipso_v4_cache_add (const unsigned char *cipso_ptr,const struct netlbl_lsm_secattr *secattr) { +int bkt_size =READ_ONCE (cipso_v4_cache_bucketsize);int ret_val = -EPERM ;u32 bkt;struct cipso_v4_map_cache_entry *entry =NULL ;struct cipso_v4_map_cache_entry *old_entry =NULL ;u32 cipso_ptr_len; -if (!cipso_v4_cache_enabled || cipso_v4_cache_bucketsize <=0 ) +if (!READ_ONCE (cipso_v4_cache_enabled) || bkt_size <=0 )return 0 ; cipso_ptr_len = cipso_ptr[1 ];
@@ -337,7 +338,7 @@ int cipso_v4_cache_add(const unsigned char *cipso_ptr, bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETS -1 );spin_lock_bh (&cipso_v4_cache[bkt].lock); -if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) { +if (cipso_v4_cache[bkt].size < bkt_size) {list_add (&entry->list, &cipso_v4_cache[bkt].list); cipso_v4_cache[bkt].size +=1 ; }else {
@@ -1214,7 +1215,8 @@ static int cipso_v4_gentag_rbm(const struct cipso_v4_doi *doi_def,/* This will send packets using the "optimized" format when * possible as specified in section 3.4.2.6 of the * CIPSO draft. */ -if (cipso_v4_rbm_optfmt && ret_val >0 && ret_val <=10 ) +if (READ_ONCE (cipso_v4_rbm_optfmt) && ret_val >0 && + ret_val <=10 ) tag_len =14 ;else tag_len =4 + ret_val;
@@ -1617,7 +1619,7 @@ int cipso_v4_validate(const struct sk_buff *skb, unsigned char **option)* all the CIPSO validations here but it doesn't * really specify _exactly_ what we need to validate * ... so, just make it a sysctl tunable. */ -if (cipso_v4_rbm_strictvalid) { +if (READ_ONCE (cipso_v4_rbm_strictvalid)) {if (cipso_v4_map_lvl_valid (doi_def, tag[3 ]) <0 ) { err_offset = opt_iter +3 ;
net/ipv4/icmp.c +3 -2
@@ -268,11 +268,12 @@ bool icmp_global_allow(void)spin_lock (&icmp_global.lock); delta =min_t (u32, now - icmp_global.stamp,HZ );if (delta >=HZ /50 ) { - incr = sysctl_icmp_msgs_per_sec * delta /HZ ; + incr =READ_ONCE (sysctl_icmp_msgs_per_sec) * delta /HZ ;if (incr)WRITE_ONCE (icmp_global.stamp, now); } - credit =min_t (u32, icmp_global.credit + incr, sysctl_icmp_msgs_burst); + credit =min_t (u32, icmp_global.credit + incr, +READ_ONCE (sysctl_icmp_msgs_burst));if (credit) {/* We want to use a credit of one in average, but need to randomize * it for security reasons.
net/tipc/socket.c +1 -0
@@ -341,6 +341,7 @@ static int tipc_sk_create(struct net *net, struct socket *sock, sock->state = state;sock_init_data (sock, sk);if (tipc_sk_insert (tsk)) { +sk_free (sk);pr_warn ("Socket create failed; port number exhausted\n" );return -EINVAL ; }
sound/pci/hda/patch_realtek.c +1 -0
@@ -5709,6 +5709,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x079b ,"Acer Aspire V5-573G" ,ALC282_FIXUP_ASPIRE_V5_PINS ),SND_PCI_QUIRK (0x1025 ,0x106d ,"Acer Cloudbook 14" ,ALC283_FIXUP_CHROME_BOOK ),SND_PCI_QUIRK (0x1028 ,0x0470 ,"Dell M101z" ,ALC269_FIXUP_DELL_M101Z ), +SND_PCI_QUIRK (0x1028 ,0x053c ,"Dell Latitude E5430" ,ALC292_FIXUP_DELL_E7X ),SND_PCI_QUIRK (0x1028 ,0x054b ,"Dell XPS one 2710" ,ALC275_FIXUP_DELL_XPS ),SND_PCI_QUIRK (0x1028 ,0x05bd ,"Dell Latitude E6440" ,ALC292_FIXUP_DELL_E7X ), SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
sound/soc/codecs/wm5110.c +6 -2
@@ -404,6 +404,7 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,unsigned int rnew = (!!ucontrol->value.integer.value[1 ]) << mc->rshift;unsigned int lold, rold;unsigned int lena, rena; +bool change = false;int ret;snd_soc_dapm_mutex_lock (dapm);
@@ -431,8 +432,8 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol, goto err; } - ret =regmap_update_bits (arizona->regmap,ARIZONA_DRE_ENABLE , - mask, lnew | rnew); + ret =regmap_update_bits_check (arizona->regmap,ARIZONA_DRE_ENABLE , + mask, lnew | rnew, &change);if (ret) {dev_err (arizona->dev,"Failed to set DRE: %d\n" , ret); goto err;
@@ -445,6 +446,9 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,if (!rnew && rold)wm5110_clear_pga_volume (arizona, mc->rshift); +if (change) + ret =1 ; + err:snd_soc_dapm_mutex_unlock (dapm);
sound/soc/soc-ops.c +2 -2
@@ -535,7 +535,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,return -EINVAL ;if (mc->platform_max && tmp > mc->platform_max)return -EINVAL ; -if (tmp > mc->max - mc->min +1 ) +if (tmp > mc->max - mc->min)return -EINVAL ;if (invert)
@@ -556,7 +556,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,return -EINVAL ;if (mc->platform_max && tmp > mc->platform_max)return -EINVAL ; -if (tmp > mc->max - mc->min +1 ) +if (tmp > mc->max - mc->min)return -EINVAL ;if (invert)