Skip to contentSkip to conversation

Linux 2.6.20.16

DISCUSSION Willy Tarreau 4 participants 6 messages Aug 16, 2007

Subsystems (14)
lore
Share & tools
lore
#0 lore raw

I've just released Linux 2.6.20.16. This version catches up with 2.6.21.7. I hope to issue newer releases soon with next batches of pending patches.

I'll also be replying to this message with a copy of the patch between 2.6.20.15 and 2.6.20.16.

The patch and changelog will appear soon at the following locations:
ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/ ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/patch-2.6.20.16.bz2 ftp://ftp.all.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.20.16

Git repository:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git
http://www.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.20.y.git

Git repository through the gitweb interface:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.20.y.git

Willy

-------

 Makefile                                      |    2 
 arch/i386/kernel/entry.S                      |    8 -
 arch/i386/oprofile/nmi_int.c                  |    9 +
 arch/powerpc/kernel/signal_64.c               |   10 -
 arch/x86_64/mm/init.c                         |    8 +
 drivers/char/cyclades.c                       |    1 
 drivers/md/bitmap.c                           |   17 +-
 drivers/md/dm-crypt.c                         |   50 ++----
 drivers/md/raid0.c                            |    3 
 drivers/md/raid1.c                            |   21 +-
 drivers/md/raid10.c                           |    6 
 drivers/media/video/saa7134/saa7134-tvaudio.c |    2 
 drivers/net/e1000/e1000_main.c                |   11 -
 drivers/net/sky2.c                            |    9 +
 drivers/serial/mpsc.c                         |    3 
 include/linux/bootmem.h                       |    1 
 include/linux/pci_ids.h                       |    4 
 include/linux/raid/bitmap.h                   |    1 
 include/linux/sched.h                         |    1 
 include/linux/workqueue.h                     |    2 
 kernel/auditfilter.c                          |    2 
 kernel/exit.c                                 |   22 ++
 kernel/futex.c                                |  205 ++++++++++++++++----------
 kernel/rtmutex.c                              |   24 ++-
 kernel/sched.c                                |   22 +-
 mm/rmap.c                                     |   24 ---
 mm/sparse.c                                   |   11 +
 27 files changed, 307 insertions(+), 172 deletions(-)

Summary of changes from 2.6.20.15 to 2.6.20.16
============================================

Alexey Kuznetsov (1):
pi-futex: Fix exit races and locking problems

Andi Kleen (1):
i386: Fix K8/core2 oprofile on multiple CPUs

Auke Kok (1):
e1000: disable polling before registering netdevice

Bob Picco (1):
sparsemem: fix oops in x86_64 show_mem

Christoph Lameter (1):
sched: fix next_interval determination in idle_balance()

Hugh Dickins (1):
mm: kill validate_anon_vma to avoid mapcount BUG

Jason Gaston (1):
pci_ids: update patch for Intel ICH9M

Jason Wessel (1):
i386: fix infinite loop with singlestep int80 syscalls

Jay Lubomirski (1):
serial: clear proper MPSC interrupt cause bits

Jeff Mahoney (1):
saa7134: fix thread shutdown handling

Jiri Slaby (1):
Char: cyclades, fix deadlock

Mike Accetta (1):
md: Fix bug in error handling during raid1 repair.

Milan Broz (1):
dm crypt: disable barriers

NeilBrown (3):
md: Avoid overflow in raid0 calculation with large components.
md: Don't write more than is required of the last page of a bitmap
md: Fix two raid10 bugs.

Olaf Kirch (3):
dm crypt: fix call to clone_init
dm crypt: fix avoid cloned bio ref after free dm crypt: fix remove first_clone

Oleg Nesterov (1):
make freezeable workqueues singlethread

Paul Mackerras (1):
POWERPC: Fix subtle FP state corruption bug in signal return on SMP

Stephen Hemminger (1):
sky2: workaround for lost IRQ

Thomas Gleixner (3):
rt-mutex: Fix stale return value
rt-mutex: Fix chain walk early wakeup bug
FUTEX: Restore the dropped ERSCH fix

Tony Jones (1):
audit: fix oops removing watch if audit disabled

