tree 339f0ac4c6d022ba048e109e51580c26ce4d252e
parent af97c7220a0376beed827e72e3bb27731af7109d
author Pekka Enberg <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:10:16 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 04:03:43 -0700

[PATCH] update kfree, vfree, and vunmap kerneldoc

This patch clarifies NULL handling of kfree() and vfree().  I addition,
wording of calling context restriction for vfree() and vunmap() are changed
from "may not" to "must not."

Signed-off-by: Pekka Enberg <[EMAIL PROTECTED]>
Acked-by: Manfred Spraul <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 mm/slab.c    |    2 ++
 mm/vmalloc.c |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2998,6 +2998,8 @@ EXPORT_SYMBOL(kzalloc);
  * kfree - free previously allocated memory
  * @objp: pointer returned by kmalloc.
  *
+ * If @objp is NULL, no operation is performed.
+ *
  * Don't free memory not originally allocated by kmalloc()
  * or you will run into trouble.
  */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -332,9 +332,10 @@ void __vunmap(void *addr, int deallocate
  *     @addr:          memory base address
  *
  *     Free the virtually contiguous memory area starting at @addr, as
- *     obtained from vmalloc(), vmalloc_32() or __vmalloc().
+ *     obtained from vmalloc(), vmalloc_32() or __vmalloc(). If @addr is
+ *     NULL, no operation is performed.
  *
- *     May not be called in interrupt context.
+ *     Must not be called in interrupt context.
  */
 void vfree(void *addr)
 {
@@ -352,7 +353,7 @@ EXPORT_SYMBOL(vfree);
  *     Free the virtually contiguous memory area starting at @addr,
  *     which was created from the page array passed to vmap().
  *
- *     May not be called in interrupt context.
+ *     Must not be called in interrupt context.
  */
 void vunmap(void *addr)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to