The branch stable/14 has been updated by des:

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

commit fe2d226d8febd7705370ca9933c600dfe1b1e448
Author:     Dag-Erling Smørgrav <[email protected]>
AuthorDate: 2025-12-05 14:57:37 +0000
Commit:     Dag-Erling Smørgrav <[email protected]>
CommitDate: 2025-12-12 18:52:50 +0000

    bus: Return 0 if reading an ivar fails
    
    In the non-INVARIANTS case, return 0 rather than stack garbage if
    reading an ivar fails (in the INVARIANTS case, we still panic).
    
    MFC after:      1 week
    Sponsored by:   Klara, Inc.
    Sponsored by:   NetApp, Inc.
    Reviewed by:    jhb
    Differential Revision:  https://reviews.freebsd.org/D54078
    
    (cherry picked from commit 4c2295c15860e70c8bd3f05f9229d2fc40dfd50d)
---
 sys/sys/bus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index 90db267d4bb2..a2189e068293 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -904,7 +904,7 @@ DECLARE_MODULE(name##_##busname, name##_##busname##_mod,    
        \
                                                                        \
 static __inline type varp ## _get_ ## var(device_t dev)                        
\
 {                                                                      \
-       uintptr_t v;                                                    \
+       uintptr_t v = 0;                                                \
        int e __diagused;                                               \
        e = BUS_READ_IVAR(device_get_parent(dev), dev,                  \
            ivarp ## _IVAR_ ## ivar, &v);                               \

Reply via email to