diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-10-15 15:53:32 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-10-15 16:45:30 -0300 |
| commit | 78f73985846465a25a7bd1d89904053661f3ca92 (patch) | |
| tree | 2819d04bce874eb78033d2e06772351b187246c9 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 2225ab306575e424b3dad2ee1be2521c89249d15 (diff) | |
| download | linux-78f73985846465a25a7bd1d89904053661f3ca92.tar.gz linux-78f73985846465a25a7bd1d89904053661f3ca92.zip | |
smb: client: reclaim credits for decrypted reads with no matching mid
When a decrypted SMB2 READ response carries a MessageId that matches no
outstanding request, both the inline receive_encrypted_read() and the
offloaded smb2_decrypt_offload() paths drop the frame without accounting
the credits the server granted in it. The plaintext unknown-frame path in
cifs_demultiplex_thread() already reclaims them with
smb2_add_credits_from_hdr(), so encrypted reads leak credits that the
plaintext path would not.
This also happens for legitimate frames - e.g. a reply that arrives after
the client has timed out and dropped the mid - so over a long-lived
connection the client's credit count drifts down and can eventually starve
it of the ability to issue requests. The frame is AEAD-authenticated, so
the granted credits in the decrypted header come from the real server and
are safe to apply.
Reclaim the credits from the decrypted header before dropping the frame,
and export smb2_add_credits_from_hdr() so the SMB2 receive paths can use it.
Fixes: c42a6abe3012 ("CIFS: Add capability to decrypt big read responses")
Fixes: 35cf94a39728 ("smb3: allow parallelizing decryption of reads")
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
