Found minor bug in kernel cifs. Who should I tell? I have a fix (soft of).
Yanko Sheiretov <[email protected]> Thu, 06 May 2010 15:54:30 -0400
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
Meanwhile during debugging I found a minor bug in the kernel cifs code.
I am wondering who I should send this to.
Here is what it is:
In file fs/cifs/connect.c line 462 reads
cFYI(1, ("Negative RFC1002 Session Response Error 0x%x)",
pdu_length));
Apart from the superfluous ")" the problem here is that it doesn't
actually log the error code returned, which is given in the
byte following the header. When I was trying to get the error code, I
substituted the line above with (I stole this from later in the file):
length = 0;
pdu_length = 1;
iov.iov_base = 4 + (char *)smb_buffer;
iov.iov_len = pdu_length;
for (total_read = 0; total_read < pdu_length;
total_read += length) {
length = kernel_recvmsg(csocket, &smb_msg, &iov, 1,
pdu_length - total_read, 0);
}
cFYI(1, ("Negative RFC1002 Session Response Error 0x%x",
int( *(4+(char *)smb_buffer) ) ) );
but I realize this is a kluge, so whoever maintains the code should
put in a real fix.
Yanko