Linux 3.16.5
Greg KH
maintainerI'm announcing the release of the 3.16.5 kernel.
All users of the 3.16 kernel series must upgrade.
The updated 3.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/ia64/pci/fixup.c | 4 - arch/x86/include/asm/vga.h | 6 -- arch/x86/pci/fixup.c | 3 - drivers/cpufreq/integrator-cpufreq.c | 4 - drivers/cpufreq/pcc-cpufreq.c | 2 drivers/gpu/drm/i915/i915_gem_gtt.c | 14 ++++++ drivers/gpu/drm/i915/intel_opregion.c | 16 +++++-- drivers/gpu/vga/vgaarb.c | 38 +++++++++++++++++ drivers/i2c/busses/i2c-qup.c | 12 +++-- drivers/i2c/busses/i2c-rk3x.c | 2 drivers/md/raid5.c | 18 +++++++- drivers/media/v4l2-core/videobuf2-core.c | 15 ++++++ drivers/usb/storage/uas-detect.h | 67 +++++++++++++++++++------------ drivers/video/fbdev/efifb.c | 39 ------------------ fs/cifs/smb1ops.c | 2 fs/cifs/smb2maperror.c | 2 fs/udf/inode.c | 35 +++++++++------- include/linux/jiffies.h | 12 ----- include/media/videobuf2-core.h | 4 + init/Kconfig | 1 kernel/events/core.c | 4 + kernel/fork.c | 5 +- kernel/time.c | 54 +++++++++++++----------- kernel/trace/ring_buffer.c | 2 mm/huge_memory.c | 11 +++-- mm/memcontrol.c | 36 ++++++++++++++-- mm/migrate.c | 5 +- sound/soc/codecs/ssm2602.c | 2 sound/soc/soc-core.c | 2 30 files changed, 259 insertions(+), 160 deletions(-)
Aaron Lu (1):
ACPI / i915: Update the condition to ignore firmware backlight change request
Alexandru M Stan (1):
i2c: rk3x: fix 0 length write transfers
Andrew Hunter (1):
jiffies: Fix timeval conversion to jiffies
Andy Gross (1):
i2c: qup: Fix order of runtime pm initialization
Arnd Bergmann (1):
cpufreq: integrator: fix integrator_cpufreq_remove return type
Bruno Prémont (2):
x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()
vgaarb: Don't default exclusively to first video device with mem+io
Chris Wilson (1):
drm/i915: Flush the PTEs after updating them before suspend
Greg Kroah-Hartman (1):
Linux 3.16.5
Hans Verkuil (1):
media: vb2: fix VBI/poll regression
Hans de Goede (4):
uas: Only complain about missing sg if all other checks succeed
uas: Log a warning when we cannot use uas because the hcd lacks streams
uas: Disable uas on ASM1051 devices
uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check
Jan Kara (1):
udf: Avoid infinite loop when processing indirect ICBs
Johannes Weiner (1):
mm: memcontrol: do not iterate uninitialized memcgs
Josh Triplett (1):
init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
Mel Gorman (2):
mm: migrate: Close race between migration completion and mprotect
mm: numa: Do not mark PTEs pte_numa when splitting huge pages
NeilBrown (1):
md/raid5: disable 'DISCARD' by default due to safety concerns.
Peter Zijlstra (1):
perf: fix perf bug in fork()
Rafael J. Wysocki (1):
cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
Stefan Kristiansson (1):
ASoC: ssm2602: do not hardcode type to SSM2602
Steve French (1):
Fix problem recognizing symlinks
Steven Rostedt (Red Hat) (1):
ring-buffer: Fix infinite spin in reading buffer
Waiman Long (1):
mm, thp: move invariant bug check out of loop in __split_huge_page_map
Xiubo Li (1):
ASoC: core: fix possible ZERO_SIZE_PTR pointer dereferencing error.
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/ia64/pci/fixup.c +2 -2
@@ -6,6 +6,7 @@#include <linux/pci.h> #include <linux/init.h> #include <linux/vgaarb.h> +#include <linux/screen_info.h> #include <asm/machvec.h>
@@ -61,8 +62,7 @@ static void pci_fixup_video(struct pci_dev *pdev)pci_read_config_word (pdev,PCI_COMMAND , &config);if (config & (PCI_COMMAND_IO |PCI_COMMAND_MEMORY )) { pdev->resource[PCI_ROM_RESOURCE ].flags |=IORESOURCE_ROM_SHADOW ; -dev_printk (KERN_DEBUG , &pdev->dev,"Boot video device\n" ); -vga_set_default_device (pdev); +dev_printk (KERN_DEBUG , &pdev->dev,"Video device with shadowed ROM\n" ); } } }
arch/x86/include/asm/vga.h +0 -6
@@ -17,10 +17,4 @@#define vga_readb (x) (*(x))#define vga_writeb (x, y) (*(y) = (x)) -#ifdef CONFIG_FB_EFI -#define __ARCH_HAS_VGA_DEFAULT_DEVICE -extern struct pci_dev *vga_default_device (void ); -extern void vga_set_default_device (struct pci_dev *pdev); -#endif -#endif /* _ASM_X86_VGA_H */
arch/x86/pci/fixup.c +1 -2
@@ -350,8 +350,7 @@ static void pci_fixup_video(struct pci_dev *pdev)pci_read_config_word (pdev,PCI_COMMAND , &config);if (config & (PCI_COMMAND_IO |PCI_COMMAND_MEMORY )) { pdev->resource[PCI_ROM_RESOURCE ].flags |=IORESOURCE_ROM_SHADOW ; -dev_printk (KERN_DEBUG , &pdev->dev,"Boot video device\n" ); -vga_set_default_device (pdev); +dev_printk (KERN_DEBUG , &pdev->dev,"Video device with shadowed ROM\n" ); } } }
drivers/cpufreq/integrator-cpufreq.c +2 -2
@@ -213,9 +213,9 @@ static int __init integrator_cpufreq_probe(struct platform_device *pdev)return cpufreq_register_driver (&integrator_driver); } -static void __exit integrator_cpufreq_remove(struct platform_device *pdev) +static int __exit integrator_cpufreq_remove(struct platform_device *pdev) { -cpufreq_unregister_driver (&integrator_driver); +return cpufreq_unregister_driver (&integrator_driver); }static const struct of_device_id integrator_cpufreq_match[] = {
drivers/cpufreq/pcc-cpufreq.c +1 -1
@@ -204,7 +204,6 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,u32 input_buffer;int cpu; -spin_lock (&pcc_lock); cpu = policy->cpu; pcc_cpu_data =per_cpu_ptr (pcc_cpu_info, cpu);
@@ -216,6 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, freqs.old = policy->cur; freqs.new = target_freq;cpufreq_freq_transition_begin (policy, &freqs); +spin_lock (&pcc_lock); input_buffer =0x1 | (((target_freq *100 ) / (ioread32 (&pcch_hdr->nominal) *1000 )) <<8 );
drivers/gpu/drm/i915/i915_gem_gtt.c +13 -1
@@ -1297,6 +1297,16 @@ void i915_check_and_clear_faults(struct drm_device *dev)POSTING_READ (RING_FAULT_REG (&dev_priv->ring[RCS ])); } +static void i915_ggtt_flush (struct drm_i915_private *dev_priv) +{ +if (INTEL_INFO (dev_priv->dev)->gen <6 ) { +intel_gtt_chipset_flush (); + }else { +I915_WRITE (GFX_FLSH_CNTL_GEN6 ,GFX_FLSH_CNTL_EN ); +POSTING_READ (GFX_FLSH_CNTL_GEN6 ); + } +} +void i915_gem_suspend_gtt_mappings (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -1313,6 +1323,8 @@ void i915_gem_suspend_gtt_mappings(struct drm_device *dev) dev_priv->gtt.base.start, dev_priv->gtt.base.total, true); + +i915_ggtt_flush (dev_priv); }void i915_gem_restore_gtt_mappings (struct drm_device *dev)
@@ -1365,7 +1377,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)gen6_write_pdes (container_of(vm ,struct i915_hw_ppgtt ,base )); } -i915_gem_chipset_flush (dev); +i915_ggtt_flush (dev_priv); }int i915_gem_gtt_prepare_object (struct drm_i915_gem_object *obj)
drivers/gpu/drm/i915/intel_opregion.c +11 -5
@@ -395,6 +395,16 @@ int intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state)return -EINVAL ; } +/* +* If the vendor backlight interface is not in use and ACPI backlight interface +* is broken, do not bother processing backlight change requests from firmware. +*/ +static bool should_ignore_backlight_request (void ) +{ +return acpi_video_backlight_support () && + !acpi_video_verify_backlight_support (); +} +static u32 asle_set_backlight (struct drm_device *dev,u32 bclp) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -403,11 +413,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)DRM_DEBUG_DRIVER ("bclp = 0x%08x\n" , bclp); -/* -* If the acpi_video interface is not supposed to be used, don't -* bother processing backlight level change requests from firmware. -*/ -if (!acpi_video_verify_backlight_support ()) { +if (should_ignore_backlight_request ()) {DRM_DEBUG_KMS ("opregion backlight request ignored\n" );return 0 ; }
drivers/gpu/vga/vgaarb.c +37 -1
@@ -41,6 +41,7 @@#include <linux/poll.h> #include <linux/miscdevice.h> #include <linux/slab.h> +#include <linux/screen_info.h> #include <linux/uaccess.h>
@@ -580,8 +581,11 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)*/ #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICEif (vga_default ==NULL && - ((vgadev->owns &VGA_RSRC_LEGACY_MASK ) ==VGA_RSRC_LEGACY_MASK )) + ((vgadev->owns &VGA_RSRC_LEGACY_MASK ) ==VGA_RSRC_LEGACY_MASK )) { +pr_info ("vgaarb: setting as boot device: PCI:%s\n" , +pci_name (pdev));vga_set_default_device (pdev); + }#endif vga_arbiter_check_bridge_sharing (vgadev);
@@ -1316,6 +1320,38 @@ static int __init vga_arb_device_init(void)pr_info ("vgaarb: loaded\n" );list_for_each_entry (vgadev, &vga_list, list) { +#if defined(CONFIG_X86 ) || defined(CONFIG_IA64 ) +/* Override I/O based detection done by vga_arbiter_add_pci_device() +* as it may take the wrong device (e.g. on Apple system under EFI). +* +* Select the device owning the boot framebuffer if there is one. +*/ +resource_size_t start, end; +int i; + +/* Does firmware framebuffer belong to us? */ +for (i =0 ; i <DEVICE_COUNT_RESOURCE ; i++) { +if (!(pci_resource_flags (vgadev->pdev, i) &IORESOURCE_MEM )) +continue ; + + start =pci_resource_start (vgadev->pdev, i); + end =pci_resource_end (vgadev->pdev, i); + +if (!start || !end) +continue ; + +if (screen_info.lfb_base < start || + (screen_info.lfb_base + screen_info.lfb_size) >= end) +continue ; +if (!vga_default_device ()) +pr_info ("vgaarb: setting as boot device: PCI:%s\n" , +pci_name (vgadev->pdev)); +else if (vgadev->pdev !=vga_default_device ()) +pr_info ("vgaarb: overriding boot device: PCI:%s\n" , +pci_name (vgadev->pdev)); +vga_set_default_device (vgadev->pdev); + } +#endif if (vgadev->bridge_has_one_vga)pr_info ("vgaarb: bridge control possible %s\n" ,pci_name (vgadev->pdev));else
drivers/i2c/busses/i2c-qup.c +8 -4
@@ -670,16 +670,20 @@ static int qup_i2c_probe(struct platform_device *pdev) qup->adap.dev.of_node = pdev->dev.of_node;strlcpy (qup->adap.name,"QUP I2C adapter" ,sizeof (qup->adap.name)); - ret =i2c_add_adapter (&qup->adap); -if (ret) - goto fail; -pm_runtime_set_autosuspend_delay (qup->dev,MSEC_PER_SEC );pm_runtime_use_autosuspend (qup->dev);pm_runtime_set_active (qup->dev);pm_runtime_enable (qup->dev); + + ret =i2c_add_adapter (&qup->adap); +if (ret) + goto fail_runtime; +return 0 ; +fail_runtime: +pm_runtime_disable (qup->dev); +pm_runtime_set_suspended (qup->dev); fail:qup_i2c_disable_clocks (qup);return ret;
drivers/i2c/busses/i2c-rk3x.c +1 -1
@@ -238,7 +238,7 @@ static void rk3x_i2c_fill_transmit_buf(struct rk3x_i2c *i2c)for (i =0 ; i <8 ; ++i) { val =0 ;for (j =0 ; j <4 ; ++j) { -if (i2c->processed == i2c->msg->len) +if ((i2c->processed == i2c->msg->len) && (cnt !=0 ))break ;if (i2c->processed ==0 && cnt ==0 )
drivers/md/raid5.c +17 -1
@@ -64,6 +64,10 @@#define cpu_to_group (cpu) cpu_to_node(cpu)#define ANY_GROUP NUMA_NO_NODE +static bool devices_handle_discard_safely = false; +module_param (devices_handle_discard_safely, bool,0644 ); +MODULE_PARM_DESC (devices_handle_discard_safely, +"Set to Y if all devices in each array reliably return zeroes on reads from discarded regions" );static struct workqueue_struct *raid5_wq;/* * Stripe cache
@@ -6208,7 +6212,7 @@ static int run(struct mddev *mddev) mddev->queue->limits.discard_granularity = stripe;/* * unaligned part of discard request will be ignored, so can't -* guarantee discard_zerors_data +* guarantee discard_zeroes_data */ mddev->queue->limits.discard_zeroes_data =0 ;
@@ -6233,6 +6237,18 @@ static int run(struct mddev *mddev) !bdev_get_queue(rdev->bdev)-> limits.discard_zeroes_data) discard_supported = false; +/* Unfortunately, discard_zeroes_data is not currently +* a guarantee - just a hint. So we only allow DISCARD +* if the sysadmin has confirmed that only safe devices +* are in use by setting a module parameter. +*/ +if (!devices_handle_discard_safely) { +if (discard_supported) { +pr_info ("md/raid456: discard support disabled due to uncertainty.\n" ); +pr_info ("Set raid456.devices_handle_discard_safely=Y to override.\n" ); + } + discard_supported = false; + } } if (discard_supported &&
drivers/media/v4l2-core/videobuf2-core.c +13 -2
@@ -967,6 +967,7 @@ static int __reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)* to the userspace. */ req->count = allocated_buffers; + q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT (q->type);return 0 ; }
@@ -1014,6 +1015,7 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *creatememset (q->plane_sizes,0 ,sizeof (q->plane_sizes));memset (q->alloc_ctx,0 ,sizeof (q->alloc_ctx)); q->memory = create->memory; + q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT (q->type); } num_buffers =min (create->count,VIDEO_MAX_FRAME - q->num_buffers);
@@ -1812,6 +1814,7 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)*/ list_add_tail (&vb->queued_entry, &q->queued_list); q->queued_count++; + q->waiting_for_buffers = false; vb->state =VB2_BUF_STATE_QUEUED ;if (V4L2_TYPE_IS_OUTPUT (q->type)) {/*
@@ -2244,6 +2247,7 @@ static int vb2_internal_streamoff(struct vb2_queue *q, enum v4l2_buf_type type)* their normal dequeued state. */ __vb2_queue_cancel (q); + q->waiting_for_buffers = !V4L2_TYPE_IS_OUTPUT (q->type);dprintk (3 ,"successful\n" );return 0 ;
@@ -2562,9 +2566,16 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait) }/* -* There is nothing to wait for if no buffers have already been queued. +* There is nothing to wait for if the queue isn't streaming. */ -if (list_empty (&q->queued_list)) +if (!vb2_is_streaming (q)) +return res |POLLERR ; +/* +* For compatibility with vb1: if QBUF hasn't been called yet, then +* return POLLERR as well. This only affects capture queues, output +* queues will always initialize waiting_for_buffers to false. +*/ +if (q->waiting_for_buffers)return res |POLLERR ;if (list_empty (&q->done_list))
drivers/usb/storage/uas-detect.h +42 -25
92 lines not on this page · raw message
drivers/video/fbdev/efifb.c +0 -39
@@ -19,8 +19,6 @@static bool request_mem_succeeded = false; -static struct pci_dev *default_vga; -static struct fb_var_screeninfo efifb_defined = { .activate =FB_ACTIVATE_NOW , .height =-1 ,
@@ -84,23 +82,10 @@ static struct fb_ops efifb_ops = { .fb_imageblit = cfb_imageblit, }; -struct pci_dev *vga_default_device (void ) -{ -return default_vga; -} - -EXPORT_SYMBOL_GPL (vga_default_device); - -void vga_set_default_device (struct pci_dev *pdev) -{ - default_vga = pdev; -} -static int efifb_setup (char *options) {char *this_opt;int i; -struct pci_dev *dev =NULL ;if (options && *options) {while ((this_opt =strsep (&options,"," )) !=NULL ) {
@@ -126,30 +111,6 @@ static int efifb_setup(char *options) } } -for_each_pci_dev (dev) { -int i; - -if ((dev->class >>8 ) !=PCI_CLASS_DISPLAY_VGA ) -continue ; - -for (i=0 ; i <DEVICE_COUNT_RESOURCE ; i++) { -resource_size_t start, end; - -if (!(pci_resource_flags (dev, i) &IORESOURCE_MEM )) -continue ; - - start =pci_resource_start (dev, i); - end =pci_resource_end (dev, i); - -if (!start || !end) -continue ; - -if (screen_info.lfb_base >= start && - (screen_info.lfb_base + screen_info.lfb_size) < end) - default_vga = dev; - } - } -return 0 ; }
fs/cifs/smb1ops.c +1 -1
@@ -586,7 +586,7 @@ cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, tmprc =CIFS_open (xid, &oparms, &oplock,NULL );if (tmprc == -EOPNOTSUPP ) *symlink = true; -else +else if (tmprc ==0 )CIFSSMBClose (xid, tcon, fid.netfid); }
fs/cifs/smb2maperror.c +2 -0
@@ -256,6 +256,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = { {STATUS_DLL_MIGHT_BE_INCOMPATIBLE , -EIO , "STATUS_DLL_MIGHT_BE_INCOMPATIBLE"}, {STATUS_STOPPED_ON_SYMLINK, -EOPNOTSUPP, "STATUS_STOPPED_ON_SYMLINK"}, + {STATUS_IO_REPARSE_TAG_NOT_HANDLED, -EOPNOTSUPP, + "STATUS_REPARSE_NOT_HANDLED"}, {STATUS_DEVICE_REQUIRES_CLEANING, -EIO, "STATUS_DEVICE_REQUIRES_CLEANING"}, {STATUS_DEVICE_DOOR_OPEN, -EIO, "STATUS_DEVICE_DOOR_OPEN"},
fs/udf/inode.c +21 -14
@@ -1271,13 +1271,22 @@ update_time:return 0 ; } +/* +* Maximum length of linked list formed by ICB hierarchy. The chosen number is +* arbitrary - just that we hopefully don't limit any real use of rewritten +* inode on write-once media but avoid looping for too long on corrupted media. +*/ +#define UDF_MAX_ICB_NESTING 1024 +static void __udf_read_inode (struct inode *inode) {struct buffer_head *bh =NULL ;struct fileEntry *fe;uint16_t ident;struct udf_inode_info *iinfo =UDF_I (inode); +unsigned int indirections =0 ; +reread:/* * Set defaults, but the inode is still incomplete! * Note: get_new_inode() sets the following on a new inode:
@@ -1314,28 +1323,26 @@ static void __udf_read_inode(struct inode *inode) ibh =udf_read_ptagged (inode->i_sb, &iinfo->i_location,1 , &ident);if (ident ==TAG_IDENT_IE && ibh) { -struct buffer_head *nbh =NULL ;struct kernel_lb_addr loc;struct indirectEntry *ie; ie = (struct indirectEntry *)ibh->b_data; loc =lelb_to_cpu (ie->indirectICB.extLocation); -if (ie->indirectICB.extLength && - (nbh =udf_read_ptagged (inode->i_sb, &loc,0 , - &ident))) { -if (ident ==TAG_IDENT_FE || - ident ==TAG_IDENT_EFE ) { -memcpy (&iinfo->i_location, - &loc, -sizeof (struct kernel_lb_addr )); -brelse (bh); -brelse (ibh); -brelse (nbh); -__udf_read_inode (inode); +if (ie->indirectICB.extLength) { +brelse (bh); +brelse (ibh); +memcpy (&iinfo->i_location, &loc, +sizeof (struct kernel_lb_addr )); +if (++indirections >UDF_MAX_ICB_NESTING ) { +udf_err (inode->i_sb, +"too many ICBs in ICB hierarchy" +" (max %d supported)\n" , +UDF_MAX_ICB_NESTING ); +make_bad_inode (inode);return ; } -brelse (nbh); + goto reread; } }brelse (ibh);
include/linux/jiffies.h +0 -12
@@ -258,23 +258,11 @@ extern unsigned long preset_lpj;#define SEC_JIFFIE_SC (32 - SHIFT_HZ)#endif #define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29) -#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19)#define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) +\ TICK_NSEC -1) / (u64)TICK_NSEC))#define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) +\ TICK_NSEC -1) / (u64)TICK_NSEC)) -#define USEC_CONVERSION \ - ((unsigned long)((((u64)NSEC_PER_USEC << USEC_JIFFIE_SC) +\ - TICK_NSEC -1) / (u64)TICK_NSEC)) -/* -* USEC_ROUND is used in the timeval to jiffie conversion. See there -* for more details. It is the scaled resolution rounding value. Note -* that it is a 64-bit value. Since, when it is applied, we are already -* in jiffies (albit scaled), it is nothing but the bits we will shift -* off. -*/ -#define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1)/* * The maximum jiffie value is (MAX_INT >> 1). Here we translate that * into seconds. The 64-bit case will overflow if we are not careful,
include/media/videobuf2-core.h +4 -0
@@ -375,6 +375,9 @@ struct v4l2_fh;* @streaming: current streaming state * @start_streaming_called: start_streaming() was called successfully and we * started streaming. +* @waiting_for_buffers: used in poll() to check if vb2 is still waiting for +* buffers. Only set for capture queues if qbuf has not yet been +* called since poll() needs to return POLLERR in that situation. * @fileio: file io emulator internal data, used only if emulator is active * @threadio: thread io internal data, used only if thread is active */
@@ -411,6 +414,7 @@ struct vb2_queue { unsigned int streaming:1; unsigned int start_streaming_called:1; + unsigned int waiting_for_buffers:1;struct vb2_fileio_data *fileio;struct vb2_threadio_data *threadio;
init/Kconfig +1 -0
@@ -1432,6 +1432,7 @@ config FUTEX config HAVE_FUTEX_CMPXCHG bool + depends on FUTEX help Architectures should select this if futex_atomic_cmpxchg_inatomic() is implemented and always working. This removes a couple of runtime
kernel/events/core.c +3 -1
@@ -7921,8 +7921,10 @@ int perf_event_init_task(struct task_struct *child)for_each_task_context_nr (ctxn) { ret =perf_event_init_context (child, ctxn); -if (ret) +if (ret) { +perf_event_free_task (child);return ret; + } }return 0 ;
kernel/fork.c +3 -2
@@ -1326,7 +1326,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, goto bad_fork_cleanup_policy; retval =audit_alloc (p);if (retval) - goto bad_fork_cleanup_policy; + goto bad_fork_cleanup_perf;/* copy all the process information */ retval =copy_semundo (clone_flags, p);if (retval)
@@ -1525,8 +1525,9 @@ bad_fork_cleanup_semundo:exit_sem (p); bad_fork_cleanup_audit:audit_free (p); -bad_fork_cleanup_policy: +bad_fork_cleanup_perf:perf_event_free_task (p); +bad_fork_cleanup_policy:#ifdef CONFIG_NUMA mpol_put (p->mempolicy); bad_fork_cleanup_threadgroup_lock:
kernel/time.c +30 -24
84 lines not on this page · raw message
kernel/trace/ring_buffer.c +1 -1
@@ -3375,7 +3375,7 @@ static void rb_iter_reset(struct ring_buffer_iter *iter) iter->head = cpu_buffer->reader_page->read; iter->cache_reader_page = iter->head_page; - iter->cache_read = iter->head; + iter->cache_read = cpu_buffer->read;if (iter->head) iter->read_stamp = cpu_buffer->read_stamp;
mm/huge_memory.c +7 -4
@@ -1775,21 +1775,24 @@ static int __split_huge_page_map(struct page *page,if (pmd) { pgtable =pgtable_trans_huge_withdraw (mm, pmd);pmd_populate (mm, &_pmd, pgtable); +if (pmd_write (*pmd)) +BUG_ON (page_mapcount (page) !=1 ); haddr = address;for (i =0 ; i <HPAGE_PMD_NR ; i++, haddr +=PAGE_SIZE ) {pte_t *pte, entry;BUG_ON (PageCompound (page+i)); +/* +* Note that pmd_numa is not transferred deliberately +* to avoid any possibility that pte_numa leaks to +* a PROT_NONE VMA by accident. +*/ entry =mk_pte (page + i, vma->vm_page_prot); entry =maybe_mkwrite (pte_mkdirty (entry), vma);if (!pmd_write (*pmd)) entry =pte_wrprotect (entry); -else -BUG_ON (page_mapcount (page) !=1 );if (!pmd_young (*pmd)) entry =pte_mkold (entry); -if (pmd_numa (*pmd)) - entry =pte_mknuma (entry); pte =pte_offset_map (&_pmd, haddr);BUG_ON (!pte_none (*pte));set_pte_at (mm, haddr, pte, entry);
mm/memcontrol.c +31 -5
@@ -292,6 +292,9 @@ struct mem_cgroup {/* vmpressure notifications */ struct vmpressure vmpressure; +/* css_online() has been completed */ +int initialized; +/* * the counter to account for mem+swap usage. */
@@ -1106,10 +1109,21 @@ skip_node:* skipping css reference should be safe. */ if (next_css) { -if ((next_css == &root->css) || - ((next_css->flags &CSS_ONLINE ) && -css_tryget_online (next_css))) -return mem_cgroup_from_css (next_css); +struct mem_cgroup *memcg =mem_cgroup_from_css (next_css); + +if (next_css == &root->css) +return memcg; + +if (css_tryget_online (next_css)) { +/* +* Make sure the memcg is initialized: +* mem_cgroup_css_online() orders the the +* initialization against setting the flag. +*/ +if (smp_load_acquire (&memcg->initialized)) +return memcg; +css_put (next_css); + } prev_css = next_css; goto skip_node;
@@ -6277,6 +6291,7 @@ mem_cgroup_css_online(struct cgroup_subsys_state *css) {struct mem_cgroup *memcg =mem_cgroup_from_css (css);struct mem_cgroup *parent =mem_cgroup_from_css (css->parent); +int ret;if (css->id >MEM_CGROUP_ID_MAX )return -ENOSPC ;
@@ -6313,7 +6328,18 @@ mem_cgroup_css_online(struct cgroup_subsys_state *css) }mutex_unlock (&memcg_create_mutex); -return memcg_init_kmem (memcg, &memory_cgrp_subsys); + ret =memcg_init_kmem (memcg, &memory_cgrp_subsys); +if (ret) +return ret; + +/* +* Make sure the memcg is initialized: mem_cgroup_iter() +* orders reading memcg->initialized against its callers +* reading the memcg members. +*/ +smp_store_release (&memcg->initialized,1 ); + +return 0 ; }/*
mm/migrate.c +4 -1
@@ -146,8 +146,11 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma, pte =pte_mkold (mk_pte (new, vma->vm_page_prot));if (pte_swp_soft_dirty (*ptep)) pte =pte_mksoft_dirty (pte); + +/* Recheck VMA as permissions can change since migration started */ if (is_write_migration_entry (entry)) - pte =pte_mkwrite (pte); + pte =maybe_mkwrite (pte, vma); +#ifdef CONFIG_HUGETLB_PAGE if (PageHuge (new)) { pte =pte_mkhuge (pte);
sound/soc/codecs/ssm2602.c +1 -1
@@ -647,7 +647,7 @@ int ssm2602_probe(struct device *dev, enum ssm2602_type type,return -ENOMEM ;dev_set_drvdata (dev, ssm2602); - ssm2602->type =SSM2602 ; + ssm2602->type = type; ssm2602->regmap = regmap; return snd_soc_register_codec(dev, &soc_codec_dev_ssm2602,
sound/soc/soc-core.c +1 -1
@@ -3181,7 +3181,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,unsigned int val, mask;void *data; -if (!component->regmap) +if (!component->regmap || !params->num_regs)return -EINVAL ; len = params->num_regs * component->val_bytes;