Skip to contentSkip to conversation

locktorture: Fix Oops when reader/writer count is 0

PATCH Applied Jeremy Linton 4 participants 13 messages Oct 10, 2017 – Nov 9, 2017 Torture-test modules

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 locktorture: Fix Oops when reader/writer count is 0

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Internal error: Oops: 96000005 [#1] SMP
...
[<ffff000000b7022c>] __torture_print_stats+0x2c/0x1c8 [locktorture]
[<ffff000000b7070c>] lock_torture_stats_print+0x74/0x120 [locktorture]
[<ffff000000b707f8>] lock_torture_stats+0x40/0xa8 [locktorture]
[<ffff0000080f3570>] kthread+0x108/0x138
[<ffff000008084b90>] ret_from_fork+0x10/0x18

This is caused by the deference to a null statp. Fix that by checking the n_stress for non zero count before referencing statp.

---
 kernel/locking/locktorture.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/locking/locktorture.c +5 -1
index f24582d4dad3..8229ba7147e5 100644
@@ -716,10 +716,14 @@ static void __torture_print_stats(char *page,
 	bool fail = 0;
 	int i, n_stress;
 	long max = 0;
-	long min = statp[0].n_lock_acquired;
+	long min = 0;
 	long long sum = 0;
 
 	n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress;
+
+	if (n_stress)
+		min = statp[0].n_lock_acquired;
+
 	for (i = 0; i < n_stress; i++) {
 		if (statp[i].n_lock_fail)
 			fail = true;
Signature · 1 line
2.13.5
#1 lore raw

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Ping?

Has anyone had a chance to look at this?

Thanks,

Quoted 38 lines
Internal error: Oops: 96000005 [#1] SMP
...
[<ffff000000b7022c>] __torture_print_stats+0x2c/0x1c8 [locktorture]
[<ffff000000b7070c>] lock_torture_stats_print+0x74/0x120 [locktorture]
[<ffff000000b707f8>] lock_torture_stats+0x40/0xa8 [locktorture]
[<ffff0000080f3570>] kthread+0x108/0x138
[<ffff000008084b90>] ret_from_fork+0x10/0x18

This is caused by the deference to a null statp. Fix that by checking the n_stress for non zero count before referencing statp.

---
  kernel/locking/locktorture.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
kernel/locking/locktorture.c +5 -1
index f24582d4dad3..8229ba7147e5 100644
@@ -716,10 +716,14 @@ static void __torture_print_stats(char *page,
  	bool fail = 0;
  	int i, n_stress;
  	long max = 0;
-	long min = statp[0].n_lock_acquired;
+	long min = 0;
  	long long sum = 0;
 
  	n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress;
+
+	if (n_stress)
+		min = statp[0].n_lock_acquired;
+
  	for (i = 0; i < n_stress; i++) {
  		if (statp[i].n_lock_fail)
  			fail = true;
#2 lore raw
Quoted 9 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Quoted 39 lines
Quoted 38 lines

Internal error: Oops: 96000005 [#1] SMP
...
[<ffff000000b7022c>] __torture_print_stats+0x2c/0x1c8 [locktorture]
[<ffff000000b7070c>] lock_torture_stats_print+0x74/0x120 [locktorture]
[<ffff000000b707f8>] lock_torture_stats+0x40/0xa8 [locktorture]
[<ffff0000080f3570>] kthread+0x108/0x138
[<ffff000008084b90>] ret_from_fork+0x10/0x18

This is caused by the deference to a null statp. Fix that by checking the n_stress for non zero count before referencing statp.

---
 kernel/locking/locktorture.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/locking/locktorture.c +5 -1
index f24582d4dad3..8229ba7147e5 100644
@@ -716,10 +716,14 @@ static void __torture_print_stats(char *page,
 	bool fail = 0;
 	int i, n_stress;
 	long max = 0;
-	long min = statp[0].n_lock_acquired;
+	long min = 0;
 	long long sum = 0;
 	n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress;
+
+	if (n_stress)
+		min = statp[0].n_lock_acquired;
+
 	for (i = 0; i < n_stress; i++) {
 		if (statp[i].n_lock_fail)
 			fail = true;
 
#3 lore raw
Quoted 4 lines · Peter Zijlstra
Quoted 3 lines · Jeremy Linton

Hi,

On 10/10/2017 10:52 AM, Jeremy Linton wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

Thanx, Paul

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +13 -9
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h
 F:	include/linux/seqlock.h
 F:	lib/locking*.[ch]
 F:	kernel/locking/
+X:	kernel/locking/locktorture.c
 
 LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
 M:	"Richard Russon (FlatCap)" <[email protected]>
@@ -11318,15 +11319,6 @@ L:	[email protected]
 S:	Orphan
 F:	drivers/net/wireless/ray*
 
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-
 RCUTORTURE TEST FRAMEWORK
 M:	"Paul E. McKenney" <[email protected]>
 M:	Josh Triplett <[email protected]>
@@ -13558,6 +13550,18 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/platform/x86/topstar-laptop.c
 
+TORTURE-TEST MODULES
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c
+
 TOSHIBA ACPI EXTRAS DRIVER
 M:	Azael Avalos <[email protected]>
 L:	[email protected]
#4 lore raw
Quoted 2 lines · Paul E. McKenney

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

True; I tend to also look at git history (as goes get_maintainers.pl IIRC).

Quoted 4 lines

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800
Quoted 8 lines

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

Seems fair;

Quoted 48 lines
MAINTAINERS +13 -9
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h
 F:	include/linux/seqlock.h
 F:	lib/locking*.[ch]
 F:	kernel/locking/
+X:	kernel/locking/locktorture.c
 
 LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
 M:	"Richard Russon (FlatCap)" <[email protected]>
@@ -11318,15 +11319,6 @@ L:	[email protected]
 S:	Orphan
 F:	drivers/net/wireless/ray*
 
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-
 RCUTORTURE TEST FRAMEWORK
 M:	"Paul E. McKenney" <[email protected]>
 M:	Josh Triplett <[email protected]>
@@ -13558,6 +13550,18 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/platform/x86/topstar-laptop.c
 
+TORTURE-TEST MODULES
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c
+
 TOSHIBA ACPI EXTRAS DRIVER
 M:	Azael Avalos <[email protected]>
 L:	[email protected]
#5 lore raw
Quoted 6 lines · Peter Zijlstra
Quoted 2 lines · Paul E. McKenney

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

True; I tend to also look at git history (as goes get_maintainers.pl IIRC).

Me too, and that certainly is best practice.

Quoted 10 lines
Quoted 10 lines

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

Quoted 6 lines
Quoted 2 lines

Seems fair;

Applied, thank you!

Thanx, Paul

Quoted 49 lines
Quoted 48 lines
MAINTAINERS +13 -9
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h
 F:	include/linux/seqlock.h
 F:	lib/locking*.[ch]
 F:	kernel/locking/
+X:	kernel/locking/locktorture.c
 
 LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
 M:	"Richard Russon (FlatCap)" <[email protected]>
@@ -11318,15 +11319,6 @@ L:	[email protected]
 S:	Orphan
 F:	drivers/net/wireless/ray*
 
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-
 RCUTORTURE TEST FRAMEWORK
 M:	"Paul E. McKenney" <[email protected]>
 M:	Josh Triplett <[email protected]>
@@ -13558,6 +13550,18 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/platform/x86/topstar-laptop.c
 
+TORTURE-TEST MODULES
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c
+
 TOSHIBA ACPI EXTRAS DRIVER
 M:	Azael Avalos <[email protected]>
 L:	[email protected]
maintainer
#6 lore raw
In reply to Paul E. McKenney
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
Quoted 6 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

fyi I had proposed the following a while back, which I think is more complete than this patch:

https://lkml.org/lkml/2017/5/15/201

Ah, there's also this (unrelated) fix:
https://lkml.org/lkml/2017/5/15/203

Quoted 54 lines

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

Thanx, Paul

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +0 -0
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h

F: include/linux/seqlock.h
F: lib/locking*.[ch]
F: kernel/locking/
+X: kernel/locking/locktorture.c

LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
M: "Richard Russon (FlatCap)" <[email protected]>

MAINTAINERS +0 -0
@@ -11318,15 +11319,6 @@ L:	[email protected]

S: Orphan
F: drivers/net/wireless/ray*

MAINTAINERS +0 -9
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-

RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <[email protected]>
M: Josh Triplett <[email protected]>

MAINTAINERS +0 -0
@@ -13558,6 +13550,18 @@ L:	[email protected]

S: Maintained
F: drivers/platform/x86/topstar-laptop.c

MAINTAINERS +1 -0
+TORTURE-TEST MODULES

MAINTAINERS L: [email protected] · line 13563

Quoted 10 lines
MAINTAINERS +10 -0
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c

Sure, if you think this is the best way to go, I have no problem.

Thanks,
Davidlohr

#7 lore raw
Quoted 19 lines · Davidlohr Bueso
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
Quoted 6 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

Quoted 10 lines

fyi I had proposed the following a while back, which I think is more complete than this patch:

https://lkml.org/lkml/2017/5/15/201

Ah, there's also this (unrelated) fix:
https://lkml.org/lkml/2017/5/15/203

Quoted 2 lines

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

And it looks like Jeremy was not alone -- I was not CCed on either of those patches, either.

Dave's patch does look more complete, and it certainly was submitted first. Let's see if it still applies... And they both do.

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

Thanx, Paul

Quoted 64 lines
Quoted 48 lines

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +0 -0
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h

F: include/linux/seqlock.h
F: lib/locking*.[ch]
F: kernel/locking/
+X: kernel/locking/locktorture.c

LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
M: "Richard Russon (FlatCap)" <[email protected]>

MAINTAINERS +0 -0
@@ -11318,15 +11319,6 @@ L:	[email protected]

S: Orphan
F: drivers/net/wireless/ray*

MAINTAINERS +0 -9
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-

RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <[email protected]>
M: Josh Triplett <[email protected]>

MAINTAINERS +0 -0
@@ -13558,6 +13550,18 @@ L:	[email protected]

S: Maintained
F: drivers/platform/x86/topstar-laptop.c

MAINTAINERS +1 -0
+TORTURE-TEST MODULES

MAINTAINERS L: [email protected] · line 13563

Quoted 10 lines
MAINTAINERS +10 -0
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c

Sure, if you think this is the best way to go, I have no problem.

Thanks,
Davidlohr

author Reviewed-by
#8 lore raw
Quoted 28 lines · Paul E. McKenney
Quoted 27 lines · Davidlohr Bueso
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
Quoted 6 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

fyi I had proposed the following a while back, which I think is more complete than this patch:

https://lkml.org/lkml/2017/5/15/201

Ah, there's also this (unrelated) fix:
https://lkml.org/lkml/2017/5/15/203

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

And it looks like Jeremy was not alone -- I was not CCed on either of those patches, either.

Dave's patch does look more complete, and it certainly was submitted first. Let's see if it still applies... And they both do.

Yes, avoiding the zero length allocations is probably a good plan, and complaining if both the reader and writer are zero is doesn't hurt either.

So, I'm good with that patch too..

Quoted 4 lines

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

I will give it a spin..

Quoted 68 lines

Thanx, Paul

Quoted 64 lines
Quoted 48 lines

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +0 -0
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h

F: include/linux/seqlock.h
F: lib/locking*.[ch]
F: kernel/locking/
+X: kernel/locking/locktorture.c

LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
M: "Richard Russon (FlatCap)" <[email protected]>

MAINTAINERS +0 -0
@@ -11318,15 +11319,6 @@ L:	[email protected]

S: Orphan
F: drivers/net/wireless/ray*

MAINTAINERS +0 -9
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-

RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <[email protected]>
M: Josh Triplett <[email protected]>

MAINTAINERS +0 -0
@@ -13558,6 +13550,18 @@ L:	[email protected]

S: Maintained
F: drivers/platform/x86/topstar-laptop.c

MAINTAINERS +1 -0
+TORTURE-TEST MODULES

MAINTAINERS L: [email protected] · line 13563

Quoted 10 lines
MAINTAINERS +10 -0
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c

Sure, if you think this is the best way to go, I have no problem.

Thanks,
Davidlohr

#9 lore raw
Quoted 38 lines · Jeremy Linton
Quoted 28 lines · Paul E. McKenney
Quoted 27 lines · Davidlohr Bueso
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
Quoted 6 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

fyi I had proposed the following a while back, which I think is more complete than this patch:

https://lkml.org/lkml/2017/5/15/201

Ah, there's also this (unrelated) fix:
https://lkml.org/lkml/2017/5/15/203

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

And it looks like Jeremy was not alone -- I was not CCed on either of those patches, either.

Dave's patch does look more complete, and it certainly was submitted first. Let's see if it still applies... And they both do.

Quoted 7 lines

Yes, avoiding the zero length allocations is probably a good plan, and complaining if both the reader and writer are zero is doesn't hurt either.

So, I'm good with that patch too..

Thank you!

Quoted 5 lines
Quoted 3 lines

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

I will give it a spin..

Very good! Looking forward to seeing the results.

Thanx, Paul

Quoted 66 lines
Quoted 65 lines
Quoted 64 lines
Quoted 48 lines

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +0 -0
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h

F: include/linux/seqlock.h
F: lib/locking*.[ch]
F: kernel/locking/
+X: kernel/locking/locktorture.c

LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
M: "Richard Russon (FlatCap)" <[email protected]>

MAINTAINERS +0 -0
@@ -11318,15 +11319,6 @@ L:	[email protected]

S: Orphan
F: drivers/net/wireless/ray*

MAINTAINERS +0 -9
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-

RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <[email protected]>
M: Josh Triplett <[email protected]>

MAINTAINERS +0 -0
@@ -13558,6 +13550,18 @@ L:	[email protected]

S: Maintained
F: drivers/platform/x86/topstar-laptop.c

MAINTAINERS +1 -0
+TORTURE-TEST MODULES

MAINTAINERS L: [email protected] · line 13563

Quoted 10 lines
MAINTAINERS +10 -0
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c

Sure, if you think this is the best way to go, I have no problem.

Thanks,
Davidlohr

author Tested-by
#10 lore raw

Hi,

Quoted 49 lines · Paul E. McKenney
Quoted 38 lines · Jeremy Linton
Quoted 28 lines · Paul E. McKenney
Quoted 27 lines · Davidlohr Bueso
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
Quoted 6 lines · Jeremy Linton

Hi,

Quoted 2 lines · Jeremy Linton

If nwriters_stress=0 is passed to the lock torture test it will panic in:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Ping?

Has anyone had a chance to look at this?

Helps if you Cc the people actually working on this stuff of course...

Thank you for the forward, Peter, I have queued Jeremy's patch for testing and review.

fyi I had proposed the following a while back, which I think is more complete than this patch:

https://lkml.org/lkml/2017/5/15/201

Ah, there's also this (unrelated) fix:
https://lkml.org/lkml/2017/5/15/203

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

But Jeremy's list of email addresses is what you would expect from looking at MAINTAINERS, so how about the following patch?

And it looks like Jeremy was not alone -- I was not CCed on either of those patches, either.

Dave's patch does look more complete, and it certainly was submitted first. Let's see if it still applies... And they both do.

Quoted 7 lines

Yes, avoiding the zero length allocations is probably a good plan, and complaining if both the reader and writer are zero is doesn't hurt either.

So, I'm good with that patch too..

Thank you!

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

I will give it a spin..

Very good! Looking forward to seeing the results.

I've been testing it on arm64 machines and it appears to work as expected.

Thanks,

Quoted 70 lines

Thanx, Paul

Quoted 66 lines
Quoted 65 lines
Quoted 64 lines
Quoted 48 lines

------------------------------------------------------------------------

commit 58322063498c8f5a3cc88f95bee237a0ce81f70a

Author: Paul E. McKenney <[email protected]>
Date:   Tue Nov 7 14:10:03 2017 -0800

torture: Place all torture-test modules in one MAINTAINERS group

There is some confusion about where patches to kernel/torture.c and kernel/locking/locktorture.c should be sent. This commit therefore updates MAINTAINERS appropriately.

MAINTAINERS +0 -0
index 2d3d750b19c0..eab868adedc6 100644
@@ -8091,6 +8091,7 @@ F:	arch/*/include/asm/rwsem.h

F: include/linux/seqlock.h
F: lib/locking*.[ch]
F: kernel/locking/
+X: kernel/locking/locktorture.c

LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
M: "Richard Russon (FlatCap)" <[email protected]>

MAINTAINERS +0 -0
@@ -11318,15 +11319,6 @@ L:	[email protected]

S: Orphan
F: drivers/net/wireless/ray*

MAINTAINERS +0 -9
-RCUTORTURE MODULE
-M:	Josh Triplett <[email protected]>
-M:	"Paul E. McKenney" <[email protected]>
-L:	[email protected]
-S:	Supported
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
-F:	Documentation/RCU/torture.txt
-F:	kernel/rcu/rcutorture.c
-

RCUTORTURE TEST FRAMEWORK
M: "Paul E. McKenney" <[email protected]>
M: Josh Triplett <[email protected]>

MAINTAINERS +0 -0
@@ -13558,6 +13550,18 @@ L:	[email protected]

S: Maintained
F: drivers/platform/x86/topstar-laptop.c

MAINTAINERS +1 -0
+TORTURE-TEST MODULES

MAINTAINERS L: [email protected] · line 13563

Quoted 10 lines
MAINTAINERS +10 -0
+M:	Davidlohr Bueso <[email protected]>
+M:	"Paul E. McKenney" <[email protected]>
+M:	Josh Triplett <[email protected]>
+L:	[email protected]
+S:	Supported
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
+F:	Documentation/RCU/torture.txt
+F:	kernel/torture.c
+F:	kernel/rcu/rcutorture.c
+F:	kernel/locking/locktorture.c

Sure, if you think this is the best way to go, I have no problem.

Thanks,
Davidlohr

maintainer
#11 lore raw
In reply to Paul E. McKenney
Quoted 3 lines · Paul E. McKenney

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

No, feel free.

Thanks,
Davidlohr

#12 lore raw
Quoted 7 lines · Davidlohr Bueso
Quoted 3 lines · Paul E. McKenney

Jeremy, could you please test Dave's patches and make sure that they work for you? That way I can apply your Tested-by. Dave, any objection to my adding Jeremy's Reported-by to your /201 patch?

No, feel free.

Applied and pushed, thank you both!

Thanx, Paul