<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/locking/locktorture.c, branch v4.4.151</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.151</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.151'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-09-13T21:09:46Z</updated>
<entry>
<title>locktorture: Fix potential memory leak with rw lock test</title>
<updated>2017-09-13T21:09:46Z</updated>
<author>
<name>Yang Shi</name>
<email>yang.shi@linaro.org</email>
</author>
<published>2016-11-10T21:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10863607c242e970cfc14c42b35689737c397fe4'/>
<id>urn:sha1:10863607c242e970cfc14c42b35689737c397fe4</id>
<content type='text'>
commit f4dbba591945dc301c302672adefba9e2ec08dc5 upstream.

When running locktorture module with the below commands with kmemleak enabled:

$ modprobe locktorture torture_type=rw_lock_irq
$ rmmod locktorture

The below kmemleak got caught:

root@10:~# echo scan &gt; /sys/kernel/debug/kmemleak
[  323.197029] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
root@10:~# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffffffc07592d500 (size 128):
  comm "modprobe", pid 368, jiffies 4294924118 (age 205.824s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 c3 7b 02 00 00 00 00 00  .........{......
    00 00 00 00 00 00 00 00 d7 9b 02 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffff80081e5a88&gt;] create_object+0x110/0x288
    [&lt;ffffff80086c6078&gt;] kmemleak_alloc+0x58/0xa0
    [&lt;ffffff80081d5acc&gt;] __kmalloc+0x234/0x318
    [&lt;ffffff80006fa130&gt;] 0xffffff80006fa130
    [&lt;ffffff8008083ae4&gt;] do_one_initcall+0x44/0x138
    [&lt;ffffff800817e28c&gt;] do_init_module+0x68/0x1cc
    [&lt;ffffff800811c848&gt;] load_module+0x1a68/0x22e0
    [&lt;ffffff800811d340&gt;] SyS_finit_module+0xe0/0xf0
    [&lt;ffffff80080836f0&gt;] el0_svc_naked+0x24/0x28
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffffffc07592d480 (size 128):
  comm "modprobe", pid 368, jiffies 4294924118 (age 205.824s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 3b 6f 01 00 00 00 00 00  ........;o......
    00 00 00 00 00 00 00 00 23 6a 01 00 00 00 00 00  ........#j......
  backtrace:
    [&lt;ffffff80081e5a88&gt;] create_object+0x110/0x288
    [&lt;ffffff80086c6078&gt;] kmemleak_alloc+0x58/0xa0
    [&lt;ffffff80081d5acc&gt;] __kmalloc+0x234/0x318
    [&lt;ffffff80006fa22c&gt;] 0xffffff80006fa22c
    [&lt;ffffff8008083ae4&gt;] do_one_initcall+0x44/0x138
    [&lt;ffffff800817e28c&gt;] do_init_module+0x68/0x1cc
    [&lt;ffffff800811c848&gt;] load_module+0x1a68/0x22e0
    [&lt;ffffff800811d340&gt;] SyS_finit_module+0xe0/0xf0
    [&lt;ffffff80080836f0&gt;] el0_svc_naked+0x24/0x28
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

It is because cxt.lwsa and cxt.lrsa don't get freed in module_exit, so free
them in lock_torture_cleanup() and free writer_tasks if reader_tasks is
failed at memory allocation.

Signed-off-by: Yang Shi &lt;yang.shi@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: 石洋 &lt;yang.s@alibaba-inc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branches 'doc.2015.10.06a', 'percpu-rwsem.2015.10.06a' and 'torture.2015.10.06a' into HEAD</title>
<updated>2015-10-07T23:06:25Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-10-07T23:06:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=39cd2dd39a8b92ce91c4dad95f6e979c946a3942'/>
<id>urn:sha1:39cd2dd39a8b92ce91c4dad95f6e979c946a3942</id>
<content type='text'>
doc.2015.10.06a:  Documentation updates.
percpu-rwsem.2015.10.06a:  Optimization of per-CPU reader-writer semaphores.
torture.2015.10.06a:  Torture-test updates.
</content>
</entry>
<entry>
<title>locktorture: Fix module unwind when bad torture_type specified</title>
<updated>2015-10-06T18:28:44Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-08-31T03:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a36a99618b1adb2d6ca0b7e08e3a656a04e477fe'/>
<id>urn:sha1:a36a99618b1adb2d6ca0b7e08e3a656a04e477fe</id>
<content type='text'>
The locktorture module has a list of torture types, and specifying
a type not on this list is supposed to cleanly fail the module load.
Unfortunately, the "fail" happens without the "cleanly".  This commit
therefore adds the needed clean-up after an incorrect torture_type.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>locktorture: Add torture tests for percpu_rwsem</title>
<updated>2015-10-06T18:24:56Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-08-29T21:46:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=617783dd99704331e22636388c932450e02ee636'/>
<id>urn:sha1:617783dd99704331e22636388c932450e02ee636</id>
<content type='text'>
This commit adds percpu_rwsem tests based on the earlier rwsem tests.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>locktorture: Support rtmutex torturing</title>
<updated>2015-10-06T18:24:40Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2015-07-22T21:07:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=095777c417db142970adeb776fa0cb10810b8122'/>
<id>urn:sha1:095777c417db142970adeb776fa0cb10810b8122</id>
<content type='text'>
Real time mutexes is one of the few general primitives
that we do not have in locktorture. Address this -- a few
considerations:

o To spice things up, enable competing thread(s) to become
rt, such that we can stress different prio boosting paths
in the rtmutex code. Introduce a -&gt;task_boost callback,
only used by rtmutex-torturer. Tasks will boost/deboost
around every 50k (arbitrarily) lock/unlock operations.

o Hold times are similar to what we have for other locks:
only occasionally having longer hold times (per ~200k ops).
So we roughly do two full rt boost+deboosting ops with
short hold times.

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>locktorture: Change longdelay_us to longdelay_ms</title>
<updated>2015-05-27T19:59:57Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-04-01T15:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=61d49d2f9888ace06ab127cf6f063bed7c3b2e53'/>
<id>urn:sha1:61d49d2f9888ace06ab127cf6f063bed7c3b2e53</id>
<content type='text'>
The locktorture long delays are in milliseconds rather than microseconds,
so this commit changes the name of the corresponding variable from
longdelay_us to longdelay_ms.

Reported-by: Ben Goodwyn &lt;bgoodwyn@softnas.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>locktorture: fix deadlock in 'rw_lock_irq' type</title>
<updated>2015-05-27T19:59:56Z</updated>
<author>
<name>Alexey Kodanev</name>
<email>alexey.kodanev@oracle.com</email>
</author>
<published>2015-03-07T00:06:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f548d99ef4f5ec8f7080e88ad07c44d16d058ddc'/>
<id>urn:sha1:f548d99ef4f5ec8f7080e88ad07c44d16d058ddc</id>
<content type='text'>
torture_rwlock_read_unlock_irq() must use read_unlock_irqrestore()
instead of write_unlock_irqrestore().

Use read_unlock_irqrestore() instead of write_unlock_irqrestore().

Signed-off-by: Alexey Kodanev &lt;alexey.kodanev@oracle.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>locktorture: Cleanup header usage</title>
<updated>2014-09-30T07:10:02Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2014-09-29T13:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c98fed9fc6a7449affd941d8a8e9fcb0c72977d6'/>
<id>urn:sha1:c98fed9fc6a7449affd941d8a8e9fcb0c72977d6</id>
<content type='text'>
Remove some unnecessary ones and explicitly include rwsem.h

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>locktorture: Cannot hold read and write lock</title>
<updated>2014-09-30T07:10:02Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2014-09-29T13:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1229491006a3d55cc0d7e6d496be39915ccefdd'/>
<id>urn:sha1:a1229491006a3d55cc0d7e6d496be39915ccefdd</id>
<content type='text'>
... trigger an error if so.

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>locktorture: Fix __acquire annotation for spinlock irq</title>
<updated>2014-09-30T07:10:02Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2014-09-29T13:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=219f800f99db6f4e43a582cb9e0d98931f13c012'/>
<id>urn:sha1:219f800f99db6f4e43a582cb9e0d98931f13c012</id>
<content type='text'>
Its quite easy to get mixed up with the names -- 'torture_spinlock_irq'
is not actually a valid spinlock name.

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
