Linux 4.14.293
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.293 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/mips/loongson32/ls1c/board.c | 1 arch/parisc/kernel/head.S | 43 +++++++++++++++++++++++++- arch/s390/include/asm/hugetlb.h | 6 ++- arch/s390/kernel/vmlinux.lds.S | 1 drivers/android/binder.c | 12 +++++++ drivers/base/dd.c | 10 ++++++ drivers/firmware/efi/capsule-loader.c | 31 ++++-------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 + drivers/gpu/drm/i915/gvt/handlers.c | 2 - drivers/gpu/drm/msm/dsi/dsi_cfg.c | 2 - drivers/gpu/drm/radeon/radeon_device.c | 3 + drivers/hwmon/gpio-fan.c | 3 + drivers/input/misc/rk805-pwrkey.c | 1 drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 - drivers/net/wireless/intel/iwlegacy/4965-rs.c | 5 --- drivers/parisc/ccio-dma.c | 11 ++++-- drivers/platform/x86/pmc_atom.c | 2 - drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 - drivers/staging/rtl8712/rtl8712_cmd.c | 36 --------------------- drivers/thunderbolt/ctl.c | 2 - drivers/tty/serial/fsl_lpuart.c | 4 +- drivers/tty/vt/vt.c | 12 ++++--- drivers/usb/class/cdc-acm.c | 3 + drivers/usb/core/hub.c | 10 ++++++ drivers/usb/dwc2/platform.c | 8 ++-- drivers/usb/dwc3/core.c | 20 ++++++------ drivers/usb/gadget/function/storage_common.c | 6 ++- drivers/usb/host/xhci-hub.c | 11 ++++++ drivers/usb/host/xhci.c | 4 +- drivers/usb/host/xhci.h | 2 - drivers/usb/serial/ch341.c | 15 +++++++-- drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/ftdi_sio.c | 2 + drivers/usb/serial/ftdi_sio_ids.h | 6 +++ drivers/usb/serial/option.c | 15 +++++++++ drivers/usb/storage/unusual_devs.h | 7 ++++ drivers/video/fbdev/chipsfb.c | 1 include/linux/buffer_head.h | 11 ++++++ include/linux/platform_data/x86/pmc_atom.h | 6 ++- include/linux/usb.h | 2 + kernel/bpf/verifier.c | 1 kernel/kprobes.c | 1 mm/kmemleak.c | 8 ++-- net/bridge/br_netfilter_hooks.c | 2 + net/bridge/br_netfilter_ipv6.c | 1 net/ipv4/tcp_input.c | 25 ++++++++++----- net/ipv6/seg6.c | 5 +++ net/kcm/kcmsock.c | 15 ++++----- net/mac80211/ibss.c | 4 ++ net/mac802154/rx.c | 2 - net/netfilter/nf_conntrack_irc.c | 5 +-- net/sched/sch_sfb.c | 13 ++++--- net/sunrpc/xprt.c | 4 +- net/tipc/monitor.c | 2 - net/wireless/debugfs.c | 3 + sound/core/seq/oss/seq_oss_midi.c | 2 + sound/core/seq/seq_clientmgr.c | 12 +++---- sound/drivers/aloop.c | 7 ++-- sound/pci/emu10k1/emupcm.c | 2 - sound/usb/stream.c | 2 - tools/testing/selftests/bpf/test_align.c | 27 ++++++++-------- tools/testing/selftests/bpf/test_verifier.c | 16 ++++----- 63 files changed, 314 insertions(+), 171 deletions(-)
Alan Stern (1):
USB: core: Prevent nested device-reset calls
Andy Shevchenko (1):
platform/x86: pmc_atom: Fix SLP_TYPx bitfield mask
Armin Wolf (1):
hwmon: (gpio-fan) Fix array out of bounds access
Candice Li (1):
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
Carlos Llamas (1):
binder: fix UAF of ref->proc caused by race condition
Christian A. Ehrhardt (1):
kprobes: Prohibit probes in gate area
Colin Ian King (1):
drm/i915/reg: Fix spelling mistake "Unsupport" -> "Unsupported"
Cong Wang (1):
kcm: fix strp_init() order and cleanup
Dan Carpenter (3):
wifi: cfg80211: debugfs: fix return type in ht40allow_map_read()
staging: rtl8712: fix use after free bugs
tipc: fix shift wrapping bug in map_get()
David Leadbeater (1):
netfilter: nf_conntrack_irc: Fix forged IP logic
David Lebrun (1):
ipv6: sr: fix out-of-bounds read when setting HMAC data.
Dongxiang Ke (1):
ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface()
Douglas Anderson (1):
drm/msm/dsi: Fix number of regulators for msm8996_dsi_cfg
Duoming Zhou (1):
ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler
Gerald Schaefer (1):
s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages
Greg Kroah-Hartman (1):
Linux 4.14.293
Harsh Modi (1):
netfilter: br_netfilter: Drop dst references before setting.
Heiner Kallweit (1):
usb: dwc2: fix wrong order of phy_power_on and phy_init
Helge Deller (2):
vt: Clear selection before changing the font
parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines
Hyunwoo Kim (1):
efi: capsule-loader: Fix use-after-free in efi_capsule_write
Isaac J. Manjarres (1):
driver core: Don't probe devices after bus_type.match() probe deferral
Johan Hovold (4):
USB: serial: cp210x: add Decagon UCA device id
usb: dwc3: fix PHY disable sequence
USB: serial: ch341: fix lost character on LCR updates
USB: serial: ch341: fix disabled rx timer on older devices
John Fastabend (1):
bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Josh Poimboeuf (1):
s390: fix nospec table alignments
Krishna Kurapati (1):
usb: gadget: mass_storage: Fix cdrom data transfers on MAC-OS
Li Qiong (1):
parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()
Linus Torvalds (1):
fs: only do a memory barrier for the first set_buffer_uptodate()
Mathias Nyman (1):
xhci: Add grace period after xHC start to prevent premature runtime suspend.
Maxim Mikityanskiy (1):
bpf: Fix the off-by-two error in range markings
Mika Westerberg (1):
thunderbolt: Use the actual buffer in tb_async_error()
Miquel Raynal (1):
net: mac802154: Fix a condition in the receive path
Neal Cardwell (1):
tcp: fix early ETIMEDOUT after spurious non-SACK RTO
NeilBrown (1):
SUNRPC: use _bh spinlocking on ->transport_lock
Niek Nooijens (1):
USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id
Pattara Teerapong (1):
ALSA: aloop: Fix random zeros in capture data when using jiffies timer
Peter Robinson (1):
Input: rk805-pwrkey - fix module autoloading
Shenwei Wang (1):
serial: fsl_lpuart: RS485 RTS polariy is inverse
Siddh Raman Pant (1):
wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected
Slark Xiao (1):
USB: serial: option: add support for Cinterion MV32-WA/WB RmNet mode
Sreekanth Reddy (1):
scsi: mpt3sas: Fix use-after-free warning
Stanislav Fomichev (1):
selftests/bpf: Fix test_align verifier log patterns
Stanislaw Gruszka (1):
wifi: iwlegacy: 4965: corrected fix for potential off-by-one overflow in il4965_rs_fill_link_cmd()
Takashi Iwai (2):
ALSA: seq: oss: Fix data-race for max_midi_devs access
ALSA: seq: Fix data-race at module auto-loading
Tasos Sahanidis (1):
ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc()
Thierry GUIBERT (1):
USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020)
Toke Høiland-Jørgensen (2):
sch_sfb: Don't assume the skb is still around after enqueueing to child
sch_sfb: Also store skb len before calling child enqueue
Witold Lipieta (1):
usb-storage: Add ignore-residue quirk for NXP PN7462AU
Yan Xinyu (1):
USB: serial: option: add support for OPPO R11 diag port
Yang Ling (1):
MIPS: loongson32: ls1c: Fix hang during startup
Yang Yingliang (1):
fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init()
Yee Lee (1):
Revert "mm: kmemleak: take a full lowmem check in kmemleak_*_phys()"
Yonglin Tan (1):
USB: serial: option: add Quectel EM060K modem
Zhenneng Li (1):
drm/radeon: add a force flush to delay work when radeon
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 292 +SUBLEVEL = 293 EXTRAVERSION = NAME = Petit Gorille
arch/mips/loongson32/ls1c/board.c +0 -1
@@ -19,7 +19,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {static int __init ls1c_platform_init (void ) {ls1x_serial_set_uartclk (&ls1x_uart_pdev); -ls1x_rtc_set_extclk (&ls1x_rtc_pdev);return platform_add_devices (ls1c_platform_devices,ARRAY_SIZE (ls1c_platform_devices));
arch/parisc/kernel/head.S +42 -1
55 lines not on this page · raw message
arch/s390/include/asm/hugetlb.h +4 -2
@@ -30,9 +30,11 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm,static inline int prepare_hugepage_range (struct file *file,unsigned long addr,unsigned long len) { -if (len & ~HPAGE_MASK ) +struct hstate *h =hstate_file (file); + +if (len & ~huge_page_mask (h))return -EINVAL ; -if (addr & ~HPAGE_MASK ) +if (addr & ~huge_page_mask (h))return -EINVAL ;return 0 ; }
arch/s390/kernel/vmlinux.lds.S +1 -0
@@ -131,6 +131,7 @@ SECTIONS /* * Table with the patch locations to undo expolines */ + . = ALIGN(4); .nospec_call_table : { __nospec_call_start = . ; *(.s390_indirect*)
drivers/android/binder.c +12 -0
@@ -1757,6 +1757,18 @@ static int binder_inc_ref_for_node(struct binder_proc *proc, } ret =binder_inc_ref_olocked (ref, strong, target_list); *rdata = ref->data; +if (ret && ref == new_ref) { +/* +* Cleanup the failed reference here as the target +* could now be dead and have already released its +* references by now. Calling on the new reference +* with strong=0 and a tmp_refs will not decrement +* the node. The new_ref gets kfree'd below. +*/ +binder_cleanup_ref_olocked (new_ref); + ref =NULL ; + } +binder_proc_unlock (proc);if (new_ref && ref != new_ref)/*
drivers/base/dd.c +10 -0
@@ -632,6 +632,11 @@ static int __device_attach_driver(struct device_driver *drv, void *_data) }else if (ret == -EPROBE_DEFER ) {dev_dbg (dev,"Device match requests probe deferral\n" );driver_deferred_probe_add (dev); +/* +* Device can't match with a driver right now, so don't attempt +* to match or bind with other drivers on the bus. +*/ +return ret; }else if (ret <0 ) {dev_dbg (dev,"Bus failed to match device: %d" , ret);return ret;
@@ -774,6 +779,11 @@ static int __driver_attach(struct device *dev, void *data) }else if (ret == -EPROBE_DEFER ) {dev_dbg (dev,"Device match requests probe deferral\n" );driver_deferred_probe_add (dev); +/* +* Driver could not match with device, but may match with +* another device on the bus. +*/ +return 0 ; }else if (ret <0 ) {dev_dbg (dev,"Bus failed to match device: %d" , ret);return ret;
drivers/firmware/efi/capsule-loader.c +7 -24
@@ -237,29 +237,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,return ret; } -/** -* efi_capsule_flush - called by file close or file flush -* @file: file pointer -* @id: not used -* -* If a capsule is being partially uploaded then calling this function -* will be treated as upload termination and will free those completed -* buffer pages and -ECANCELED will be returned. -**/ -static int efi_capsule_flush (struct file *file,fl_owner_t id) -{ -int ret =0 ; -struct capsule_info *cap_info = file->private_data; - -if (cap_info->index >0 ) { -pr_err ("capsule upload not complete\n" ); -efi_free_all_buff_pages (cap_info); - ret = -ECANCELED ; - } - -return ret; -} -/** * efi_capsule_release - called by file close * @inode: not used
@@ -272,6 +249,13 @@ static int efi_capsule_release(struct inode *inode, struct file *file) {struct capsule_info *cap_info = file->private_data; +if (cap_info->index >0 && + (cap_info->header.headersize ==0 || + cap_info->count < cap_info->total_size)) { +pr_err ("capsule upload not complete\n" ); +efi_free_all_buff_pages (cap_info); + } +kfree (cap_info->pages);kfree (cap_info->phys);kfree (file->private_data);
@@ -319,7 +303,6 @@ static const struct file_operations efi_capsule_fops = { .owner = THIS_MODULE, .open = efi_capsule_open, .write = efi_capsule_write, - .flush = efi_capsule_flush, .release = efi_capsule_release, .llseek = no_llseek, };
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
@@ -1514,7 +1514,8 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)gfx_v9_0_tiling_mode_table_init (adev); -gfx_v9_0_setup_rb (adev); +if (adev->gfx.num_gfx_rings) +gfx_v9_0_setup_rb (adev);gfx_v9_0_get_cu_info (adev, &adev->gfx.cu_info);/* XXX SH_MEM regs */
drivers/gpu/drm/i915/gvt/handlers.c +1 -1
@@ -601,7 +601,7 @@ static int update_fdi_rx_iir_status(struct intel_vgpu *vgpu,else if (FDI_RX_IMR_TO_PIPE (offset) !=INVALID_INDEX ) index =FDI_RX_IMR_TO_PIPE (offset);else { -gvt_vgpu_err ("Unsupport registers %x\n" , offset); +gvt_vgpu_err ("Unsupported registers %x\n" , offset);return -EINVAL ; }
drivers/gpu/drm/msm/dsi/dsi_cfg.c +1 -1
@@ -105,7 +105,7 @@ static const char * const dsi_8996_bus_clk_names[] = {static const struct msm_dsi_config msm8996_dsi_cfg = { .io_offset =DSI_6G_REG_SHIFT , .reg_cfg = { - .num =2 , + .num =3 , .regs = { {"vdda" ,18160 ,1 },/* 1.25 V */ {"vcca" ,17000 ,32 },/* 0.925 V */
drivers/gpu/drm/radeon/radeon_device.c +3 -0
@@ -1655,6 +1655,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,if (r) {/* delay GPU reset to resume */ radeon_fence_driver_force_completion (rdev, i); + }else { +/* finish executing delayed work */ +flush_delayed_work (&rdev->fence_drv[i].lockup_work); } }
drivers/hwmon/gpio-fan.c +3 -0
@@ -422,6 +422,9 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,if (!fan_data)return -EINVAL ; +if (state >= fan_data->num_speed) +return -EINVAL ; +set_fan_speed (fan_data, state);return 0 ; }
drivers/input/misc/rk805-pwrkey.c +1 -0
@@ -106,6 +106,7 @@ static struct platform_driver rk805_pwrkey_driver = { };module_platform_driver (rk805_pwrkey_driver); +MODULE_ALIAS ("platform:rk805-pwrkey" );MODULE_AUTHOR ("Joseph Chen <[email protected]>" );MODULE_DESCRIPTION ("RK805 PMIC Power Key driver" );MODULE_LICENSE ("GPL" );
drivers/net/ethernet/rocker/rocker_ofdpa.c +1 -1
@@ -1277,7 +1277,7 @@ static int ofdpa_port_ipv4_neigh(struct ofdpa_port *ofdpa_port,bool removing;int err =0 ; - entry =kzalloc (sizeof (*entry),GFP_KERNEL ); + entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (!entry)return -ENOMEM ;
drivers/net/wireless/intel/iwlegacy/4965-rs.c +1 -4
@@ -2424,7 +2424,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,/* Repeat initial/next rate. * For legacy IL_NUMBER_TRY == 1, this loop will not execute. * For HT IL_HT_NUMBER_TRY == 3, this executes twice. */ -while (repeat_rate >0 ) { +while (repeat_rate >0 && idx < (LINK_QUAL_MAX_RETRY_NUM -1 )) {if (is_legacy (tbl_type.lq_type)) {if (ant_toggle_cnt <NUM_TRY_BEFORE_ANT_TOGGLE ) ant_toggle_cnt++;
@@ -2443,8 +2443,6 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,cpu_to_le32 (new_rate); repeat_rate--; idx++; -if (idx >=LINK_QUAL_MAX_RETRY_NUM ) - goto out; } il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band,
@@ -2489,7 +2487,6 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta, repeat_rate--; } -out: lq_cmd->agg_params.agg_frame_cnt_limit =LINK_QUAL_AGG_FRAME_LIMIT_DEF ; lq_cmd->agg_params.agg_dis_start_th =LINK_QUAL_AGG_DISABLE_START_DEF ;
drivers/parisc/ccio-dma.c +8 -3
@@ -1416,15 +1416,17 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) } } -static void __init ccio_init_resources (struct ioc *ioc) +static int __init ccio_init_resources (struct ioc *ioc) {struct resource *res = ioc->mmio_region;char *name =kmalloc (14 ,GFP_KERNEL ); - +if (unlikely (!name)) +return -ENOMEM ;snprintf (name,14 ,"GSC Bus [%d/]" , ioc->hw_path);ccio_init_resource (res, name, &ioc->ioc_regs->io_io_low);ccio_init_resource (res +1 , name, &ioc->ioc_regs->io_io_low_hv); +return 0 ; } static int new_ioc_area(struct resource *res, unsigned long size,
@@ -1578,7 +1580,10 @@ static int __init ccio_probe(struct parisc_device *dev)return -ENOMEM ; }ccio_ioc_init (ioc); -ccio_init_resources (ioc); +if (ccio_init_resources (ioc)) { +kfree (ioc); +return -ENOMEM ; + } hppa_dma_ops = &ccio_ops; dev->dev.platform_data =kzalloc (sizeof (struct pci_hba_data ),GFP_KERNEL );
drivers/platform/x86/pmc_atom.c +1 -1
@@ -253,7 +253,7 @@ static void pmc_power_off(void) pm1_cnt_port = acpi_base_addr +PM1_CNT ; pm1_cnt_value =inl (pm1_cnt_port); - pm1_cnt_value &=SLEEP_TYPE_MASK ; + pm1_cnt_value &= ~SLEEP_TYPE_MASK ; pm1_cnt_value |=SLEEP_TYPE_S5 ; pm1_cnt_value |=SLEEP_ENABLE ;
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -1
@@ -2804,6 +2804,7 @@ static struct fw_event_work *dequeue_next_fw_event(struct MPT3SAS_ADAPTER *ioc) fw_event =list_first_entry (&ioc->fw_event_list, struct fw_event_work, list);list_del_init (&fw_event->list); +fw_event_work_put (fw_event); }spin_unlock_irqrestore (&ioc->fw_event_lock, flags);
@@ -2840,7 +2841,6 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc)if (cancel_work_sync (&fw_event->work))fw_event_work_put (fw_event); -fw_event_work_put (fw_event); } }
drivers/staging/rtl8712/rtl8712_cmd.c +0 -36
@@ -129,34 +129,6 @@ static void r871x_internal_cmd_hdl(struct _adapter *padapter, u8 *pbuf)kfree (pdrvcmd->pbuf); } -static u8 read_macreg_hdl (struct _adapter *padapter,u8 *pbuf) -{ -void (*pcmd_callback)(struct _adapter *dev,struct cmd_obj *pcmd); -struct cmd_obj *pcmd = (struct cmd_obj *)pbuf; - -/* invoke cmd->callback function */ - pcmd_callback = cmd_callback[pcmd->cmdcode].callback; -if (!pcmd_callback) -r8712_free_cmd_obj (pcmd); -else -pcmd_callback (padapter, pcmd); -return H2C_SUCCESS ; -} - -static u8 write_macreg_hdl (struct _adapter *padapter,u8 *pbuf) -{ -void (*pcmd_callback)(struct _adapter *dev,struct cmd_obj *pcmd); -struct cmd_obj *pcmd = (struct cmd_obj *)pbuf; - -/* invoke cmd->callback function */ - pcmd_callback = cmd_callback[pcmd->cmdcode].callback; -if (!pcmd_callback) -r8712_free_cmd_obj (pcmd); -else -pcmd_callback (padapter, pcmd); -return H2C_SUCCESS ; -} -static u8 read_bbreg_hdl (struct _adapter *padapter,u8 *pbuf) {struct cmd_obj *pcmd = (struct cmd_obj *)pbuf;
@@ -225,14 +197,6 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, pcmd_r =NULL ;switch (pcmd->cmdcode) { -case GEN_CMD_CODE (_Read_MACREG): -read_macreg_hdl (padapter, (u8 *)pcmd); - pcmd_r = pcmd; -break ; -case GEN_CMD_CODE (_Write_MACREG): -write_macreg_hdl (padapter, (u8 *)pcmd); - pcmd_r = pcmd; -break ;case GEN_CMD_CODE (_Read_BBREG):read_bbreg_hdl (padapter, (u8 *)pcmd);break ;
drivers/thunderbolt/ctl.c +1 -1
@@ -401,7 +401,7 @@ static void tb_ctl_rx_submit(struct ctl_pkg *pkg)static int tb_async_error (const struct ctl_pkg *pkg) { -const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg; +const struct cfg_error_pkg *error = pkg->buffer;if (pkg->frame.eof !=TB_CFG_PKG_ERROR )return false;
drivers/tty/serial/fsl_lpuart.c +2 -2
@@ -1106,9 +1106,9 @@ static int lpuart_config_rs485(struct uart_port *port,* Note: UART is assumed to be active high. */ if (rs485->flags &SER_RS485_RTS_ON_SEND ) - modem &= ~UARTMODEM_TXRTSPOL ; -else if (rs485->flags &SER_RS485_RTS_AFTER_SEND ) modem |=UARTMODEM_TXRTSPOL ; +else if (rs485->flags &SER_RS485_RTS_AFTER_SEND ) + modem &= ~UARTMODEM_TXRTSPOL ; }/* Store the new configuration */
drivers/tty/vt/vt.c +8 -4
@@ -4175,9 +4175,11 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op)console_lock ();if (vc->vc_mode !=KD_TEXT ) rc = -EINVAL ; -else if (vc->vc_sw->con_font_set) +else if (vc->vc_sw->con_font_set) { +if (vc_is_sel (vc)) +clear_selection (); rc = vc->vc_sw->con_font_set (vc, &font, op->flags); -else + }else rc = -ENOSYS ;console_unlock ();kfree (font.data);
@@ -4204,9 +4206,11 @@ static int con_font_default(struct vc_data *vc, struct console_font_op *op)console_unlock ();return -EINVAL ; } -if (vc->vc_sw->con_font_default) +if (vc->vc_sw->con_font_default) { +if (vc_is_sel (vc)) +clear_selection (); rc = vc->vc_sw->con_font_default (vc, &font, s); -else + }else rc = -ENOSYS ;console_unlock ();if (!rc) {
drivers/usb/class/cdc-acm.c +3 -0
@@ -1894,6 +1894,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x09d8, 0x0320), /* Elatec GmbH TWN3 */ .driver_info =NO_UNION_NORMAL ,/* has misplaced union descriptor */ }, + { USB_DEVICE(0x0c26, 0x0020), /* Icom ICF3400 Serie */ + .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ + }, { USB_DEVICE(0x0ca6, 0xa050), /* Castles VEGA3000 */ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ },
drivers/usb/core/hub.c +10 -0
@@ -5737,6 +5737,11 @@ static int usb_reset_and_verify_device(struct usb_device *udev)* the reset is over (using their post_reset method). * * Return: The same as for usb_reset_and_verify_device(). +* However, if a reset is already in progress (for instance, if a +* driver doesn't have pre_ or post_reset() callbacks, and while +* being unbound or re-bound during the ongoing reset its disconnect() +* or probe() routine tries to perform a second, nested reset), the +* routine returns -EINPROGRESS. * * Note: * The caller must own the device lock. For example, it's safe to use
@@ -5770,6 +5775,10 @@ int usb_reset_device(struct usb_device *udev)return -EISDIR ; } +if (udev->reset_in_progress) +return -EINPROGRESS ; + udev->reset_in_progress =1 ; + port_dev = hub->ports[udev->portnum -1 ];/*
@@ -5834,6 +5843,7 @@ int usb_reset_device(struct usb_device *udev)usb_autosuspend_device (udev);memalloc_noio_restore (noio_flag); + udev->reset_in_progress =0 ;return ret; }EXPORT_SYMBOL_GPL (usb_reset_device);
drivers/usb/dwc2/platform.c +4 -4
@@ -141,9 +141,9 @@ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg) }else if (hsotg->plat && hsotg->plat->phy_init) { ret = hsotg->plat->phy_init (pdev, hsotg->plat->phy_type); }else { - ret =phy_power_on (hsotg->phy); + ret =phy_init (hsotg->phy);if (ret ==0 ) - ret =phy_init (hsotg->phy); + ret =phy_power_on (hsotg->phy); }return ret;
@@ -175,9 +175,9 @@ static int __dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg) }else if (hsotg->plat && hsotg->plat->phy_exit) { ret = hsotg->plat->phy_exit (pdev, hsotg->plat->phy_type); }else { - ret =phy_exit (hsotg->phy); + ret =phy_power_off (hsotg->phy);if (ret ==0 ) - ret =phy_power_off (hsotg->phy); + ret =phy_exit (hsotg->phy); }if (ret)return ret;
drivers/usb/dwc3/core.c +10 -10
@@ -656,15 +656,15 @@ static void dwc3_core_exit(struct dwc3 *dwc) {dwc3_event_buffers_cleanup (dwc); -usb_phy_shutdown (dwc->usb2_phy); -usb_phy_shutdown (dwc->usb3_phy); -phy_exit (dwc->usb2_generic_phy); -phy_exit (dwc->usb3_generic_phy); -usb_phy_set_suspend (dwc->usb2_phy,1 );usb_phy_set_suspend (dwc->usb3_phy,1 );phy_power_off (dwc->usb2_generic_phy);phy_power_off (dwc->usb3_generic_phy); + +usb_phy_shutdown (dwc->usb2_phy); +usb_phy_shutdown (dwc->usb3_phy); +phy_exit (dwc->usb2_generic_phy); +phy_exit (dwc->usb3_generic_phy); }static bool dwc3_core_is_valid (struct dwc3 *dwc)
@@ -1288,16 +1288,16 @@ static int dwc3_probe(struct platform_device *pdev) err5:dwc3_event_buffers_cleanup (dwc); -usb_phy_shutdown (dwc->usb2_phy); -usb_phy_shutdown (dwc->usb3_phy); -phy_exit (dwc->usb2_generic_phy); -phy_exit (dwc->usb3_generic_phy); -usb_phy_set_suspend (dwc->usb2_phy,1 );usb_phy_set_suspend (dwc->usb3_phy,1 );phy_power_off (dwc->usb2_generic_phy);phy_power_off (dwc->usb3_generic_phy); +usb_phy_shutdown (dwc->usb2_phy); +usb_phy_shutdown (dwc->usb3_phy); +phy_exit (dwc->usb2_generic_phy); +phy_exit (dwc->usb3_generic_phy); +dwc3_ulpi_exit (dwc); err4:
drivers/usb/gadget/function/storage_common.c +4 -2
@@ -298,8 +298,10 @@ EXPORT_SYMBOL_GPL(fsg_lun_fsync_sub);void store_cdrom_address (u8 *dest,int msf,u32 addr) {if (msf) { -/* Convert to Minutes-Seconds-Frames */ - addr >>=2 ;/* Convert to 2048-byte frames */ +/* +* Convert to Minutes-Seconds-Frames. +* Sector size is already set to 2048 bytes. +*/ addr +=2 *75 ;/* Lead-in occupies 2 seconds */ dest[3 ] = addr %75 ;/* Frames */ addr /=75 ;
drivers/usb/host/xhci-hub.c +11 -0
@@ -1455,6 +1455,17 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) status = bus_state->resuming_ports; +/* +* SS devices are only visible to roothub after link training completes. +* Keep polling roothubs for a grace period after xHC start +*/ +if (xhci->run_graceperiod) { +if (time_before (jiffies, xhci->run_graceperiod)) + status =1 ; +else + xhci->run_graceperiod =0 ; + } + mask =PORT_CSC |PORT_PEC |PORT_OCC |PORT_PLC |PORT_WRC |PORT_CEC ;/* For each port, did anything change? If so, set that bit in buf. */
drivers/usb/host/xhci.c +3 -1
@@ -159,9 +159,11 @@ int xhci_start(struct xhci_hcd *xhci)xhci_err (xhci,"Host took too long to start, " "waited %u microseconds.\n" ,XHCI_MAX_HALT_USEC ); -if (!ret) +if (!ret) {/* clear state flags. Including dying, halted or removing */ xhci->xhc_state =0 ; + xhci->run_graceperiod = jiffies +msecs_to_jiffies (500 ); + }return ret; }
drivers/usb/host/xhci.h +1 -1
@@ -1780,7 +1780,7 @@ struct xhci_hcd {/* Host controller watchdog timer structures */ unsigned int xhc_state; - +unsigned long run_graceperiod;u32 command;struct s3_save s3;/* Host controller is dying - not responding to commands. "I'm not dead yet!"
drivers/usb/serial/ch341.c +13 -2
@@ -99,6 +99,8 @@ struct ch341_private {u8 mcr;u8 msr;u8 lcr; + +u8 version; }; static void ch341_set_termios(struct tty_struct *tty,
@@ -177,13 +179,20 @@ static int ch341_set_baudrate_lcr(struct usb_device *dev,/* * CH341A buffers data until a full endpoint-size packet (32 bytes) * has been received unless bit 7 is set. +* +* At least one device with version 0x27 appears to have this bit +* inverted. */ - a |=BIT (7 ); +if (priv->version >0x27 ) + a |=BIT (7 ); r =ch341_control_out (dev,CH341_REQ_WRITE_REG ,0x1312 , a);if (r)return r; +if (priv->version <0x30 ) +return 0 ; + r =ch341_control_out (dev,CH341_REQ_WRITE_REG ,0x2518 , lcr);if (r)return r;
@@ -235,7 +244,9 @@ static int ch341_configure(struct usb_device *dev, struct ch341_private *priv) r =ch341_control_in (dev,CH341_REQ_READ_VERSION ,0 ,0 , buffer, size);if (r <0 ) goto out; -dev_dbg (&dev->dev,"Chip version: 0x%02x\n" , buffer[0 ]); + + priv->version = buffer[0 ]; +dev_dbg (&dev->dev,"Chip version: 0x%02x\n" , priv->version); r =ch341_control_out (dev,CH341_REQ_SERIAL_INIT ,0 ,0 );if (r <0 )
drivers/usb/serial/cp210x.c +1 -0
@@ -134,6 +134,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x83AA) }, /* Mark-10 Digital Force Gauge */ { USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */ { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ + { USB_DEVICE(0x10C4, 0x8414) }, /* Decagon USB Cable Adapter */ { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */ { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ { USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -1040,6 +1040,8 @@ static const struct usb_device_id id_table_combined[] = {/* IDS GmbH devices */ { USB_DEVICE(IDS_VID, IDS_SI31A_PID) }, { USB_DEVICE(IDS_VID, IDS_CM31A_PID) }, +/* Omron devices */ + { USB_DEVICE(OMRON_VID, OMRON_CS1W_CIF31_PID) },/* U-Blox devices */ { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) }, { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -661,6 +661,12 @@#define INFINEON_TRIBOARD_TC1798_PID 0x0028/* DAS JTAG TriBoard TC1798 V1.0 */ #define INFINEON_TRIBOARD_TC2X7_PID 0x0043/* DAS JTAG TriBoard TC2X7 V1.0 */ +/* +* Omron corporation (https://www.omron.com) +*/ +#define OMRON_VID 0x0590 +#define OMRON_CS1W_CIF31_PID 0x00b2 +/* * Acton Research Corp. */
drivers/usb/serial/option.c +15 -0
@@ -256,6 +256,7 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_BG96 0x0296#define QUECTEL_PRODUCT_EP06 0x0306#define QUECTEL_PRODUCT_EM05G 0x030a +#define QUECTEL_PRODUCT_EM060K 0x030b#define QUECTEL_PRODUCT_EM12 0x0512#define QUECTEL_PRODUCT_RM500Q 0x0800#define QUECTEL_PRODUCT_EC200S_CN 0x6002
@@ -441,6 +442,8 @@ static void option_instat_callback(struct urb *urb);#define CINTERION_PRODUCT_MV31_2_RMNET 0x00b9#define CINTERION_PRODUCT_MV32_WA 0x00f1#define CINTERION_PRODUCT_MV32_WB 0x00f2 +#define CINTERION_PRODUCT_MV32_WA_RMNET 0x00f3 +#define CINTERION_PRODUCT_MV32_WB_RMNET 0x00f4/* Olivetti products */ #define OLIVETTI_VENDOR_ID 0x0b3c
@@ -576,6 +579,10 @@ static void option_instat_callback(struct urb *urb);#define WETELECOM_PRODUCT_6802 0x6802#define WETELECOM_PRODUCT_WMD300 0x6803 +/* OPPO products */ +#define OPPO_VENDOR_ID 0x22d9 +#define OPPO_PRODUCT_R11 0x276c +/* Device flags */
@@ -1141,6 +1148,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff), .driver_info = RSVD(6) | ZLP }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff), .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
@@ -1996,8 +2006,12 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0)}, { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff), .driver_info = RSVD(3)}, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA_RMNET, 0xff), + .driver_info = RSVD(0) }, { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff), .driver_info = RSVD(3)}, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB_RMNET, 0xff), + .driver_info = RSVD(0) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), .driver_info = RSVD(4) }, { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
@@ -2157,6 +2171,7 @@ static const struct usb_device_id option_ids[] = { { 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 */ + { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/storage/unusual_devs.h +7 -0
@@ -2313,6 +2313,13 @@ UNUSUAL_DEV( 0x1e74, 0x4621, 0x0000, 0x0000, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), +/* Reported by Witold Lipieta <[email protected]> */ +UNUSUAL_DEV (0x1fc9 ,0x0117 ,0x0100 ,0x0100 , +"NXP Semiconductors" , +"PN7462AU" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_IGNORE_RESIDUE ), +/* Supplied with some Castlewood ORB removable drives */ UNUSUAL_DEV( 0x2027, 0xa001, 0x0000, 0x9999, "Double-H Technology",
drivers/video/fbdev/chipsfb.c +1 -0
@@ -432,6 +432,7 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) err_release_fb:framebuffer_release (p); err_disable: +pci_disable_device (dp); err_out:return rc; }
include/linux/buffer_head.h +11 -0
@@ -133,6 +133,17 @@ BUFFER_FNS(Defer_Completion, defer_completion) static __always_inline void set_buffer_uptodate(struct buffer_head *bh) { +/* +* If somebody else already set this uptodate, they will +* have done the memory barrier, and a reader will thus +* see *some* valid buffer state. +* +* Any other serialization (with IO errors or whatever that +* might clear the bit) has to come from other state (eg BH_Lock). +*/ +if (test_bit (BH_Uptodate, &bh->b_state)) +return ; +/* * make it consistent with folio_mark_uptodate * pairs with smp_load_acquire in buffer_uptodate
include/linux/platform_data/x86/pmc_atom.h +4 -2
@@ -16,6 +16,8 @@#ifndef PMC_ATOM_H #define PMC_ATOM_H +#include <linux/bits.h> +/* ValleyView Power Control Unit PCI Device ID */ #define PCI_DEVICE_ID_VLV_PMC 0x0F1C/* CherryTrail Power Control Unit PCI Device ID */
@@ -148,9 +150,9 @@#define ACPI_MMIO_REG_LEN 0x100#define PM1_CNT 0x4 -#define SLEEP_TYPE_MASK 0xFFFFECFF +#define SLEEP_TYPE_MASK GENMASK(12, 10)#define SLEEP_TYPE_S5 0x1C00 -#define SLEEP_ENABLE 0x2000 +#define SLEEP_ENABLE BIT(13)extern int pmc_atom_read (int offset,u32 *value);extern int pmc_atom_write (int offset,u32 value);
include/linux/usb.h +2 -0
@@ -568,6 +568,7 @@ struct usb3_lpm_parameters {* @level: number of USB hub ancestors * @can_submit: URBs may be submitted * @persist_enabled: USB_PERSIST enabled for this device +* @reset_in_progress: the device is being reset * @have_langid: whether string_langid is valid * @authorized: policy has said we can use it; * (user space) policy determines if we authorize this device to be
@@ -646,6 +647,7 @@ struct usb_device { unsigned can_submit:1; unsigned persist_enabled:1; + unsigned reset_in_progress:1; unsigned have_langid:1; unsigned authorized:1; unsigned authenticated:1;
kernel/bpf/verifier.c +1 -0
@@ -2739,6 +2739,7 @@ static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env,coerce_reg_to_size (dst_reg,4 ); } +__update_reg_bounds (dst_reg);__reg_deduce_bounds (dst_reg);__reg_bound_offset (dst_reg);return 0 ;
kernel/kprobes.c +1 -0
@@ -1553,6 +1553,7 @@ static int check_kprobe_address_safe(struct kprobe *p,/* Ensure it is not in reserved area nor out of text */ if (!(core_kernel_text ((unsigned long ) p->addr) ||is_module_text_address ((unsigned long ) p->addr)) || +in_gate_area_no_mm ((unsigned long ) p->addr) ||within_kprobe_blacklist ((unsigned long ) p->addr) ||jump_label_text_reserved (p->addr, p->addr) ||find_bug ((unsigned long )p->addr)) {
mm/kmemleak.c +4 -4
@@ -1192,7 +1192,7 @@ EXPORT_SYMBOL(kmemleak_no_scan);void __ref kmemleak_alloc_phys (phys_addr_t phys,size_t size,int min_count,gfp_t gfp) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_alloc (__va (phys), size, min_count, gfp); }EXPORT_SYMBOL (kmemleak_alloc_phys);
@@ -1203,7 +1203,7 @@ EXPORT_SYMBOL(kmemleak_alloc_phys);*/ void __ref kmemleak_free_part_phys (phys_addr_t phys,size_t size) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_free_part (__va (phys), size); }EXPORT_SYMBOL (kmemleak_free_part_phys);
@@ -1214,7 +1214,7 @@ EXPORT_SYMBOL(kmemleak_free_part_phys);*/ void __ref kmemleak_not_leak_phys (phys_addr_t phys) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_not_leak (__va (phys)); }EXPORT_SYMBOL (kmemleak_not_leak_phys);
@@ -1225,7 +1225,7 @@ EXPORT_SYMBOL(kmemleak_not_leak_phys);*/ void __ref kmemleak_ignore_phys (phys_addr_t phys) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_ignore (__va (phys)); }EXPORT_SYMBOL (kmemleak_ignore_phys);
net/bridge/br_netfilter_hooks.c +2 -0
@@ -382,6 +382,7 @@ static int br_nf_pre_routing_finish(struct net *net, struct sock *sk, struct sk_/* - Bridged-and-DNAT'ed traffic doesn't * require ip_forwarding. */ if (rt->dst.dev == dev) { +skb_dst_drop (skb);skb_dst_set (skb, &rt->dst); goto bridged_dnat; }
@@ -411,6 +412,7 @@ static int br_nf_pre_routing_finish(struct net *net, struct sock *sk, struct sk_kfree_skb (skb);return 0 ; } +skb_dst_drop (skb);skb_dst_set_noref (skb, &rt->dst); }
net/bridge/br_netfilter_ipv6.c +1 -0
@@ -201,6 +201,7 @@ static int br_nf_pre_routing_finish_ipv6(struct net *net, struct sock *sk, struckfree_skb (skb);return 0 ; } +skb_dst_drop (skb);skb_dst_set_noref (skb, &rt->dst); }
net/ipv4/tcp_input.c +18 -7
@@ -2425,6 +2425,21 @@ static inline bool tcp_may_undo(const struct tcp_sock *tp)return tp->undo_marker && (!tp->undo_retrans ||tcp_packet_delayed (tp)); } +static bool tcp_is_non_sack_preventing_reopen (struct sock *sk) +{ +struct tcp_sock *tp =tcp_sk (sk); + +if (tp->snd_una == tp->high_seq &&tcp_is_reno (tp)) { +/* Hold old state until something *above* high_seq +* is ACKed. For Reno it is MUST to prevent false +* fast retransmits (RFC2582). SACK TCP is safe. */ +if (!tcp_any_retrans_done (sk)) + tp->retrans_stamp =0 ; +return true; + } +return false; +} +/* People celebrate: "We love our President!" */ static bool tcp_try_undo_recovery (struct sock *sk) {
@@ -2445,14 +2460,8 @@ static bool tcp_try_undo_recovery(struct sock *sk)NET_INC_STATS (sock_net (sk), mib_idx); } -if (tp->snd_una == tp->high_seq &&tcp_is_reno (tp)) { -/* Hold old state until something *above* high_seq -* is ACKed. For Reno it is MUST to prevent false -* fast retransmits (RFC2582). SACK TCP is safe. */ -if (!tcp_any_retrans_done (sk)) - tp->retrans_stamp =0 ; +if (tcp_is_non_sack_preventing_reopen (sk))return true; - }tcp_set_ca_state (sk, TCP_CA_Open); tp->is_sack_reneg =0 ;return false;
@@ -2486,6 +2495,8 @@ static bool tcp_try_undo_loss(struct sock *sk, bool frto_undo)NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPSPURIOUSRTOS );inet_csk (sk)->icsk_retransmits =0 ; +if (tcp_is_non_sack_preventing_reopen (sk)) +return true;if (frto_undo ||tcp_is_sack (tp)) {tcp_set_ca_state (sk, TCP_CA_Open); tp->is_sack_reneg =0 ;
net/ipv6/seg6.c +5 -0
@@ -129,6 +129,11 @@ static int seg6_genl_sethmac(struct sk_buff *skb, struct genl_info *info) goto out_unlock; } +if (slen >nla_len (info->attrs[SEG6_ATTR_SECRET ])) { + err = -EINVAL ; + goto out_unlock; + } +if (hinfo) { err =seg6_hmac_info_del (net, hmackeyid);if (err)
net/kcm/kcmsock.c +7 -8
@@ -1412,12 +1412,6 @@ static int kcm_attach(struct socket *sock, struct socket *csock, psock->sk = csk; psock->bpf_prog = prog; - err =strp_init (&psock->strp, csk, &cb); -if (err) { -kmem_cache_free (kcm_psockp, psock); - goto out; - } -write_lock_bh (&csk->sk_callback_lock);/* Check if sk_user_data is aready by KCM or someone else.
@@ -1425,13 +1419,18 @@ static int kcm_attach(struct socket *sock, struct socket *csock,*/ if (csk->sk_user_data) {write_unlock_bh (&csk->sk_callback_lock); -strp_stop (&psock->strp); -strp_done (&psock->strp);kmem_cache_free (kcm_psockp, psock); err = -EALREADY ; goto out; } + err =strp_init (&psock->strp, csk, &cb); +if (err) { +write_unlock_bh (&csk->sk_callback_lock); +kmem_cache_free (kcm_psockp, psock); + goto out; + } + psock->save_data_ready = csk->sk_data_ready; psock->save_write_space = csk->sk_write_space; psock->save_state_change = csk->sk_state_change;
net/mac80211/ibss.c +4 -0
@@ -544,6 +544,10 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata)sdata_assert_lock (sdata); +/* When not connected/joined, sending CSA doesn't make sense. */ +if (ifibss->state !=IEEE80211_IBSS_MLME_JOINED ) +return -ENOLINK ; +/* update cfg80211 bss information with the new channel */ if (!is_zero_ether_addr (ifibss->bssid)) { cbss = cfg80211_get_bss(sdata->local->hw.wiphy,
net/mac802154/rx.c +1 -1
@@ -52,7 +52,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,switch (mac_cb (skb)->dest.mode) {case IEEE802154_ADDR_NONE : -if (mac_cb (skb)->dest.mode !=IEEE802154_ADDR_NONE ) +if (hdr->source.mode !=IEEE802154_ADDR_NONE )/* FIXME: check if we are PAN coordinator */ skb->pkt_type =PACKET_OTHERHOST ;else
net/netfilter/nf_conntrack_irc.c +3 -2
@@ -187,8 +187,9 @@ static int help(struct sk_buff *skb, unsigned int protoff,/* dcc_ip can be the internal OR external (NAT'ed) IP */ tuple = &ct->tuplehash[dir].tuple; -if (tuple->src.u3.ip != dcc_ip && - tuple->dst.u3.ip != dcc_ip) { +if ((tuple->src.u3.ip != dcc_ip && + ct->tuplehash[!dir].tuple.dst.u3.ip != dcc_ip) || + dcc_port ==0 ) {net_warn_ratelimited ("Forged DCC command from %pI4: %pI4:%u\n" , &tuple->src.u3.ip, &dcc_ip, dcc_port);
net/sched/sch_sfb.c +8 -5
@@ -139,15 +139,15 @@ static void increment_one_qlen(u32 sfbhash, u32 slot, struct sfb_sched_data *q) } } -static void increment_qlen (const struct sk_buff *skb,struct sfb_sched_data *q) +static void increment_qlen (const struct sfb_skb_cb *cb,struct sfb_sched_data *q) {u32 sfbhash; - sfbhash =sfb_hash (skb,0 ); + sfbhash = cb->hashes[0 ];if (sfbhash)increment_one_qlen (sfbhash,0 , q); - sfbhash =sfb_hash (skb,1 ); + sfbhash = cb->hashes[1 ];if (sfbhash)increment_one_qlen (sfbhash,1 , q); }
@@ -284,8 +284,10 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, {struct sfb_sched_data *q =qdisc_priv (sch); +unsigned int len =qdisc_pkt_len (skb);struct Qdisc *child = q->qdisc;struct tcf_proto *fl; +struct sfb_skb_cb cb;int i;u32 p_min = ~0 ;u32 minqlen = ~0 ;
@@ -402,11 +404,12 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, } enqueue: +memcpy (&cb,sfb_skb_cb (skb),sizeof (cb)); ret =qdisc_enqueue (skb, child, to_free);if (likely (ret ==NET_XMIT_SUCCESS )) { -qdisc_qstats_backlog_inc (sch, skb); + sch->qstats.backlog += len; sch->q.qlen++; -increment_qlen (skb, q); +increment_qlen (&cb, q); }else if (net_xmit_drop_count (ret)) { q->stats.childdrop++;qdisc_qstats_drop (sch);
net/sunrpc/xprt.c +2 -2
@@ -1525,9 +1525,9 @@ static void xprt_destroy(struct rpc_xprt *xprt)* is cleared. We use ->transport_lock to ensure the mod_timer() * can only run *before* del_time_sync(), never after. */ -spin_lock (&xprt->transport_lock); +spin_lock_bh (&xprt->transport_lock);del_timer_sync (&xprt->timer); -spin_unlock (&xprt->transport_lock); +spin_unlock_bh (&xprt->transport_lock);/* * Destroy sockets etc from the system workqueue so they can
net/tipc/monitor.c +1 -1
@@ -130,7 +130,7 @@ static void map_set(u64 *up_map, int i, unsigned int v)static int map_get (u64 up_map,int i) { -return (up_map & (1 << i)) >> i; +return (up_map & (1ULL << i)) >> i; }static struct tipc_peer *peer_prev (struct tipc_peer *peer)
net/wireless/debugfs.c +2 -1
@@ -68,9 +68,10 @@ static ssize_t ht40allow_map_read(struct file *file, {struct wiphy *wiphy = file->private_data;char *buf; -unsigned int offset =0 , buf_size =PAGE_SIZE , i, r; +unsigned int offset =0 , buf_size =PAGE_SIZE , i;enum nl80211_band band;struct ieee80211_supported_band *sband; +ssize_t r; buf =kzalloc (buf_size,GFP_KERNEL );if (!buf)
sound/core/seq/oss/seq_oss_midi.c +2 -0
@@ -280,7 +280,9 @@ snd_seq_oss_midi_clear_all(void)void snd_seq_oss_midi_setup (struct seq_oss_devinfo *dp) { +spin_lock_irq (®ister_lock); dp->max_mididev = max_midi_devs; +spin_unlock_irq (®ister_lock); }/*
sound/core/seq/seq_clientmgr.c +5 -7
@@ -136,13 +136,13 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)spin_unlock_irqrestore (&clients_lock, flags);#ifdef CONFIG_MODULES if (!in_interrupt ()) { -static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS ]; -static char card_requested[SNDRV_CARDS ]; + static DECLARE_BITMAP(client_requested, SNDRV_SEQ_GLOBAL_CLIENTS); + static DECLARE_BITMAP(card_requested, SNDRV_CARDS); +if (clientid <SNDRV_SEQ_GLOBAL_CLIENTS ) {int idx; -if (!client_requested[clientid]) { - client_requested[clientid] =1 ; +if (!test_and_set_bit (clientid, client_requested)) {for (idx =0 ; idx <15 ; idx++) {if (seq_client_load[idx] <0 )break ;
@@ -157,10 +157,8 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)int card = (clientid -SNDRV_SEQ_GLOBAL_CLIENTS ) /SNDRV_SEQ_CLIENTS_PER_CARD ;if (card < snd_ecards_limit) { -if (! card_requested[card]) { - card_requested[card] =1 ; +if (!test_and_set_bit (card, card_requested))snd_request_card (card); - }snd_seq_device_load_drivers (); } }
sound/drivers/aloop.c +4 -3
@@ -477,17 +477,18 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable) cable->streams[SNDRV_PCM_STREAM_PLAYBACK ];struct loopback_pcm *dpcm_capt = cable->streams[SNDRV_PCM_STREAM_CAPTURE ]; -unsigned long delta_play =0 , delta_capt =0 ; +unsigned long delta_play =0 , delta_capt =0 , cur_jiffies;unsigned int running, count1, count2; + cur_jiffies = jiffies; running = cable->running ^ cable->pause;if (running & (1 <<SNDRV_PCM_STREAM_PLAYBACK )) { - delta_play = jiffies - dpcm_play->last_jiffies; + delta_play = cur_jiffies - dpcm_play->last_jiffies; dpcm_play->last_jiffies += delta_play; }if (running & (1 <<SNDRV_PCM_STREAM_CAPTURE )) { - delta_capt = jiffies - dpcm_capt->last_jiffies; + delta_capt = cur_jiffies - dpcm_capt->last_jiffies; dpcm_capt->last_jiffies += delta_capt; }
sound/pci/emu10k1/emupcm.c +1 -1
@@ -137,7 +137,7 @@ static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voic epcm->voices[0 ]->epcm = epcm;if (voices >1 ) {for (i =1 ; i < voices; i++) { - epcm->voices[i] = &epcm->emu->voices[epcm->voices[0 ]->number + i]; + epcm->voices[i] = &epcm->emu->voices[(epcm->voices[0 ]->number + i) %NUM_G ]; epcm->voices[i]->epcm = epcm; } }
sound/usb/stream.c +1 -1
@@ -502,7 +502,7 @@ int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)* Dallas DS4201 workaround: It presents 5 altsettings, but the last * one misses syncpipe, and does not produce any sound. */ -if (chip->usb_id ==USB_ID (0x04fa ,0x4201 )) +if (chip->usb_id ==USB_ID (0x04fa ,0x4201 ) && num >=4 ) num =4 ;for (i =0 ; i < num; i++) {
tools/testing/selftests/bpf/test_align.c +14 -13
@@ -363,15 +363,15 @@ static struct bpf_align_test tests[] = {* is still (4n), fixed offset is not changed. * Also, we create a new reg->id. */ - {29, "R5=pkt(id=4,off=18,r=0,umax_value=2040,var_off=(0x0; 0x7fc))"}, + {29, "R5=pkt(id=4,off=18,r=0,umax_value=2040,var_off=(0x0; 0x7fc)"},/* At the time the word size load is performed from R5, * its total fixed offset is NET_IP_ALIGN + reg->off (18) * which is 20. Then the variable offset is (4n), so * the total offset is 4-byte aligned and meets the * load's requirements. */ - {33, "R4=pkt(id=4,off=22,r=22,umax_value=2040,var_off=(0x0; 0x7fc))"}, - {33, "R5=pkt(id=4,off=18,r=22,umax_value=2040,var_off=(0x0; 0x7fc))"}, + {33, "R4=pkt(id=4,off=22,r=22,umax_value=2040,var_off=(0x0; 0x7fc)"}, + {33, "R5=pkt(id=4,off=18,r=22,umax_value=2040,var_off=(0x0; 0x7fc)"}, }, }, {
@@ -414,15 +414,15 @@ static struct bpf_align_test tests[] = {/* Adding 14 makes R6 be (4n+2) */ {9, "R6=inv(id=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"},/* Packet pointer has (4n+2) offset */ - {11, "R5=pkt(id=1,off=0,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"}, - {13, "R4=pkt(id=1,off=4,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"}, + {11, "R5=pkt(id=1,off=0,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"}, + {13, "R4=pkt(id=1,off=4,r=0,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"},/* At the time the word size load is performed from R5, * its total fixed offset is NET_IP_ALIGN + reg->off (0) * which is 2. Then the variable offset is (4n+2), so * the total offset is 4-byte aligned and meets the * load's requirements. */ - {15, "R5=pkt(id=1,off=0,r=4,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc))"}, + {15, "R5=pkt(id=1,off=0,r=4,umin_value=14,umax_value=1034,var_off=(0x2; 0x7fc)"},/* Newly read value in R6 was shifted left by 2, so has * known alignment of 4. */
@@ -430,15 +430,15 @@ static struct bpf_align_test tests[] = {/* Added (4n) to packet pointer's (4n+2) var_off, giving * another (4n+2). */ - {19, "R5=pkt(id=2,off=0,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc))"}, - {21, "R4=pkt(id=2,off=4,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc))"}, + {19, "R5=pkt(id=2,off=0,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"}, + {21, "R4=pkt(id=2,off=4,r=0,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"},/* At the time the word size load is performed from R5, * its total fixed offset is NET_IP_ALIGN + reg->off (0) * which is 2. Then the variable offset is (4n+2), so * the total offset is 4-byte aligned and meets the * load's requirements. */ - {23, "R5=pkt(id=2,off=0,r=4,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc))"}, + {23, "R5=pkt(id=2,off=0,r=4,umin_value=14,umax_value=2054,var_off=(0x2; 0xffc)"}, }, }, {
@@ -473,11 +473,11 @@ static struct bpf_align_test tests[] = { .matches = { {4, "R5=pkt_end(id=0,off=0,imm=0)"},/* (ptr - ptr) << 2 == unknown, (4n) */ - {6, "R5=inv(id=0,smax_value=9223372036854775804,umax_value=18446744073709551612,var_off=(0x0; 0xfffffffffffffffc))"}, + {6, "R5=inv(id=0,smax_value=9223372036854775804,umax_value=18446744073709551612,var_off=(0x0; 0xfffffffffffffffc)"},/* (4n) + 14 == (4n+2). We blow our bounds, because * the add could overflow. */ - {7, "R5=inv(id=0,var_off=(0x2; 0xfffffffffffffffc))"}, + {7, "R5=inv(id=0,smin_value=-9223372036854775806,smax_value=9223372036854775806,umin_value=2,umax_value=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"},/* Checked s>=0 */ {9, "R5=inv(id=0,umin_value=2,umax_value=9223372036854775806,var_off=(0x2; 0x7ffffffffffffffc))"},/* packet pointer + nonnegative (4n+2) */
@@ -532,7 +532,7 @@ static struct bpf_align_test tests[] = {/* New unknown value in R7 is (4n) */ {11, "R7=inv(id=0,umax_value=1020,var_off=(0x0; 0x3fc))"},/* Subtracting it from R6 blows our unsigned bounds */ - {12, "R6=inv(id=0,smin_value=-1006,smax_value=1034,var_off=(0x2; 0xfffffffffffffffc))"}, + {12, "R6=inv(id=0,smin_value=-1006,smax_value=1034,umin_value=2,umax_value=18446744073709551614,var_off=(0x2; 0xfffffffffffffffc)"},/* Checked s>= 0 */ {14, "R6=inv(id=0,umin_value=2,umax_value=1034,var_off=(0x2; 0x7fc))"},/* At the time the word size load is performed from R5,
@@ -541,7 +541,8 @@ static struct bpf_align_test tests[] = {* the total offset is 4-byte aligned and meets the * load's requirements. */ - {20, "R5=pkt(id=1,off=0,r=4,umin_value=2,umax_value=1034,var_off=(0x2; 0x7fc))"}, + {20, "R5=pkt(id=1,off=0,r=4,umin_value=2,umax_value=1034,var_off=(0x2; 0x7fc)"}, + }, }, {
tools/testing/selftests/bpf/test_verifier.c +8 -8
@@ -7438,10 +7438,10 @@ static struct bpf_test tests[] = {BPF_LDX_MEM (BPF_W ,BPF_REG_3 ,BPF_REG_1 , offsetof(struct xdp_md , data_end)),BPF_MOV64_REG (BPF_REG_1 ,BPF_REG_2 ), -BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,8 ), +BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,6 ),BPF_JMP_REG (BPF_JGT ,BPF_REG_3 ,BPF_REG_1 ,1 ),BPF_JMP_IMM (BPF_JA ,0 ,0 ,1 ), -BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-8 ), +BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-6 ),BPF_MOV64_IMM (BPF_REG_0 ,0 ), BPF_EXIT_INSN(), },
@@ -7494,10 +7494,10 @@ static struct bpf_test tests[] = {BPF_LDX_MEM (BPF_W ,BPF_REG_3 ,BPF_REG_1 , offsetof(struct xdp_md , data_end)),BPF_MOV64_REG (BPF_REG_1 ,BPF_REG_2 ), -BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,8 ), +BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,6 ),BPF_JMP_REG (BPF_JLT ,BPF_REG_1 ,BPF_REG_3 ,1 ),BPF_JMP_IMM (BPF_JA ,0 ,0 ,1 ), -BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-8 ), +BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-6 ),BPF_MOV64_IMM (BPF_REG_0 ,0 ), BPF_EXIT_INSN(), },
@@ -7603,9 +7603,9 @@ static struct bpf_test tests[] = {BPF_LDX_MEM (BPF_W ,BPF_REG_3 ,BPF_REG_1 , offsetof(struct xdp_md , data_end)),BPF_MOV64_REG (BPF_REG_1 ,BPF_REG_2 ), -BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,8 ), +BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,6 ),BPF_JMP_REG (BPF_JGE ,BPF_REG_1 ,BPF_REG_3 ,1 ), -BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-8 ), +BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-6 ),BPF_MOV64_IMM (BPF_REG_0 ,0 ), BPF_EXIT_INSN(), },
@@ -7770,9 +7770,9 @@ static struct bpf_test tests[] = {BPF_LDX_MEM (BPF_W ,BPF_REG_3 ,BPF_REG_1 , offsetof(struct xdp_md , data_end)),BPF_MOV64_REG (BPF_REG_1 ,BPF_REG_2 ), -BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,8 ), +BPF_ALU64_IMM (BPF_ADD ,BPF_REG_1 ,6 ),BPF_JMP_REG (BPF_JLE ,BPF_REG_3 ,BPF_REG_1 ,1 ), -BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-8 ), +BPF_LDX_MEM (BPF_DW ,BPF_REG_0 ,BPF_REG_1 ,-6 ),BPF_MOV64_IMM (BPF_REG_0 ,0 ), BPF_EXIT_INSN(), },