Add missing recording of back channel attrs in nfsd4_session
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Kinglong Mee
commit
5b6feee9608dce7afd2646f457c93e612526d1d8forgot recording the back channel attrs innfsd4_session.nfsd just check the back channel attars by
check_backchannel_attrs, but do not record it innfsd4_sessionin the latest kernel.
Whoops. So the current server is returning random uninitialized data in those fields, or all zeros?
It would be easy enough to write a pynfs test for this, I think.
--b.
Quoted 22 lines
Signed-off-by Kinglong Mee <[email protected]>--- fs/nfsd/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+)fs/nfsd/nfs4state.c +2
-0@@ -999,6 +999,8 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, struspin_unlock (&nn->client_lock);memcpy (&new->se_fchannel, &cses->fore_channel,sizeof (struct nfsd4_channel_attrs )); +memcpy (&new->se_bchannel, &cses->back_channel, +sizeof (struct nfsd4_channel_attrs ));if (cses->flags &SESSION4_BACK_CHAN ) {struct sockaddr *sa =svc_addr (rqstp);/* Signature · 1 line
1.8.1.4
Quoted 11 lines · J. Bruce Fields
Quoted 5 lines · Kinglong Mee
commit
5b6feee9608dce7afd2646f457c93e612526d1d8forgot recording the back channel attrs innfsd4_session.nfsd just check the back channel attars by
check_backchannel_attrs, but do not record it innfsd4_sessionin the latest kernel.Whoops. So the current server is returning random uninitialized data in those fields, or all zeros?
It would be easy enough to write a pynfs test for this, I think.
No, server returns right data for nfsd4_encode_create_session encoding back-channel attrs from struct nfsd4_create_session, not from nfsd4_session.
Without this patch, se_bchannel in struct nfsd4_session contains data with all zeros.
thanks,
Kinglong Mee
Quoted 23 lines
Quoted 22 lines
Signed-off-by Kinglong Mee <[email protected]>--- fs/nfsd/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+)fs/nfsd/nfs4state.c +2
-0@@ -999,6 +999,8 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, struspin_unlock (&nn->client_lock);memcpy (&new->se_fchannel, &cses->fore_channel,sizeof (struct nfsd4_channel_attrs )); +memcpy (&new->se_bchannel, &cses->back_channel, +sizeof (struct nfsd4_channel_attrs ));if (cses->flags &SESSION4_BACK_CHAN ) {struct sockaddr *sa =svc_addr (rqstp);/* Signature · 1 line
1.8.1.4
Quoted 11 lines · Kinglong Mee
Quoted 10 lines · J. Bruce Fields
Quoted 5 lines · Kinglong Mee
commit
5b6feee9608dce7afd2646f457c93e612526d1d8forgot recording the back channel attrs innfsd4_session.nfsd just check the back channel attars by
check_backchannel_attrs, but do not record it innfsd4_sessionin the latest kernel.Whoops. So the current server is returning random uninitialized data in those fields, or all zeros?
Quoted 6 lines
Quoted 1 line
It would be easy enough to write a pynfs test for this, I think.
No, server returns right data for
nfsd4_encode_create_sessionencoding back-channel attrs from structnfsd4_create_session, not fromnfsd4_session.Without this patch,
se_bchannelin structnfsd4_sessioncontains data with all zeros.
Oh, I see.
But actually we never use se_bchannel for anything. Maybe the right thing is just to remove that field from nfsd4_session.
--b.
Quoted 28 lines
thanks,
Kinglong MeeQuoted 23 lines
Quoted 22 lines
Signed-off-by Kinglong Mee <[email protected]>--- fs/nfsd/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+)fs/nfsd/nfs4state.c +2
-0@@ -999,6 +999,8 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, struspin_unlock (&nn->client_lock);memcpy (&new->se_fchannel, &cses->fore_channel,sizeof (struct nfsd4_channel_attrs )); +memcpy (&new->se_bchannel, &cses->back_channel, +sizeof (struct nfsd4_channel_attrs ));if (cses->flags &SESSION4_BACK_CHAN ) {struct sockaddr *sa =svc_addr (rqstp);/* Signature · 1 line
1.8.1.4
2013/12/7 J. Bruce Fields <[email protected]>:
Quoted 17 lines · Kinglong Mee
Quoted 16 lines · J. Bruce Fields
Quoted 11 lines · Kinglong Mee
Quoted 5 lines
commit
5b6feee9608dce7afd2646f457c93e612526d1d8forgot recording the back channel attrs innfsd4_session.nfsd just check the back channel attars by
check_backchannel_attrs, but do not record it innfsd4_sessionin the latest kernel.Whoops. So the current server is returning random uninitialized data in those fields, or all zeros?
It would be easy enough to write a pynfs test for this, I think.
No, server returns right data for
nfsd4_encode_create_sessionencoding back-channel attrs from structnfsd4_create_session, not fromnfsd4_session.
Quoted 6 lines
Quoted 1 line
Without this patch,
se_bchannelin structnfsd4_sessioncontains data with all zeros.Oh, I see.
But actually we never use
se_bchannelfor anything. Maybe the right thing is just to remove that field fromnfsd4_session.
I'd like keep it in nfsd4_session.
Maybe nfsd will use it after a while.
thanks,
Kinglong Mee
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 23 lines
Signed-off-by Kinglong Mee <[email protected]>--- fs/nfsd/nfs4state.c | 2 ++ 1 file changed, 2 insertions(+)fs/nfsd/nfs4state.c +2
-1@@ -999,6 +999,8 @@ static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, struspin_unlock (&nn->client_lock);memcpy (&new->se_fchannel, &cses->fore_channel,sizeof (struct nfsd4_channel_attrs )); +memcpy (&new->se_bchannel, &cses->back_channel, +sizeof (struct nfsd4_channel_attrs ));if (cses->flags &SESSION4_BACK_CHAN ) {struct sockaddr *sa =svc_addr (rqstp);/* -- 1.8.1.4