Willy Tarreau (1):

      Linux 2.6.20.16

Zou Nan hai (1):
x86_64: allocate sparsemem memmap above 4G

#1 lore raw
Makefile +1 -1
index 947ff3c..b3806cb 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 20
-EXTRAVERSION = .15
+EXTRAVERSION = .16
 NAME = Homicidal Dwarf Hamster
 
 # *DOCUMENTATION*
arch/i386/kernel/entry.S +4 -4
index 5e47683..9bf056e 100644
@@ -367,10 +367,6 @@ ENTRY(system_call)
 	CFI_ADJUST_CFA_OFFSET 4
 	SAVE_ALL
 	GET_THREAD_INFO(%ebp)
-	testl $TF_MASK,PT_EFLAGS(%esp)
-	jz no_singlestep
-	orl $_TIF_SINGLESTEP,TI_flags(%ebp)
-no_singlestep:
 					# system call tracing in operation / emulation
 	/* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
 	testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
@@ -385,6 +381,10 @@ syscall_exit:
 					# setting need_resched or sigpending
 					# between sampling and the iret
 	TRACE_IRQS_OFF
+	testl $TF_MASK,PT_EFLAGS(%esp)	# If tracing set singlestep flag on exit
+	jz no_singlestep
+	orl $_TIF_SINGLESTEP,TI_flags(%ebp)
+no_singlestep:
 	movl TI_flags(%ebp), %ecx
 	testw $_TIF_ALLWORK_MASK, %cx	# current->work
 	jne syscall_exit_work
arch/i386/oprofile/nmi_int.c +8 -1
index 3700eef..be4a9a8 100644
@@ -131,7 +131,6 @@ static void nmi_save_registers(void * dummy)
 {
 	int cpu = smp_processor_id();
 	struct op_msrs * msrs = &cpu_msrs[cpu];
-	model->fill_in_addresses(msrs);
 	nmi_cpu_save_registers(msrs);
 }
 
@@ -195,6 +194,7 @@ static struct notifier_block profile_exceptions_nb = {
 static int nmi_setup(void)
 {
 	int err=0;
+	int cpu;
 
 	if (!allocate_msrs())
 		return -ENOMEM;
@@ -207,6 +207,13 @@ static int nmi_setup(void)
 	/* We need to serialize save and setup for HT because the subset
 	 * of msrs are distinct for save and setup operations
 	 */
+
+	/* Assume saved/restored counters are the same on all CPUs */
+	model->fill_in_addresses(&cpu_msrs[0]);
+	for_each_possible_cpu (cpu) {
+		if (cpu != 0)
+			cpu_msrs[cpu] = cpu_msrs[0];
+	}
 	on_each_cpu(nmi_save_registers, NULL, 0, 1);
 	on_each_cpu(nmi_cpu_setup, NULL, 0, 1);
 	nmi_enabled = 1;
arch/powerpc/kernel/signal_64.c +7 -3
index f72e8e8..a84304e 100644
@@ -177,6 +177,13 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
 	 */
 	discard_lazy_cpu_state();
 
+	/*
+	 * Force reload of FP/VEC.
+	 * This has to be done before copying stuff into current->thread.fpr/vr
+	 * for the reasons explained in the previous comment.
+	 */
+	regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
+
 	err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
 
 #ifdef CONFIG_ALTIVEC
@@ -198,9 +205,6 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
 		current->thread.vrsave = 0;
 #endif /* CONFIG_ALTIVEC */
 
-	/* Force reload of FP/VEC */
-	regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
-
 	return err;
 }
 
