Skip to contentSkip to conversation

symbols: fix xensyms_read() hitting the final "end" symbol

PATCH In review Jan Beulich 3 participants 3 messages Sep 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 symbols: fix xensyms_read() hitting the final "end" symbol

A new "no (more) symbol" path there was lacking a necessary unlock.

Fixes d3b637fba31b ("symbols: arrange to know where functions end")

Coverity ID: 1665212

xen/common/symbols.c +3 -0
@@ -202,7 +202,10 @@ int xensyms_read(uint32_t *symnum, char
     {
         ++next_offset;
         if ( ++*symnum == symbols_num_addrs )
+        {
+            spin_unlock(&symbols_mutex);
             goto no_symbol;
+        }
     }
 
     *type = symbols_get_symbol_type(next_offset);
Reviewed-by on v1 1/1
#1 lore raw

Hi Jan,

Quoted 11 lines · Jan Beulich

A new "no (more) symbol" path there was lacking a necessary unlock.

Fixes d3b637fba31b ("symbols: arrange to know where functions end")

Coverity ID: 1665212

xen/common/symbols.c int xensyms_read(uint32_t *symnum, char · line 211

Quoted 10 lines
xen/common/symbols.c +3 -0
@@ -202,7 +202,10 @@ int xensyms_read(uint32_t *symnum, char
     {
         ++next_offset;
         if ( ++*symnum == symbols_num_addrs )
+        {
+            spin_unlock(&symbols_mutex);
             goto no_symbol;
+        }
     }
 
     *type = symbols_get_symbol_type(next_offset);

Best regards,
Mykola