lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Aug 2022 15:39:29 +0300
From:   Alexey Romanov <avromanov@...rdevices.ru>
To:     <minchan@...nel.org>, <senozhatsky@...omium.org>,
        <ngupta@...are.org>, <akpm@...ux-foundation.org>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <kernel@...rdevices.ru>, Alexey Romanov <avromanov@...rdevices.ru>
Subject: [PATCH v2 1/2] zsmalloc: zs_object_copy: add clarifying comment

Signed-off-by: Alexey Romanov <avromanov@...rdevices.ru>
---
 mm/zsmalloc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 5d5fc04385b8..df381ba891ea 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1564,6 +1564,12 @@ static void zs_object_copy(struct size_class *class, unsigned long dst,
 		d_off += size;
 		d_size -= size;
 
+		/* Calling kunmap_atomic(d_addr) is necessary. kunmap_atomic()
+ 		 * calls must occurs in reverse order of calls to kmap_atomic.
+		 * So, to call kunmap_atomic(s_addr) we should first call 
+		 * kunmap_atomic(d_addr). For more details see:
+		 * Documentation/mm/highmem
+		 */
 		if (s_off >= PAGE_SIZE) {
 			kunmap_atomic(d_addr);
 			kunmap_atomic(s_addr);
-- 
2.30.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