Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP2:Update
nvme-cli
0021-nvme-print-fix-nvme-list-segfault-if-contr...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-nvme-print-fix-nvme-list-segfault-if-controller-is-u.patch of Package nvme-cli
From: Martin George <marting@netapp.com> Date: Thu, 5 Aug 2021 18:01:24 +0530 Subject: nvme-print: fix 'nvme list' segfault if controller is unavailable References: bsc#1189046 Git-commit: 59e7477c5a18ec4bcb1f9b1e20d2303b4e0cafb1 Check if the controller is available before dereferencing the controller attributes. Signed-off-by: Martin George <marting@netapp.com> --- nvme-print.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/nvme-print.c +++ b/nvme-print.c @@ -4305,6 +4305,9 @@ static void nvme_show_list_item(struct n char usage[128]; char format[128]; + if (!n->ctrl) + return; + sprintf(usage,"%6.2f %2sB / %6.2f %2sB", nuse, u_suffix, nsze, s_suffix); sprintf(format,"%3.0f %2sB + %2d B", (double)lba, l_suffix, @@ -4356,6 +4359,9 @@ static void nvme_show_details_ns(struct char usage[128]; char format[128]; + if (!n->ctrl) + return; + sprintf(usage,"%6.2f %2sB / %6.2f %2sB", nuse, u_suffix, nsze, s_suffix); sprintf(format,"%3.0f %2sB + %2d B", (double)lba, l_suffix, @@ -4553,6 +4559,9 @@ static void json_simple_ns(struct nvme_n long long lba; char *devnode; + if (!n->ctrl) + return; + if (asprintf(&devnode, "/dev/%s", n->name) < 0) return;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor