Patches contributed by Eötvös Lorand University


commit e47411b1f4456480d6c60ebdc7a733e81ccd5d66
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Nov 16 08:27:53 2008 +0100

    MAINTAINERS: remove me as RAID maintainer
    
    Neil has been the maintainer of the RAID/MD code for a long time,
    remove me as a co-maintainer.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/MAINTAINERS b/MAINTAINERS
index 8e0777fae3ce..627e4c89328e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3928,8 +3928,6 @@ M:	bootc@bootc.net
 S:	Maintained
 
 SOFTWARE RAID (Multiple Disks) SUPPORT
-P:	Ingo Molnar
-M:	mingo@redhat.com
 P:	Neil Brown
 M:	neilb@suse.de
 L:	linux-raid@vger.kernel.org

commit 29d7b90c15035741d15421b36000509212b3e135
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Nov 16 08:07:15 2008 +0100

    sched: fix kernel warning on /proc/sched_debug access
    
    Luis Henriques reported that with CONFIG_PREEMPT=y + CONFIG_PREEMPT_DEBUG=y +
    CONFIG_SCHED_DEBUG=y + CONFIG_LATENCYTOP=y enabled, the following warning
    triggers when using latencytop:
    
    > [  775.663239] BUG: using smp_processor_id() in preemptible [00000000] code: latencytop/6585
    > [  775.663303] caller is native_sched_clock+0x3a/0x80
    > [  775.663314] Pid: 6585, comm: latencytop Tainted: G        W 2.6.28-rc4-00355-g9c7c354 #1
    > [  775.663322] Call Trace:
    > [  775.663343]  [<ffffffff803a94e4>] debug_smp_processor_id+0xe4/0xf0
    > [  775.663356]  [<ffffffff80213f7a>] native_sched_clock+0x3a/0x80
    > [  775.663368]  [<ffffffff80213e19>] sched_clock+0x9/0x10
    > [  775.663381]  [<ffffffff8024550d>] proc_sched_show_task+0x8bd/0x10e0
    > [  775.663395]  [<ffffffff8034466e>] sched_show+0x3e/0x80
    > [  775.663408]  [<ffffffff8031039b>] seq_read+0xdb/0x350
    > [  775.663421]  [<ffffffff80368776>] ? security_file_permission+0x16/0x20
    > [  775.663435]  [<ffffffff802f4198>] vfs_read+0xc8/0x170
    > [  775.663447]  [<ffffffff802f4335>] sys_read+0x55/0x90
    > [  775.663460]  [<ffffffff8020c67a>] system_call_fastpath+0x16/0x1b
    > ...
    
    This breakage was caused by me via:
    
      7cbaef9: sched: optimize sched_clock() a bit
    
    Change the calls to cpu_clock().
    
    Reported-by: Luis Henriques <henrix@sapo.pt>

diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 48ecc51e7701..26ed8e3d1c15 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -423,10 +423,11 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
 #undef __P
 
 	{
+		unsigned int this_cpu = raw_smp_processor_id();
 		u64 t0, t1;
 
-		t0 = sched_clock();
-		t1 = sched_clock();
+		t0 = cpu_clock(this_cpu);
+		t1 = cpu_clock(this_cpu);
 		SEQ_printf(m, "%-35s:%21Ld\n",
 			   "clock-delta", (long long)(t1-t0));
 	}

commit 985809608f758a8d3ddda4ce5a53ed0e57fb9e1b
Merge: c91add5fa68e 1c80025a4985
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Nov 16 07:57:13 2008 +0100

    Merge branch 'tracing/ftrace' into tracing/function-return-tracer

commit c91add5fa68ea9b1f2923b3788c5dae0e60e1f6b
Merge: d1aaf8cf8afe b3535c6390f2 ee51a1de7e38
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun Nov 16 07:28:46 2008 +0100

    Merge branches 'tracing/fastboot', 'tracing/ftrace' and 'tracing/urgent' into tracing/core

