<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/srcutree.c, branch v5.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-20T03:37:47Z</updated>
<entry>
<title>Merge branches 'cpuinfo.2020.11.06a', 'doc.2020.11.06a', 'fixes.2020.11.19b', 'lockdep.2020.11.02a', 'tasks.2020.11.06a' and 'torture.2020.11.06a' into HEAD</title>
<updated>2020-11-20T03:37:47Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-11-20T03:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7fc91fc8450655e7ba941d61663afcaf65cefb78'/>
<id>urn:sha1:7fc91fc8450655e7ba941d61663afcaf65cefb78</id>
<content type='text'>
cpuinfo.2020.11.06a: Speedups for /proc/cpuinfo.
doc.2020.11.06a: Documentation updates.
fixes.2020.11.19b: Miscellaneous fixes.
lockdep.2020.11.02a: Lockdep-RCU updates to avoid "unused variable".
tasks.2020.11.06a: Tasks-RCU updates.
torture.2020.11.06a': Torture-test updates.
</content>
</entry>
<entry>
<title>srcu: Take early exit on memory-allocation failure</title>
<updated>2020-11-20T03:37:17Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-09-10T18:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50edb988534c621a56ca103c0c16ac59e7399f01'/>
<id>urn:sha1:50edb988534c621a56ca103c0c16ac59e7399f01</id>
<content type='text'>
It turns out that init_srcu_struct() can be invoked from usermode tasks,
and that fatal signals received by these tasks can cause memory-allocation
failures.  These failures are not handled well by init_srcu_struct(),
so much so that NULL pointer dereferences can result.  This commit
therefore causes init_srcu_struct() to take an early exit upon detection
of memory-allocation failure.

Link: https://lore.kernel.org/lkml/20200908144306.33355-1-aik@ozlabs.ru/
Reported-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Tested-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Use a more appropriate lockdep helper</title>
<updated>2020-11-03T01:10:00Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-09-16T18:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f505d4346f6129d4708338491cf23ca9cf1d8f2a'/>
<id>urn:sha1:f505d4346f6129d4708338491cf23ca9cf1d8f2a</id>
<content type='text'>
The lockdep_is_held() macro is defined as:

 #define lockdep_is_held(lock)		lock_is_held(&amp;(lock)-&gt;dep_map)

This hides away the dereference, so that builds with !LOCKDEP don't break.
This works in current kernels because the RCU_LOCKDEP_WARN() eliminates
its condition at preprocessor time in !LOCKDEP kernels.  However, later
patches in this series will cause the compiler to see this condition even
in !LOCKDEP kernels.  This commit prepares for this upcoming change by
switching from lock_is_held() to lockdep_is_held().

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
--
CC: jiangshanlai@gmail.com
CC: paulmck@kernel.org
CC: josh@joshtriplett.org
CC: rostedt@goodmis.org
CC: mathieu.desnoyers@efficios.com
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Remove KCSAN stubs</title>
<updated>2020-08-25T01:36:03Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-06-17T20:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9b60741318f6f8bcb2adc4beaef724c923fcb93'/>
<id>urn:sha1:d9b60741318f6f8bcb2adc4beaef724c923fcb93</id>
<content type='text'>
KCSAN is now in mainline, so this commit removes the stubs for the
data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS()
macros.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Avoid local_irq_save() before acquiring spinlock_t</title>
<updated>2020-06-29T19:01:22Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2020-05-26T13:41:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bde50d8ff83e4ce9e576f7c5ba1edb48a3610a5b'/>
<id>urn:sha1:bde50d8ff83e4ce9e576f7c5ba1edb48a3610a5b</id>
<content type='text'>
SRCU disables interrupts to get a stable per-CPU pointer and then
acquires the spinlock which is in the per-CPU data structure. The
release uses spin_unlock_irqrestore(). While this is correct on a non-RT
kernel, this conflicts with the RT semantics because the spinlock is
converted to a 'sleeping' spinlock. Sleeping locks can obviously not be
acquired with interrupts disabled.

