Skip to content

cmds: allocated correct sized buffer for reading cap config list#3171

Open
igaw wants to merge 1 commit intolinux-nvme:masterfrom
igaw:fix-support_cap_config_list
Open

cmds: allocated correct sized buffer for reading cap config list#3171
igaw wants to merge 1 commit intolinux-nvme:masterfrom
igaw:fix-support_cap_config_list

Conversation

@igaw
Copy link
Collaborator

@igaw igaw commented Mar 12, 2026

The size of struct nvme_supported_cap_config_list_log only contains the header. Thus first read the header and then allocated the correctly sized buffer to read the log page.

Reported-by: 하태구 hataegu0826@gmail.com

The size of struct nvme_supported_cap_config_list_log only contains the
header. Thus first read the header and then allocated the correctly
sized buffer to read the log page.

Reported-by: 하태구 <hataegu0826@gmail.com>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw
Copy link
Collaborator Author

igaw commented Mar 12, 2026

Not so happy with the amount of code in the inline function. Also it depends on malloc instead of nvme_malloc which is necessary for older kernels to work correctly. Though I really would like to avoid having all these function moved into the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant