Re: [PATCH 1/2] cifs: fix length vs. total_read confusion in cifs_demultiplex_thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/1/27 Pavel Shilovsky <piastryyy@xxxxxxxxx>:
> 2011/1/27 Jeff Layton <jlayton@xxxxxxxxxx>:
>> length at this point is the length returned by the last kernel_recvmsg
>> call. total_read is the length of all of the data read so far. length
>> is more or less meaningless at this point, so use total_read for
>> everything.
>>
>> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
>> ---
>>  fs/cifs/connect.c |    7 +++----
>>  1 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
>> index 47034af..12a3e04 100644
>> --- a/fs/cifs/connect.c
>> +++ b/fs/cifs/connect.c
>> @@ -581,11 +581,10 @@ incomplete_rcv:
>>                else if (reconnect == 1)
>>                        continue;
>>
>> -               length += 4; /* account for rfc1002 hdr */
>> +               total_read += 4; /* account for rfc1002 hdr */
>>
>> -
>> -               dump_smb(smb_buffer, length);
>> -               if (checkSMB(smb_buffer, smb_buffer->Mid, total_read+4)) {
>> +               dump_smb(smb_buffer, total_read);
>> +               if (checkSMB(smb_buffer, smb_buffer->Mid, total_read)) {
>>                        cifs_dump_mem("Bad SMB: ", smb_buffer, 48);
>>                        continue;
>>                }
>> --
>> 1.7.3.4
>>
>
> Looks right.
>
> Reviewed-by: Pavel Shilovsky <piastry@xxxxxxxxxxx>
>

I've just noticed that you reject the second patch of this set. If
this one won't be changed you can feel free to leave above tag.

-- 
Best regards,
Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux