* [PATCH 0/3] fix backchannel crash due to multipath
@ 2016-05-24 21:16 J. Bruce Fields
0 siblings, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2016-05-24 21:16 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs, J. Bruce Fields
From: "J. Bruce Fields" <bfields@redhat.com>
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 same rpc_xprt, ends up trying
to keep that rpc_xprt on 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_switch per tcp connection by doing as we do in the rpc_xprt
case: keeping a pointer to it in the svc_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.
--b.
J. Bruce Fields (3):
SUNRPC: fix xprt leak on xps allocation failure
nfsd4/rpc: move backchannel create logic into rpc code
rpc: share one xps between all backchannels
fs/nfsd/nfs4callback.c | 18 +-----------------
include/linux/sunrpc/clnt.h | 2 --
include/linux/sunrpc/svc_xprt.h | 1 +
include/linux/sunrpc/xprt.h | 1 +
net/sunrpc/clnt.c | 31 +++++++++++++++++++++++++------
net/sunrpc/svc_xprt.c | 2 ++
net/sunrpc/xprtsock.c | 1 +
7 files changed, 31 insertions(+), 25 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/3] fix backchannel crash due to multipath
@ 2016-06-13 18:21 J. Bruce Fields
2016-06-13 19:24 ` Trond Myklebust
0 siblings, 1 reply; 4+ messages in thread
From: J. Bruce Fields @ 2016-06-13 18:21 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs
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 same rpc_xprt, ends up trying
> to keep that rpc_xprt on 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_switch per tcp connection by doing as we do in the rpc_xprt
> case: keeping a pointer to it in the svc_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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/3] fix backchannel crash due to multipath
2016-06-13 18:21 [PATCH 0/3] fix backchannel crash due to multipath J. Bruce Fields
@ 2016-06-13 19:24 ` Trond Myklebust
2016-06-13 20:54 ` J. Bruce Fields
0 siblings, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2016-06-13 19:24 UTC (permalink / raw)
To: J. Bruce Fields, Anna Schumaker; +Cc: linux-nfs@vger.kernel.org
DQoNCk9uIDYvMTMvMTYsIDE0OjIxLCAiSi4gQnJ1Y2UgRmllbGRzIiA8YmZpZWxkc0BmaWVsZHNl
cy5vcmc+IHdyb3RlOg0KDQo+T24gTWFyY2ggMjQgSi4gQnJ1Y2UgRmllbGRzIHNhaWQ6DQo+PiBw
eW5mcyBjYW4gY3Jhc2ggdGhlIG5mcyBzZXJ2ZXIgc2luY2UgdGhlIG5ldyBtdWx0aXBhdGggY29k
ZS4gIFRoZQ0KPj4gcHJvYmxlbSBpcyB0aGF0IHB5bmZzIHVzZXMgdGhlIHNhbWUgdGNwIGNvbm5l
Y3Rpb24gZm9yIG11bHRpcGxlIHY0DQo+PiBjbGllbnRzIChzb21ldGhpbmcgdGhlIHNwZWMgZXhw
bGljaXRseSBhbGxvd3MpLiAgVGhlIGNhbGxiYWNrIGNsaWVudCBpbg0KPj4gc3VjaC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PmZpeGVkLiAgQUNLIG9yIE5BQ0s/ICBJIGNhbiB0YWtl
IGl0IHRocm91Z2ggbXkgdHJlZSBpZiBpdCdzIGFuIEFDSy4NCj4NCj4tLWIuDQo+DQoNCkFjaw0K
DQo=
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/3] fix backchannel crash due to multipath
2016-06-13 19:24 ` Trond Myklebust
@ 2016-06-13 20:54 ` J. Bruce Fields
0 siblings, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2016-06-13 20:54 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Anna Schumaker, linux-nfs@vger.kernel.org
On Mon, Jun 13, 2016 at 07:24:06PM +0000, Trond Myklebust wrote:
>
>
> On 6/13/16, 14:21, "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> >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 same rpc_xprt, ends up trying
> >> to keep that rpc_xprt on 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_switch per tcp connection by doing as we do in the rpc_xprt
> >> case: keeping a pointer to it in the svc_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.
> >
>
> Ack
Thanks!--b.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-13 20:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 18:21 [PATCH 0/3] fix backchannel crash due to multipath J. Bruce Fields
2016-06-13 19:24 ` Trond Myklebust
2016-06-13 20:54 ` J. Bruce Fields
-- strict thread matches above, loose matches on Subject: below --
2016-05-24 21:16 J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).