Linux 3.18.58
Greg KH
maintainerI'm announcing the release of the 3.18.58 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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/mm/mmap.c | 2 arch/parisc/kernel/sys_parisc.c | 15 +- arch/powerpc/mm/slice.c | 2 arch/s390/mm/vmem.c | 2 arch/sh/mm/mmap.c | 4 arch/sparc/kernel/sys_sparc_64.c | 4 arch/sparc/kernel/traps_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 block/partitions/msdos.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/net/ethernet/xilinx/xilinx_emaclite.c | 126 +++++++++++--------- 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/gadget/udc/dummy_hcd.c | 6 drivers/usb/host/r8a66597-hcd.c | 6 drivers/usb/host/xhci-pci.c | 3 fs/cifs/connect.c | 24 ++- fs/configfs/symlink.c | 3 fs/hugetlbfs/inode.c | 2 fs/proc/task_mmu.c | 4 include/linux/log2.h | 13 +- include/linux/mm.h | 53 ++++---- include/uapi/linux/usb/ch11.h | 3 kernel/irq/manage.c | 4 kernel/time/alarmtimer.c | 8 + mm/gup.c | 5 mm/memory-failure.c | 5 mm/memory.c | 38 ------ mm/mmap.c | 160 +++++++++++++++----------- mm/page_cgroup.c | 3 net/ipv6/datagram.c | 14 +- net/ipv6/ip6_output.c | 3 net/ipv6/tcp_ipv6.c | 11 + net/ipv6/udp.c | 4 net/mac80211/rx.c | 6 53 files changed, 353 insertions(+), 271 deletions(-)
Anssi Hannula (2):
net: xilinx_emaclite: fix freezes due to unordered I/O
net: xilinx_emaclite: fix receive buffer overflow
Anton Bondarenko (1):
usb: core: fix potential memory leak in error path during hcd creation
Ard Biesheuvel (1):
log2: make order_base_2() behave correctly on const input value zero
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 (3):
sparc64: make string buffers large enough
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 3.18.58
Heiko Carstens (1):
s390/vmem: fix identity mapping
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
Johan Hovold (2):
USB: hub: fix SS max number of ports
USB: gadget: dummy_hcd: fix hub-descriptor removable fields
Jonathan T. Leighton (2):
ipv6: Handle IPv4-mapped src to in6addr_any dst.
ipv6: Inhibit IPv4-mapped src address on the wire.
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
Richard (1):
partitions/msdos: FreeBSD UFS2 file systems are not recognized
Sachin Prabhu (1):
Call echo service immediately after socket reconnect
Thomas Gleixner (1):
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
@@ -3324,6 +3324,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 = 3 PATCHLEVEL = 18 -SUBLEVEL = 57 +SUBLEVEL = 58 EXTRAVERSION = NAME = Diseased Newt
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/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/vmem.c +1 -1
@@ -378,7 +378,7 @@ void __init vmem_map_init(void) ro_end = (unsigned long )&_eshared &PAGE_MASK ;for_each_memblock (memory, reg) { start = reg->base; - end = reg->base + reg->size -1 ; + end = reg->base + reg->size;if (start >= ro_end || end <= ro_start)vmem_add_mem (start, end - start,0 );else if (start >= ro_start && end <= ro_end)
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/kernel/traps_64.c +2 -2
@@ -85,7 +85,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)void bad_trap (struct pt_regs *regs,long lvl) { -char buffer[32 ]; +char buffer[36 ];siginfo_t info; if (notify_die(DIE_TRAP, "bad trap", regs,
@@ -116,7 +116,7 @@ void bad_trap(struct pt_regs *regs, long lvl)void bad_trap_tl1 (struct pt_regs *regs,long lvl) { -char buffer[32 ]; +char buffer[36 ];if (notify_die (DIE_TRAP_TL1 ,"bad trap tl1" , regs,0 , lvl,SIGTRAP ) ==NOTIFY_STOP )
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
@@ -237,7 +237,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
@@ -127,7 +127,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; }
@@ -166,7 +166,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
@@ -86,7 +86,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 )
block/partitions/msdos.c +2 -0
@@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_partitions *state,continue ; bsd_start =le32_to_cpu (p->p_offset); bsd_size =le32_to_cpu (p->p_size); +if (memcmp (flavour,"bsd\0" ,4 ) ==0 ) + bsd_start += offset;if (offset == bsd_start && size == bsd_size)/* full parent partition, we have it already */ continue ;
drivers/cpufreq/cpufreq_conservative.c +2 -2
@@ -204,8 +204,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
@@ -256,8 +256,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 ));
@@ -267,8 +265,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
@@ -305,6 +301,8 @@ static int as3935_resume(struct spi_device *spi) 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
@@ -1120,7 +1120,7 @@ EXPORT_SYMBOL_GPL(vb2_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
@@ -376,8 +376,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/net/ethernet/xilinx/xilinx_emaclite.c +69 -57
298 lines not on this page · raw message
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
@@ -873,7 +873,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
@@ -2461,6 +2461,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
@@ -1346,7 +1346,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/gadget/udc/dummy_hcd.c +3 -3
@@ -1935,7 +1935,7 @@ ss_hub_descriptor(struct usb_hub_descriptor *desc) desc->wHubCharacteristics =cpu_to_le16 (0x0001 ); 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)
@@ -1945,8 +1945,8 @@ static inline void hub_descriptor(struct usb_hub_descriptor *desc) desc->bDescLength =9 ; desc->wHubCharacteristics =cpu_to_le16 (0x0001 ); 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/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
@@ -185,6 +185,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/cifs/connect.c +18 -6
@@ -400,6 +400,9 @@ cifs_reconnect(struct TCP_Server_Info *server)mutex_unlock (&server->srv_mutex); }while (server->tcpStatus == CifsNeedReconnect); +if (server->tcpStatus == CifsNeedNegotiate) +mod_delayed_work (cifsiod_wq, &server->echo,0 ); +return rc; }
@@ -409,18 +412,27 @@ cifs_echo_request(struct work_struct *work)int rc;struct TCP_Server_Info *server =container_of (work, struct TCP_Server_Info, echo.work); +unsigned long echo_interval; + +/* +* If we need to renegotiate, set echo interval to zero to +* immediately call echo service where we can renegotiate. +*/ +if (server->tcpStatus == CifsNeedNegotiate) + echo_interval =0 ; +else + echo_interval =SMB_ECHO_INTERVAL ;/* -* We cannot send an echo if it is disabled or until the -* NEGOTIATE_PROTOCOL request is done, which is indicated by -* server->ops->need_neg() == true. Also, no need to ping if -* we got a response recently. +* We cannot send an echo if it is disabled. +* Also, no need to ping if we got a response recently. */ if (server->tcpStatus == CifsNeedReconnect || - server->tcpStatus == CifsExiting || server->tcpStatus == CifsNew || + server->tcpStatus == CifsExiting || + server->tcpStatus == CifsNew || (server->ops->can_echo && !server->ops->can_echo (server)) || -time_before (jiffies, server->lstrp +SMB_ECHO_INTERVAL -HZ )) +time_before (jiffies, server->lstrp + echo_interval -HZ )) goto requeue_echo; rc = server->ops->echo ? server->ops->echo (server) : -ENOSYS ;
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
@@ -171,7 +171,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
@@ -284,11 +284,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/log2.h +12 -1
@@ -194,6 +194,17 @@ unsigned long __rounddown_pow_of_two(unsigned long n)* ... and so on. */ -#define order_base_2 (n) ilog2(roundup_pow_of_two(n)) +static inline __attribute_const__ +int __order_base_2(unsigned long n) +{ +return n >1 ?ilog2 (n -1 ) +1 :0 ; +} +#define order_base_2 (n) \ +( \ + __builtin_constant_p(n) ? ( \ + ((n) == 0 || (n) == 1) ? 0 : \ + ilog2((n) - 1) + 1) : \ + __order_base_2(n) \ +)#endif /* _LINUX_LOG2_H */
include/linux/mm.h +25 -28
71 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
@@ -1156,8 +1156,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ret =__irq_set_trigger (desc, irq, 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 +8 -0
@@ -614,6 +614,14 @@ 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 ) {
mm/gup.c +0 -5
@@ -275,11 +275,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,unsigned int fault_flags =0 ;int ret; -/* For mlock, just skip the stack guard page. */ -if ((*flags &FOLL_MLOCK ) && - (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
@@ -1189,7 +1189,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
@@ -2580,40 +2580,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.
@@ -2633,10 +2599,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 )) { entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
mm/mmap.c +97 -63
336 lines not on this page · raw message
mm/page_cgroup.c +3 -0
@@ -368,6 +368,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/ipv6/datagram.c +9 -5
@@ -76,18 +76,22 @@ static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int a } } - addr_type =ipv6_addr_type (&usin->sin6_addr); - -if (addr_type ==IPV6_ADDR_ANY ) { +if (ipv6_addr_any (&usin->sin6_addr)) {/* * connect to self */ - usin->sin6_addr.s6_addr[15 ] =0x01 ; +if (ipv6_addr_v4mapped (&sk->sk_v6_rcv_saddr)) +ipv6_addr_set_v4mapped (htonl (INADDR_LOOPBACK ), + &usin->sin6_addr); +else + usin->sin6_addr = in6addr_loopback; } + addr_type =ipv6_addr_type (&usin->sin6_addr); + daddr = &usin->sin6_addr; -if (addr_type ==IPV6_ADDR_MAPPED ) { +if (addr_type &IPV6_ADDR_MAPPED ) {struct sockaddr_in sin;if (__ipv6_only_sock (sk)) {
net/ipv6/ip6_output.c +3 -0
@@ -960,6 +960,9 @@ static int ip6_dst_lookup_tail(struct sock *sk, } }#endif +if (ipv6_addr_v4mapped (&fl6->saddr) && + !(ipv6_addr_v4mapped (&fl6->daddr) ||ipv6_addr_any (&fl6->daddr))) +return -EAFNOSUPPORT ;return 0 ;
net/ipv6/tcp_ipv6.c +8 -3
@@ -164,8 +164,13 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,* connect() to INADDR_ANY means loopback (BSD'ism). */ -if (ipv6_addr_any (&usin->sin6_addr)) - usin->sin6_addr.s6_addr[15 ] =0x1 ; +if (ipv6_addr_any (&usin->sin6_addr)) { +if (ipv6_addr_v4mapped (&sk->sk_v6_rcv_saddr)) +ipv6_addr_set_v4mapped (htonl (INADDR_LOOPBACK ), + &usin->sin6_addr); +else + usin->sin6_addr = in6addr_loopback; + } addr_type =ipv6_addr_type (&usin->sin6_addr);
@@ -204,7 +209,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,* TCP over IPv4 */ -if (addr_type ==IPV6_ADDR_MAPPED ) { +if (addr_type &IPV6_ADDR_MAPPED ) {u32 exthdrlen = icsk->icsk_ext_hdr_len;struct sockaddr_in sin;
net/ipv6/udp.c +4 -0
@@ -1107,6 +1107,10 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,if (addr_len <SIN6_LEN_RFC2133 )return -EINVAL ; daddr = &sin6->sin6_addr; +if (ipv6_addr_any (daddr) && +ipv6_addr_v4mapped (&np->saddr)) +ipv6_addr_set_v4mapped (htonl (INADDR_LOOPBACK ), + daddr);break ;case AF_INET : goto do_udp_sendmsg;
net/mac80211/rx.c +5 -1
@@ -1319,12 +1319,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)*/ if (!(sta->local->hw.flags &IEEE80211_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))) {