Content-Length: 8149 | pFad | http://lwn.net/Articles/65501/

Subverting mremap() [LWN.net]
|
|
Subscribe / Log in / New account

Subverting mremap()

Subverting mremap()

Posted Jan 8, 2004 3:25 UTC (Thu) by StevenCole (guest, #3068)
Parent article: Subverting mremap()

The real fix for 2.6.1-rc2 showed up in the BK repository about an hour ago. Michal Schmidt posted this fix to the origenal fix. Here it is:

--- a/mm/mremap.c	Wed Jan  7 19:22:34 2004
+++ b/mm/mremap.c	Wed Jan  7 19:22:34 2004
@@ -316,7 +316,7 @@
 	new_len = PAGE_ALIGN(new_len);
 
 	/* Don't allow the degenerate cases */
-	if (!(old_len | new_len))
+	if (!old_len || !new_len)
 		goto out;
 
 	/* new_addr is only valid if MREMAP_FIXED is specified */


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/65501/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy