libceph: fix CEPH_FEATURE_CEPHX_V2 check in calc_signature()
PATCH 1/1 libceph: fix CEPH_FEATURE_CEPHX_V2 check in calc_signature()
Upstream commit cc255c76c70f ("libceph: implement CEPHX_V2 calculation mode") was adjusted incorrectly: CEPH_FEATURE_CEPHX_V2 if condition got inverted, thus breaking 4.9.144 and later kernels for all setups that use cephx.
Cc Ben Hutchings <[email protected]>
Signed-off-by Ilya Dryomov <[email protected]>
--- net/ceph/auth_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ceph/auth_x.c +1 -1
@@ -804,7 +804,7 @@ static int calc_signature(struct ceph_x_authorizer *au, struct ceph_msg *msg,void *enc_buf = au->enc_buf;int ret; -if (msg->con->peer_features &CEPH_FEATURE_CEPHX_V2 ) { +if (!(msg->con->peer_features &CEPH_FEATURE_CEPHX_V2 )) {struct {__le32 len;__le32 header_crc;
Signature · 1 line
2.14.4
Quoted 4 lines · Ilya Dryomov
Upstream commit
cc255c76c70f("libceph: implementCEPHX_V2calculation mode") was adjusted incorrectly:CEPH_FEATURE_CEPHX_V2if condition got inverted, thus breaking 4.9.144 and later kernels for all setups that use cephx.
Whoa, sorry about that.
Ben.
Quoted 19 lines
Cc Ben Hutchings <[email protected]>Signed-off-by Ilya Dryomov <[email protected]>---
net/ceph/auth_x.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)net/ceph/auth_x.c +0
-0@@ -804,7 +804,7 @@ static int calc_signature(struct ceph_x_authorizer *au, struct ceph_msg *msg, void *enc_buf = au->enc_buf; int ret;net/ceph/auth_x.c +1
-1-if (msg->con->peer_features &CEPH_FEATURE_CEPHX_V2 ) { +if (!(msg->con->peer_features &CEPH_FEATURE_CEPHX_V2 )) {struct {
__le32len;
__le32header_crc;
Signature · 3 lines
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom