Skip to content

Revert "nvmet-tcp: Don't free SQ on authentication success"#746

Open
blktests-ci[bot] wants to merge 2 commits intolinus-master_basefrom
series/1082258=>linus-master
Open

Revert "nvmet-tcp: Don't free SQ on authentication success"#746
blktests-ci[bot] wants to merge 2 commits intolinus-master_basefrom
series/1082258=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Apr 17, 2026

Pull request for series with
subject: Revert "nvmet-tcp: Don't free SQ on authentication success"
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1082258

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 17, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 17, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from fc834da to 21c3d92 Compare April 17, 2026 05:46
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 17, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from 21c3d92 to a9ad33d Compare April 17, 2026 17:04
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6b4d829 to ceec5ed Compare April 21, 2026 06:51
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 21, 2026

Upstream branch: b4e0758
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from a9ad33d to abb4f27 Compare April 21, 2026 06:52
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ceec5ed to 3b54e52 Compare April 22, 2026 20:20
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 22, 2026

Upstream branch: 6596a02
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from abb4f27 to 5f26abf Compare April 22, 2026 20:20
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3b54e52 to 6a0b974 Compare April 23, 2026 16:58
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 23, 2026

Upstream branch: 507bd4b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from 5f26abf to 08e879e Compare April 23, 2026 16:59
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6a0b974 to 59ca59b Compare April 24, 2026 00:56
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from 08e879e to 3744682 Compare April 24, 2026 00:57
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from 94f0438 to 857ada9 Compare April 24, 2026 07:54
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1082258
version: 1

In an attempt to fix REPLACETLSPSK we stopped freeing the secrets on
successful connections. This resulted in memory leaks in the kernel, so
let's revert the commit. A improved fix is being developed to just avoid
clearing the tls_key variable.

This reverts commit 2e6eb6b.

Signed-off-by: Alistair Francis <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Chris Leech <[email protected]>
Curently after the host sends a REPLACETLSPSK we free the TLS keys as
part of calling nvmet_auth_sq_free() on success. This means when the
host sends a follow up REPLACETLSPSK we return CONCAT_MISMATCH as the
check for !nvmet_queue_tls_keyid(req->sq) fails.

A previous attempt to fix this involed not calling nvmet_auth_sq_free()
on successful connections, but that results in memory leaks. Instead we
should not clear `tls_key` in nvmet_auth_sq_free(), as that was
incorrectly wiping the tls keys which are used for the session.

This patch ensures we correctly free the ephemeral session key on
connection, yet we don't free the TLS key unless closing the connection.

Signed-off-by: Alistair Francis <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Chris Leech <[email protected]>
@blktests-ci blktests-ci Bot force-pushed the series/1082258=>linus-master branch from 3744682 to 73fc81e Compare April 24, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant