Skip to contentSkip to conversation

smb/server: fix debug log endianness in smb2_cancel()

PATCH Applied ChenXiaoSong 2 participants 2 messages Jun 17

Subsystems (2)
lore
Share & tools
lore

ChenXiaoSong

author reviewer
#0 lore raw

PATCH 1/1 smb/server: fix debug log endianness in smb2_cancel()

From: ChenXiaoSong <[email protected]>

Convert to CPU byte order to avoid incorrect debug log on big-endian architectures.

---
 fs/smb/server/smb2pdu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/smb/server/smb2pdu.c +2 -1
index 852236043bc6..13c5b0c6e65c 100644
@@ -7435,7 +7435,8 @@ int smb2_cancel(struct ksmbd_work *work)
 		hdr = ksmbd_resp_buf_next(work);
 
 	ksmbd_debug(SMB, "smb2 cancel called on mid %llu, async flags 0x%x\n",
-		    hdr->MessageId, hdr->Flags);
+		    le64_to_cpu(hdr->MessageId),
+		    le32_to_cpu(hdr->Flags));
 
 	if (hdr->Flags & SMB2_FLAGS_ASYNC_COMMAND) {
 		command_list = &conn->async_requests;
Signature · 1 line
2.54.0