[folded-merged] mm-kvmalloc-align-kvrealloc-with-krealloc-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: mm: (k)vrealloc: document concurrency restrictions
has been removed from the -mm tree.  Its filename was
     mm-kvmalloc-align-kvrealloc-with-krealloc-fix.patch

This patch was dropped because it was folded into mm-kvmalloc-align-kvrealloc-with-krealloc.patch

------------------------------------------------------
From: Danilo Krummrich <dakr@xxxxxxxxxx>
Subject: mm: (k)vrealloc: document concurrency restrictions
Date: Thu, 25 Jul 2024 14:54:37 +0200

Document that concurrent calls to vrealloc() with itself or vfree() for
the same memory allocation are not permitted, since it leads to undefined
behavior.

Consequently, the same applies for kvrealloc(), hence also document it
for kvrealloc().

Link: https://lkml.kernel.org/r/20240725125442.4957-1-dakr@xxxxxxxxxx
Suggested-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Suggested-by: Uladzislau Rezki <urezki@xxxxxxxxx>
Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/util.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/mm/util.c~mm-kvmalloc-align-kvrealloc-with-krealloc-fix
+++ a/mm/util.c
@@ -732,6 +732,9 @@ EXPORT_SYMBOL(kvfree_sensitive);
  * If @p is %NULL, kvrealloc() behaves exactly like kvmalloc(). If @size is 0
  * and @p is not a %NULL pointer, the object pointed to is freed.
  *
+ * This function must not be called concurrently with itself or kvfree() for the
+ * same memory allocation.
+ *
  * Return: pointer to the allocated memory or %NULL in case of error
  */
 void *kvrealloc_noprof(const void *p, size_t size, gfp_t flags)
_

Patches currently in -mm which might be from dakr@xxxxxxxxxx are

mm-vmalloc-implement-vrealloc.patch
mm-kvmalloc-align-kvrealloc-with-krealloc.patch
mm-kvmalloc-align-kvrealloc-with-krealloc-fix-2.patch
mm-kvmalloc-align-kvrealloc-with-krealloc-fix-3.patch
mm-krealloc-consider-spare-memory-for-__gfp_zero.patch
mm-krealloc-clarify-valid-usage-of-__gfp_zero.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux