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-next>] [day] [month] [year] [list]
Message-Id: <20201228132901.41523-1-carver4lio@163.com>
Date:   Mon, 28 Dec 2020 21:29:01 +0800
From:   Hailong liu <carver4lio@....com>
To:     akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        liu.hailong6@....com.cn
Subject: [PATCH] mm/page_alloc:add a missing mm_page_alloc_zone_locked tracepoint

From: Hailong liu <liu.hailong6@....com.cn>

The trace point *trace_mm_page_alloc_zone_locked()* in __rmqueue() does not
currently cover all branches. Add the missing tracepoint and check the page
before do that.

Signed-off-by: Hailong liu <liu.hailong6@....com.cn>
---
 mm/page_alloc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7a2c89b21115..8cfa58bcf21a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2871,7 +2871,7 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype,
 	    zone_page_state(zone, NR_FREE_PAGES) / 2) {
 		page = __rmqueue_cma_fallback(zone, order);
 		if (page)
-			return page;
+			goto out;
 	}
 #endif
 retry:
@@ -2884,8 +2884,9 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype,
 								alloc_flags))
 			goto retry;
 	}
-
-	trace_mm_page_alloc_zone_locked(page, order, migratetype);
+out:
+	if (page)
+		trace_mm_page_alloc_zone_locked(page, order, migratetype);
 	return page;
 }
 
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