The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d4accf60d9bd257965620530d6893eb6889e0dd0

commit d4accf60d9bd257965620530d6893eb6889e0dd0
Author:     Warner Losh <i...@freebsd.org>
AuthorDate: 2022-09-23 21:02:53 +0000
Commit:     Warner Losh <i...@freebsd.org>
CommitDate: 2022-09-23 21:07:23 +0000

    arm64: don't loop forever if first option in kern.cfg.order not available
    
    strchr returns a pointer to the ',', so if the first option in the list
    isn't available, we need to step over the , to look at the next
    option. So if kern.cfg.order="acpi,fdt" and we have no acpi, we'd loop
    forever with order=',fdt'.
    
    Sponsored by:           Netflix
    Reviewed by:            andrew, jhb
    Differential Revision:  https://reviews.freebsd.org/D36682
---
 sys/arm64/arm64/machdep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 51932905ec82..46773c1911b4 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -646,6 +646,8 @@ bus_probe(void)
                                break;
                        }
                        order = strchr(order, ',');
+                       if (order != NULL)
+                               order++;        /* Skip comma */
                }
                freeenv(env);
 

Reply via email to