commit e8f6fbf62de37cbc2e179176ac7010d5f4396b67
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 12 01:38:36 2008 +0000

    lockdep: include/linux/lockdep.h - fix warning in net/bluetooth/af_bluetooth.c
    
    fix this warning:
    
      net/bluetooth/af_bluetooth.c:60: warning: ‘bt_key_strings’ defined but not used
      net/bluetooth/af_bluetooth.c:71: warning: ‘bt_slock_key_strings’ defined but not used
    
    this is a lockdep macro problem in the !LOCKDEP case.
    
    We cannot convert it to an inline because the macro works on multiple types,
    but we can mark the parameter used.
    
    [ also clean up a misaligned tab in sock_lock_init_class_and_name() ]
    
    [ also remove #ifdefs from around af_family_clock_key strings - which
      were certainly added to get rid of the ugly build warnings. ]
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 331e5f1c2d8e..29aec6e10020 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -331,10 +331,11 @@ static inline void lockdep_on(void)
 # define lock_set_subclass(l, s, i)		do { } while (0)
 # define lockdep_init()				do { } while (0)
 # define lockdep_info()				do { } while (0)
-# define lockdep_init_map(lock, name, key, sub)	do { (void)(key); } while (0)
+# define lockdep_init_map(lock, name, key, sub) \
+		do { (void)(name); (void)(key); } while (0)
 # define lockdep_set_class(lock, key)		do { (void)(key); } while (0)
 # define lockdep_set_class_and_name(lock, key, name) \
-		do { (void)(key); } while (0)
+		do { (void)(key); (void)(name); } while (0)
 #define lockdep_set_class_and_subclass(lock, key, sub) \
 		do { (void)(key); } while (0)
 #define lockdep_set_subclass(lock, sub)		do { } while (0)
