The patch titled

     update kfree, vfree, and vunmap kerneldoc

has been added to the -mm tree.  Its filename is

     update-kfree-vfree-and-vunmap-kerneldoc.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

introduce-and-use-kzalloc.patch
introduce-and-use-kzalloc-make-kcalloc-a-static-inline.patch
ia64-convert-kcalloc-to-kzalloc.patch
ppc64-convert-kcalloc-to-kzalloc.patch
input-convert-kcalloc-to-kzalloc.patch
usb-convert-kcalloc-to-kzalloc.patch
pci-convert-kcalloc-to-kzalloc.patch
drivers-convert-kcalloc-to-kzalloc.patch
fs-convert-kcalloc-to-kzalloc.patch
alsa-convert-kcalloc-to-kzalloc.patch
update-kfree-vfree-and-vunmap-kerneldoc.patch
add-kerneldoc-reference-to-codingstyle.patch
update-fsf-address-in-copying.patch



From: Pekka Enberg <[EMAIL PROTECTED]>

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]>
---

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

diff -puN mm/slab.c~update-kfree-vfree-and-vunmap-kerneldoc mm/slab.c
--- devel/mm/slab.c~update-kfree-vfree-and-vunmap-kerneldoc     2005-08-21 
22:19:00.000000000 -0700
+++ devel-akpm/mm/slab.c        2005-08-21 22:19:00.000000000 -0700
@@ -2578,6 +2578,8 @@ EXPORT_SYMBOL(kcalloc);
  * 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 -puN mm/vmalloc.c~update-kfree-vfree-and-vunmap-kerneldoc mm/vmalloc.c
--- devel/mm/vmalloc.c~update-kfree-vfree-and-vunmap-kerneldoc  2005-08-21 
22:19:00.000000000 -0700
+++ devel-akpm/mm/vmalloc.c     2005-08-21 22:19:00.000000000 -0700
@@ -334,9 +334,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)
 {
@@ -354,7 +355,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 mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to