diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-10-13 10:33:41 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-10-13 14:29:35 -0300 |
| commit | 8667061cf99394526dd9c0ea2662e6bbc7ae7848 (patch) | |
| tree | 692a7bdd3997ab3963a840531f15cbe233dae8b3 /tools/perf/scripts/python/stackcollapse.py | |
| parent | cafbf020e437365beaeacc682fecd50450dff669 (diff) | |
| download | linux-8667061cf99394526dd9c0ea2662e6bbc7ae7848.tar.gz linux-8667061cf99394526dd9c0ea2662e6bbc7ae7848.zip | |
smb: client: require stable pages for SMB compression
Like signing, SMB compression builds the write payload from the pagecache
folios: should_compress() lets a write request through and smb_compress()
compresses those folios on the way to the socket. If a buffered write
mutates a folio while a write subrequest is still in flight, the compressed
bytes no longer correspond to a consistent view of the data, and the server
silently stores corrupted contents - worse than the signed case, which at
least fails loudly with STATUS_ACCESS_DENIED.
Mark the mapping for stable writes when a write may be compressed, i.e. the
same condition should_compress() tests (compression negotiated and the share
allows compressed data), so netfs_perform_write() waits for writeback to
complete before modifying an in-flight folio.
Fixes: f046d71e84e1 ("smb: client: insert compression check/call on write requests")
Suggested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Shyam Prasad N <sprasad@microsoft.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Bharath SM <bharathsm@microsoft.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
