fix backchannel crash due to multipath
Subsystems (2)
Quoted 8 lines · On March 24 J. Bruce Fields said:
pynfs can crash the nfs server since the new multipath code. The problem is that pynfs uses the same tcp connection for multiple v4 clients (something the spec explicitly allows). The callback client in such cases has to share the same
rpc_xprt. The new rpc code, when it creates two callback clients sharing the samerpc_xprt, ends up trying to keep thatrpc_xprton the lists of two different rpc_xprt_switch's. The first symptom I see is a list corruption warning.
Quoted 7 lines
So, I'm enforcing the requirement that there be only one backchannel
rpc_xprt_switchper tcp connection by doing as we do in therpc_xprt
case: keeping a pointer to it in thesvc_xprt, and using that when it's available instead of allocating a new one.That's a pretty straightforward fix (and I've verified it works), but doesn't look very elegant. If there's a better solution, I'm all ears.
I haven't come up with anything neater, and kind of need the crash fixed. ACK or NACK? I can take it through my tree if it's an ACK.
--b.
DQoNCk9uIDYvMTMvMTYsIDE0OjIxLCAiSi4gQnJ1Y2UgRmllbGRzIiA8YmZpZWxkc0BmaWVsZHNl cy5vcmc+IHdyb3RlOg0KDQo+T24gTWFyY2ggMjQgSi4gQnJ1Y2UgRmllbGRzIHNhaWQ6DQo+PiBw eW5mcyBjYW4gY3Jhc2ggdGhlIG5mcyBzZXJ2ZXIgc2luY2UgdGhlIG5ldyBtdWx0aXBhdGggY29k ZS4gIFRoZQ0KPj4gcHJvYmxlbSBpcyB0aGF0IHB5bmZzIHVzZXMgdGhlIHNhbWUgdGNwIGNvbm5l Y3Rpb24gZm9yIG11bHRpcGxlIHY0DQo+PiBjbGllbnRzIChzb21ldGhpbmcgdGhlIHNwZWMgZXhw bGljaXRseSBhbGxvd3MpLiAgVGhlIGNhbGxiYWNrIGNsaWVudCBpbg0KPj4gc3VjaCBjYXNlcyBo YXMgdG8gc2hhcmUgdGhlIHNhbWUgcnBjX3hwcnQuICBUaGUgbmV3IHJwYyBjb2RlLCB3aGVuIGl0 DQo+PiBjcmVhdGVzIHR3byBjYWxsYmFjayBjbGllbnRzIHNoYXJpbmcgdGhlIHNhbWUgcnBjX3hw cnQsIG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 24 J. Bruce Fields said:
pynfs can crash the nfs server since the new multipath code. The problem is that pynfs uses the same tcp connection for multiple v4 clients (something the spec explicitly allows). The callback client in such cases has to share the same
rpc_xprt. The new rpc code, when it creates two callback clients sharing the samerpc_xprt, ends up trying to keep thatrpc_xprton the lists of two different rpc_xprt_switch's. The first symptom I see is a list corruption warning.So, I'm enforcing the requirement that there be only one backchannel
rpc_xprt_switchper tcp connection by doing as we do in therpc_xprt
case: keeping a pointer to it in thesvc_xprt, and using that when it's available instead of allocating a new one.That's a pretty straightforward fix (and I've verified it works), but doesn't look very elegant. If there's a better solution, I'm all ears.
Quoted 7 lines
Quoted 5 lines
I haven't come up with anything neater, and kind of need the crash fixed. ACK or NACK? I can take it through my tree if it's an ACK.
--b.
Ack
Thanks!--b.