Переглянути джерело

Merge branch 'akpm'

* akpm:
  mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration
  readahead: fix pipeline break caused by block plug
  kprobes: fix a memory leak in function pre_handler_kretprobe()
  drivers/tty/vt/vt_ioctl.c: fix KDFONTOP 32bit compatibility layer
  lkdtm: avoid calling lkdtm_do_action() with spinlock held
  mm/filemap_xip.c: fix race condition in xip_file_fault()
  mm/memcontrol.c: fix warning with CONFIG_NUMA=n
  avr32: select generic atomic64_t support
  mm: postpone migrated page mapping reset
  xtensa: fix memscan()
  MAINTAINERS: update lguest F: patterns
  MAINTAINERS: remove staging sections
  MAINTAINERS: remove iMX5 section
  MAINTAINERS: update partitions block F: patterns
Linus Torvalds 13 роки тому
батько
коміт
82bdc843c2

+ 4 - 15
MAINTAINERS

@@ -789,12 +789,6 @@ F:	arch/arm/mach-mx*/
 F:	arch/arm/mach-imx/
 F:	arch/arm/mach-imx/
 F:	arch/arm/plat-mxc/
 F:	arch/arm/plat-mxc/
 
 
-ARM/FREESCALE IMX51
-M:	Amit Kucheria <amit.kucheria@canonical.com>
-L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-S:	Maintained
-F:	arch/arm/mach-mx5/
-
 ARM/FREESCALE IMX6
 ARM/FREESCALE IMX6
 M:	Shawn Guo <shawn.guo@linaro.org>
 M:	Shawn Guo <shawn.guo@linaro.org>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@ -3992,11 +3986,11 @@ M:	Rusty Russell <rusty@rustcorp.com.au>
 L:	lguest@lists.ozlabs.org
 L:	lguest@lists.ozlabs.org
 W:	http://lguest.ozlabs.org/
 W:	http://lguest.ozlabs.org/
 S:	Odd Fixes
 S:	Odd Fixes
-F:	Documentation/virtual/lguest/
+F:	arch/x86/include/asm/lguest*.h
 F:	arch/x86/lguest/
 F:	arch/x86/lguest/
 F:	drivers/lguest/
 F:	drivers/lguest/
 F:	include/linux/lguest*.h
 F:	include/linux/lguest*.h
-F:	arch/x86/include/asm/lguest*.h
+F:	tools/lguest/
 
 
 LINUX FOR IBM pSERIES (RS/6000)
 LINUX FOR IBM pSERIES (RS/6000)
 M:	Paul Mackerras <paulus@au.ibm.com>
 M:	Paul Mackerras <paulus@au.ibm.com>
@@ -4136,7 +4130,7 @@ L:	linux-ntfs-dev@lists.sourceforge.net
 W:	http://www.linux-ntfs.org/content/view/19/37/
 W:	http://www.linux-ntfs.org/content/view/19/37/
 S:	Maintained
 S:	Maintained
 F:	Documentation/ldm.txt
 F:	Documentation/ldm.txt
-F:	fs/partitions/ldm.*
+F:	block/partitions/ldm.*
 
 
 LogFS
 LogFS
 M:	Joern Engel <joern@logfs.org>
 M:	Joern Engel <joern@logfs.org>
@@ -5633,7 +5627,7 @@ W:	http://www.ibm.com/developerworks/linux/linux390/
 S:	Supported
 S:	Supported
 F:	arch/s390/
 F:	arch/s390/
 F:	drivers/s390/
 F:	drivers/s390/
-F:	fs/partitions/ibm.c
+F:	block/partitions/ibm.c
 F:	Documentation/s390/
 F:	Documentation/s390/
 F:	Documentation/DocBook/s390*
 F:	Documentation/DocBook/s390*
 
 
@@ -6396,11 +6390,6 @@ M:	Omar Ramirez Luna <omar.ramirez@ti.com>
 S:	Odd Fixes
 S:	Odd Fixes
 F:	drivers/staging/tidspbridge/
 F:	drivers/staging/tidspbridge/
 
 
-STAGING - TRIDENT TVMASTER TMxxxx USB VIDEO CAPTURE DRIVERS
-L:	linux-media@vger.kernel.org
-S:	Odd Fixes
-F:	drivers/staging/tm6000/
-
 STAGING - USB ENE SM/MS CARD READER DRIVER
 STAGING - USB ENE SM/MS CARD READER DRIVER
 M:	Al Cho <acho@novell.com>
 M:	Al Cho <acho@novell.com>
 S:	Odd Fixes
 S:	Odd Fixes

