[folded-merged] vfree-kvfree-add-debug-might-sleeps-fix.patch removed from -mm tree

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

 



The patch titled
     Subject: vfree-kvfree-add-debug-might-sleeps-fix
has been removed from the -mm tree.  Its filename was
     vfree-kvfree-add-debug-might-sleeps-fix.patch

This patch was dropped because it was folded into vfree-kvfree-add-debug-might-sleeps.patch

------------------------------------------------------
From: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Subject: vfree-kvfree-add-debug-might-sleeps-fix

Seems like we need to drop might_sleep_if() from kvfree().

	rcu_read_lock()
		rhashtable_insert_rehash()
			new_tbl = bucket_table_alloc(ht, size, GFP_ATOMIC | __GFP_NOWARN);
				->kvmalloc();

		bucket_table_free(new_tbl);
			->kvfree()
	rcu_read_unlock()

kvmalloc(..., GFP_ATOMIC) simply always kmalloc:
	if ((flags & GFP_KERNEL) != GFP_KERNEL)
		return kmalloc_node(size, flags, node);

So in the above case, kvfree() always frees kmalloced memory -> and never calls vfree().

Link: http://lkml.kernel.org/r/7e19e4df-b1a6-29bd-9ae7-0266d50bef1d@xxxxxxxxxxxxx
Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/mm/util.c~vfree-kvfree-add-debug-might-sleeps-fix
+++ a/mm/util.c
@@ -446,8 +446,6 @@ EXPORT_SYMBOL(kvmalloc_node);
  */
 void kvfree(const void *addr)
 {
-	might_sleep_if(!in_interrupt());
-
 	if (is_vmalloc_addr(addr))
 		vfree(addr);
 	else
_

Patches currently in -mm which might be from aryabinin@xxxxxxxxxxxxx are

linkageh-align-weak-symbols.patch
arm64-lib-use-c-string-functions-with-kasan-enabled.patch
lib-test_kasan-add-tests-for-several-string-memory-api-functions.patch
kvfree-fix-misleading-comment.patch
mm-vmalloc-improve-vfree-kerneldoc.patch
vfree-kvfree-add-debug-might-sleeps.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