From: Wang Zhaolong <wangzhaolong633@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Tom Talpey <tom@talpey.com>,
ChenXiaoSong <chenxiaosong@chenxiaosong.com>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] ksmbd: fix named-pipe reply loss with small output buffers
Date: Tue, 27 Oct 2026 12:19:47 +0800 [thread overview]
Message-ID: <a2d84436-1b28-4fdc-8c27-d8022356013e@gmail.com> (raw)
In-Reply-To: <CAKYAXd-OpiRi2uQzK81rJpHis0VkS-gTaZpQWJ4TZH_RJFzL6g@mail.gmail.com>
>>
>> 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
prev parent reply other threads:[~2026-10-27 4:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 5:35 [PATCH v3 0/2] ksmbd: fix named-pipe reply loss and operation races Wang Zhaolong
2026-10-26 5:35 ` [PATCH v3 1/2] ksmbd: avoid races between named-pipe operations Wang Zhaolong
2026-10-26 5:35 ` [PATCH v3 2/2] ksmbd: fix named-pipe reply loss with small output buffers Wang Zhaolong
2026-10-26 11:33 ` Namjae Jeon
2026-10-26 15:09 ` Wang Zhaolong
2026-10-26 15:19 ` Wang Zhaolong
2026-10-27 1:19 ` Namjae Jeon
2026-10-27 4:19 ` Wang Zhaolong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2d84436-1b28-4fdc-8c27-d8022356013e@gmail.com \
--to=wangzhaolong633@gmail.com \
--cc=chenxiaosong@chenxiaosong.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®