Linux 4.4.74
Greg KH
maintainerI'm announcing the release of the 4.4.74 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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
------------
Documentation/kernel-parameters.txt | 7 + Makefile | 2 arch/arc/mm/mmap.c | 2 arch/arm/mm/mmap.c | 4 arch/frv/mm/elf-fdpic.c | 2 arch/mips/kernel/branch.c | 4 arch/mips/mm/mmap.c | 2 arch/parisc/kernel/sys_parisc.c | 15 +- arch/powerpc/mm/slice.c | 2 arch/s390/mm/mmap.c | 4 arch/sh/mm/mmap.c | 4 arch/sparc/kernel/sys_sparc_64.c | 4 arch/sparc/mm/hugetlbpage.c | 2 arch/tile/mm/hugetlbpage.c | 2 arch/x86/kernel/sys_x86_64.c | 4 arch/x86/mm/hugetlbpage.c | 2 arch/x86/mm/numa_32.c | 1 arch/xtensa/kernel/syscall.c | 2 drivers/cpufreq/cpufreq_conservative.c | 4 drivers/iio/proximity/as3935.c | 6 - drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 13 -- drivers/media/v4l2-core/videobuf2-core.c | 2 drivers/mfd/omap-usb-tll.c | 2 drivers/misc/c2port/c2port-duramar2150.c | 4 drivers/net/can/usb/gs_usb.c | 2 drivers/staging/rtl8188eu/core/rtw_ap.c | 2 drivers/tty/serial/efm32-uart.c | 11 + drivers/usb/core/hcd.c | 1 drivers/usb/core/hub.c | 8 + drivers/usb/dwc3/dwc3-exynos.c | 4 drivers/usb/gadget/legacy/inode.c | 5 drivers/usb/gadget/udc/dummy_hcd.c | 19 +-- drivers/usb/gadget/udc/net2280.c | 9 - drivers/usb/host/r8a66597-hcd.c | 6 - drivers/usb/host/xhci-pci.c | 3 fs/configfs/symlink.c | 3 fs/hugetlbfs/inode.c | 2 fs/proc/task_mmu.c | 4 include/linux/mm.h | 53 ++++----- include/uapi/linux/usb/ch11.h | 3 kernel/irq/manage.c | 4 kernel/time/alarmtimer.c | 14 +- mm/gup.c | 5 mm/memory-failure.c | 5 mm/memory.c | 38 ------ mm/mmap.c | 160 +++++++++++++++++------------ mm/swap_cgroup.c | 3 net/mac80211/ibss.c | 6 - net/mac80211/rx.c | 6 - net/mac80211/wpa.c | 9 - 50 files changed, 253 insertions(+), 228 deletions(-)
Alan Stern (1):
USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
Anton Bondarenko (1):
usb: core: fix potential memory leak in error path during hcd creation
Arnd Bergmann (1):
pvrusb2: reduce stack usage pvr2_eeprom_analyze()
Chris Brandt (2):
usb: r8a66597-hcd: select a different endpoint on timeout
usb: r8a66597-hcd: decrease timeout
Christophe JAILLET (2):
vb2: Fix an off by one error in 'vb2_plane_vaddr'
serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
Corentin Labbe (1):
usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
Dan Carpenter (2):
staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data() drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
Emmanuel Grumbach (1):
mac80211: don't look at the PM bit of BAR frames
Greg Kroah-Hartman (1):
Linux 4.4.74
Heiner Kallweit (1):
genirq: Release resources in __setup_irq() error path
Helge Deller (1):
Allow stack to grow up to address space limit
Hugh Dickins (2):
mm: larger stack guard gap, between vmas
mm: fix new crash in unmapped_area_topdown()
James Morse (1):
mm/memory-failure.c: use compound_head() flags for huge pages
Jason A. Donenfeld (1):
mac80211/wpa: use constant time memory comparison for MACs
Johan Hovold (2):
USB: hub: fix SS max number of ports
USB: gadget: dummy_hcd: fix hub-descriptor removable fields
Johannes Berg (1):
mac80211: fix IBSS presp allocation size
Koen Vandeputte (1):
mac80211: fix CSA in IBSS mode
Laura Abbott (1):
x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
Marc Kleine-Budde (1):
can: gs_usb: fix memory leak in gs_cmd_reset()
Matt Ranostay (1):
iio: proximity: as3935: recalibrate RCO after resume
Nicholas Bellinger (1):
configfs: Fix race between create_link and configfs_rmdir
Paul Burton (1):
MIPS: Fix bnezc/jialc return address calculation
Shuah Khan (1):
usb: dwc3: exynos fix axius clock error path to do cleanup
Thomas Gleixner (2):
alarmtimer: Prevent overflow of relative timers
alarmtimer: Rate limit periodic intervals
Tomasz Wilczyński (1):
cpufreq: conservative: Allow down_threshold to take values from 1 to 10
Tony Lindgren (1):
mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
Yu Zhao (1):
swap: cond_resched in swap_cgroup_prepare()
Greg KH
maintainerDocumentation/kernel-parameters.txt +7 -0
@@ -3580,6 +3580,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. spia_pedr= spia_peddr= + stack_guard_gap= [MM] + override the default stack gap protection. The value + is in page units and it defines how many pages prior + to (for stacks growing down) resp. after (for stacks + growing up) the main stack are reserved for no other + mapping. Default value is 256 pages. + stacktrace [FTRACE] Enabled the stack tracer on boot up.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 73 +SUBLEVEL = 74 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/mm/mmap.c +1 -1
@@ -64,7 +64,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/arm/mm/mmap.c +2 -2
@@ -89,7 +89,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
@@ -140,7 +140,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr =PAGE_ALIGN (addr); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/frv/mm/elf-fdpic.c +1 -1
@@ -74,7 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi addr =PAGE_ALIGN (addr); vma =find_vma (current->mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma))) goto success; }
arch/mips/kernel/branch.c +3 -1
@@ -816,8 +816,10 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, break; }/* Compact branch: BNEZC || JIALC */ -if (insn.i_format.rs) +if (!insn.i_format.rs) { +/* JIALC: set $31/ra */ regs->regs[31 ] = epc +4 ; + } regs->cp0_epc +=8 ;break ;#endif
arch/mips/mm/mmap.c +1 -1
@@ -92,7 +92,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp, vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/parisc/kernel/sys_parisc.c +9 -6
@@ -88,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; -struct vm_area_struct *vma; +struct vm_area_struct *vma, *prev;unsigned long task_size =TASK_SIZE ;int do_color_align, last_mmap;struct vm_unmapped_area_info info;
@@ -115,9 +115,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,else addr =PAGE_ALIGN (addr); - vma =find_vma (mm, addr); + vma =find_vma_prev (mm, addr, &prev);if (task_size - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)) && + (!prev || addr >=vm_end_gap (prev))) goto found_addr; }
@@ -141,7 +142,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, const unsigned long len, const unsigned long pgoff, const unsigned long flags) { - struct vm_area_struct *vma; + struct vm_area_struct *vma, *prev;struct mm_struct *mm = current->mm;unsigned long addr = addr0;int do_color_align, last_mmap;
@@ -175,9 +176,11 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr =COLOR_ALIGN (addr, last_mmap, pgoff); else addr =PAGE_ALIGN (addr); - vma =find_vma (mm, addr); + + vma =find_vma_prev (mm, addr, &prev);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)) && + (!prev || addr >=vm_end_gap (prev))) goto found_addr; }
arch/powerpc/mm/slice.c +1 -1
@@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,if ((mm->task_size - len) < addr)return 0 ; vma =find_vma (mm, addr); -return (!vma || (addr + len) <= vma->vm_start); +return (!vma || (addr + len) <=vm_start_gap (vma)); }static int slice_low_has_vma (struct mm_struct *mm,unsigned long slice)
arch/s390/mm/mmap.c +2 -2
@@ -97,7 +97,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, addr =PAGE_ALIGN (addr); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
@@ -135,7 +135,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr =PAGE_ALIGN (addr); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/sh/mm/mmap.c +2 -2
@@ -63,7 +63,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
@@ -113,7 +113,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/sparc/kernel/sys_sparc_64.c +2 -2
@@ -118,7 +118,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi vma =find_vma (mm, addr);if (task_size - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
@@ -181,7 +181,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, vma =find_vma (mm, addr);if (task_size - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/sparc/mm/hugetlbpage.c +1 -1
@@ -115,7 +115,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, addr =ALIGN (addr,HPAGE_SIZE ); vma =find_vma (mm, addr);if (task_size - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }if (mm->get_unmapped_area == arch_get_unmapped_area)
arch/tile/mm/hugetlbpage.c +1 -1
@@ -232,7 +232,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, addr =ALIGN (addr,huge_page_size (h)); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }if (current->mm->get_unmapped_area == arch_get_unmapped_area)
arch/x86/kernel/sys_x86_64.c +2 -2
@@ -143,7 +143,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, addr =PAGE_ALIGN (addr); vma =find_vma (mm, addr);if (end - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
@@ -186,7 +186,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, addr =PAGE_ALIGN (addr); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
arch/x86/mm/hugetlbpage.c +1 -1
@@ -144,7 +144,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, addr =ALIGN (addr,huge_page_size (h)); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }if (mm->get_unmapped_area == arch_get_unmapped_area)
arch/x86/mm/numa_32.c +1 -0
@@ -100,5 +100,6 @@ void __init initmem_init(void)printk (KERN_DEBUG "High memory starts at vaddr %08lx\n" , (ulong )pfn_to_kaddr (highstart_pfn)); + __vmalloc_start_set = true;setup_bootmem_allocator (); }
arch/xtensa/kernel/syscall.c +1 -1
@@ -87,7 +87,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,/* At this point: (!vmm || addr < vmm->vm_end). */ if (TASK_SIZE - len < addr)return -ENOMEM ; -if (!vmm || addr + len <= vmm->vm_start) +if (!vmm || addr + len <=vm_start_gap (vmm))return addr; addr = vmm->vm_end;if (flags &MAP_SHARED )
drivers/cpufreq/cpufreq_conservative.c +2 -2
@@ -212,8 +212,8 @@ static ssize_t store_down_threshold(struct dbs_data *dbs_data, const char *buf,int ret; ret =sscanf (buf,"%u" , &input); -/* cannot be lower than 11 otherwise freq will not fall */ -if (ret !=1 || input <11 || input >100 || +/* cannot be lower than 1 otherwise freq will not fall */ +if (ret !=1 || input <1 || input >100 || input >= cs_tuners->up_threshold)return -EINVAL ;
drivers/iio/proximity/as3935.c +2 -4
@@ -263,8 +263,6 @@ static irqreturn_t as3935_interrupt_handler(int irq, void *private)static void calibrate_as3935 (struct as3935_state *st) { -mutex_lock (&st->lock); -/* mask disturber interrupt bit */ as3935_write (st,AS3935_INT ,BIT (5 ));
@@ -274,8 +272,6 @@ static void calibrate_as3935(struct as3935_state *st)mdelay (2 );as3935_write (st,AS3935_TUNE_CAP , (st->tune_cap /TUNE_CAP_DIV )); - -mutex_unlock (&st->lock); }#ifdef CONFIG_PM_SLEEP
@@ -312,6 +308,8 @@ static int as3935_resume(struct device *dev) val &= ~AS3935_AFE_PWR_BIT ; ret =as3935_write (st,AS3935_AFE_GAIN , val); +calibrate_as3935 (st); + err_resume:mutex_unlock (&st->lock);
drivers/media/usb/pvrusb2/pvrusb2-eeprom.c +4 -9
@@ -123,15 +123,10 @@ int pvr2_eeprom_analyze(struct pvr2_hdw *hdw)memset (&tvdata,0 ,sizeof (tvdata)); eeprom =pvr2_eeprom_fetch (hdw); -if (!eeprom)return -EINVAL ; - - { -struct i2c_client fake_client; -/* Newer version expects a useless client interface */ - fake_client.addr = hdw->eeprom_addr; - fake_client.adapter = &hdw->i2c_adap; -tveeprom_hauppauge_analog (&fake_client,&tvdata,eeprom); - } +if (!eeprom) +return -EINVAL ; + +tveeprom_hauppauge_analog (NULL , &tvdata, eeprom);trace_eeprom ("eeprom assumed v4l tveeprom module" );trace_eeprom ("eeprom direct call results:" );
drivers/media/v4l2-core/videobuf2-core.c +1 -1
@@ -793,7 +793,7 @@ EXPORT_SYMBOL_GPL(vb2_core_create_bufs);*/ void *vb2_plane_vaddr (struct vb2_buffer *vb,unsigned int plane_no) { -if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv) +if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv)return NULL ;return call_ptr_memop (vb, vaddr, vb->planes[plane_no].mem_priv);
drivers/mfd/omap-usb-tll.c +1 -1
@@ -375,8 +375,8 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)* and use SDR Mode */ reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE - |OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF |OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE ); + reg |=OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF ; }else if (pdata->port_mode[i] ==OMAP_EHCI_PORT_MODE_HSIC ) {/*
drivers/misc/c2port/c2port-duramar2150.c +2 -2
@@ -129,8 +129,8 @@ static int __init duramar2150_c2port_init(void) duramar2150_c2port_dev =c2port_device_register ("uc" , &duramar2150_c2port_ops,NULL ); -if (!duramar2150_c2port_dev) { - ret = -ENODEV ; +if (IS_ERR (duramar2150_c2port_dev)) { + ret =PTR_ERR (duramar2150_c2port_dev); goto free_region; }
drivers/net/can/usb/gs_usb.c +2 -0
@@ -246,6 +246,8 @@ static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)sizeof (*dm), 1000); +kfree (dm); +return rc; }
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
@@ -894,7 +894,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)return _FAIL; -if (len >MAX_IE_SZ ) +if (len <0 || len >MAX_IE_SZ )return _FAIL; pbss_network->IELength = len;
drivers/tty/serial/efm32-uart.c +8 -3
@@ -27,6 +27,7 @@#define UARTn_FRAME 0x04#define UARTn_FRAME_DATABITS__MASK 0x000f#define UARTn_FRAME_DATABITS (n) ((n) - 3) +#define UARTn_FRAME_PARITY__MASK 0x0300#define UARTn_FRAME_PARITY_NONE 0x0000#define UARTn_FRAME_PARITY_EVEN 0x0200#define UARTn_FRAME_PARITY_ODD 0x0300
@@ -572,12 +573,16 @@ static void efm32_uart_console_get_options(struct efm32_uart_port *efm_port, 16 * (4 + (clkdiv >> 6))); frame =efm32_uart_read32 (efm_port, UARTn_FRAME); -if (frame & UARTn_FRAME_PARITY_ODD) +switch (frame & UARTn_FRAME_PARITY__MASK) { +case UARTn_FRAME_PARITY_ODD: *parity ='o' ; -else if (frame & UARTn_FRAME_PARITY_EVEN) +break ; +case UARTn_FRAME_PARITY_EVEN: *parity ='e' ; -else +break ; +default : *parity ='n' ; + } *bits = (frame & UARTn_FRAME_DATABITS__MASK) -UARTn_FRAME_DATABITS (4 ) +4 ;
drivers/usb/core/hcd.c +1 -0
@@ -2511,6 +2511,7 @@ struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver, hcd->bandwidth_mutex =kmalloc (sizeof (*hcd->bandwidth_mutex),GFP_KERNEL );if (!hcd->bandwidth_mutex) { +kfree (hcd->address0_mutex);kfree (hcd);dev_dbg (dev,"hcd bandwidth mutex alloc failed\n" );return NULL ;
drivers/usb/core/hub.c +7 -1
@@ -1318,7 +1318,13 @@ static int hub_configure(struct usb_hub *hub,if (ret <0 ) { message ="can't read hub descriptor" ; goto fail; - }else if (hub->descriptor->bNbrPorts >USB_MAXCHILDREN ) { + } + + maxchild =USB_MAXCHILDREN ; +if (hub_is_superspeed (hdev)) + maxchild =min_t (unsigned, maxchild,USB_SS_MAXPORTS ); + +if (hub->descriptor->bNbrPorts > maxchild) { message ="hub has too many ports!" ; ret = -ENODEV ; goto fail;
drivers/usb/dwc3/dwc3-exynos.c +3 -1
@@ -148,7 +148,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev) exynos->axius_clk =devm_clk_get (dev,"usbdrd30_axius_clk" );if (IS_ERR (exynos->axius_clk)) {dev_err (dev,"no AXI UpScaler clk specified\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto axius_clk_err; }clk_prepare_enable (exynos->axius_clk); }else {
@@ -206,6 +207,7 @@ err3:regulator_disable (exynos->vdd33); err2:clk_disable_unprepare (exynos->axius_clk); +axius_clk_err:clk_disable_unprepare (exynos->susp_clk);clk_disable_unprepare (exynos->clk);return ret;
drivers/usb/gadget/legacy/inode.c +3 -2
@@ -1676,9 +1676,10 @@ static void gadgetfs_suspend (struct usb_gadget *gadget) {struct dev_data *dev =get_gadget_data (gadget); +unsigned long flags;INFO (dev,"suspended from state %d\n" , dev->state); -spin_lock (&dev->lock); +spin_lock_irqsave (&dev->lock, flags);switch (dev->state) {case STATE_DEV_SETUP :// VERY odd... host died?? case STATE_DEV_CONNECTED :
@@ -1689,7 +1690,7 @@ gadgetfs_suspend (struct usb_gadget *gadget)default :break ; } -spin_unlock (&dev->lock); +spin_unlock_irqrestore (&dev->lock, flags); }static struct usb_gadget_driver gadgetfs_driver = {
drivers/usb/gadget/udc/dummy_hcd.c +7 -12
@@ -442,23 +442,16 @@ static void set_link_state(struct dummy_hcd *dum_hcd)/* Report reset and disconnect events to the driver */ if (dum->driver && (disconnect || reset)) {stop_activity (dum); -spin_unlock (&dum->lock);if (reset)usb_gadget_udc_reset (&dum->gadget, dum->driver);else dum->driver->disconnect (&dum->gadget); -spin_lock (&dum->lock); } }else if (dum_hcd->active != dum_hcd->old_active) { -if (dum_hcd->old_active && dum->driver->suspend) { -spin_unlock (&dum->lock); +if (dum_hcd->old_active && dum->driver->suspend) dum->driver->suspend (&dum->gadget); -spin_lock (&dum->lock); - }else if (!dum_hcd->old_active && dum->driver->resume) { -spin_unlock (&dum->lock); +else if (!dum_hcd->old_active && dum->driver->resume) dum->driver->resume (&dum->gadget); -spin_lock (&dum->lock); - } } dum_hcd->old_status = dum_hcd->port_status;
@@ -985,7 +978,9 @@ static int dummy_udc_stop(struct usb_gadget *g)struct dummy_hcd *dum_hcd =gadget_to_dummy_hcd (g);struct dummy *dum = dum_hcd->dum; +spin_lock_irq (&dum->lock); dum->driver =NULL ; +spin_unlock_irq (&dum->lock);return 0 ; }
@@ -2011,7 +2006,7 @@ ss_hub_descriptor(struct usb_hub_descriptor *desc) HUB_CHAR_COMMON_OCPM); desc->bNbrPorts =1 ; desc->u.ss.bHubHdrDecLat =0x04 ;/* Worst case: 0.4 micro sec*/ - desc->u.ss.DeviceRemovable =0xffff ; + desc->u.ss.DeviceRemovable =0 ; }static inline void hub_descriptor (struct usb_hub_descriptor *desc)
@@ -2023,8 +2018,8 @@ static inline void hub_descriptor(struct usb_hub_descriptor *desc)HUB_CHAR_INDV_PORT_LPSM | HUB_CHAR_COMMON_OCPM); desc->bNbrPorts =1 ; - desc->u.hs.DeviceRemovable[0 ] =0xff ; - desc->u.hs.DeviceRemovable[1 ] =0xff ; + desc->u.hs.DeviceRemovable[0 ] =0 ; + desc->u.hs.DeviceRemovable[1 ] =0xff ;/* PortPwrCtrlMask */ } static int dummy_hub_control(
drivers/usb/gadget/udc/net2280.c +1 -8
@@ -2425,11 +2425,8 @@ static void stop_activity(struct net2280 *dev, struct usb_gadget_driver *driver)nuke (&dev->ep[i]);/* report disconnect; the driver is already quiesced */ -if (driver) { -spin_unlock (&dev->lock); +if (driver) driver->disconnect (&dev->gadget); -spin_lock (&dev->lock); - }usb_reinit (dev); }
@@ -3275,8 +3272,6 @@ next_endpoints: BIT(PCI_RETRY_ABORT_INTERRUPT))static void handle_stat1_irqs (struct net2280 *dev,u32 stat) -__releases(dev->lock) -__acquires(dev->lock) {struct net2280_ep *ep;u32 tmp, num, mask, scratch;
@@ -3317,14 +3312,12 @@ __acquires(dev->lock)if (disconnect || reset) {stop_activity (dev, dev->driver);ep0_start (dev); -spin_unlock (&dev->lock);if (reset)usb_gadget_udc_reset (&dev->gadget, dev->driver);else (dev->driver->disconnect) (&dev->gadget); -spin_lock (&dev->lock);return ; } }
drivers/usb/host/r8a66597-hcd.c +4 -2
@@ -1269,7 +1269,7 @@ static void set_td_timer(struct r8a66597 *r8a66597, struct r8a66597_td *td) time =30 ;break ;default : - time =300 ; + time =50 ;break ; }
@@ -1785,6 +1785,7 @@ static void r8a66597_td_timer(unsigned long _r8a66597) pipe = td->pipe;pipe_stop (r8a66597, pipe); +/* Select a different address or endpoint */ new_td = td; do { list_move_tail(&new_td->queue,
@@ -1794,7 +1795,8 @@ static void r8a66597_td_timer(unsigned long _r8a66597) new_td = td;break ; } - }while (td != new_td && td->address == new_td->address); + }while (td != new_td && td->address == new_td->address && + td->pipe->info.epnum == new_td->pipe->info.epnum);start_transfer (r8a66597, new_td);
drivers/usb/host/xhci-pci.c +3 -0
@@ -198,6 +198,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==0x1042 ) xhci->quirks |=XHCI_BROKEN_STREAMS ; +if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && + pdev->device ==0x1142 ) + xhci->quirks |=XHCI_TRUST_TX_LENGTH ;if (xhci->quirks &XHCI_RESET_ON_RESUME ) xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
fs/configfs/symlink.c +1 -2
@@ -83,14 +83,13 @@ static int create_link(struct config_item *parent_item, ret = -ENOMEM ; sl =kmalloc (sizeof (struct configfs_symlink ),GFP_KERNEL );if (sl) { - sl->sl_target =config_item_get (item);spin_lock (&configfs_dirent_lock);if (target_sd->s_type &CONFIGFS_USET_DROPPING ) {spin_unlock (&configfs_dirent_lock); -config_item_put (item);kfree (sl);return -ENOENT ; } + sl->sl_target =config_item_get (item);list_add (&sl->sl_list, &target_sd->s_links);spin_unlock (&configfs_dirent_lock); ret = configfs_create_link(sl, parent_item->ci_dentry,
fs/hugetlbfs/inode.c +1 -1
@@ -191,7 +191,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, addr =ALIGN (addr,huge_page_size (h)); vma =find_vma (mm, addr);if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vma->vm_start)) + (!vma || addr + len <=vm_start_gap (vma)))return addr; }
fs/proc/task_mmu.c +0 -4
@@ -295,11 +295,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)/* We don't show the stack guard page in /proc/maps */ start = vma->vm_start; -if (stack_guard_page_start (vma, start)) - start +=PAGE_SIZE ; end = vma->vm_end; -if (stack_guard_page_end (vma, end)) - end -=PAGE_SIZE ;seq_setwidth (m,25 +sizeof (void *) *6 -1 ); seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
include/linux/mm.h +25 -28
76 lines not on this page · raw message
include/uapi/linux/usb/ch11.h +3 -0
@@ -22,6 +22,9 @@*/ #define USB_MAXCHILDREN 31 +/* See USB 3.1 spec Table 10-5 */ +#define USB_SS_MAXPORTS 15 +/* * Hub request types */
kernel/irq/manage.c +3 -1
@@ -1287,8 +1287,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ret =__irq_set_trigger (desc, new->flags &IRQF_TRIGGER_MASK ); -if (ret) +if (ret) { +irq_release_resources (desc); goto out_mask; + } } desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
kernel/time/alarmtimer.c +11 -3
@@ -339,7 +339,7 @@ void alarm_start_relative(struct alarm *alarm, ktime_t start) {struct alarm_base *base = &alarm_bases[alarm->type]; - start =ktime_add (start, base->gettime ()); + start =ktime_add_safe (start, base->gettime ());alarm_start (alarm, start); }EXPORT_SYMBOL_GPL (alarm_start_relative);
@@ -425,7 +425,7 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval) overrun++; } - alarm->node.expires =ktime_add (alarm->node.expires, interval); + alarm->node.expires =ktime_add_safe (alarm->node.expires, interval);return overrun; }EXPORT_SYMBOL_GPL (alarm_forward);
@@ -611,13 +611,21 @@ static int alarm_timer_set(struct k_itimer *timr, int flags,/* start the timer */ timr->it.alarm.interval =timespec_to_ktime (new_setting->it_interval); + +/* +* Rate limit to the tick as a hot fix to prevent DOS. Will be +* mopped up later. +*/ +if (ktime_to_ns (timr->it.alarm.interval) <TICK_NSEC ) + timr->it.alarm.interval =ktime_set (0 ,TICK_NSEC ); + exp =timespec_to_ktime (new_setting->it_value);/* Convert (if necessary) to absolute time */ if (flags !=TIMER_ABSTIME ) {ktime_t now; now = alarm_bases[timr->it.alarm.alarmtimer.type].gettime (); - exp =ktime_add (now, exp); + exp =ktime_add_safe (now, exp); }alarm_start (&timr->it.alarm.alarmtimer, exp);
mm/gup.c +0 -5
@@ -312,11 +312,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,/* mlock all present pages, but do not fault in new pages */ if ((*flags & (FOLL_POPULATE |FOLL_MLOCK )) ==FOLL_MLOCK )return -ENOENT ; -/* For mm_populate(), just skip the stack guard page. */ -if ((*flags &FOLL_POPULATE ) && - (stack_guard_page_start (vma, address) || -stack_guard_page_end (vma, address +PAGE_SIZE ))) -return -ENOENT ;if (*flags &FOLL_WRITE ) fault_flags |=FAULT_FLAG_WRITE ;if (nonblocking)
mm/memory-failure.c +4 -1
@@ -1208,7 +1208,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)* page_remove_rmap() in try_to_unmap_one(). So to determine page status * correctly, we save a copy of the page flags at this time. */ - page_flags = p->flags; +if (PageHuge (p)) + page_flags = hpage->flags; +else + page_flags = p->flags;/* * unpoison always clear PG_hwpoison inside page lock
mm/memory.c +0 -38
@@ -2662,40 +2662,6 @@ out_release: }/* -* This is like a special single-page "expand_{down|up}wards()", -* except we must first make sure that 'address{-|+}PAGE_SIZE' -* doesn't hit another vma. -*/ -static inline int check_stack_guard_page (struct vm_area_struct *vma,unsigned long address) -{ - address &=PAGE_MASK ; -if ((vma->vm_flags &VM_GROWSDOWN ) && address == vma->vm_start) { -struct vm_area_struct *prev = vma->vm_prev; - -/* -* Is there a mapping abutting this one below? -* -* That's only ok if it's the same stack mapping -* that has gotten split.. -*/ -if (prev && prev->vm_end == address) -return prev->vm_flags &VM_GROWSDOWN ?0 : -ENOMEM ; - -return expand_downwards (vma, address -PAGE_SIZE ); - } -if ((vma->vm_flags &VM_GROWSUP ) && address +PAGE_SIZE == vma->vm_end) { -struct vm_area_struct *next = vma->vm_next; - -/* As VM_GROWSDOWN but s/below/above/ */ -if (next && next->vm_start == address +PAGE_SIZE ) -return next->vm_flags &VM_GROWSUP ?0 : -ENOMEM ; - -return expand_upwards (vma, address +PAGE_SIZE ); - } -return 0 ; -} - -/* * We enter with non-exclusive mmap_sem (to exclude vma changes, * but allow concurrent faults), and pte mapped but not yet locked. * We return with mmap_sem still held, but pte unmapped and unlocked.
@@ -2715,10 +2681,6 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,if (vma->vm_flags &VM_SHARED )return VM_FAULT_SIGBUS ; -/* Check if we need to add a guard page to the stack */ -if (check_stack_guard_page (vma, address) <0 ) -return VM_FAULT_SIGSEGV ; -/* Use the zero-page for reads */ if (!(flags &FAULT_FLAG_WRITE ) && !mm_forbids_zeropage (mm)) { entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
mm/mmap.c +97 -63
336 lines not on this page · raw message
mm/swap_cgroup.c +3 -0
@@ -48,6 +48,9 @@ static int swap_cgroup_prepare(int type)if (!page) goto not_enough_page; ctrl->map[idx] = page; + +if (!(idx %SWAP_CLUSTER_MAX )) +cond_resched (); }return 0 ; not_enough_page:
net/mac80211/ibss.c +4 -2
@@ -66,6 +66,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,2 + (IEEE80211_MAX_SUPP_RATES -8 ) +2 +sizeof (struct ieee80211_ht_cap ) +2 +sizeof (struct ieee80211_ht_operation ) + +2 +sizeof (struct ieee80211_vht_cap ) + +2 +sizeof (struct ieee80211_vht_operation ) + ifibss->ie_len; presp =kzalloc (sizeof (*presp) + frame_len,GFP_KERNEL );if (!presp)
@@ -486,14 +488,14 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata,struct beacon_data *presp, *old_presp;struct cfg80211_bss *cbss;const struct cfg80211_bss_ies *ies; -u16 capability =0 ; +u16 capability =WLAN_CAPABILITY_IBSS ;u64 tsf;int ret =0 ;sdata_assert_lock (sdata);if (ifibss->privacy) - capability =WLAN_CAPABILITY_PRIVACY ; + capability |=WLAN_CAPABILITY_PRIVACY ; cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, ifibss->bssid, ifibss->ssid,
net/mac80211/rx.c +5 -1
@@ -1455,12 +1455,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)*/ if (!ieee80211_hw_check (&sta->local->hw,AP_LINK_PS ) && !ieee80211_has_morefrags (hdr->frame_control) && + !ieee80211_is_back_req (hdr->frame_control) && !(status->rx_flags &IEEE80211_RX_DEFERRED_RELEASE ) && (rx->sdata->vif.type ==NL80211_IFTYPE_AP || rx->sdata->vif.type ==NL80211_IFTYPE_AP_VLAN ) && -/* PM bit is only checked in frames where it isn't reserved, +/* +* PM bit is only checked in frames where it isn't reserved, * in AP mode it's reserved in non-bufferable management frames * (cf. IEEE 802.11-2012 8.2.4.1.7 Power Management field) +* BAR frames should be ignored as specified in +* IEEE 802.11-2012 10.2.1.2. */ (!ieee80211_is_mgmt (hdr->frame_control) ||ieee80211_is_bufferable_mmpdu (hdr->frame_control))) {
net/mac80211/wpa.c +5 -4
@@ -16,6 +16,7 @@#include <asm/unaligned.h> #include <net/mac80211.h> #include <crypto/aes.h> +#include <crypto/algapi.h> #include "ieee80211_i.h" #include "michael.h"
@@ -152,7 +153,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) data_len = skb->len - hdrlen -MICHAEL_MIC_LEN ; key = &rx->key->conf.key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY ];michael_mic (key, hdr, data, data_len, mic); -if (memcmp (mic, data + data_len,MICHAEL_MIC_LEN ) !=0 ) +if (crypto_memneq (mic, data + data_len,MICHAEL_MIC_LEN )) goto mic_fail;/* remove Michael MIC from payload */
@@ -1044,7 +1045,7 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)bip_aad (skb, aad);ieee80211_aes_cmac (key->u.aes_cmac.tfm, aad, skb->data +24 , skb->len -24 , mic); -if (memcmp (mic, mmie->mic,sizeof (mmie->mic)) !=0 ) { +if (crypto_memneq (mic, mmie->mic,sizeof (mmie->mic))) { key->u.aes_cmac.icverrors++;return RX_DROP_UNUSABLE ; }
@@ -1094,7 +1095,7 @@ ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx)bip_aad (skb, aad);ieee80211_aes_cmac_256 (key->u.aes_cmac.tfm, aad, skb->data +24 , skb->len -24 , mic); -if (memcmp (mic, mmie->mic,sizeof (mmie->mic)) !=0 ) { +if (crypto_memneq (mic, mmie->mic,sizeof (mmie->mic))) { key->u.aes_cmac.icverrors++;return RX_DROP_UNUSABLE ; }
@@ -1198,7 +1199,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx)if (ieee80211_aes_gmac (key->u.aes_gmac.tfm, aad, nonce, skb->data +24 , skb->len -24 , mic) <0 || -memcmp (mic, mmie->mic,sizeof (mmie->mic)) !=0 ) { +crypto_memneq (mic, mmie->mic,sizeof (mmie->mic))) { key->u.aes_gmac.icverrors++;return RX_DROP_UNUSABLE ; }