Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASfpga
VILLASfpga
Commits
3ee7e073
Commit
3ee7e073
authored
May 15, 2018
by
Daniel Krebs
Browse files
kernel/pci: fix unitialized memory
parent
1e72e806
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/kernel/pci.c
View file @
3ee7e073
...
...
@@ -325,6 +325,7 @@ int pci_get_driver(const struct pci_device *d, char *buf, size_t buflen)
{
int
ret
;
char
sysfs
[
1024
],
syml
[
1024
];
memset
(
syml
,
0
,
sizeof
(
syml
));
snprintf
(
sysfs
,
sizeof
(
sysfs
),
"%s/bus/pci/devices/%04x:%02x:%02x.%x/driver"
,
SYSFS_PATH
,
d
->
slot
.
domain
,
d
->
slot
.
bus
,
d
->
slot
.
device
,
d
->
slot
.
function
);
...
...
@@ -372,6 +373,7 @@ int pci_get_iommu_group(const struct pci_device *d)
{
int
ret
;
char
*
group
,
link
[
1024
],
sysfs
[
1024
];
memset
(
link
,
0
,
sizeof
(
link
));
snprintf
(
sysfs
,
sizeof
(
sysfs
),
"%s/bus/pci/devices/%04x:%02x:%02x.%x/iommu_group"
,
SYSFS_PATH
,
d
->
slot
.
domain
,
d
->
slot
.
bus
,
d
->
slot
.
device
,
d
->
slot
.
function
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment