Thread (175 messages) 175 messages, 3 authors, 2012-11-26

[ 061/171] ceph: osd_client: fix endianness bug in osd_req_encode_op()

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2012-11-22 21:52:31
Also in: lkml

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

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

From: Alex Elder <redacted>

(cherry picked from commit 065a68f9167e20f321a62d044cb2c3024393d455)
quoted
From Al Viro [off-list ref]
Al Viro noticed that we were using a non-cpu-encoded value in
a switch statement in osd_req_encode_op().  The result would
clearly not work correctly on a big-endian machine.

Signed-off-by: Alex Elder <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ceph/osd_client.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -278,7 +278,7 @@ static void osd_req_encode_op(struct cep
 {
 	dst->op = cpu_to_le16(src->op);
 
-	switch (dst->op) {
+	switch (src->op) {
 	case CEPH_OSD_OP_READ:
 	case CEPH_OSD_OP_WRITE:
 		dst->extent.offset =

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help