|
Lines 304-317
Link Here
|
| 304 |
|
304 |
|
| 305 |
#endif /* !USE_BRL */ |
305 |
#endif /* !USE_BRL */ |
| 306 |
|
306 |
|
| 307 |
void * |
307 |
#ifdef CONFIG_PAX_KERNEXEC |
| 308 |
module_alloc (unsigned long size) |
308 |
void *module_alloc(unsigned long size) |
| 309 |
{ |
309 |
{ |
| 310 |
if (!size) |
310 |
if (size == 0) |
| 311 |
return NULL; |
311 |
return NULL; |
|
|
312 |
|
| 312 |
return vmalloc(size); |
313 |
return vmalloc(size); |
| 313 |
} |
314 |
} |
| 314 |
|
315 |
|
|
|
316 |
void *module_alloc_exec(unsigned long size) |
| 317 |
#else |
| 318 |
void *module_alloc(unsigned long size) |
| 319 |
#endif |
| 320 |
|
| 321 |
{ |
| 322 |
if (size == 0) |
| 323 |
return NULL; |
| 324 |
|
| 325 |
return vmalloc_exec(size); |
| 326 |
} |
| 327 |
|
| 315 |
void |
328 |
void |
| 316 |
module_free (struct module *mod, void *module_region) |
329 |
module_free (struct module *mod, void *module_region) |
| 317 |
{ |
330 |
{ |
|
Lines 322-327
Link Here
|
| 322 |
vfree(module_region); |
335 |
vfree(module_region); |
| 323 |
} |
336 |
} |
| 324 |
|
337 |
|
|
|
338 |
#ifdef CONFIG_PAX_KERNEXEC |
| 339 |
void module_free_exec(struct module *mod, void *module_region) |
| 340 |
{ |
| 341 |
module_free(mod, module_region); |
| 342 |
} |
| 343 |
#endif |
| 344 |
|
| 325 |
/* Have we already seen one of these relocations? */ |
345 |
/* Have we already seen one of these relocations? */ |
| 326 |
/* FIXME: we could look in other sections, too --RR */ |
346 |
/* FIXME: we could look in other sections, too --RR */ |
| 327 |
static int |
347 |
static int |