arch/x86_64/mm/init.c +8 -0
index 2968b90..e67cc4f 100644
@@ -72,6 +72,8 @@ void show_mem(void)
 
 	for_each_online_pgdat(pgdat) {
                for (i = 0; i < pgdat->node_spanned_pages; ++i) {
+			if (!pfn_valid(pgdat->node_start_pfn + i))
+				continue;
 			page = pfn_to_page(pgdat->node_start_pfn + i);
 			total++;
 			if (PageReserved(page))
@@ -766,3 +768,9 @@ int in_gate_area_no_task(unsigned long addr)
 {
 	return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
 }
+
+void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
+{
+	return __alloc_bootmem_core(pgdat->bdata, size,
+			SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
+}
drivers/char/cyclades.c +1 -0
index 3ffa080..e4e0ccb 100644
@@ -1102,6 +1102,7 @@ static void cyy_intr_chip(struct cyclades_card *cinfo, int chip,
 
 				if (data & info->ignore_status_mask) {
 					info->icount.rx++;
+					spin_unlock(&cinfo->card_lock);
 					return;
 				}
 				if (tty_buffer_request_room(tty, 1)) {
drivers/md/bitmap.c +12 -5
index cef1287..550ac72 100644
@@ -255,19 +255,25 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
 
 }
 
-static int write_sb_page(mddev_t *mddev, long offset, struct page *page, int wait)
+static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
 {
 	mdk_rdev_t *rdev;
 	struct list_head *tmp;
+	mddev_t *mddev = bitmap->mddev;
 
 	ITERATE_RDEV(mddev, rdev, tmp)
 		if (test_bit(In_sync, &rdev->flags)
-		    && !test_bit(Faulty, &rdev->flags))
+		    && !test_bit(Faulty, &rdev->flags)) {
+			int size = PAGE_SIZE;
+			if (page->index == bitmap->file_pages-1)
+				size = roundup(bitmap->last_page_size,
+					       bdev_hardsect_size(rdev->bdev));
 			md_super_write(mddev, rdev,
-				       (rdev->sb_offset<<1) + offset
+				       (rdev->sb_offset<<1) + bitmap->offset
 				       + page->index * (PAGE_SIZE/512),
-				       PAGE_SIZE,
+				       size,
 				       page);
+		}
 
 	if (wait)
 		md_super_wait(mddev);
@@ -282,7 +288,7 @@ static int write_page(struct bitmap *bitmap, struct page *page, int wait)
 	struct buffer_head *bh;
 
 	if (bitmap->file == NULL)
-		return write_sb_page(bitmap->mddev, bitmap->offset, page, wait);
+		return write_sb_page(bitmap, page, wait);
 
 	bh = page_buffers(page);
 
@@ -923,6 +929,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
 			}
 
 			bitmap->filemap[bitmap->file_pages++] = page;
+			bitmap->last_page_size = count;
 		}
 		paddr = kmap_atomic(page, KM_USER0);
 		if (bitmap->flags & BITMAP_HOSTENDIAN)
drivers/md/dm-crypt.c +18 -32

127 lines not on this page · raw message

drivers/md/raid0.c +1 -2
index dfe3214..2c404f7 100644
@@ -415,7 +415,7 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
 	raid0_conf_t *conf = mddev_to_conf(mddev);
 	struct strip_zone *zone;
 	mdk_rdev_t *tmp_dev;
-	unsigned long chunk;
+	sector_t chunk;
 	sector_t block, rsect;
 	const int rw = bio_data_dir(bio);
 
@@ -470,7 +470,6 @@ static int raid0_make_request (request_queue_t *q, struct bio *bio)
 
 		sector_div(x, zone->nb_dev);
 		chunk = x;
-		BUG_ON(x != (sector_t)chunk);
 
 		x = block >> chunksize_bits;
 		tmp_dev = zone->dev[sector_div(x, zone->nb_dev)];
drivers/md/raid1.c +14 -7
index 97ee870..b20c6e9 100644
@@ -1235,17 +1235,24 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
 			}
 		r1_bio->read_disk = primary;
 		for (i=0; i<mddev->raid_disks; i++)
-			if (r1_bio->bios[i]->bi_end_io == end_sync_read &&
-			    test_bit(BIO_UPTODATE, &r1_bio->bios[i]->bi_flags)) {
+			if (r1_bio->bios[i]->bi_end_io == end_sync_read) {
 				int j;
 				int vcnt = r1_bio->sectors >> (PAGE_SHIFT- 9);
 				struct bio *pbio = r1_bio->bios[primary];
 				struct bio *sbio = r1_bio->bios[i];
-				for (j = vcnt; j-- ; )
-					if (memcmp(page_address(pbio->bi_io_vec[j].bv_page),
-						   page_address(sbio->bi_io_vec[j].bv_page),
-						   PAGE_SIZE))
-						break;
+
+				if (test_bit(BIO_UPTODATE, &sbio->bi_flags)) {
+					for (j = vcnt; j-- ; ) {
+						struct page *p, *s;
+						p = pbio->bi_io_vec[j].bv_page;
+						s = sbio->bi_io_vec[j].bv_page;
+						if (memcmp(page_address(p),
+							   page_address(s),
+							   PAGE_SIZE))
+							break;
+					}
+				} else
+					j = 0;
 				if (j >= 0)
 					mddev->resync_mismatches += r1_bio->sectors;
 				if (j < 0 || test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) {
drivers/md/raid10.c +6 -0
index 82249a6..9eb66c1 100644
@@ -1867,6 +1867,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
 			int d = r10_bio->devs[i].devnum;
 			bio = r10_bio->devs[i].bio;
 			bio->bi_end_io = NULL;
+			clear_bit(BIO_UPTODATE, &bio->bi_flags);
 			if (conf->mirrors[d].rdev == NULL ||
 			    test_bit(Faulty, &conf->mirrors[d].rdev->flags))
 				continue;
@@ -2037,6 +2038,11 @@ static int run(mddev_t *mddev)
 	/* 'size' is now the number of chunks in the array */
 	/* calculate "used chunks per device" in 'stride' */
 	stride = size * conf->copies;
+
+	/* We need to round up when dividing by raid_disks to
+	 * get the stride size.
+	 */
+	stride += conf->raid_disks - 1;
 	sector_div(stride, conf->raid_disks);
 	mddev->size = stride  << (conf->chunk_shift-1);
 
drivers/media/video/saa7134/saa7134-tvaudio.c +1 -1
index dd759d6..36b3fa3 100644
@@ -1006,7 +1006,7 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev)
 int saa7134_tvaudio_fini(struct saa7134_dev *dev)
 {
 	/* shutdown tvaudio thread */
-	if (dev->thread.pid >= 0) {
+	if (dev->thread.pid > 0) {
 		dev->thread.shutdown = 1;
 		wake_up_interruptible(&dev->thread.wq);
 		wait_for_completion(&dev->thread.exit);
drivers/net/e1000/e1000_main.c +7 -4
index c6259c7..40bdcf9 100644
@@ -1157,13 +1157,16 @@ e1000_probe(struct pci_dev *pdev,
 	    !e1000_check_mng_mode(&adapter->hw))
 		e1000_get_hw_control(adapter);
 
-	strcpy(netdev->name, "eth%d");
-	if ((err = register_netdev(netdev)))
-		goto err_register;
-
 	/* tell the stack to leave us alone until e1000_open() is called */
 	netif_carrier_off(netdev);
 	netif_stop_queue(netdev);
+#ifdef CONFIG_E1000_NAPI
+	netif_poll_disable(netdev);
+#endif
+
+	strcpy(netdev->name, "eth%d");
+	if ((err = register_netdev(netdev)))
+		goto err_register;
 
 	DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n");
 
drivers/net/sky2.c +8 -1
index 38e75cf..aec8c59 100644
@@ -95,7 +95,7 @@ static int disable_msi = 0;
 module_param(disable_msi, int, 0);
 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
 
-static int idle_timeout = 0;
+static int idle_timeout = 100;
 module_param(idle_timeout, int, 0);
 MODULE_PARM_DESC(idle_timeout, "Watchdog timer for lost interrupts (ms)");
 
@@ -2341,6 +2341,13 @@ static int sky2_poll(struct net_device *dev0, int *budget)
 
 	work_done = sky2_status_intr(hw, work_limit);
 	if (work_done < work_limit) {
+		/* Bug/Errata workaround?
+		 * Need to kick the TX irq moderation timer.
+		 */
+		if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
+			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
+			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
+		}
 		netif_rx_complete(dev0);
 
 		sky2_read32(hw, B0_Y2_SP_LISR);
drivers/serial/mpsc.c +2 -1
index 3d2fcc5..64ed5ef 100644
@@ -502,7 +502,8 @@ mpsc_sdma_intr_ack(struct mpsc_port_info *pi)
 
 	if (pi->mirror_regs)
 		pi->shared_regs->SDMA_INTR_CAUSE_m = 0;
-	writel(0, pi->shared_regs->sdma_intr_base + SDMA_INTR_CAUSE);
+	writeb(0x00, pi->shared_regs->sdma_intr_base + SDMA_INTR_CAUSE +
+	       pi->port.line);
 	return;
 }
 
include/linux/bootmem.h +1 -0
index 2275f27..8f820e4 100644
@@ -59,6 +59,7 @@ extern void *__alloc_bootmem_core(struct bootmem_data *bdata,
 				  unsigned long align,
 				  unsigned long goal,
 				  unsigned long limit);
+extern void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size);
 
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 extern void reserve_bootmem(unsigned long addr, unsigned long size);
include/linux/pci_ids.h +2 -2
index d37f46a..f768e10 100644
@@ -2235,11 +2235,11 @@
 #define PCI_DEVICE_ID_INTEL_ICH8_5	0x283e
 #define PCI_DEVICE_ID_INTEL_ICH8_6	0x2850
 #define PCI_DEVICE_ID_INTEL_ICH9_0	0x2910
-#define PCI_DEVICE_ID_INTEL_ICH9_1	0x2911
+#define PCI_DEVICE_ID_INTEL_ICH9_1	0x2917
 #define PCI_DEVICE_ID_INTEL_ICH9_2	0x2912
 #define PCI_DEVICE_ID_INTEL_ICH9_3	0x2913
 #define PCI_DEVICE_ID_INTEL_ICH9_4	0x2914
-#define PCI_DEVICE_ID_INTEL_ICH9_5	0x2915
+#define PCI_DEVICE_ID_INTEL_ICH9_5	0x2919
 #define PCI_DEVICE_ID_INTEL_ICH9_6	0x2930
 #define PCI_DEVICE_ID_INTEL_82855PM_HB	0x3340
 #define PCI_DEVICE_ID_INTEL_82830_HB	0x3575
include/linux/raid/bitmap.h +1 -0
index 6db9a4c..dd5a05d 100644
@@ -232,6 +232,7 @@ struct bitmap {
 	struct page **filemap; /* list of cache pages for the file */
 	unsigned long *filemap_attr; /* attributes associated w/ filemap pages */
 	unsigned long file_pages; /* number of pages in the file */
+	int last_page_size; /* bytes in the last page */
 
 	unsigned long flags;
 
include/linux/sched.h +1 -0
index 4463735..7a0cc67 100644
@@ -1137,6 +1137,7 @@ static inline void put_task_struct(struct task_struct *t)
 					/* Not implemented yet, only for 486*/
 #define PF_STARTING	0x00000002	/* being created */
 #define PF_EXITING	0x00000004	/* getting shut down */
+#define PF_EXITPIDONE	0x00000008	/* pi exit done on shut down */
 #define PF_FORKNOEXEC	0x00000040	/* forked but didn't exec */
 #define PF_SUPERPRIV	0x00000100	/* used super-user privileges */
 #define PF_DUMPCORE	0x00000200	/* dumped core */
include/linux/workqueue.h +1 -1
index 2a7b38d..1a76bda 100644
@@ -162,7 +162,7 @@ extern struct workqueue_struct *__create_workqueue(const char *name,
 						    int singlethread,
 						    int freezeable);
 #define create_workqueue(name) __create_workqueue((name), 0, 0)
-#define create_freezeable_workqueue(name) __create_workqueue((name), 0, 1)
+#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1)
 #define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0)
 
 extern void destroy_workqueue(struct workqueue_struct *wq);
kernel/auditfilter.c +1 -1
index 9c8c232..5a75657 100644
@@ -905,7 +905,7 @@ static void audit_update_watch(struct audit_parent *parent,
 
 		/* If the update involves invalidating rules, do the inode-based
 		 * filtering now, so we don't omit records. */
-		if (invalidating &&
+		if (invalidating && current->audit_context &&
 		    audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT)
 			audit_set_auditable(current->audit_context);
 
kernel/exit.c +22 -0
index fec12eb..d306845 100644
@@ -883,13 +883,29 @@ fastcall NORET_TYPE void do_exit(long code)
 	if (unlikely(tsk->flags & PF_EXITING)) {
 		printk(KERN_ALERT
 			"Fixing recursive fault but reboot is needed!\n");
+		/*
+		 * We can do this unlocked here. The futex code uses
+		 * this flag just to verify whether the pi state
+		 * cleanup has been done or not. In the worst case it
+		 * loops once more. We pretend that the cleanup was
+		 * done as there is no way to return. Either the
+		 * OWNER_DIED bit is set by now or we push the blocked
+		 * task into the wait for ever nirwana as well.
+		 */
+		tsk->flags |= PF_EXITPIDONE;
 		if (tsk->io_context)
 			exit_io_context();
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule();
 	}
 
+	/*
+	 * tsk->flags are checked in the futex code to protect against
+	 * an exiting task cleaning up the robust pi futexes.
+	 */
+	spin_lock_irq(&tsk->pi_lock);
 	tsk->flags |= PF_EXITING;
+	spin_unlock_irq(&tsk->pi_lock);
 
 	if (unlikely(in_atomic()))
 		printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
@@ -956,6 +972,12 @@ fastcall NORET_TYPE void do_exit(long code)
 	 * Make sure we are holding no locks:
 	 */
 	debug_check_no_locks_held(tsk);
+	/*
+	 * We can do this unlocked here. The futex code uses this flag
+	 * just to verify whether the pi state cleanup has been done
+	 * or not. In the worst case it loops once more.
+	 */
+	tsk->flags |= PF_EXITPIDONE;
 
 	if (tsk->io_context)
 		exit_io_context();
kernel/futex.c +133 -72

321 lines not on this page · raw message

kernel/rtmutex.c +22 -2
index 4ab17da..dd5feae 100644
@@ -212,6 +212,19 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
 	if (!waiter || !waiter->task)
 		goto out_unlock_pi;
 
+	/*
+	 * Check the orig_waiter state. After we dropped the locks,
+	 * the previous owner of the lock might have released the lock
+	 * and made us the pending owner:
+	 */
+	if (orig_waiter && !orig_waiter->task)
+		goto out_unlock_pi;
+
+	/*
+	 * Drop out, when the task has no waiters. Note,
+	 * top_waiter can be NULL, when we are in the deboosting
+	 * mode!
+	 */
 	if (top_waiter && (!task_has_pi_waiters(task) ||
 			   top_waiter != task_top_pi_waiter(task)))
 		goto out_unlock_pi;
@@ -659,9 +672,16 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
 			 * all over without going into schedule to try
 			 * to get the lock now:
 			 */
-			if (unlikely(!waiter.task))
+			if (unlikely(!waiter.task)) {
+				/*
+				 * Reset the return value. We might
+				 * have returned with -EDEADLK and the
+				 * owner released the lock while we
+				 * were walking the pi chain.
+				 */
+				ret = 0;
 				continue;
-
+			}
 			if (unlikely(ret))
 				break;
 		}
kernel/sched.c +13 -9
index 62db30c..907ab05 100644
@@ -2814,17 +2814,21 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
 	unsigned long next_balance = jiffies + 60 *  HZ;
 
 	for_each_domain(this_cpu, sd) {
-		if (sd->flags & SD_BALANCE_NEWIDLE) {
+		unsigned long interval;
+
+		if (!(sd->flags & SD_LOAD_BALANCE))
+			continue;
+
+		if (sd->flags & SD_BALANCE_NEWIDLE)
 			/* If we've pulled tasks over stop searching: */
 			pulled_task = load_balance_newidle(this_cpu,
-							this_rq, sd);
-			if (time_after(next_balance,
-				  sd->last_balance + sd->balance_interval))
-				next_balance = sd->last_balance
-						+ sd->balance_interval;
-			if (pulled_task)
-				break;
-		}
+								this_rq, sd);
+
+		interval = msecs_to_jiffies(sd->balance_interval);
+		if (time_after(next_balance, sd->last_balance + interval))
+			next_balance = sd->last_balance + interval;
+		if (pulled_task)
+			break;
 	}
 	if (!pulled_task)
 		/*
mm/rmap.c +1 -23
index 7ce69c1..c30781c 100644
@@ -53,24 +53,6 @@
 
 struct kmem_cache *anon_vma_cachep;
 
-static inline void validate_anon_vma(struct vm_area_struct *find_vma)
-{
-#ifdef CONFIG_DEBUG_VM
-	struct anon_vma *anon_vma = find_vma->anon_vma;
-	struct vm_area_struct *vma;
-	unsigned int mapcount = 0;
-	int found = 0;
-
-	list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
-		mapcount++;
-		BUG_ON(mapcount > 100000);
-		if (vma == find_vma)
-			found = 1;
-	}
-	BUG_ON(!found);
-#endif
-}
-
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)
 {
@@ -121,10 +103,8 @@ void __anon_vma_link(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
 
-	if (anon_vma) {
+	if (anon_vma)
 		list_add_tail(&vma->anon_vma_node, &anon_vma->head);
-		validate_anon_vma(vma);
-	}
 }
 
 void anon_vma_link(struct vm_area_struct *vma)
@@ -134,7 +114,6 @@ void anon_vma_link(struct vm_area_struct *vma)
 	if (anon_vma) {
 		spin_lock(&anon_vma->lock);
 		list_add_tail(&vma->anon_vma_node, &anon_vma->head);
-		validate_anon_vma(vma);
 		spin_unlock(&anon_vma->lock);
 	}
 }
@@ -148,7 +127,6 @@ void anon_vma_unlink(struct vm_area_struct *vma)
 		return;
 
 	spin_lock(&anon_vma->lock);
-	validate_anon_vma(vma);
 	list_del(&vma->anon_vma_node);
 
 	/* We must garbage collect the anon_vma if it's empty */
mm/sparse.c +11 -0
index ac26eb0..faa08e2 100644
@@ -209,6 +209,12 @@ static int sparse_init_one_section(struct mem_section *ms,
 	return 1;
 }
 
+__attribute__((weak))
+void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
+{
+	return NULL;
+}
+
 static struct page *sparse_early_mem_map_alloc(unsigned long pnum)
 {
 	struct page *map;
@@ -219,6 +225,11 @@ static struct page *sparse_early_mem_map_alloc(unsigned long pnum)
 	if (map)
 		return map;
 
+  	map = alloc_bootmem_high_node(NODE_DATA(nid),
+                       sizeof(struct page) * PAGES_PER_SECTION);
+	if (map)
+		return map;
+
 	map = alloc_bootmem_node(NODE_DATA(nid),
 			sizeof(struct page) * PAGES_PER_SECTION);
 	if (map)
#2 lore raw

no announce mails for "older" stable-releases on linux-kernel-announce (Was: Re: Linux 2.6.20.16)

In reply to Willy Tarreau
Quoted 6 lines · Willy Tarreau

I've just released Linux 2.6.20.16. This version catches up with 2.6.21.7. I hope to issue newer releases soon with next batches of pending patches.

I'll also be replying to this message with a copy of the patch between 2.6.20.15 and 2.6.20.16.
[...]

Just wondering -- Kernels like this (or 2.6.16.x, 2.6.21.x as well as 2.6.22.x once 2.6.23 got released) don't get announced on linux-kernel-announce. Is that on purpose or a misbehavior of scripts that create the messages for linux-kernel-announce?

If the latter: are those scripts available somewhere?

CU
thl

#3 lore raw

Re: no announce mails for "older" stable-releases on linux-kernel-announce (Was: Re: Linux 2.6.20.16)

Quoted 4 lines · Thorsten Leemhuis
Quoted 3 lines · Willy Tarreau

I've just released Linux 2.6.20.16. This version catches up with 2.6.21.7. I hope to issue newer releases soon with next batches of pending patches.

Quoted 8 lines
Quoted 3 lines

I'll also be replying to this message with a copy of the patch between 2.6.20.15 and 2.6.20.16.
[...]

Just wondering -- Kernels like this (or 2.6.16.x, 2.6.21.x as well as 2.6.22.x once 2.6.23 got released) don't get announced on linux-kernel-announce. Is that on purpose or a misbehavior of scripts that create the messages for linux-kernel-announce?

even simpler : I've never been aware of linux-kernel-announce. It's possible that only Linus sends there and that even the -stable team does not use/know about it either.

Quoted 1 line

If the latter: are those scripts available somewhere?

we all have somewhat different scripts. Those scripts do 80% of the work depending on our environments, mostly in order to avoid common mistakes, and we do the remaining 20% by hand. Anyway I think it's not difficult for any of us to add a new address.

(CCing -stable and Adrian in case they miss your mail)

Regards,
willy

#4 lore raw

Re: no announce mails for "older" stable-releases on linux-kernel-announce (Was: Re: Linux 2.6.20.16)

Quoted 8 lines · Willy Tarreau
Quoted 7 lines · Thorsten Leemhuis
Quoted 6 lines · Willy Tarreau

I've just released Linux 2.6.20.16. This version catches up with 2.6.21.7. I hope to issue newer releases soon with next batches of pending patches.

I'll also be replying to this message with a copy of the patch between 2.6.20.15 and 2.6.20.16.
[...]

Quoted 7 lines
Quoted 4 lines

Just wondering -- Kernels like this (or 2.6.16.x, 2.6.21.x as well as 2.6.22.x once 2.6.23 got released) don't get announced on linux-kernel-announce. Is that on purpose or a misbehavior of scripts that create the messages for linux-kernel-announce?

even simpler : I've never been aware of linux-kernel-announce. It's possible that only Linus sends there and that even the -stable team does not use/know about it either.

Mails for the current stable-releases get out there -- e.g. I received a "Linux kernel 2.6.22.3 released" not that long ago (that particular one was broken, but that's another story mentioned somewhere else on LKML already).

If just seems that 2.6.21.x (or 2.6.20.x or 2.6.16.x) don't get mentioned on the list because some script likely does a check like this:

if 2.6.22.3 > 2.6.20.16;
then
# don't send mail
exit
fi

Quoted 2 lines
Quoted 1 line
Quoted 1 line

If the latter: are those scripts available somewhere?

we all have somewhat different scripts. [...]

I tend to think it's a script that runs on a server site somewhere to generates those mails, as they contain the text:

This is an automatically generated message. To unsubscribe from this list, please send a message to [email protected] containing the line: [...]

But maybe I'm wrong with that assumption...

CU
thl

#5 lore raw

Re: [stable] no announce mails for "older" stable-releases on linux-kernel-announce (Was: Re: Linux 2.6.20.16)

Quoted 31 lines · Thorsten Leemhuis
Quoted 8 lines · Willy Tarreau
Quoted 7 lines · Thorsten Leemhuis
Quoted 6 lines · Willy Tarreau

I've just released Linux 2.6.20.16. This version catches up with 2.6.21.7. I hope to issue newer releases soon with next batches of pending patches.

I'll also be replying to this message with a copy of the patch between 2.6.20.15 and 2.6.20.16.
[...]

Quoted 7 lines
Quoted 4 lines

Just wondering -- Kernels like this (or 2.6.16.x, 2.6.21.x as well as 2.6.22.x once 2.6.23 got released) don't get announced on linux-kernel-announce. Is that on purpose or a misbehavior of scripts that create the messages for linux-kernel-announce?

even simpler : I've never been aware of linux-kernel-announce. It's possible that only Linus sends there and that even the -stable team does not use/know about it either.

Mails for the current stable-releases get out there -- e.g. I received a "Linux kernel 2.6.22.3 released" not that long ago (that particular one was broken, but that's another story mentioned somewhere else on LKML already).

If just seems that 2.6.21.x (or 2.6.20.x or 2.6.16.x) don't get mentioned on the list because some script likely does a check like this:

if 2.6.22.3 > 2.6.20.16;
then
# don't send mail
exit
fi

Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

If the latter: are those scripts available somewhere?

we all have somewhat different scripts. [...]

I tend to think it's a script that runs on a server site somewhere to generates those mails, as they contain the text:

Yes, it's something on kernel.org, I don't do anything to generate a message to be sent on the -announce mailing list.

Perhaps you need to ask the kernel.org maintainers about this.

thanks,

greg k-h