diff options
| -rw-r--r-- | drivers/pci/p2pdma.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index 509813d75467..bf5af4555f99 100644 --- a/drivers/pci/p2pdma.c +++ b/drivers/pci/p2pdma.c @@ -778,11 +778,13 @@ check_b_path_acs: } if (verbose) { - acs_list.buffer[acs_list.len-1] = 0; /* drop final semicolon */ + /* Drop the final semicolon; the list is not empty here */ + if (!seq_buf_has_overflowed(&acs_list)) + acs_list.buffer[acs_list.len - 1] = '\0'; pci_warn(client, "ACS redirect is set between the client and provider (%s)\n", pci_name(provider)); pci_warn(client, "to disable ACS redirect for this path, add the kernel parameter: pci=disable_acs_redir=%s\n", - acs_list.buffer); + seq_buf_str(&acs_list)); } acs_redirects = true; |
