<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel, branch v3.0.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel?h=v3.0.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel?h=v3.0.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-11T17:37:17Z</updated>
<entry>
<title>PM / Suspend: Off by one in pm_suspend()</title>
<updated>2011-11-11T17:37:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2011-09-21T18:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f450df800450e9c7ec8c53bdb72d6c4ef5f17d4e'/>
<id>urn:sha1:f450df800450e9c7ec8c53bdb72d6c4ef5f17d4e</id>
<content type='text'>
commit 528f7ce6e439edeac38f6b3f8561f1be129b5e91 upstream.

In enter_state() we use "state" as an offset for the pm_states[]
array.  The pm_states[] array only has PM_SUSPEND_MAX elements so
this test is off by one.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>ptrace: don't clear GROUP_STOP_SIGMASK on double-stop</title>
<updated>2011-11-11T17:36:23Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2011-09-26T17:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=43742b14ffbe87453e96f4411389445fc707df57'/>
<id>urn:sha1:43742b14ffbe87453e96f4411389445fc707df57</id>
<content type='text'>
[This does not correspond to any specific patch in the upstream tree as it was
fixed accidentally by rewriting the code in the 3.1 release]

https://bugzilla.redhat.com/show_bug.cgi?id=740121

1. Luke Macken triggered WARN_ON(!(group_stop &amp; GROUP_STOP_SIGMASK))
   in do_signal_stop().

   This is because do_signal_stop() clears GROUP_STOP_SIGMASK part
   unconditionally but doesn't update it if task_is_stopped().

2. Looking at this problem I noticed that WARN_ON_ONCE(!ptrace) is
   not right, a stopped-but-resumed tracee can clone the untraced
   thread in the SIGNAL_STOP_STOPPED group, the new thread can start
   another group-stop.

   Remove this warning, we need more fixes to make it true.

Reported-by: Luke Macken &lt;lmacken@redhat.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>genirq: Add IRQF_RESUME_EARLY and resume such IRQs earlier</title>
<updated>2011-11-11T17:35:54Z</updated>
<author>
<name>Ian Campbell</name>
<email>ian.campbell@citrix.com</email>
</author>
<published>2011-10-03T14:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09bb52774e0543390bdba59b67ade093d34e4906'/>
<id>urn:sha1:09bb52774e0543390bdba59b67ade093d34e4906</id>
<content type='text'>
commit 9bab0b7fbaceec47d32db51cd9e59c82fb071f5a upstream.

This adds a mechanism to resume selected IRQs during syscore_resume
instead of dpm_resume_noirq.

Under Xen we need to resume IRQs associated with IPIs early enough
that the resched IPI is unmasked and we can therefore schedule
ourselves out of the stop_machine where the suspend/resume takes
place.

This issue was introduced by 676dc3cf5bc3 "xen: Use IRQF_FORCE_RESUME".

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Jeremy Fitzhardinge &lt;Jeremy.Fitzhardinge@citrix.com&gt;
Cc: xen-devel &lt;xen-devel@lists.xensource.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Link: http://lkml.kernel.org/r/1318713254.11016.52.camel@dagon.hellion.org.uk
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>tracing: Fix returning of duplicate data after EOF in trace_pipe_raw</title>
<updated>2011-11-11T17:35:53Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-10-14T14:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=12cb3e734a5616ea0057aee938c553ff6ccbdfbd'/>
<id>urn:sha1:12cb3e734a5616ea0057aee938c553ff6ccbdfbd</id>
<content type='text'>
commit 436fc280261dcfce5af38f08b89287750dc91cd2 upstream.

The trace_pipe_raw handler holds a cached page from the time the file
is opened to the time it is closed. The cached page is used to handle
the case of the user space buffer being smaller than what was read from
the ring buffer. The left over buffer is held in the cache so that the
next read will continue where the data left off.

After EOF is returned (no more data in the buffer), the index of
the cached page is set to zero. If a user app reads the page again
after EOF, the check in the buffer will see that the cached page
is less than page size and will return the cached page again. This
will cause reading the trace_pipe_raw again after EOF to return
duplicate data, making the output look like the time went backwards
but instead data is just repeated.

The fix is to not reset the index right after all data is read
from the cache, but to reset it after all data is read and more
data exists in the ring buffer.

Reported-by: Jeremy Eder &lt;jeder@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>time: Change jiffies_to_clock_t() argument type to unsigned long</title>
<updated>2011-11-11T17:35:52Z</updated>
<author>
<name>hank</name>
<email>pyu@redhat.com</email>
</author>
<published>2011-09-20T20:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7f65094f7e2b8463a7c002e967e78db8f30468a'/>
<id>urn:sha1:c7f65094f7e2b8463a7c002e967e78db8f30468a</id>
<content type='text'>
commit cbbc719fccdb8cbd87350a05c0d33167c9b79365 upstream.

