Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157151
b: refs/heads/master
c: 7d1d16e
h: refs/heads/master
i:
  157149: dbee696
  157147: badd2cf
  157143: aa3f4c3
  157135: c895775
  157119: 3833902
v: v3
  • Loading branch information
Rusty Russell authored and Linus Torvalds committed Aug 27, 2009
1 parent f676358 commit b56b856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a80fb10239b04c45e5e80aad8d4b2ca5ac407b2
refs/heads/master: 7d1d16e416e61aeef8655d542f8e4a4fc6e808e4
6 changes: 4 additions & 2 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,16 +909,18 @@ void __symbol_put(const char *symbol)
}
EXPORT_SYMBOL(__symbol_put);

/* Note this assumes addr is a function, which it currently always is. */
void symbol_put_addr(void *addr)
{
struct module *modaddr;
unsigned long a = (unsigned long)dereference_function_descriptor(addr);

if (core_kernel_text((unsigned long)addr))
if (core_kernel_text(a))
return;

/* module_text_address is safe here: we're supposed to have reference
* to module from symbol_get, so it can't go away. */
modaddr = __module_text_address((unsigned long)addr);
modaddr = __module_text_address(a);
BUG_ON(!modaddr);
module_put(modaddr);
}
Expand Down

0 comments on commit b56b856

Please sign in to comment.