Skip to contentSkip to conversation

SUNRPC: Set alloc_slot for backchannel tcp ops

PATCH In review [email protected] 4 participants 11 messages Sep 24, 2012 – Oct 27, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: Set alloc_slot for backchannel tcp ops

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
 [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
 [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
 [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [<ffffffff81073589>] process_one_work+0x139/0x500
 [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
 [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
 [<ffffffff81073d1e>] worker_thread+0x15e/0x460
 [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
 [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
 [<ffffffff81079603>] kthread+0x93/0xa0
 [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
 [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 86b7777..aaaadfb 100644
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
Signature · 1 line
1.7.12.1
#1 lore raw
Quoted 6 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Thanks, I just rebased some of my work to 3.6 and ran across that! It crashes the 4.1 server very quickly....

--b.

Quoted 41 lines
Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
 [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
 [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
 [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [<ffffffff81073589>] process_one_work+0x139/0x500
 [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
 [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
 [<ffffffff81073d1e>] worker_thread+0x15e/0x460
 [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
 [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
 [<ffffffff81079603>] kthread+0x93/0xa0
 [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
 [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 86b7777..aaaadfb 100644
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
Signature · 6 lines
1.7.12.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 10 lines · J. Bruce Fields
Quoted 6 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Thanks, I just rebased some of my work to 3.6 and ran across that! It crashes the 4.1 server very quickly....

That sounds like my story. It got my peer-to-peer server right away, too.

- Bryan

Quoted 44 lines

--b.

Quoted 41 lines
Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
 [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
 [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
 [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [<ffffffff81073589>] process_one_work+0x139/0x500
 [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
 [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
 [<ffffffff81073d1e>] worker_thread+0x15e/0x460
 [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
 [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
 [<ffffffff81079603>] kthread+0x93/0xa0
 [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
 [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 86b7777..aaaadfb 100644
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
Signature · 6 lines
1.7.12.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

T24gTW9uLCAyMDEyLTA5LTI0IGF0IDEzOjUyIC0wNDAwLCBCcnlhbiBTY2h1bWFrZXIgd3JvdGU6 DQo+IE9uIDA5LzI0LzIwMTIgMDE6NDIgUE0sIEouIEJydWNlIEZpZWxkcyB3cm90ZToNCj4gPiBP biBNb24sIFNlcCAyNCwgMjAxMiBhdCAwMTozOTowMVBNIC0wNDAwLCBianNjaHVtYUBuZXRhcHAu Y29tIHdyb3RlOg0KPiA+PiBGcm9tOiBCcnlhbiBTY2h1bWFrZXIgPGJqc2NodW1hQG5ldGFwcC5j b20+DQo+ID4+DQo+ID4+IGYzOWMxYmZiNWEwM2UyZDI1NTQ1MWJmZjA1YmUwZDcyNTUyOThmYTQg KFNVTlJQQzogRml4IGEgVURQIHRyYW5zcG9ydA0KPiA+PiByZWdyZXNzaW9uKSBpbnRyb2R1Y2Vk IHRoZSAiYWxsb2Nfc2xvdCIgZnVuY3Rpb24gZm9yIHhwcnQgb3BlcmF0aW9ucywNCj4gPj4gYnV0 IG5ldmVyIGNyZWF0ZWQgb25lIGZvciB0aGUgYmFja2NoYW5uZWwgb3BlcmF0aW9ucy4gIFRoaXMg cGF0Y2ggZml4ZXMNCj4gPj4gYSBudWxsIHBvaW50ZXIgZGVyZWZlcmVuY2Ugd2hlbiBtb3VudGlu ZyBORlMgb3ZlciB2NC4xLg0KPiA+IA0KPiA+IFRoYW5rcywgSSBqdXN0IHJlYmFzZWQgc29tZSBv ZiBteSB3b3JrIHRvIDMuNiBhbmQgcmFuIGFjcm9zcyB0aGF0ISAgSXQNCj4gPiBjc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mQgc2hvdWxkIG5ldmVyIGNsZWFyIGl0Lg0KDQotLSANClRyb25kIE15a2xlYnVzdA0K TGludXggTkZTIGNsaWVudCBtYWludGFpbmVyDQoNCk5ldEFwcA0KVHJvbmQuTXlrbGVidXN0QG5l dGFwcC5jb20NCnd3dy5uZXRhcHAuY29tDQo=

#4 lore raw
Quoted 63 lines · Trond
Quoted 56 lines · Bryan Schumaker
Quoted 10 lines · J. Bruce Fields
Quoted 6 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Thanks, I just rebased some of my work to 3.6 and ran across that! It crashes the 4.1 server very quickly....

That sounds like my story. It got my peer-to-peer server right away, too.

- Bryan

Quoted 40 lines

--b.

Quoted 37 lines
Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
 [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
 [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
 [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [<ffffffff81073589>] process_one_work+0x139/0x500
 [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
 [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
 [<ffffffff81073d1e>] worker_thread+0x15e/0x460
 [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
 [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
 [<ffffffff81079603>] kthread+0x93/0xa0
 [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
 [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 86b7777..aaaadfb 100644
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
Signature · 1 line
1.7.12.1
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 6 lines

Argh... Sorry, that was entirely my fault. I traced the client side backchannel code, and found it was allocating slots using its own mechanism, then thought that applied to bc_tcp_ops.

I find the NFSv4.1 backchannel code to be even more confusing than lockd.

Patches very much welcomed.

Quoted 3 lines

...and BTW the .rpcbind hack above is a prime example. Bruce, why do you need that? The server back channel sets xprt_set_bound() in xs_setup_bc_tcp() and should never clear it.

Beats me; you're suggesting the below? Agreed, looks wrong.

It must be pointless in the AF_LOCAL case too, though I didn't try to verify.

--b.

commit ad25de5558f702fa2c7ececedf4d61975dababa8

Author: J. Bruce Fields <[email protected]>
Date:   Mon Sep 24 15:53:29 2012 -0400

sunrpc: server back channel needs no rpcbind method

XPRT_BOUND is set on server backchannel xprts by xs_setup_bc_tcp() (using xprt_set_bound()), and is never cleared, so ->rpcbind() will never need to be called.

net/sunrpc/xprtsock.c +0 -1
index cd59a80..3a8663e6 100644
@@ -2529,7 +2529,6 @@ static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
 	.alloc_slot		= xprt_alloc_slot,
-	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
 	.send_request		= bc_send_request,
#5 lore raw
In reply to [email protected]

Did this not get sent to stable? (Now upstream as 84e28a307e376f271505af65a7b7e212dd6f61f4.)

--b.

Quoted 47 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP transport regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
 [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
 [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
 [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
 [<ffffffff81073589>] process_one_work+0x139/0x500
 [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
 [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
 [<ffffffff81073d1e>] worker_thread+0x15e/0x460
 [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
 [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
 [<ffffffff81079603>] kthread+0x93/0xa0
 [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
 [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c +1 -0
index 86b7777..aaaadfb 100644
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
Signature · 6 lines
1.7.12.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

Et tu Bruce?

Not yet, because if you check, neither has commit f39c1bfb5a (SUNRPC: Fix a UDP transport regression). I figured it is better to send them both together as a single patch.

Trond

Quoted 61 lines

-----Original Message-----
From: J. Bruce Fields [mailto:[email protected]]
Sent: Friday, October 19, 2012 3:40 PM
To: Schumaker, Bryan
Cc: Myklebust, Trond; [email protected]; [email protected]
Subject: Re: [PATCH] SUNRPC: Set alloc_slot for backchannel tcp ops

Did this not get sent to stable? (Now upstream as 84e28a307e376f271505af65a7b7e212dd6f61f4.)

--b.

Quoted 3 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP

transport

Quoted 39 lines

regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
[<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
[<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
[<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
[<ffffffff81073589>] process_one_work+0x139/0x500
[<ffffffff81070e70>] ? alloc_worker+0x70/0x70  [<ffffffffa020e5f0>] ?
__rpc_execute+0x400/0x400 [sunrpc]  [<ffffffff81073d1e>]
worker_thread+0x15e/0x460  [<ffffffff8145c839>] ?
preempt_schedule+0x49/0x70  [<ffffffff81073bc0>] ?
rescuer_thread+0x230/0x230  [<ffffffff81079603>] kthread+0x93/0xa0
[<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
[<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c index renamed from net/sunrpc/xprtsock.c +0 -0

86b7777..aaaadfb 100644

net/sunrpc/xprtsock.c +1 -1
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
--

1.7.12.1

Quoted 3 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More

majordomo

Quoted 1 line

info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 4 lines · Trond

Et tu Bruce?

Not yet, because if you check, neither has commit f39c1bfb5a (SUNRPC: Fix a UDP transport regression). I figured it is better to send them both together as a single patch.

I'm confused, I thought I did check. Looking again... It's in 3.6:

	$ git log v3.6..f39c1bfb5a
	$ 

and cc'd to stable:

	$ git show f39c1bfb5a|grep stable
	    Cc: [email protected] [>= 3.1]

so presumably it's already on its way to older stable branches too.

--b.

Quoted 64 lines

Trond

Quoted 61 lines

-----Original Message-----
From: J. Bruce Fields [mailto:[email protected]]
Sent: Friday, October 19, 2012 3:40 PM
To: Schumaker, Bryan
Cc: Myklebust, Trond; [email protected]; [email protected]
Subject: Re: [PATCH] SUNRPC: Set alloc_slot for backchannel tcp ops

Did this not get sent to stable? (Now upstream as 84e28a307e376f271505af65a7b7e212dd6f61f4.)

--b.

Quoted 3 lines · On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected] wrote:

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP

transport

Quoted 39 lines

regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over v4.1.

Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
[<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
[<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
[<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
[<ffffffff81073589>] process_one_work+0x139/0x500
[<ffffffff81070e70>] ? alloc_worker+0x70/0x70  [<ffffffffa020e5f0>] ?
__rpc_execute+0x400/0x400 [sunrpc]  [<ffffffff81073d1e>]
worker_thread+0x15e/0x460  [<ffffffff8145c839>] ?
preempt_schedule+0x49/0x70  [<ffffffff81073bc0>] ?
rescuer_thread+0x230/0x230  [<ffffffff81079603>] kthread+0x93/0xa0
[<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
[<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c index renamed from net/sunrpc/xprtsock.c +0 -0

86b7777..aaaadfb 100644

net/sunrpc/xprtsock.c +1 -1
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
--

1.7.12.1

Quoted 3 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More

majordomo

Quoted 1 line

info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 11 lines

-----Original Message-----
From: J. Bruce Fields [mailto:[email protected]]
Sent: Friday, October 19, 2012 5:01 PM
To: Myklebust, Trond
Cc: Schumaker, Bryan; [email protected]; [email protected]
Subject: Re: [PATCH] SUNRPC: Set alloc_slot for backchannel tcp ops

Quoted 3 lines · Trond

Et tu Bruce?

Quoted 8 lines
Quoted 1 line

Not yet, because if you check, neither has commit f39c1bfb5a (SUNRPC: Fix

a UDP transport regression). I figured it is better to send them both together as a single patch.

I'm confused, I thought I did check. Looking again... It's in 3.6:

	$ git log v3.6..f39c1bfb5a
	$

Yes. 3.6 still has the original patch+problem.

Quoted 6 lines

and cc'd to stable:

	$ git show f39c1bfb5a|grep stable
	    Cc: [email protected] [>= 3.1]

so presumably it's already on its way to older stable branches too.

No. See attachment...

Quoted 67 lines
Quoted 17 lines

Trond

Quoted 14 lines

-----Original Message-----
From: J. Bruce Fields [mailto:[email protected]]
Sent: Friday, October 19, 2012 3:40 PM
To: Schumaker, Bryan
Cc: Myklebust, Trond; [email protected]; [email protected]
Subject: Re: [PATCH] SUNRPC: Set alloc_slot for backchannel tcp ops

Did this not get sent to stable? (Now upstream as 84e28a307e376f271505af65a7b7e212dd6f61f4.)

--b.

On Mon, Sep 24, 2012 at 01:39:01PM -0400, [email protected]

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 3 lines

From: Bryan Schumaker <[email protected]>

f39c1bfb5a03e2d255451bff05be0d7255298fa4 (SUNRPC: Fix a UDP

transport

Quoted 3 lines

regression) introduced the "alloc_slot" function for xprt operations, but never created one for the backchannel operations. This patch fixes a null pointer dereference when mounting NFS over

v4.1.

Quoted 41 lines
Quoted 41 lines
Quoted 36 lines
Call Trace:
 [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
[<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
[<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
[<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
[<ffffffff81073589>] process_one_work+0x139/0x500
[<ffffffff81070e70>] ? alloc_worker+0x70/0x70  [<ffffffffa020e5f0>] ?
__rpc_execute+0x400/0x400 [sunrpc]  [<ffffffff81073d1e>]
worker_thread+0x15e/0x460  [<ffffffff8145c839>] ?
preempt_schedule+0x49/0x70  [<ffffffff81073bc0>] ?
rescuer_thread+0x230/0x230  [<ffffffff81079603>] kthread+0x93/0xa0
[<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
[<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81465d00>] ? gs_change+0x13/0x13
---
 net/sunrpc/xprtsock.c | 1 +
 1 file changed, 1 insertion(+)
net/sunrpc/xprtsock.c index renamed from net/sunrpc/xprtsock.c +0 -0

86b7777..aaaadfb 100644

net/sunrpc/xprtsock.c +1 -1
@@ -2521,6 +2521,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
 static struct rpc_xprt_ops bc_tcp_ops = {
 	.reserve_xprt		= xprt_reserve_xprt,
 	.release_xprt		= xprt_release_xprt,
+	.alloc_slot		= xprt_alloc_slot,
 	.rpcbind		= xs_local_rpcbind,
 	.buf_alloc		= bc_malloc,
 	.buf_free		= bc_free,
--

1.7.12.1

Quoted 3 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More

majordomo

Quoted 1 line

info at http://vger.kernel.org/majordomo-info.html

Quoted 11 lines · Greg Kroah-Hartman

3.4-stable review patch. If anyone has any objections, please let me know.

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

From: Trond Myklebust <[email protected]>

commit f39c1bfb5a03e2d255451bff05be0d7255298fa4 upstream.

Commit 43cedbf0e8dfb9c5610eb7985d5f21263e313802 (SUNRPC: Ensure that we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing hangs in the case of NFS over UDP mounts.

Ditto with this. Please hold this patch until the 1 line fix mentioned previously has been merged upstream (at which point I will resend the patch through [email protected]).

Thanks!
Trond

--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com

#9 lore raw
Quoted 22 lines · Trond
Quoted 11 lines

-----Original Message-----
From: J. Bruce Fields [mailto:[email protected]]
Sent: Friday, October 19, 2012 5:01 PM
To: Myklebust, Trond
Cc: Schumaker, Bryan; [email protected]; [email protected]
Subject: Re: [PATCH] SUNRPC: Set alloc_slot for backchannel tcp ops

Quoted 3 lines · Trond

Et tu Bruce?

Quoted 8 lines
Quoted 1 line

Not yet, because if you check, neither has commit f39c1bfb5a (SUNRPC: Fix

a UDP transport regression). I figured it is better to send them both together as a single patch.

I'm confused, I thought I did check. Looking again... It's in 3.6:

	$ git log v3.6..f39c1bfb5a
	$

Yes. 3.6 still has the original patch+problem.

Quoted 8 lines
Quoted 6 lines

and cc'd to stable:

	$ git show f39c1bfb5a|grep stable
	    Cc: [email protected] [>= 3.1]

so presumably it's already on its way to older stable branches too.

No. See attachment...

OK. As long as it makes it to 3.6.x one way or another, I'm happy....

--b.

#10 lore raw
In reply to J. Bruce Fields
Quoted 2 lines · J. Bruce Fields

Did this not get sent to stable? (Now upstream as 84e28a307e376f271505af65a7b7e212dd6f61f4.)

[...]

I've added this to the queue for 3.2.

Ben.

Signature · 2 lines
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.