The parameter's origin type is long. On an i386 architecture, it can
easily be larger than 0x80000000, causing this function to convert it
to a sign-extended u64 type.

Change the type to unsigned long so we get the correct result.

Signed-off-by: hank &lt;pyu@redhat.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
[ build fix ]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>kmod: prevent kmod_loop_msg overflow in __request_module()</title>
<updated>2011-11-11T17:35:48Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2011-10-26T02:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3cdf240310b4f3d94981d727d3660c78a50a40c6'/>
<id>urn:sha1:3cdf240310b4f3d94981d727d3660c78a50a40c6</id>
<content type='text'>
commit 37252db6aa576c34fd794a5a54fb32d7a8b3a07a upstream.

Due to post-increment in condition of kmod_loop_msg in __request_module(),
the system log can be spammed by much more than 5 instances of the 'runaway
loop' message if the number of events triggering it makes the kmod_loop_msg
to overflow.

Fix that by making sure we never increment it past the threshold.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>cputimer: Cure lock inversion</title>
<updated>2011-10-25T05:10:14Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2011-10-17T09:50:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=607ce3ed1cf6aa5af82a12faf1adf0de5d2f583e'/>
<id>urn:sha1:607ce3ed1cf6aa5af82a12faf1adf0de5d2f583e</id>
<content type='text'>
commit bcd5cff7216f9b2de0a148cc355eac199dc6f1cf upstream.

There's a lock inversion between the cputimer-&gt;lock and rq-&gt;lock;
notably the two callchains involved are:

 update_rlimit_cpu()
   sighand-&gt;siglock
   set_process_cpu_timer()
     cpu_timer_sample_group()
       thread_group_cputimer()
         cputimer-&gt;lock
         thread_group_cputime()
           task_sched_runtime()
             -&gt;pi_lock
             rq-&gt;lock

 scheduler_tick()
   rq-&gt;lock
   task_tick_fair()
     update_curr()
       account_group_exec()
         cputimer-&gt;lock

Where the first one is enabling a CLOCK_PROCESS_CPUTIME_ID timer, and
the second one is keeping up-to-date.