diff --git a/include/net/sock.h b/include/net/sock.h
index c04f9e18ea22..2f47107f6d0f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -815,7 +815,7 @@ static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
  */
 #define sock_lock_init_class_and_name(sk, sname, skey, name, key) 	\
 do {									\
-	sk->sk_lock.owned = 0;					\
+	sk->sk_lock.owned = 0;						\
 	init_waitqueue_head(&sk->sk_lock.wq);				\
 	spin_lock_init(&(sk)->sk_lock.slock);				\
 	debug_check_no_locks_freed((void *)&(sk)->sk_lock,		\
diff --git a/net/core/sock.c b/net/core/sock.c
index 5e2a3132a8c9..341e39456952 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -136,7 +136,6 @@
 static struct lock_class_key af_family_keys[AF_MAX];
 static struct lock_class_key af_family_slock_keys[AF_MAX];
 
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
 /*
  * Make lock validator output more readable. (we pre-construct these
  * strings build-time, so that runtime initialization of socket
@@ -187,7 +186,6 @@ static const char *af_family_clock_key_strings[AF_MAX+1] = {
   "clock-AF_RXRPC" , "clock-AF_ISDN"     , "clock-AF_PHONET"   ,
   "clock-AF_MAX"
 };
-#endif
 
 /*
  * sk_callback_lock locking rules are per-address-family,

commit ee51a1de7e3837577412be269e0100038068e691
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Nov 13 14:58:31 2008 +0100

    tracing: fix mmiotrace resizing crash
    
    Pekka reported a crash when resizing the mmiotrace tracer (if only
    mmiotrace is enabled).
    
    This happens because in that case we do not allocate the max buffer,
    but we try to use it.
    
    Make ring_buffer_resize() idempotent against NULL buffers.
    
    Reported-by: Pekka Paalanen <pq@iki.fi>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 231db209fa82..036456cbb4f7 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -538,6 +538,12 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
 	LIST_HEAD(pages);
 	int i, cpu;
 
+	/*
+	 * Always succeed at resizing a non-existent buffer:
+	 */
+	if (!buffer)
+		return size;
+
 	size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
 	size *= BUF_PAGE_SIZE;
 	buffer_size = buffer->pages * BUF_PAGE_SIZE;

commit 24de38620dd3504782c90c0892eef888d0c351e9
Merge: 94b80ffd650b 68f96c0c889b 1dc1c6adf38b 47e74f2ba8fb
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Nov 13 09:48:03 2008 +0100

    Merge branches 'tracing/branch-tracer', 'tracing/fastboot', 'tracing/function-return-tracer' and 'tracing/urgent' into tracing/core

commit 5cbd54ef470d880fc37fbe4b21eb514806d51e0d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 12 20:05:50 2008 +0100

    sched: fix init_idle()'s use of sched_clock()
    
    Maciej Rutecki reported:
    
    > I have this bug during suspend to disk:
    >
    > [  188.592151] Enabling non-boot CPUs ...
    > [  188.592151] SMP alternatives: switching to SMP code
    > [  188.666058] BUG: using smp_processor_id() in preemptible
    > [00000000]
    > code: suspend_to_disk/2934
    > [  188.666064] caller is native_sched_clock+0x2b/0x80
    
    Which, as noted by Linus, was caused by me, via:
    
      7cbaef9c "sched: optimize sched_clock() a bit"
    
    Move the rq locking a bit earlier in the initialization sequence,
    that will make the sched_clock() call in init_idle() non-preemptible.
    
    Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/sched.c b/kernel/sched.c
index 3bafbe350f4f..c94baf2969e7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5870,6 +5870,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
 	struct rq *rq = cpu_rq(cpu);
 	unsigned long flags;
 
+	spin_lock_irqsave(&rq->lock, flags);
+
 	__sched_fork(idle);
 	idle->se.exec_start = sched_clock();
 
@@ -5877,7 +5879,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
 	idle->cpus_allowed = cpumask_of_cpu(cpu);
 	__set_task_cpu(idle, cpu);
 
-	spin_lock_irqsave(&rq->lock, flags);
 	rq->curr = rq->idle = idle;
 #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
 	idle->oncpu = 1;

commit eb42c75878e4d13941dcbcf2ef1027c257b099a6
Merge: 9868ee63b896 f21f237cf554
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 12 15:43:39 2008 +0100

    Merge branch 'linus' into x86/crashdump

commit 68d119f0a66f7e3663304343b072e56a2693446b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Nov 12 14:09:30 2008 +0100

    tracing: finetune branch-tracer output
    
    Steve suggested the to change the output from this:
    
    >  bash-3471  [003]   357.014755: [ MISS ] sched_info_dequeued:sched_stats.h:177
    >  bash-3471  [003]   357.014756: [ .... ] update_curr:sched_fair.c:489
    >  bash-3471  [003]   357.014758: [ .... ] calc_delta_fair:sched_fair.c:411
    
    to this:
    
    >  bash-3471  [003]   357.014755: [ MISS ] sched_info_dequeued:sched_stats.h:177
    >  bash-3471  [003]   357.014756: [  ok  ] update_curr:sched_fair.c:489
    >  bash-3471  [003]   357.014758: [  ok  ] calc_delta_fair:sched_fair.c:411
    
    as it makes it clearer to the user what it means exactly.
    
    Acked-by: Steven Rostedt <srostedt@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 728a46ec6b06..d842db14a59b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1657,7 +1657,7 @@ print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu)
 		trace_assign_type(field, entry);
 
 		trace_seq_printf(s, "[%s] %s:%s:%d\n",
-				 field->correct ? " .... " : " MISS ",
+				 field->correct ? "  ok  " : " MISS ",
 				 field->func,
 				 field->file,
 				 field->line);
@@ -1808,7 +1808,7 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter)
 		trace_assign_type(field, entry);
 
 		trace_seq_printf(s, "[%s] %s:%s:%d\n",
-				 field->correct ? " .... " : " MISS ",
+				 field->correct ? "  ok  " : " MISS ",
 				 field->func,
 				 field->file,
 				 field->line);