You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
409 B
Diff
21 lines
409 B
Diff
13 years ago
|
--- a/kernel/module.c
|
||
|
+++ b/kernel/module.c
|
||
|
@@ -2286,12 +2286,15 @@
|
||
|
|
||
|
void * __weak module_alloc(unsigned long size)
|
||
|
{
|
||
|
- return size == 0 ? NULL : vmalloc_exec(size);
|
||
|
+ return vmalloc_exec(size);
|
||
|
}
|
||
|
|
||
|
static void *module_alloc_update_bounds(unsigned long size)
|
||
|
{
|
||
|
- void *ret = module_alloc(size);
|
||
|
+ void *ret = NULL;
|
||
|
+
|
||
|
+ if (size)
|
||
|
+ ret = module_alloc(size);
|
||
|
|
||
|
if (ret) {
|
||
|
mutex_lock(&module_mutex);
|