Patches contributed by Eötvös Lorand University


commit a5ebc0b1a7843508b375f7ab8a36a628e5c9f372
Merge: 5ba1ae92b679 8e0ee43bc2c3
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Mar 26 15:45:22 2009 +0100

    Merge commit 'v2.6.29' into timers/core

commit 66fef08f7d5267b2312c4b48a6d2957d2d414105
Merge: b6d9842258d1 b7bb4c9bb019
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Mar 26 15:25:24 2009 +0100

    Merge branch 'sched/balancing' into sched/core

commit b6d9842258d1ba27fb978cded74eb4b6aa15edc8
Merge: 67aa0f767af4 8e0ee43bc2c3
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Mar 25 10:26:51 2009 +0100

    Merge branch 'sched/cleanups'; commit 'v2.6.29' into sched/core

commit 5c8cd82ed7e4af45a1fff81e6762c1d078c03d93
Merge: 29219683c46c ba639039d68c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Mar 24 15:20:51 2009 +0100

    Merge branch 'x86/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tiptop into x86/cleanups

commit 29219683c46cb89edf5c58418b5305b14646d030
Merge: 04c93ce4991f 1cc185211a9c 45c7b28f3c7e 9cdec049389c c8608d6b5898 14fc9fbc700d 8e0ee43bc2c3
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Mar 24 15:19:45 2009 +0100

    Merge branches 'x86/apic', 'x86/cleanups', 'x86/mm', 'x86/pat', 'x86/setup' and 'x86/signal'; commit 'v2.6.29' into x86/core

diff --cc arch/x86/kernel/apic/io_apic.c
index d882c03604ee,ea97e5efa907,42cdc78427a2,42cdc78427a2,42cdc78427a2,42cdc78427a2,bc7ac4da90d7..86827d85488a
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@@@@@@@ -3464,8 -3464,8 -3464,8 -3464,8 -3464,8 -3464,8 -3504,11 +3464,8 @@@@@@@@ int arch_setup_msi_irqs(struct pci_dev 
       	int ret, sub_handle;
       	struct msi_desc *msidesc;
       	unsigned int irq_want;
      -
      -#ifdef CONFIG_INTR_REMAP
- -----	struct intel_iommu *iommu = 0;
+ +++++	struct intel_iommu *iommu = NULL;
       	int index = 0;
      -#endif
       
       	irq_want = nr_irqs_gsi;
       	sub_handle = 0;

commit 34053979fb1d923217685cf166349f1899980581
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat Feb 21 11:16:36 2009 +0100

    block: cleanup bio_alloc_bioset()
    
    this warning (which got fixed by commit b2bf968):
    
      fs/bio.c: In function ‘bio_alloc_bioset’:
      fs/bio.c:305: warning: ‘p’ may be used uninitialized in this function
    
    Triggered because the code flow in bio_alloc_bioset() is correct
    but a bit complex for the compiler to see through.
    
    Streamline it a bit - this also makes the code a tiny bit more compact:
    
       text    data     bss     dec     hex filename
       7540     256      40    7836    1e9c bio.o.before
       7539     256      40    7835    1e9b bio.o.after
    
    Also remove an older compiler-warnings annotation from this function,
    it's not needed.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

diff --git a/fs/bio.c b/fs/bio.c
index d4f06327c810..cef6258b8943 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -301,48 +301,51 @@ void bio_init(struct bio *bio)
  **/
 struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
 {
+	struct bio_vec *bvl = NULL;
 	struct bio *bio = NULL;
-	void *uninitialized_var(p);
+	unsigned long idx = 0;
+	void *p = NULL;
 
 	if (bs) {
 		p = mempool_alloc(bs->bio_pool, gfp_mask);
-
-		if (p)
-			bio = p + bs->front_pad;
-	} else
+		if (!p)
+			goto err;
+		bio = p + bs->front_pad;
+	} else {
 		bio = kmalloc(sizeof(*bio), gfp_mask);
+		if (!bio)
+			goto err;
+	}
 
-	if (likely(bio)) {
-		struct bio_vec *bvl = NULL;
-
-		bio_init(bio);
-		if (likely(nr_iovecs)) {
-			unsigned long uninitialized_var(idx);
-
-			if (nr_iovecs <= BIO_INLINE_VECS) {
-				idx = 0;
-				bvl = bio->bi_inline_vecs;
-				nr_iovecs = BIO_INLINE_VECS;
-			} else {
-				bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx,
-							bs);
-				nr_iovecs = bvec_nr_vecs(idx);
-			}
-			if (unlikely(!bvl)) {
-				if (bs)
-					mempool_free(p, bs->bio_pool);
-				else
-					kfree(bio);
-				bio = NULL;
-				goto out;
-			}
-			bio->bi_flags |= idx << BIO_POOL_OFFSET;
-			bio->bi_max_vecs = nr_iovecs;
-		}
-		bio->bi_io_vec = bvl;
+	bio_init(bio);
+
+	if (unlikely(!nr_iovecs))
+		goto out_set;
+
+	if (nr_iovecs <= BIO_INLINE_VECS) {
+		bvl = bio->bi_inline_vecs;
+		nr_iovecs = BIO_INLINE_VECS;
+	} else {
+		bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
+		if (unlikely(!bvl))
+			goto err_free;
+
+		nr_iovecs = bvec_nr_vecs(idx);
 	}
-out:
+	bio->bi_flags |= idx << BIO_POOL_OFFSET;
+	bio->bi_max_vecs = nr_iovecs;
+out_set:
+	bio->bi_io_vec = bvl;
+
 	return bio;
+
+err_free:
+	if (bs)
+		mempool_free(p, bs->bio_pool);
+	else
+		kfree(bio);
+err:
+	return NULL;
 }
 
 struct bio *bio_alloc(gfp_t gfp_mask, int nr_iovecs)

