diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-09-28 10:23:00 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-09-30 14:24:21 -0300 |
| commit | 53c5c2c1095eb21e214811fec16cd75f89d72ee2 (patch) | |
| tree | 9e041e1cb070cbe6f31c8bbf1396d202204741c1 /lib/bug.c | |
| parent | 75aa4b4d557114276bb72e19a9bce5cb27b5e4b8 (diff) | |
| download | linux-stable-53c5c2c1095eb21e214811fec16cd75f89d72ee2.tar.gz linux-stable-53c5c2c1095eb21e214811fec16cd75f89d72ee2.zip | |
smb: client: require stable pages for signed connections
When signing, cifs computes the SMB signature over the pagecache folios
in place and then hands those same folios to the socket. If a buffered
write mutates a folio while a write subrequest is still in flight, the
signature no longer matches the data that follows it, the server rejects
the write with STATUS_ACCESS_DENIED (-EACCES), and the error is latched
in the mapping, so the next fsync()/fallocate() returns -EIO.
Mark the mapping for stable writes so netfs_perform_write() waits for
writeback to complete before modifying an in-flight folio. This is
only needed when the connection is signed.
Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Reviewed-by: David Howells <dhowells@redhat.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Matthew Wilcox <willy@infradead.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 'lib/bug.c')
0 files changed, 0 insertions, 0 deletions
