Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24-git7 /kernel/kallsyms.c

Filename:/kernel/kallsyms.c
Lines Added:4
Lines Deleted:7
Also changed in: (Previous) 2.6.24-git6  2.6.24  2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5 
(Following) 2.6.24-git8  2.6.24-git9  2.6.24-git10  2.6.24-git11  2.6.24-git12  2.6.24-git13 

Location
[  2.6.24-git7
  [  kernel
     o  kallsyms.c

Patch

diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 2fc2581..7dadc71 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -233,10 +233,11 @@ static unsigned long get_symbol_pos(unsigned long addr,
 int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize,
             unsigned long *offset)
 {
+   char namebuf[KSYM_NAME_LEN];
    if (is_ksym_addr(addr))
       return !!get_symbol_pos(addr, symbolsize, offset);
 
-   return !!module_address_lookup(addr, symbolsize, offset, NULL);
+   return !!module_address_lookup(addr, symbolsize, offset, NULL, namebuf);
 }
 
 /*
@@ -251,8 +252,6 @@ const char *kallsyms_lookup(unsigned long addr,
              unsigned long *offset,
              char **modname, char *namebuf)
 {
-   const char *msym;
-
    namebuf[KSYM_NAME_LEN - 1] = 0;
    namebuf[0] = 0;
 
@@ -268,10 +267,8 @@ const char *kallsyms_lookup(unsigned long addr,
    }
 
    /* see if it's in a module */
-   msym = module_address_lookup(addr, symbolsize, offset, modname);
-   if (msym)
-      return strncpy(namebuf, msym, KSYM_NAME_LEN - 1);
-
+   return module_address_lookup(addr, symbolsize, offset, modname,
+                 namebuf);
    return NULL;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.