diff options
| -rw-r--r-- | mm/slab.c | 2 | ||||
| -rw-r--r-- | mm/vmalloc.c | 7 |
2 files changed, 6 insertions, 3 deletions
| @@ -2998,6 +2998,8 @@ EXPORT_SYMBOL(kzalloc); | |||
| 2998 | * kfree - free previously allocated memory | 2998 | * kfree - free previously allocated memory |
| 2999 | * @objp: pointer returned by kmalloc. | 2999 | * @objp: pointer returned by kmalloc. |
| 3000 | * | 3000 | * |
| 3001 | * If @objp is NULL, no operation is performed. | ||
| 3002 | * | ||
| 3001 | * Don't free memory not originally allocated by kmalloc() | 3003 | * Don't free memory not originally allocated by kmalloc() |
| 3002 | * or you will run into trouble. | 3004 | * or you will run into trouble. |
| 3003 | */ | 3005 | */ |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 67b358e57ef6..13c3d82968ae 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
| @@ -332,9 +332,10 @@ void __vunmap(void *addr, int deallocate_pages) | |||
| 332 | * @addr: memory base address | 332 | * @addr: memory base address |
| 333 | * | 333 | * |
| 334 | * Free the virtually contiguous memory area starting at @addr, as | 334 | * Free the virtually contiguous memory area starting at @addr, as |
| 335 | * obtained from vmalloc(), vmalloc_32() or __vmalloc(). | 335 | * obtained from vmalloc(), vmalloc_32() or __vmalloc(). If @addr is |
| 336 | * NULL, no operation is performed. | ||
| 336 | * | 337 | * |
| 337 | * May not be called in interrupt context. | 338 | * Must not be called in interrupt context. |
| 338 | */ | 339 | */ |
| 339 | void vfree(void *addr) | 340 | void vfree(void *addr) |
| 340 | { | 341 | { |
| @@ -352,7 +353,7 @@ EXPORT_SYMBOL(vfree); | |||
| 352 | * Free the virtually contiguous memory area starting at @addr, | 353 | * Free the virtually contiguous memory area starting at @addr, |
| 353 | * which was created from the page array passed to vmap(). | 354 | * which was created from the page array passed to vmap(). |
| 354 | * | 355 | * |
| 355 | * May not be called in interrupt context. | 356 | * Must not be called in interrupt context. |
| 356 | */ | 357 | */ |
| 357 | void vunmap(void *addr) | 358 | void vunmap(void *addr) |
| 358 | { | 359 | { |