Acquire the per-CPU pointer `ssp-&gt;sda' without disabling preemption and
then acquire the spinlock_t of the per-CPU data structure. The lock will
ensure that the data is consistent.

The added call to check_init_srcu_struct() is now needed because a
statically defined srcu_struct may remain uninitialized until this
point and the newly introduced locking operation requires an initialized
spinlock_t.

This change was tested for four hours with 8*SRCU-N and 8*SRCU-P without
causing any warnings.

Cc: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Cc: "Paul E. McKenney" &lt;paulmck@kernel.org&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: rcu@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Fix a typo in comment "amoritized"-&gt;"amortized"</title>
<updated>2020-06-29T19:01:22Z</updated>
<author>
<name>Ethon Paul</name>
<email>ethp@qq.com</email>
</author>
<published>2020-04-18T11:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7fef6cff8f2814bf8eb632e2bb8f0a987ffd9ece'/>
<id>urn:sha1:7fef6cff8f2814bf8eb632e2bb8f0a987ffd9ece</id>
<content type='text'>
This commit fixes a typo in a comment.

Signed-off-by: Ethon Paul &lt;ethp@qq.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Add data_race() to -&gt;srcu_lock_count and -&gt;srcu_unlock_count arrays</title>
<updated>2020-04-27T18:01:16Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-01-04T00:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b68c6146512d92f6d570d26e1873497ade2cc4cb'/>
<id>urn:sha1:b68c6146512d92f6d570d26e1873497ade2cc4cb</id>
<content type='text'>
The srcu_data structure's -&gt;srcu_lock_count and -&gt;srcu_unlock_count arrays
are read and written locklessly, so this commit adds the data_race()
to the diagnostic-print loads from these arrays in order mark them as
known and approved data-racy accesses.

This data race was reported by KCSAN. Not appropriate for backporting due
to failure being unlikely and due to this being used only by rcutorture.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>srcu: Add KCSAN stubs</title>
<updated>2020-04-27T18:01:15Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-04-13T23:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f58820fd710e0563e22420c07c03c5ccec948bf'/>
<id>urn:sha1:4f58820fd710e0563e22420c07c03c5ccec948bf</id>
<content type='text'>
This commit adds stubs for KCSAN's data_race(), ASSERT_EXCLUSIVE_WRITER(),
and ASSERT_EXCLUSIVE_ACCESS() macros to allow code using these macros to
move ahead.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branches 'doc.2020.02.27a', 'fixes.2020.03.21a', 'kfree_rcu.2020.02.20a', 'locktorture.2020.02.20a', 'ovld.2020.02.20a', 'rcu-tasks.2020.02.20a', 'srcu.2020.02.20a' and 'torture.2020.02.20a' into HEAD</title>
<updated>2020-03-22T00:15:11Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-03-22T00:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa93ec620be378cce1454286122915533ff8fa48'/>
<id>urn:sha1:aa93ec620be378cce1454286122915533ff8fa48</id>
<content type='text'>
doc.2020.02.27a: Documentation updates.
fixes.2020.03.21a: Miscellaneous fixes.
kfree_rcu.2020.02.20a: Updates to kfree_rcu().
locktorture.2020.02.20a: Lock torture-test updates.
ovld.2020.02.20a: Updates to callback-overload handling.
rcu-tasks.2020.02.20a: RCU-tasks updates.
srcu.2020.02.20a: SRCU updates.
torture.2020.02.20a: Torture-test updates.
</content>
</entry>
<entry>
<title>srcu: Hold srcu_struct -&gt;lock when updating -&gt;srcu_gp_seq</title>
<updated>2020-02-21T00:01:11Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-01-03T19:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=710426068dc60f2d2e139478d6185710802cdc0a'/>
<id>urn:sha1:710426068dc60f2d2e139478d6185710802cdc0a</id>
<content type='text'>
A read of the srcu_struct structure's -&gt;srcu_gp_seq field should not
need READ_ONCE() when that structure's -&gt;lock is held.  Except that this
lock is not always held when updating this field.  This commit therefore
acquires the lock around updates and removes a now-unneeded READ_ONCE().

This data race was reported by KCSAN.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
[ paulmck: Switch from READ_ONCE() to lock per Peter Zilstra question. ]
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
</content>
</entry>
</feed>