+ 1 - 0
arch/avr32/Kconfig

@@ -8,6 +8,7 @@ config AVR32
 	select HAVE_KPROBES
 	select HAVE_KPROBES
 	select HAVE_GENERIC_HARDIRQS
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_PROBE
+	select GENERIC_ATOMIC64
 	select HARDIRQS_SW_RESEND
 	select HARDIRQS_SW_RESEND
 	select GENERIC_IRQ_SHOW
 	select GENERIC_IRQ_SHOW
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG

+ 0 - 3
arch/xtensa/include/asm/string.h

@@ -118,7 +118,4 @@ extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
 /* Don't build bcopy at all ...  */
 /* Don't build bcopy at all ...  */
 #define __HAVE_ARCH_BCOPY
 #define __HAVE_ARCH_BCOPY
 
 
-#define __HAVE_ARCH_MEMSCAN
-#define memscan memchr
-
 #endif	/* _XTENSA_STRING_H */
 #endif	/* _XTENSA_STRING_H */

+ 5 - 1
drivers/misc/lkdtm.c

@@ -354,6 +354,7 @@ static void lkdtm_do_action(enum ctype which)
 static void lkdtm_handler(void)
 static void lkdtm_handler(void)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
+	bool do_it = false;
 
 
 	spin_lock_irqsave(&count_lock, flags);
 	spin_lock_irqsave(&count_lock, flags);
 	count--;
 	count--;
@@ -361,10 +362,13 @@ static void lkdtm_handler(void)
 			cp_name_to_str(cpoint), cp_type_to_str(cptype), count);
 			cp_name_to_str(cpoint), cp_type_to_str(cptype), count);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		lkdtm_do_action(cptype);
+		do_it = true;
 		count = cpoint_count;
 		count = cpoint_count;
 	}
 	}
 	spin_unlock_irqrestore(&count_lock, flags);
 	spin_unlock_irqrestore(&count_lock, flags);
+
+	if (do_it)
+		lkdtm_do_action(cptype);
 }
 }
 
 
 static int lkdtm_register_cpoint(enum cname which)
 static int lkdtm_register_cpoint(enum cname which)

+ 0 - 1
drivers/tty/vt/vt_ioctl.c

@@ -1463,7 +1463,6 @@ compat_kdfontop_ioctl(struct compat_console_font_op __user *fontop,
 	if (!perm && op->op != KD_FONT_OP_GET)
 	if (!perm && op->op != KD_FONT_OP_GET)
 		return -EPERM;
 		return -EPERM;
 	op->data = compat_ptr(((struct compat_console_font_op *)op)->data);
 	op->data = compat_ptr(((struct compat_console_font_op *)op)->data);
-	op->flags |= KD_FONT_FLAG_OLD;
 	i = con_font_op(vc, op);
 	i = con_font_op(vc, op);
 	if (i)
 	if (i)
 		return i;
 		return i;

+ 5 - 1
kernel/kprobes.c

@@ -1673,8 +1673,12 @@ static int __kprobes pre_handler_kretprobe(struct kprobe *p,
 		ri->rp = rp;
 		ri->rp = rp;
 		ri->task = current;
 		ri->task = current;
 
 
-		if (rp->entry_handler && rp->entry_handler(ri, regs))
+		if (rp->entry_handler && rp->entry_handler(ri, regs)) {
+			raw_spin_lock_irqsave(&rp->lock, flags);
+			hlist_add_head(&ri->hlist, &rp->free_instances);
+			raw_spin_unlock_irqrestore(&rp->lock, flags);
 			return 0;
 			return 0;
+		}
 
 
 		arch_prepare_kretprobe(ri, regs);
 		arch_prepare_kretprobe(ri, regs);
 
 

+ 13 - 0
mm/compaction.c

@@ -313,6 +313,19 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
 		} else if (!locked)
 		} else if (!locked)
 			spin_lock_irq(&zone->lru_lock);
 			spin_lock_irq(&zone->lru_lock);
 
 
+		/*
+		 * migrate_pfn does not necessarily start aligned to a
+		 * pageblock. Ensure that pfn_valid is called when moving
+		 * into a new MAX_ORDER_NR_PAGES range in case of large
+		 * memory holes within the zone
+		 */
+		if ((low_pfn & (MAX_ORDER_NR_PAGES - 1)) == 0) {
+			if (!pfn_valid(low_pfn)) {
+				low_pfn += MAX_ORDER_NR_PAGES - 1;
+				continue;
+			}
+		}
+
 		if (!pfn_valid_within(low_pfn))
 		if (!pfn_valid_within(low_pfn))
 			continue;
 			continue;
 		nr_scanned++;
 		nr_scanned++;

