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

Jan Beulich posted 1 patch 5 days, 18 hours ago
Failed in applying to current master (apply log)
[PATCH] symbols: fix xensyms_read() hitting the final "end" symbol
Posted by Jan Beulich 5 days, 18 hours ago
A new "no (more) symbol" path there was lacking a necessary unlock.

Fixes: d3b637fba31b ("symbols: arrange to know where functions end")
Coverity ID: 1665212
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/common/symbols.c
+++ b/xen/common/symbols.c
@@ -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);
Re: [PATCH] symbols: fix xensyms_read() hitting the final "end" symbol
Posted by Andrew Cooper 5 days, 17 hours ago
On 08/09/2025 10:22 am, Jan Beulich wrote:
> A new "no (more) symbol" path there was lacking a necessary unlock.
>
> Fixes: d3b637fba31b ("symbols: arrange to know where functions end")
> Coverity ID: 1665212
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Re: [PATCH] symbols: fix xensyms_read() hitting the final "end" symbol
Posted by Mykola Kvach 5 days, 17 hours ago
Hi Jan,

On Mon, Sep 8, 2025 at 12:22 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> A new "no (more) symbol" path there was lacking a necessary unlock.
>
> Fixes: d3b637fba31b ("symbols: arrange to know where functions end")
> Coverity ID: 1665212
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/common/symbols.c
> +++ b/xen/common/symbols.c
> @@ -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: Mykola Kvach <mykola_kvach@epam.com>

Best regards,
Mykola