commit efd247fa34084d9b162f485004ae6d8a04059f0c
Merge: af66df5ecf9c 59fcbddaff6f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Mar 23 16:53:20 2009 +0100

    Merge branches 'sched/debug' and 'linus' into sched/core

commit b3e3b302cf6dc8d60b67f0e84d1fa5648889c038
Merge: a6bc3262c561 59fcbddaff6f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Mar 23 10:07:49 2009 +0100

    Merge branches 'irq/sparseirq' and 'linus' into irq/core

commit fe9f57f250ab4d781b99504caeb218ca2db14c1a
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Mar 22 18:41:59 2009 +0100

    tracing: add run-time field descriptions for event filtering, kfree fix
    
    Impact: fix potential kfree of random data in (rare) failure path
    
    Zero-initialize the field structure.
    
    Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    LKML-Reference: <1237710639.7703.46.camel@charm-linux>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 97d4daaddd9a..594d78aaa185 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -24,26 +24,31 @@ int trace_define_field(struct ftrace_event_call *call, char *type,
 {
 	struct ftrace_event_field *field;
 
-	field = kmalloc(sizeof(*field), GFP_KERNEL);
+	field = kzalloc(sizeof(*field), GFP_KERNEL);
 	if (!field)
 		goto err;
+
 	field->name = kstrdup(name, GFP_KERNEL);
 	if (!field->name)
 		goto err;
+
 	field->type = kstrdup(type, GFP_KERNEL);
 	if (!field->type)
 		goto err;
+
 	field->offset = offset;
 	field->size = size;
 	list_add(&field->link, &call->fields);
 
 	return 0;
+
 err:
 	if (field) {
 		kfree(field->name);
 		kfree(field->type);
 	}
 	kfree(field);
+
 	return -ENOMEM;
 }
 

commit a524446fe82f7f38738403a5a080c4910af86a61
Merge: 0cf53ff62b3e 09c9e84d474d 505f2b970b22
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Mar 22 18:10:02 2009 +0100

    Merge branches 'tracing/ftrace', 'tracing/hw-breakpoints', 'tracing/ring-buffer', 'tracing/textedit' and 'linus' into tracing/core