+ 4 - 4
mm/filemap.c

@@ -1400,15 +1400,12 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 	unsigned long seg = 0;
 	unsigned long seg = 0;
 	size_t count;
 	size_t count;
 	loff_t *ppos = &iocb->ki_pos;
 	loff_t *ppos = &iocb->ki_pos;
-	struct blk_plug plug;
 
 
 	count = 0;
 	count = 0;
 	retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
 	retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
 	if (retval)
 	if (retval)
 		return retval;
 		return retval;
 
 
-	blk_start_plug(&plug);
-
 	/* coalesce the iovecs and go direct-to-BIO for O_DIRECT */
 	/* coalesce the iovecs and go direct-to-BIO for O_DIRECT */
 	if (filp->f_flags & O_DIRECT) {
 	if (filp->f_flags & O_DIRECT) {
 		loff_t size;
 		loff_t size;
@@ -1424,8 +1421,12 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 			retval = filemap_write_and_wait_range(mapping, pos,
 			retval = filemap_write_and_wait_range(mapping, pos,
 					pos + iov_length(iov, nr_segs) - 1);
 					pos + iov_length(iov, nr_segs) - 1);
 			if (!retval) {
 			if (!retval) {
+				struct blk_plug plug;
+
+				blk_start_plug(&plug);
 				retval = mapping->a_ops->direct_IO(READ, iocb,
 				retval = mapping->a_ops->direct_IO(READ, iocb,
 							iov, pos, nr_segs);
 							iov, pos, nr_segs);
+				blk_finish_plug(&plug);
 			}
 			}
 			if (retval > 0) {
 			if (retval > 0) {
 				*ppos = pos + retval;
 				*ppos = pos + retval;
@@ -1481,7 +1482,6 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
 			break;
 			break;
 	}
 	}
 out:
 out:
-	blk_finish_plug(&plug);
 	return retval;
 	return retval;
 }
 }
 EXPORT_SYMBOL(generic_file_aio_read);
 EXPORT_SYMBOL(generic_file_aio_read);

+ 6 - 1
mm/filemap_xip.c

@@ -263,7 +263,12 @@ found:
 							xip_pfn);
 							xip_pfn);
 		if (err == -ENOMEM)
 		if (err == -ENOMEM)
 			return VM_FAULT_OOM;
 			return VM_FAULT_OOM;
-		BUG_ON(err);
+		/*
+		 * err == -EBUSY is fine, we've raced against another thread
+		 * that faulted-in the same page
+		 */
+		if (err != -EBUSY)
+			BUG_ON(err);
 		return VM_FAULT_NOPAGE;
 		return VM_FAULT_NOPAGE;
 	} else {
 	} else {
 		int err, ret = VM_FAULT_OOM;
 		int err, ret = VM_FAULT_OOM;

+ 2 - 1
mm/memcontrol.c

@@ -776,7 +776,8 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
 	/* threshold event is triggered in finer grain than soft limit */
 	/* threshold event is triggered in finer grain than soft limit */
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 	if (unlikely(mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_THRESH))) {
 						MEM_CGROUP_TARGET_THRESH))) {
-		bool do_softlimit, do_numainfo;
+		bool do_softlimit;
+		bool do_numainfo __maybe_unused;
 
 
 		do_softlimit = mem_cgroup_event_ratelimit(memcg,
 		do_softlimit = mem_cgroup_event_ratelimit(memcg,
 						MEM_CGROUP_TARGET_SOFTLIMIT);
 						MEM_CGROUP_TARGET_SOFTLIMIT);

+ 1 - 1
mm/migrate.c

@@ -445,7 +445,6 @@ void migrate_page_copy(struct page *newpage, struct page *page)
 	ClearPageSwapCache(page);
 	ClearPageSwapCache(page);
 	ClearPagePrivate(page);
 	ClearPagePrivate(page);
 	set_page_private(page, 0);
 	set_page_private(page, 0);
-	page->mapping = NULL;
 
 
 	/*
 	/*
 	 * If any waiters have accumulated on the new page then
 	 * If any waiters have accumulated on the new page then
@@ -667,6 +666,7 @@ static int move_to_new_page(struct page *newpage, struct page *page,
 	} else {
 	} else {
 		if (remap_swapcache)
 		if (remap_swapcache)
 			remove_migration_ptes(page, newpage);
 			remove_migration_ptes(page, newpage);
+		page->mapping = NULL;
 	}
 	}
 
 
 	unlock_page(newpage);
 	unlock_page(newpage);