This problem was introduced by e8abccb7193 ("posix-cpu-timers: Cure
SMP accounting oddities").

Cure the problem by removing the cputimer-&gt;lock and rq-&gt;lock nesting,
this leaves concurrent enablers doing duplicate work, but the time
wasted should be on the same order otherwise wasted spinning on the
lock and the greater-than assignment filter should ensure we preserve
monotonicity.

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Reported-by: Simon Kirby &lt;sim@hostway.ca&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Link: http://lkml.kernel.org/r/1318928713.21167.4.camel@twins
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Avoid using variable-length arrays in kernel/sys.c</title>
<updated>2011-10-25T05:10:14Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-10-17T15:24:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60635529f6aec7572ae7009aabd80558cf2f43b4'/>
<id>urn:sha1:60635529f6aec7572ae7009aabd80558cf2f43b4</id>
<content type='text'>
commit a84a79e4d369a73c0130b5858199e949432da4c6 upstream.

The size is always valid, but variable-length arrays generate worse code
for no good reason (unless the function happens to be inlined and the
compiler sees the length for the simple constant it is).

Also, there seems to be some code generation problem on POWER, where
Henrik Bakken reports that register r28 can get corrupted under some
subtle circumstances (interrupt happening at the wrong time?).  That all
indicates some seriously broken compiler issues, but since variable
length arrays are bad regardless, there's little point in trying to
chase it down.

"Just don't do that, then".

Reported-by: Henrik Grindal Bakken &lt;henribak@cisco.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix regression where ftrace breaks when modules are loaded</title>
<updated>2011-10-16T21:14:55Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-07-15T03:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9374622a9923b2343ee2f5083ebe6c51fcc914c5'/>
<id>urn:sha1:9374622a9923b2343ee2f5083ebe6c51fcc914c5</id>
<content type='text'>
commit f7bc8b61f65726ff98f52e286b28e294499d7a08 upstream.

Enabling function tracer to trace all functions, then load a module and
then disable function tracing will cause ftrace to fail.

This can also happen by enabling function tracing on the command line:

  ftrace=function

and during boot up, modules are loaded, then you disable function tracing
with 'echo nop &gt; current_tracer' you will trigger a bug in ftrace that
will shut itself down.

The reason is, the new ftrace code keeps ref counts of all ftrace_ops that
are registered for tracing. When one or more ftrace_ops are registered,
all the records that represent the functions that the ftrace_ops will
trace have a ref count incremented. If this ref count is not zero,
when the code modification runs, that function will be enabled for tracing.
If the ref count is zero, that function will be disabled from tracing.

To make sure the accounting was working, FTRACE_WARN_ON()s were added
to updating of the ref counts.

If the ref count hits its max (&gt; 2^30 ftrace_ops added), or if
the ref count goes below zero, a FTRACE_WARN_ON() is triggered which
disables all modification of code.

Since it is common for ftrace_ops to trace all functions in the kernel,
instead of creating &gt; 20,000 hash items for the ftrace_ops, the hash
count is just set to zero, and it represents that the ftrace_ops is
to trace all functions. This is where the issues arrise.

If you enable function tracing to trace all functions, and then add
a module, the modules function records do not get the ref count updated.
When the function tracer is disabled, all function records ref counts
are subtracted. Since the modules never had their ref counts incremented,
they go below zero and the FTRACE_WARN_ON() is triggered.

The solution to this is rather simple. When modules are loaded, and
their functions are added to the the ftrace pool, look to see if any
ftrace_ops are registered that trace all functions. And for those,
update the ref count for the module function records.

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;

</content>
</entry>
<entry>
<title>ftrace: Fix regression of :mod:module function enabling</title>
<updated>2011-10-16T21:14:55Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-07-07T15:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7f04c486e494bf96166ff53b0957369e32509c6'/>
<id>urn:sha1:d7f04c486e494bf96166ff53b0957369e32509c6</id>
<content type='text'>
commit 43dd61c9a09bd413e837df829e6bfb42159be52a upstream.

The new code that allows different utilities to pick and choose
what functions they trace broke the :mod: hook that allows users
to trace only functions of a particular module.

The reason is that the :mod: hook bypasses the hash that is setup
to allow individual users to trace their own functions and uses
the global hash directly. But if the global hash has not been
set up, it will cause a bug:

echo '*:mod:radeon' &gt; /sys/kernel/debug/set_ftrace_filter

produces:

 [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
 [drm:radeon_crtc_page_flip] *ERROR* failed to reserve new rbo buffer before flip
 BUG: unable to handle kernel paging request at ffffffff8160ec90
 IP: [&lt;ffffffff810d9136&gt;] add_hash_entry+0x66/0xd0
 PGD 1a05067 PUD 1a09063 PMD 80000000016001e1
 Oops: 0003 [#1] SMP Jul  7 04:02:28 phyllis kernel: [55303.858604] CPU 1
 Modules linked in: cryptd aes_x86_64 aes_generic binfmt_misc rfcomm bnep ip6table_filter hid radeon r8169 ahci libahci mii ttm drm_kms_helper drm video i2c_algo_bit intel_agp intel_gtt

 Pid: 10344, comm: bash Tainted: G        WC  3.0.0-rc5 #1 Dell Inc. Inspiron N5010/0YXXJJ
 RIP: 0010:[&lt;ffffffff810d9136&gt;]  [&lt;ffffffff810d9136&gt;] add_hash_entry+0x66/0xd0
 RSP: 0018:ffff88003a96bda8  EFLAGS: 00010246
 RAX: ffff8801301735c0 RBX: ffffffff8160ec80 RCX: 0000000000306ee0
 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880137c92940
 RBP: ffff88003a96bdb8 R08: ffff880137c95680 R09: 0000000000000000
 R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff81c9df78
 R13: ffff8801153d1000 R14: 0000000000000000 R15: 0000000000000000
 FS: 00007f329c18a700(0000) GS:ffff880137c80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: ffffffff8160ec90 CR3: 000000003002b000 CR4: 00000000000006e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process bash (pid: 10344, threadinfo ffff88003a96a000, task ffff88012fcfc470)
 Stack:
  0000000000000fd0 00000000000000fc ffff88003a96be38 ffffffff810d92f5
  ffff88011c4c4e00 ffff880000000000 000000000b69f4d0 ffffffff8160ec80
  ffff8800300e6f06 0000000081130295 0000000000000282 ffff8800300e6f00
 Call Trace:
  [&lt;ffffffff810d92f5&gt;] match_records+0x155/0x1b0
  [&lt;ffffffff810d940c&gt;] ftrace_mod_callback+0xbc/0x100
  [&lt;ffffffff810dafdf&gt;] ftrace_regex_write+0x16f/0x210
  [&lt;ffffffff810db09f&gt;] ftrace_filter_write+0xf/0x20
  [&lt;ffffffff81166e48&gt;] vfs_write+0xc8/0x190
  [&lt;ffffffff81167001&gt;] sys_write+0x51/0x90
  [&lt;ffffffff815c7e02&gt;] system_call_fastpath+0x16/0x1b
 Code: 48 8b 33 31 d2 48 85 f6 75 33 49 89 d4 4c 03 63 08 49 8b 14 24 48 85 d2 48 89 10 74 04 48 89 42 08 49 89 04 24 4c 89 60 08 31 d2
 RIP [&lt;ffffffff810d9136&gt;] add_hash_entry+0x66/0xd0
  RSP &lt;ffff88003a96bda8&gt;
 CR2: ffffffff8160ec90
 ---[ end trace a5d031828efdd88e ]---

Reported-by: Brian Marete &lt;marete@toshnix.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
