Thread (12 messages) 12 messages, 4 authors, 2018-11-29

[PATCH 1/2] mm/zsmalloc.c: check encoded object value overflow for PAE

From: Sergey Senozhatsky <hidden>
Date: 2018-10-25 05:29:09
Also in: linux-mm, lkml

On (10/24/18 22:27), Rafael David Tinoco wrote:
 static unsigned long location_to_obj(struct page *page, unsigned int obj_idx)
 {
-	unsigned long obj;
+	unsigned long obj, pfn;
+
+	pfn = page_to_pfn(page);
+
+	if (unlikely(OBJ_OVERFLOW(pfn)))
+		BUG();
The trend these days is to have less BUG/BUG_ON-s in the kernel.

	-ss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help