23 #include <linux/ctype.h>
48 cERROR(1,
"Received Request not response");
52 cERROR(1,
"Bad protocol string signature header %x",
55 cERROR(1,
"Mids do not match: %llu and %llu", mid,
104 cFYI(1,
"%s length: 0x%x, smb_buf_length: 0x%x", __func__, length, len);
111 if (length <
sizeof(
struct smb2_pdu)) {
120 cERROR(1,
"Length less than SMB header size");
125 cERROR(1,
"SMB length greater than maximum, mid=%llu", mid);
129 if (check_smb2_hdr(hdr, mid))
133 cERROR(1,
"Illegal structure size %u",
140 cERROR(1,
"Illegal SMB2 command %d", command);
148 cERROR(1,
"Illegal response size %u for command %d",
155 cERROR(1,
"Illegal response size %d for oplock break",
161 if (4 + len != length) {
162 cERROR(1,
"Total length %u RFC1002 length %u mismatch mid %llu",
163 length, 4 + len, mid);
169 if (4 + len != clc_len) {
170 cFYI(1,
"Calculated size %u length %u mismatch mid %llu",
171 clc_len, 4 + len, mid);
176 if (clc_len == 4 + len + 1)
270 cERROR(1,
"no length check for command");
279 cERROR(1,
"offset %d too large, data area ignored", *off);
282 }
else if (*off < 0) {
283 cERROR(1,
"negative offset %d to data invalid ignore data area",
287 }
else if (*len < 0) {
288 cERROR(1,
"negative data length %d invalid, data area ignored",
291 }
else if (*len > 128 * 1024) {
292 cERROR(1,
"data area larger than 128K: %d", *len);
297 if ((*off != 0) && (*len != 0))
327 cFYI(1,
"SMB2 data length %d offset %d", data_length, offset);
329 if (data_length > 0) {
337 if (offset + 4 + 1 < len) {
338 cERROR(1,
"data area offset %d overlaps SMB2 header %d",
339 offset + 4 + 1, len);
346 cFYI(1,
"SMB2 len %d", len);
355 const char *start_of_path;
360 start_of_path = from + 1;
362 start_of_path =
from;
363 to = cifs_strndup_to_utf16(start_of_path,
PATH_MAX, &len,
408 cFYI(1,
"Lease release rc %d", rc);
430 cERROR(1,
"Memory allocation failed during lease break check");
437 cFYI(1,
"Checking for lease break");
452 cinode = CIFS_I(cfile->
dentry->d_inode);
458 cFYI(1,
"found in the open list");
459 cFYI(1,
"lease key match, lease break 0x%d",
483 if (!found && ack_req) {
492 cFYI(1,
"found in the pending open list");
493 cFYI(1,
"lease key match, lease break 0x%d",
509 cFYI(1,
"Can not process lease break - no lease matched");
523 cFYI(1,
"Checking for oplock break");
531 return smb2_is_valid_lease_break(buffer, server);
551 cfile->
fid.persistent_fid ||
553 cfile->
fid.volatile_fid)
556 cFYI(1,
"file id match, oplock break");
557 cinode = CIFS_I(cfile->
dentry->d_inode);
576 cFYI(1,
"No matching file for oplock break");
581 cFYI(1,
"Can not process oplock break for non-existent connection");