Re: [PATCH v3 2/2] ksmbd: fix named-pipe reply loss with small output buffers

From: Wang Zhaolong

Date: Tue Oct 27 2026 - 00:20:32 EST



>>
>> Thanks for catching this.
>>
>> I reproduced the sequence you described and confirmed the problem.
>>
>> For the READ path, your suggested STATUS_BUFFER_OVERFLOW check looks
>> appropriate when a positive-length read leaves unread bytes from
>> the same reply.
>>
>> For TRANSCEIVE, I think the correct fix needs some discussion.
>> One possibility is to return STATUS_PIPE_BUSY when cached reply
>> data remains, without issuing another IPC request or consuming the
>> cached data. The client would need to drain that reply through READ
>> before submitting another transaction. MS-FSCC §2.3.48[1] lists
>> PIPE_BUSY for a pipe containing unread data.
>>
>> However, I would like to confirm that this is the intended behavior
>> for this SMB2 path before preparing v4. Simply omitting the WRITE
>> and returning cached data would still silently discard the input.
>>
>> Would rejecting the transaction with STATUS_PIPE_BUSY be appropriate
>> here, or would you prefer a different approach?
> I think the former is correct.
>
> Thanks.

Okay, I will use the solution and send V4 after thorough testing.

Best regards,
Wang Zhaolong